Skip to main content

AgentBackup

@hyperledger/identus-sdk v7.0.0


@hyperledger/identus-sdk / overview / AgentBackup

Class: AgentBackup

Defined in: src/edge-agent/Agent.Backup.ts:24

Constructors

Constructor

new AgentBackup(Agent: BackupAgent): AgentBackup

Defined in: src/edge-agent/Agent.Backup.ts:27

Parameters

ParameterType
AgentBackupAgent

Returns

AgentBackup

Properties

PropertyModifierTypeDefined in
AgentreadonlyBackupAgentsrc/edge-agent/Agent.Backup.ts:28

Methods

createJWE()

createJWE(options?: BackupOptions): Promise<string>

Defined in: src/edge-agent/Agent.Backup.ts:47

Creates a JWE (JSON Web Encryption) containing the backup data stored in Pluto. The data can optionally be encrypted using a custom master key, compressed, and filtered to exclude specified fields.

Parameters

ParameterTypeDescription
options?BackupOptionsOptional settings for the backup.

Returns

Promise<string>

  • A promise that resolves to the JWE string.

See

restore - Method to restore data from a JWE string.


restore()

restore(jwe: string, options?: BackupOptions): Promise<void>

Defined in: src/edge-agent/Agent.Backup.ts:81

Decodes a JWE (JSON Web Encryption) string and restores the backup data to the store. If the JWE is compressed (Base64-encoded), it will attempt to decompress it first.

Parameters

ParameterTypeDescription
jwestringThe JWE string containing the encrypted backup data.
options?BackupOptionsOptional settings for the backup.

Returns

Promise<void>

  • A promise that resolves when the data is successfully restored.

See

createJWE - Method to create a JWE from the stored backup data.