Skip to main content
Defined in ERC-7677
The paymasterService capability enables apps to sponsor user transactions using ERC-4337 paymaster web services. This allows users to execute transactions without paying gas fees directly.
This capability is not yet finalized and may change in future iterations.

Parameters

string
required
The URL of the ERC-7677-compliant paymaster service that will sponsor the transactions.Format: Must be a valid HTTPS URL pointing to a paymaster service endpoint.

Returns

object
The paymaster service capability configuration for the specified chain.

Example Usage

Error Handling

Paymaster Service Implementation

The paymaster service must implement ERC-7677 compliance with these endpoints:

1. Gas Estimation Endpoint

2. Paymaster Data Endpoint

Complete Example

Here’s a complete example of implementing sponsored transactions:

Error Handling

Handle paymaster-related errors appropriately:

Use Cases

Gaming Applications

DeFi Onboarding

Best Practices

  1. Validate Paymaster URLs: Ensure paymaster service URLs are trustworthy and ERC-7677 compliant
  2. Handle Failures Gracefully: Implement fallbacks for when paymaster services are unavailable
  3. Monitor Costs: Track paymaster usage to manage sponsorship costs
  4. User Communication: Clearly communicate when transactions are sponsored
The paymaster service capability enables seamless user experiences by removing the need for users to hold native tokens for gas fees.