Interface Definition

interface KeyShareBackupInfo {
  passwordEncrypted: boolean;
  backups: Record<BackupLocation, BackupLocationWithExternalKeyShareId[]>;
}

Properties

Required Properties

  • passwordEncrypted (boolean) - Whether the key shares are encrypted with a password
  • backups (Record<BackupLocation, BackupLocationWithExternalKeyShareId[]>) - Backup information organized by location

Backup Locations

The backups property contains backup information for different storage locations:
  • dynamic - Backed up to Dynamic’s secure storage
  • googleDrive - Backed up to Google Drive (if enabled)
  • iCloud - Backed up to iCloud (if enabled)
  • user - User-provided backup location
  • external - External backup location

Example

import { KeyShareBackupInfo, BackupLocation } from '@dynamic-labs-wallet/node';

const backupInfo: KeyShareBackupInfo = {
  passwordEncrypted: true,
  backups: {
    [BackupLocation.DYNAMIC]: [
      {
        location: BackupLocation.DYNAMIC,
        keyShareId: 'key-share-123',
        externalKeyShareId: 'ext-key-share-456'
      }
    ],
    [BackupLocation.GOOGLE_DRIVE]: [],
    [BackupLocation.ICLOUD]: [],
    [BackupLocation.USER]: [],
    [BackupLocation.EXTERNAL]: []
  }
};

Usage

This interface is used to track where key shares are backed up and whether they’re password-protected. It’s returned by various wallet operations:
  • getWalletExternalServerKeyShareBackupInfo() - Returns backup information for a specific wallet
  • WalletProperties.externalServerKeySharesBackupInfo - Backup info stored with wallet properties
  • Wallet.serverKeySharesBackupInfo - Backup info returned with wallet objects