Flutter skeleton for NOVOVM DApp wallet (Android / iOS), integrated with local SDK root:
D:\WEB3_AI\novovm-wallet-sdk.
- Build a mobile wallet shell for NOVOVM + EVM plugin domain.
- Use
novovm-wallet-sdkas the only SDK entry. - Keep architecture ready for real signer / transfer / DApp auth flows.
- Install Flutter 3.35+ and confirm:
flutter --versionIf flutter is not in PATH on Windows, use:
D:\Flutter\flutter\bin\flutter.bat --version- Run dependencies:
flutter pub getpubspec.yaml already points to local SDK package:
novovm_wallet_sdk:
path: ../novovm-wallet-sdk/packages/novovm_wallet_sdk- Run app:
flutter runWindows fallback:
D:\Flutter\flutter\bin\flutter.bat runWindows D 盘缓存包装(避免 C 盘占满):
.\scripts\flutter_d_build.ps1 -Command "analyze"
.\scripts\flutter_d_build.ps1 -Command "test"
.\scripts\flutter_d_build.ps1 -Command "build apk --debug"说明:test 默认会自动附加 --concurrency=1,降低 Windows 内存峰值导致的 OOM 风险。
可选:设置 XONOVO_CACHE_ROOT 自定义缓存根目录。
若遇到 Gradle daemon 崩溃,可临时设置 XONOVO_GRADLE_NO_DAEMON=1 关闭 daemon 重试。
4. Optional: override SDK root path:
flutter run --dart-define NOVOVM_SDK_ROOT=D:\WEB3_AI\novovm-wallet-sdk- Optional: set default RPC endpoint:
flutter run --dart-define NOVOVM_RPC_ENDPOINT=http://127.0.0.1:9899- Optional: select DApp callback connector mode:
flutter run --dart-define NOVOVM_DAPP_CALLBACK_CONNECTOR=method_channelSupported values:
memory(default): local debug connectormethod_channel/native: route callback outbox delivery to app native channel Behavior:method_channel/nativemode auto-dispatches callback outbox on startup and after authorizationmemorymode keeps manual dispatch for local debugging
- Bottom navigation: Wallet / DApp / Settings
- SDK package:
novovm_wallet_sdk(local path dependency) - SDK bridge: JSON-RPC (when endpoint configured) + plugin
MethodChannelfallback - Plugin native methods:
healthCheck,getSurfaceMap,submitTransferaoemSignDigest,aoemVerifyDigest(dev-compatible deterministic sign/verify)
- Wallet dashboard: SDK health, RPC queries, transfer flow (build/sign/submit/status)
- Account MVP: create mnemonic account, import mnemonic/private key, auto-bind active address to transfer
From- derivation baseline:
BIP39 + BIP32 (m/44'/60'/0'/0/0)
- derivation baseline:
- Settings: shows account-signer binding status and supports manual rebind
- Transfer flow: auto-checks account-signer consistency and offers one-click rebind before signing
- Local signer vault: secure storage for signer secret (generate/save/clear in settings)
- Default signing strategy: AOEM-first (
MethodChannelAoemBridge) with local fallback - Startup AOEM bridge chain:
FfiAoemLiteBridge (if loaded) -> MethodChannelAoemBridge - DApp auth execution: approve
sign_message=> real signer output, approvesend_transaction=>walletTransferWithSigner - DApp WebView bridge (MVP): open connected session in wallet WebView, inject
window.xonovoWallet(connect/signMessage/sendTransaction) and route requests to existing authorization pipeline - DApp capability handshake:
getCapabilities/capabilitiesreturns supported methods, error codes, bridge version and session permissions - DApp bridge events:
on/offsubscription withwalletReady/accountChanged/chainChanged/capabilitiesChanged/walletError - DApp runtime state sync: wallet snapshots account/capabilities while WebView is active (periodic polling + app resume refresh) and emits change events automatically
- DApp WebView same-origin navigation guard: whitelisted cross-origin redirects require user confirmation; non-whitelisted/unsupported-scheme redirects are blocked
- DApp Hub navigation whitelist editor: configure/persist allowed cross-origin hosts (URL paste supported)
- Session remember for whitelisted redirect confirmations: optionally skip repeated prompts in the same WebView session
- TTL remember for whitelisted redirect confirmations: optional 10-minute persisted memory across WebView pages (auto-expire)
- Manual reset for cross-origin remembered confirmations: one-tap clear in DApp Hub to force re-confirmation
- Remembered confirmation list: DApp Hub displays remembered host/origin entries with per-item deletion
- Remembered confirmation list auto-refreshes every 5 seconds in foreground (paused in background) and removes expired entries
- Remembered confirmations are grouped by origin with one-tap clear per origin
- Built-in Bridge Demo page in DApp Hub: one-tap local demo to verify bridge methods and wallet events
- Built-in auto-smoke entry: runs quick bridge smoke (
getCapabilities + connect) and logssmoke.summary - DApp WebView bridge errors are normalized as
error.code/message/data(e.g.USER_REJECTED,INVALID_PARAMS,EXECUTION_FAILED) - Wallet WebView applies code-based error UI strategy (silent vs notify) to reduce noisy prompts on user rejection
- DApp auth callback:
DappHubPage.onAuthorizationResolvedemits structured auth result to upper layer - DApp auto-approve guard: remembered allow for
send_transactionis capped at amount<= 1.0, over-limit requires manual confirmation - DApp callback bridge: in-memory
DappCallbackBridgeemitsauthorization_resolvedevents and keeps recent callback logs - DApp callback outbox:
LocalDappCallbackOutboxVaultpersists pending callback events for connector delivery/ack - DApp callback connector adapter:
DappCallbackConnector+DappCallbackOutboxDispatchersupports manual outbox delivery from DApp Hub - Callback failure handling: outbox tracks retry count and marks dead-letter events after retry threshold
- MethodChannel callback connector:
MethodChannelDappCallbackConnector(com.xonovo.wallet/dapp_callback) and app native stub handler on Android/iOS - Sensitive action unlock gate (MVP): local PIN protection with optional biometric-first unlock (fallback to PIN) for transfer signing and DApp authorization execution; consecutive PIN failures trigger temporary lockout with configurable threshold/duration
- App identifiers:
- Android
applicationId:com.xonovo.wallet - iOS
PRODUCT_BUNDLE_IDENTIFIER:com.xonovo.wallet
- Android
lib/
app/
core/
theme/
features/
dapp/
home/
settings/
dependencies:
novovm_wallet_sdk -> ../novovm-wallet-sdk/packages/novovm_wallet_sdk
android/ ios/ (App shell; SDK bridge is in plugin package)
docs/ (design/features/architecture/development plan)