…hereum wallet subcluster
Implements Phase 1 of the eth-wallet subcluster with:
- Keyring management (SRP mnemonic + throwaway keys, HD derivation, signing)
- EIP-7710 delegation framework (create, sign, receive, revoke, match)
- Coordinator vat orchestrating signing strategy resolution (delegation → local → peer)
- Provider vat wrapping JSON-RPC communication
- Cluster config using bundleSpec with `ocap bundle` build step
- 109 unit tests, all lint-clean
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Adds
@ocap/eth-wallet, a new package implementing a capability-driven Ethereum wallet as an OCAP kernel subcluster. This is Phase 1 — all local wallet operations with stubs for peer wallet connectivity (Phase 2).The wallet is composed of four vats orchestrated by a coordinator that resolves signing strategy (delegation → local key → peer wallet → reject):
Changes
packages/eth-wallet/package with full source undersrc/and vat definitions insrc/vats/lib/) for keyring, signing, delegation, caveats (ABI encoding for enforcer contracts), and providerbundleSpec(pre-built bundles viaocap bundle src/vats)test/helpers.tswithmakeMockBaggage()used across all vat testsTesting
109 unit tests covering all library functions and vat behavior. Each vat has co-located tests exercising its full API. The coordinator vat tests wire real keyring and delegation vats (with a mock
E()proxy) to validate cross-vat signing flows, delegation creation, and peer wallet fallback. All tests pass lint, TypeScript type checking, and depcheck.🤖 Generated with Claude Code