This is a fork of Octra WebCLI with passkey (WebAuthn) support and multi-account wallet management. This is only tested with latest Chrome 145.0.7632.160 (64-bit). Full structure of the fork is described in STRUCTURE.md.
- Added passkey support via user.id being used as a seed (yes, the private key is sitting in the tab's memory, it is a temporary problem that needs to be addressed at protocol level to accept native webAuthn rich signatures).
- Added the management of multiple accounts (both imported via private keys and passkeys) so you can test transactions between accounts
- Optimized logout to be instant. The rpc was being called every 15 seconds or tab switching for the balance checks, and the user had to wait untill its finished. Plus leveldb had to finish the compaction in the same thread so the user had to wait for it too untill he gets the response from backend.
- Account manifest (
data/accounts.json): every imported/created account is recorded (addr, type, file) and upserted on every unlock/import/create. Each account gets its own wallet file (data/wallet_<addr>.oct). - Account selection screen:
GET /api/wallet/statusreturns the manifest as anaccountsarray; if non-empty, the frontend shows a picker instead of a PIN prompt.GET /api/wallet/accountsandDELETE /api/wallet/accountadded;/unlockand/unlock-passkeyaccept an optionaladdrfield to target a specific account. - Backward compatibility: existing
wallet.octand legacywallet.jsonmigration still work; first unlock of a pre-existing wallet auto-registers it in the manifest. - Per-account TX confirmation: PIN accounts are prompted for their 6-digit PIN before every transaction (
POST /api/wallet/confirm-pin); passkey accounts use the WebAuthn popup.GET /api/walletreturnsis_passkeyso the frontend routes correctly. - Passkey key derivation: random 32-byte seed stored as the WebAuthn
user.id, recovered viauserHandleon unlock. Private key never written to disk. Each credential is labeled with the wallet address in the OS passkey manager. Removes PRF extension requirement. - Per-account credential map:
octra_cred_mapin localStorage ensures unlocking account A always uses account A's specific credential, not the last-registered one. - Logout optimization: UI flushes instantly, txcache closes in a background thread,
/api/balancereleasesg_mtxbefore RPC calls — eliminates 1-20s stall caused by background refresh requests holding the mutex.