Skip to content

Conversation

@Wanbogang
Copy link
Contributor

Overview

Implements modular wallet adapter interface with two providers following project structure standards. This PR addresses feedback from #456 and provides a clean, maintainable architecture.

Changes

  • Added modular wallet adapter interface and two providers:
    • WalletConnect v2 (QR)
    • MetaMask (extension, EIP-1193)
  • Moved wallet providers from providers/ to src/providers/ following project structure
  • Renamed files for consistency:
    • coinbase.pycoinbase_provider.py
    • metamask.pymetamask_provider.py
  • Updated all import paths across entire codebase (src.actions, src.backgrounds, src.inputs, src.llm, etc.)
  • Fixed indentation issues in wallet_coinbase.py
  • Removed contrib/multi-wallet/ directory (non-compliant TypeScript code)
  • Updated src/providers/init.py and factory.py imports
  • All wallet providers now follow consistent naming and structure

Demo app

Demonstrates: Connect → Sign → Send Tx on Sepolia (sepolia:11155111)

Demo videos

How to run

  1. Copy apps/demo/.env.exampleapps/demo/.env and set VITE_WC_PROJECT_ID
  2. From apps/demo:
    npx vite --host 8.8.8.8 --port 4321
  3. Open http://localhost:4321

Testing

  • Factory pattern works: create_provider('coinbase', {...}) and create_provider('metamask')
  • All imports resolve correctly with new structure
  • No breaking changes to existing functionality

Addresses

Feedback from @Prachi1615 on #456

Additional Information

  • Net reduction of 376 lines (clean, focused refactor)
  • All wallet logic now properly organized under src/providers/ with proper naming
  • Ready for review

root and others added 9 commits October 3, 2025 04:39
- Add modular wallet adapter interface (connect/getAddress/signMessage/sendTransaction)
- Providers: WalletConnect v2 (QR) & MetaMask (EIP-1193)
- Demo (Sepolia): Connect → Sign → Send Tx
- Include README, .env.example, and .gitignore
…ject structure

- Add abstract ProviderBase interface in src/providers/base.py
- Add CoinbaseProvider with lazy CDP SDK loading
- Add MetaMaskProvider for signature verification
- Add comprehensive tests for both providers
- Add README documenting provider usage and integration

Addresses feedback from PR OpenMind#428 to follow coinbase provider pattern
@Wanbogang Wanbogang requested review from a team as code owners December 16, 2025 23:16
@github-actions github-actions bot added robotics Robotics code changes python Python code tests Test files config Configuration files labels Dec 16, 2025
Nama Kamu and others added 4 commits December 17, 2025 06:51
- Update imports from 'providers.coinbase' to 'src.providers.coinbase_provider'
- Update imports from 'providers.metamask' to 'src.providers.metamask_provider'
- Fixes CI/CD test failures (ModuleNotFoundError)
- Update string literal from 'providers.metamask.Account' to 'src.providers.metamask_provider.Account'
- Fixes test_metamask_verify_signature monkeypatch target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration files python Python code robotics Robotics code changes tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants