Skip to main content
Function Signature
Parameters
  • method: The backup method to use. Supported methods:
    • .GoogleDrive: Back up to Google Drive
    • .iCloud: Back up to iCloud
    • .Password: Back up with password protection
    • .Passkey: Back up with passkey authentication
    • .Firebase: Back up with Firebase Auth Backup
    • .local: Back up to local storage
  • usingProgressCallback: Optional callback to track backup progress. Receives an MpcStatus object containing:
    • status: Current operation being performed:
      • .readingShare: Reading the stored share
      • .generatingShare: Generate the share
      • .parsingShare: Parsing the share data
      • .encryptingShare: Encrypt the share data
      • .storingShare: Saving the recovered share
      • .done: Process completed
    • done: Boolean indicating whether the operation is complete
Returns A tuple containing:
  • cipherText: The encrypted backup data
  • storageCallback: A callback function that must be called to complete the backup process
Throws Various backup method-specific errors if the backup process fails Example Usage