Skip to content

feat(rpc): add paymaster RPC support#293

Draft
tarrencev wants to merge 6 commits intomainfrom
add-paymaster-rpc
Draft

feat(rpc): add paymaster RPC support#293
tarrencev wants to merge 6 commits intomainfrom
add-paymaster-rpc

Conversation

@tarrencev
Copy link
Contributor

Summary

  • Add paymaster API integration with RPC endpoints for sponsored transactions
  • Implement configuration support through CLI with JSON/TOML config files
  • Add new paymaster module with health check, transaction building, and execution endpoints

Changes

  • Added PaymasterApi trait with RPC endpoints for paymaster functionality
  • Extended CLI arguments to support paymaster configuration file paths
  • Integrated paymaster client with Cartridge module
  • Added dependency on paymaster-rpc crate for client implementation

Test plan

  • Verify paymaster can be enabled via CLI flag
  • Test paymaster configuration loading from JSON/TOML files
  • Validate RPC endpoints respond correctly when paymaster is enabled
  • Ensure backward compatibility when paymaster is disabled

🤖 Generated with Claude Code

tarrencev and others added 6 commits September 29, 2025 11:37
Add paymaster API integration with configuration support through CLI.
Includes new RPC endpoints for transaction building and execution with
paymaster sponsorship.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Route execute_from_outside through Avnu paymaster when available
- Add build_transaction and execute_transaction methods to PaymasterService
- Integrate VRF calls with Avnu transaction flow
- Remove old direct paymaster execution logic
- Add comprehensive tests for execute_from_outside functionality
- Maintain backward compatibility when paymaster is not configured

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Resolved conflicts:
- Added task_spawner to CartridgeApi constructor
- Updated VRF handle_vrf_calls to use state parameter
- Renamed on_io_blocking_task to on_io_bound_task
Add comprehensive documentation covering:
- Architecture and component overview
- Transaction flow diagrams for standard and VRF-enabled flows
- Configuration and setup instructions
- Migration guide from old implementation
- Testing approach and security considerations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Wrap the complete execute_from_outside call instead of extracting calls
- Paymaster account executes: submit_random → execute_from_outside → assert_consumed
- Preserves user's transaction intact for proper VRF consumption
- Update documentation with detailed VRF transaction flow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kariy kariy force-pushed the main branch 2 times, most recently from e3bd68b to e897bbb Compare December 30, 2025 17:28
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