Integration notes
A hosted authentication and encrypted-storage service for the central wallet and registered independent applications. Ranger is the first embedded client.
Central wallet
The user dashboard at https://wallet.thetanuts.finance is its own tenant and WebAuthn RP. It can create, import, switch, export and passkey-protect EOAs in one central keyring. It cannot read legacy keys from another origin. Users must explicitly import a recovery key.
Ranger unlocks the central keyring at /connect?mode=session. After explicit consent, the wallet worker encrypts the selected EOA key to an ephemeral key held by the Ranger worker. A signed service grant binds the exact origins, connection nonce, selected address, recipient key and expiry. A private channel carries the encrypted package. The popup locks and closes. Ranger shows transaction confirmations; its worker validates, signs and broadcasts canonical Base USDC approvals and Ranger orders. No PRF output, vault root or API token is shared. The session ends on lock, page exit or after eight hours. ETH is required for gas. The previous wallet-origin approval flow remains available through Ranger's ?wallet-vault=popup mode. Paymaster and arbitrary-message signing are not supported.
Service boundary
The vault worker generates new EOA keys, encrypts and checks their saved records, decrypts vaults and prepares encrypted handoffs. The page supplies only a label and intended vault when creating a wallet. WebAuthn PRF evaluation uses a captured browser bridge. Explicit import and recovery export are the only wallet UI paths that accept or reveal plaintext keys. The server stores encrypted vault records, public WebAuthn verification data, short-lived authentication and revision metadata, and its own handoff-certification key. It sees the selected public address and session metadata when issuing a grant. The server does not receive PRF outputs, private keys or recovery keys. This service is not a transaction signer or a smart-account service.
The service protects encrypted data at rest. Normal decryption and handoff run inside workers. WebAuthn still passes its unlock secret through a minimal page bridge. Early injection can intercept that bridge or replace a worker; a signed grant does not attest code. Recovery screens deliberately show private material, and exporting an existing key requires a fresh passkey unlock.
Odette pilot
https://odette.fi/wallet-pilot/app.html opens /connect?mode=session&app=odette. Odette has no independent vault tenant: only the public verification-key endpoint permits its origin. Grant issuance and all vault operations stay at the central wallet origin. Its copied worker policy permits canonical BTC/ETH USDC buys and USDC withdrawals, with a shared 500 USDC session budget and 100 USDC action cap. The default Odette app is unchanged. Secure saved wallet imports an existing Odette wallet through /connect?mode=migrate&app=odette. A dedicated source worker handles password decryption and sends the key directly to the vault worker after consent. The vault verifies its encrypted saved copy before success. Original browser copies remain. When ETH is low, the worker can use the existing Circle/Pimlico v0.8 flow with a fixed 0.50 USDC permit and conservative session reservation before estimation. The approved 7702 delegation persists after lock; no arbitrary signing API is exposed. Existing Circle allowance above 0.50 USDC is refused. The worker checks exact signed fields and verifies UserOperationEvent on Base before returning a transaction hash. Swaps and arbitrary signatures are excluded.
Register an embedded client
Registration is an operator-reviewed configuration change. Each embedded application needs an exact HTTPS origin, a host-scoped WebAuthn RP ID and a separate tenant namespace. Ranger uses origin https://ranger.thetanuts.finance and RP ID ranger.thetanuts.finance. The API origin is https://wallet.thetanuts.finance. No wildcard origins, shared parent-domain RP, iframe login or public self-registration is supported. An embedded client must be configured in both service and copied client modules before it is enabled. A central connector client also needs a reviewed exact origin and transaction policy.
Client requirements
- Use discoverable passkeys with required user verification. Verify actual PRF output before calling a wallet encrypted.
- Serialize only the specified WebAuthn fields. Never upload
PublicKeyCredential.toJSON()or unfiltered extension results: these can include the PRF encryption secret. - Use the version 2 encrypted envelope, fresh IVs, context-bound AES-GCM and per-passkey root-key wrapping. Derive the EOA address again after decryption.
- Keep session tokens and decrypted keys in memory. Locking must invalidate signers, pending prompts and pending transactions. Never log credentials, keys, PRF output, ciphertext bodies or authentication tokens.
- Use
credentials: omitand the exact-origin CORS contract. Every write needs an expected revision and fresh assertion bound to the payload digest. Read back and decrypt before reporting a save complete. - Import wallets additively. Keep a legacy plaintext source until the encrypted record is committed and read back successfully. Preserve unreadable storage.
- Pin executable dependencies and enforce a restrictive CSP. Do not add analytics or arbitrary third-party code to a page that holds keys.
- Offer an additional passkey and an explicit recovery export from wallet settings. Creation must not reveal a private key by default. Bind export to the selected wallet and account, require fresh authentication, and discard late replies after lock or account changes. A synced passkey is not a universal recovery guarantee. Provide an external-wallet fallback if PRF is unavailable.
Independent applications
Each embedded subDAO owns a reviewed copy of the client modules and its site configuration. Vaults and credentials are separate across RPs. Users may explicitly import the same EOA key into another application, including an exported Odette key. The service does not share wallets automatically across sites. The popup approval mode keeps keys and transaction confirmation at the wallet origin. Ranger and the opt-in Odette pilot explicitly delegate the selected EOA to their own worker memory; other origins remain denied. The signed grant binds the exact receiver origin, and a receiver rejects grants for the other app. Neither mode works around WebAuthn RP rules.
Testing and rollout
Use the exact registered HTTPS origin for passkey tests. The shared thetanuts.finance/dev/ origin is not registered and cannot test Ranger's RP. Never use localhost for this integration. Test real mobile and desktop passkeys, a second device, unsupported PRF, cancellation, recovery, race conditions and both direct and paymaster signing. Deployment and new enrollment are separately controlled. Enrollment is disabled by default.
Protocol API: version 1. Encrypted envelope: version 2. Do not reinterpret unknown versions. See the API contract and current limitations.