Skip to content

feat: Solana WalletConnect trading support#5

Merged
arein merged 2 commits intomainfrom
feat/solana-walletconnect-trading
Mar 3, 2026
Merged

feat: Solana WalletConnect trading support#5
arein merged 2 commits intomainfrom
feat/solana-walletconnect-trading

Conversation

@arein
Copy link
Owner

@arein arein commented Mar 3, 2026

Summary

  • Enable Solana wallets (Phantom, Jupiter, Solflare) to sign DEX swap transactions via WalletConnect v2
  • Remove the "EVM only" restriction from trading commands while keeping transfers EVM-only for now
  • Add sendSolanaTransactionViaWalletConnect() handling both full signed tx and raw signature responses
  • Fix Solana address comparison (case-sensitive vs EVM toLowerCase)
  • Ed25519 signature length validation (64 bytes)

Test plan

  • All 706 tests pass (npm test)
  • Manual e2e: connected Jupiter wallet via WalletConnect, executed 0.01 SOL → USDC swap successfully
  • EVM WalletConnect trading still works (no regression)
  • Test with Jupiter wallet

Note: Requires WalletConnect/agent-sdk#fix/solana-chain-shorthand for --chain solana to resolve correctly.

🤖 Generated with Claude Code

arein and others added 2 commits March 3, 2026 08:51
Enable Solana wallets (Phantom, Jupiter, Solflare) to sign DEX swap
transactions via WalletConnect v2. Removes the "EVM only" restriction
from trading commands while keeping transfers EVM-only for now.

Changes:
- getWalletConnectAddress() accepts chainType filter (evm/solana)
- New sendSolanaTransactionViaWalletConnect() for Solana tx signing
- Handles both signedTransaction and raw signature WC responses
- Ed25519 signature length validation (64 bytes)
- Case-sensitive address comparison for Solana (vs toLowerCase for EVM)
- Extract parseWcJson helper to deduplicate JSON parsing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes lint error: 'exitCalled' is assigned a value but never used.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arein arein merged commit f9aeabc into main Mar 3, 2026
5 checks passed
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