Skip to content

Repository files navigation

xonovo-wallet

Flutter skeleton for NOVOVM DApp wallet (Android / iOS), integrated with local SDK root: D:\WEB3_AI\novovm-wallet-sdk.

Project Goals

  • Build a mobile wallet shell for NOVOVM + EVM plugin domain.
  • Use novovm-wallet-sdk as the only SDK entry.
  • Keep architecture ready for real signer / transfer / DApp auth flows.

Quick Start

  1. Install Flutter 3.35+ and confirm:
flutter --version

If flutter is not in PATH on Windows, use:

D:\Flutter\flutter\bin\flutter.bat --version
  1. Run dependencies:
flutter pub get

pubspec.yaml already points to local SDK package:

novovm_wallet_sdk:
  path: ../novovm-wallet-sdk/packages/novovm_wallet_sdk
  1. Run app:
flutter run

Windows fallback:

D:\Flutter\flutter\bin\flutter.bat run

Windows 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
  1. Optional: set default RPC endpoint:
flutter run --dart-define NOVOVM_RPC_ENDPOINT=http://127.0.0.1:9899
  1. Optional: select DApp callback connector mode:
flutter run --dart-define NOVOVM_DAPP_CALLBACK_CONNECTOR=method_channel

Supported values:

  • memory (default): local debug connector
  • method_channel / native: route callback outbox delivery to app native channel Behavior:
  • method_channel / native mode auto-dispatches callback outbox on startup and after authorization
  • memory mode keeps manual dispatch for local debugging

Current Scaffold

  • Bottom navigation: Wallet / DApp / Settings
  • SDK package: novovm_wallet_sdk (local path dependency)
  • SDK bridge: JSON-RPC (when endpoint configured) + plugin MethodChannel fallback
  • Plugin native methods:
    • healthCheck, getSurfaceMap, submitTransfer
    • aoemSignDigest, 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)
  • 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, approve send_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/capabilities returns supported methods, error codes, bridge version and session permissions
  • DApp bridge events: on/off subscription with walletReady/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 logs smoke.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.onAuthorizationResolved emits structured auth result to upper layer
  • DApp auto-approve guard: remembered allow for send_transaction is capped at amount <= 1.0, over-limit requires manual confirmation
  • DApp callback bridge: in-memory DappCallbackBridge emits authorization_resolved events and keeps recent callback logs
  • DApp callback outbox: LocalDappCallbackOutboxVault persists pending callback events for connector delivery/ack
  • DApp callback connector adapter: DappCallbackConnector + DappCallbackOutboxDispatcher supports 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

Directory Layout

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)

Docs

About

xonovo-wallet

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages