Prerequisites
- Flutter
>=3.3.0/ Dart>=3.11 - Android
minSdk 24+or iOS13.0+
1
Add the packages
Add all three packages to Then fetch them:
pubspec.yaml:2
Apply the BMONI theme
Wrap your app root with
BMoniTheme.darkTheme() (or lightTheme()) so every widget in the tree picks up the correct colours and typography automatically.3
Initialise the SDK
Call
BmoniEmbeddedSdk.initialize once — before runApp is the recommended place. The defaults are pinLength: 6 and requirePin: true.4
Provision a wallet
On first launch, call
initWallet() to generate a secp256k1 keypair inside the device’s secure hardware. The returned EIP-55 address is automatically cached in flutter_secure_storage.5
Set a PIN
The PIN gates future signing operations. It is stored only as a PBKDF2-HMAC-SHA256 digest — the raw value never touches disk.
6
Sign a message
Use Or
signMessage for EIP-191 personal-sign flows (SIWE, login challenges):signTransactionHash for a pre-computed 32-byte digest (ERC-4337 userOpHash, EIP-712, raw tx hash):7
Handle errors
Wrap SDK calls in a See the full error reference for all codes.
try/catch and branch on BmoniSignerErrorCode:8
Render a wallet card (optional)
If you also have See the full wallets & cards guide for the complete wiring.
bmoni_embedded_wallets_cards, wire a notifier and drop in the card widget:Next steps
SDK configuration
Customise PIN length and the
requirePin gate.PIN management
Change, verify, and remove PINs.
Design tokens
Use BMONI colours and typography in your own widgets.
Wallet card widgets
Full API for
EmbeddedWalletCard and the transactions section.
