Skip to content

Comments

feat: migrate staking-cli to CWP + add wallet-cli and companion-wallet#13

Merged
arein merged 2 commits intomainfrom
feat/cwp-migration
Feb 24, 2026
Merged

feat: migrate staking-cli to CWP + add wallet-cli and companion-wallet#13
arein merged 2 commits intomainfrom
feat/cwp-migration

Conversation

@arein
Copy link
Member

@arein arein commented Feb 24, 2026

Summary

  • Migrate staking-cli from WalletConnect SDK (cli-sdk) to CLI Wallet Protocol (CWP) via wallet-cli — wallet commands now use stateless CWP provider subprocesses instead of QR code sessions
  • Add @anthropic-ai/wallet-cli package — CWP provider discovery (discoverProviders), execution (walletExec), and interactive selection (selectProvider) with capability/chain filtering
  • Add @walletconnect/companion-wallet package — local key CWP provider with AES-256-GCM encrypted keystore, signing, transaction broadcast, fund/drain commands
  • Extend @walletconnect/cli-sdksend-transaction command, --chain flag for connect, --json flag for whoami, wallet-walletconnect CWP adapter binary, stderr for log output

Breaking Changes (staking-cli)

  • stake/unstake/claim accept WalletSender interface instead of WalletConnectCLI
  • --browser flag removed, --wallet <name> flag added
  • status and balance now require --address=0x... (no longer discover from wallet)
  • CLI_METADATA export removed

Test plan

  • npm run build — all 4 packages compile
  • vitest — cli-sdk (41 tests), staking-cli (25 tests) all pass
  • Manual: staked 1 WCT for 4 weeks via WalletConnect CWP on Optimism
  • CI pipeline passes

🤖 Generated with Claude Code

arein and others added 2 commits February 24, 2026 16:41
…i packages

Replace WalletConnect SDK dependency in staking-cli with CLI Wallet Protocol
(CWP) for provider-agnostic wallet connectivity. Add wallet-cli for CWP
provider discovery and interactive selection. Add companion-wallet as a local
key CWP provider. Extend cli-sdk with send-transaction, --chain, --json flags
and wallet-walletconnect CWP adapter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move CWP discovery, exec, and select modules from the standalone
@anthropic-ai/wallet-cli package into @walletconnect/cli-sdk/src/cwp/.
This eliminates a separate package and fixes the scope mismatch.

- Add src/cwp/ barrel with exec, discovery, select modules
- Add wallet binary as cwp-cli.ts entry point in cli-sdk
- Update staking-cli imports from @anthropic-ai/wallet-cli → @walletconnect/cli-sdk
- Remove @anthropic-ai/wallet-cli from changeset fixed group
- Delete packages/wallet-cli/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arein arein merged commit b292a59 into main Feb 24, 2026
4 checks passed
@github-actions github-actions bot mentioned this pull request Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant