Skip to content

Conversation

@jtang17
Copy link
Collaborator

@jtang17 jtang17 commented Jan 23, 2026

  • Add AptosChainProvider with fee payer signing for sponsored transactions
  • Implement v2 exact payment scheme for Aptos (aptos:1, aptos:2)
  • Add local patch for aptos-runtimes tokio compatibility
  • Support CAIP-2 chain identifiers

jtang17 and others added 6 commits January 22, 2026 23:04
- Add AptosChainProvider with fee payer signing for sponsored transactions
- Implement v2 exact payment scheme for Aptos (aptos:1, aptos:2)
- Add local patch for aptos-runtimes tokio compatibility
- Support CAIP-2 chain identifiers
Use aptos-node-v1.39.2 tag instead of commit hash for better
readability and maintainability. Functionally equivalent to the
previous commit hash fb9e2f4.
Add optional gas sponsorship for Aptos transactions, allowing facilitators to choose between sponsored mode (facilitator pays gas) and non-sponsored mode (client pays own gas).

Changes:
- Make AptosChainConfig.signer optional, add sponsor_gas boolean flag
- Update AptosChainProvider to handle optional fee payer configuration
- Update /supported endpoint to include extra.sponsored when enabled
- Update settle flow to conditionally sponsor based on configuration
- Add validation: signer required when sponsor_gas is true

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Add documentation showing:
- Sponsored mode: facilitator pays gas (requires signer)
- Non-sponsored mode: client pays gas (no signer needed)

Only signer field supports environment variables ($APTOS_PRIVATE_KEY).
RPC URL and sponsor_gas are plain config values, consistent with Solana.
Allow RPC URL and sponsor_gas to be configured via environment variables:
- APTOS_RPC_URL - RPC endpoint (can include API key in URL)
- APTOS_SPONSOR_GAS - true/false for gas sponsorship
- APTOS_PRIVATE_KEY - facilitator private key (existing)

This provides deployment flexibility to switch between networks and
RPC providers without modifying config files.
Add api_key field to AptosChainConfigInner for authenticated RPC access.
If provided, API key is sent as Authorization: Bearer header with all requests.

Useful for paid RPC providers like Geomi nodes to avoid rate limiting.

Example config:
  api_key = "$APTOS_API_KEY"

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
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.

2 participants