Skip to main content

Password protection

Custom UI flow

If you are building a custom UI implementation, you must check the wallet recovery state and unlock the wallet programmatically before performing any wallet operations. If you skip this step, Dynamic’s default password modal will appear, which defeats the purpose of a custom UI integration.
The required flow for custom UI implementations is:
  1. Check wallet state — Call GetWalletRecoveryState to determine if the wallet is password-encrypted and currently locked.
  2. Unlock if needed — If the wallet is password-encrypted, collect the password in your own UI and call UnlockWallet.
  3. Proceed with operations — Only after the wallet is unlocked should you perform signing, transactions, or other wallet operations.

Check wallet recovery state

Set password on a wallet

Set a password on a wallet that doesn’t have one:

Unlock a password-protected wallet

Update password

Complete example

Next steps

Last modified on April 1, 2026