Skip to main content

Overview

A wallet is a secp256k1 keypair generated inside the device’s secure hardware. The SDK stores the encrypted private key on-device and returns the EIP-55 checksummed address — the only piece of data you need to share with your backend.
The native BMONISigner layer only returns the address at the moment of provisioning. The Dart facade caches it in flutter_secure_storage automatically, so you can read it back at any time.

Check whether a wallet exists


Provision a new wallet

initWallet throws walletAlreadyExists if the native layer already holds an encrypted key. You must delete it first before provisioning again.

Read the cached address

The typical startup pattern:

Delete a wallet

deleteWallet removes the encrypted private key from device storage. It is idempotent at the native layer.
When requirePin is false, omit the pin argument:
Deletion is permanent and irreversible from this device. The on-chain address is unrecoverable once the key is deleted.

Re-provisioning (recovery flow)

If initWallet throws walletAlreadyExists but walletAddress() returns null, the native wallet exists but the Dart-side address cache is missing (e.g., the app was reinstalled). The only recovery path is to delete the existing wallet and provision a new one:
Always show a confirmation dialog before executing this flow — the old address is gone after deletion.