Skip to main content

Usage

Parameters

The mutation accepts an object with:

Return Value

MigrateWalletToPasskeyResult

How It Works

  1. A new passkey is created in the browser/device (triggers biometric prompt)
  2. The wallet’s private key is decrypted using oldEncryptKey (the PIN)
  3. The private key is re-encrypted using the passkey-derived key
  4. The updated wallet is returned — persist the new wallet object and credentialId
After migration, the old PIN (oldEncryptKey) will no longer work. Store the updated wallet object and credentialId securely.

Example Implementation

  • Use Passkeys Guide — Full passkey setup walkthrough
  • useCreateWallet — Create a wallet with passkey from the start (set usePasskey: true)