Skip to main content

Keys and UX patterns

Mobile wallets handle real money. Follow these patterns on Flutter and React Native.

Key storage​

PlatformUseAvoid
iOSKeychain via secure storage pluginUserDefaults, plain files
AndroidKeystore / EncryptedSharedPreferencesSharedPreferences for mnemonics
RNexpo-secure-store or react-native-keychainAsyncStorage for secrets
FlutterKeychain via flutter_secure_storage (mnemonic for CosmJS bridge only)SharedPreferences for secrets

Never log mnemonics or private keys. Use biometrics to gate signing screens.

Confirm-before-sign UX​

  1. Show recipient (SafHandle @name + resolved truncated addr_safro...)
  2. Show amount in SAF and usaf
  3. Show fee estimate from simulate (see Simulate gas)
  4. Require explicit confirm (button + optional biometric)

Address display​

  • Default: addr_safro1abc...xyz (first 10 + last 6 chars)
  • With SafHandle: display @john prominently; show resolved address on confirm screen

Register app links for pay intents:

safro://pay/@alice?amount=1000000&denom=usaf&memo=coffee
https://pay.safrochain.com/@alice

See SafHandle resolve before building MsgSend.