Skip to content
This repository was archived by the owner on Sep 14, 2026. It is now read-only.

feat: replace private key management with OpenWallet Standard - #8

Merged
yujiym merged 14 commits into
mainfrom
feat/openwallet-integration
Mar 26, 2026
Merged

yujiym merged 14 commits into
mainfrom
feat/openwallet-integration

Conversation

@yujiym

@yujiym yujiym commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace direct private key generation/storage in CLI and SDK with OpenWallet Standard (@open-wallet-standard/core)
  • Keys are now generated, encrypted at rest, and managed by OWS (~/.ows/wallets/) — OrbitMem never touches raw key material
  • CLI stores only a wallet name in ~/.orbitmem/config.json; key.json is no longer created

Changes

  • SDK: New ows-adapter.ts wrapping OWS SDK behind OwsAdapter interface (getAddress, signMessage, toViemAccount). Identity layer uses OWS instead of privateKeyToAccount. IdentityConfig.privateKey replaced with owsWallet/owsChain
  • CLI: saveKey/loadKey removed from config. init creates OWS wallet. All commands use config-based walletName. CAIP-2 chain ID helper extracted to toCaip2()
  • Examples: agent-research updated to use OWS adapter
  • Tests: Rewritten for OWS with proper wallet lifecycle (unique names, cleanup)

Design

  • Spec: docs/design/2026-03-26-openwallet-integration.md
  • Plan: docs/plans/2026-03-26-openwallet-integration.md
  • Browser (web app, memo example) is out of scope — continues using wagmi/passkey

Test plan

  • bun run typecheck — all packages pass
  • bun test — 147 pass, 21 skip, 0 fail
  • bun run lint — 0 warnings, 0 errors
  • Smoke test: bun run cli init && bun run cli status (requires OWS installed)

@yujiym
yujiym merged commit 8c39f4c into main Mar 26, 2026
4 checks passed
@yujiym
yujiym deleted the feat/openwallet-integration branch March 26, 2026 05:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant