Interface CreateSecretStorageOpts

interface CreateSecretStorageOpts {
    createSecretStorageKey?: (() => Promise<GeneratedSecretStorageKey>);
    getKeyBackupPassphrase?: (() => Promise<Uint8Array>);
    keyBackupInfo?: KeyBackupInfo;
    setupNewKeyBackup?: boolean;
    setupNewSecretStorage?: boolean;
}

Properties

createSecretStorageKey?: (() => Promise<GeneratedSecretStorageKey>)

Function called to await a secret storage key creation flow.

Type declaration

getKeyBackupPassphrase?: (() => Promise<Uint8Array>)

Function called to get the user's current key backup passphrase.

Should return a promise that resolves with a Uint8Array containing the key, or rejects if the key cannot be obtained.

Only used when the client has existing key backup, but no secret storage.

Not used by the Rust crypto stack.

keyBackupInfo?: KeyBackupInfo

The current key backup object. If passed, the passphrase and recovery key from this backup will be used.

setupNewKeyBackup?: boolean

If true, a new key backup version will be created and the private key stored in the new SSSS store. Ignored if keyBackupInfo is supplied.

setupNewSecretStorage?: boolean

Reset even if keys already exist.