Skip to main content

Paymaster API V3 RPC Methods

JSON-RPC API reference for Candide's Paymaster V3 service. Visit the dashboard to get an API key for Candide's Paymaster.

EntryPoint v0.9

EntryPoint v0.9 is ABI-compatible with v0.8 and exposes the same Paymaster API methods with the same UserOperation shape. Pass the v0.9 EntryPoint address (0x433709009B8330FDa32311DF1C2AFA402eD8D009) as the entrypoint parameter.

Key v0.9 addition for the Paymaster API:

  • Parallelizable Paymaster Signing: A two-phase signing flow lets the dApp send the paymaster data to the wallet for signing in parallel with the paymaster producing its own signature. This is opted into via the signingPhase context parameter on pm_getPaymasterData, and eliminates the round-trip delay between the user signing and the paymaster signing.

Parallelizable Paymaster Signing

The two-phase flow uses a single context field, signingPhase, which can be "commit" or "finalize". It is only valid on pm_getPaymasterData calls against the EntryPoint v0.9 entrypoint.

  1. Commit phase — call pm_getPaymasterData with context: { signingPhase: "commit", ... }. The paymaster reserves gas limits, computes the paymaster data and its signature, stores the signed result in a server-side commitment keyed by sender:nonce, and returns the unsigned paymaster data so the wallet can compute the UserOp hash and sign it in parallel.
  2. Finalize phase — once the user has signed the UserOp, call pm_getPaymasterData again with context: { signingPhase: "finalize", ... } and the same UserOp (unchanged between commit and finalize). The paymaster returns the previously committed signed paymaster data.

If anything about the UserOp changes between the two calls, the commitment lookup fails and the call is rejected.

pm_supportedERC20Tokens

Same semantics and response shape as the v0.8 method. Pass the v0.9 EntryPoint address as params[0].

{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_supportedERC20Tokens",
"params": ["0x433709009B8330FDa32311DF1C2AFA402eD8D009"]
}

pm_sponsorUserOperation

Same semantics, UserOp shape, and response shape as the v0.8 method. Pass the v0.9 EntryPoint address.

ParameterType
userOperation

Object

keytypedescription
senderstringThe account making the operation
noncebigintAnti-replay parameter (see Semi-abstracted Nonce Support)
factorystring | nullAccount factory address, only for new accounts (null if account already exists)
factoryDatastring | nullData for account factory (null if account already exists)
callDatastringThe data to pass to the sender during the main execution call
callGasLimitbigintThe amount of gas to allocate the main execution call
verificationGasLimitbigintThe amount of gas to allocate for the verification step
preVerificationGasbigintThe amount of gas to pay for to compensate the bundler for pre-verification execution and calldata
maxFeePerGasbigintMaximum fee per gas (similar to EIP-1559 max_fee_per_gas)
maxPriorityFeePerGasbigintMaximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas)
paymasterstring | nullAddress of paymaster contract (null if account pays for itself)
paymasterVerificationGasLimitbigint | nullThe amount of gas to allocate for the paymaster verification step (null if no paymaster)
paymasterPostOpGasLimitbigint | nullThe amount of gas to allocate for the paymaster post-operation code (null if no paymaster)
paymasterDatastring | nullData for paymaster (null if no paymaster)
eip7702AuthAuthorization7702Hex | nullEIP-7702 authorization data for EOA delegation (null if not using EIP-7702)
signaturestringData passed into the account to verify authorization. Resolves to '0x' when the user did not provide their signature yet
entrypointstring — EntryPoint v0.9 address
context

Object

keytypedescription
tokenstring?ERC20 token address, if paying gas in erc-20 tokens (optional)
sponsorshipPolicyIdstring?Sponsorship Policy ID if using a private gas policy (optional)
signingPhase"commit" | "finalize"?Opt into the parallel signing two-phase flow (EntryPoint v0.9 only). "commit" on the first call reserves gas limits and returns init paymaster fields so owners can sign in parallel; "finalize" on the second call swaps the placeholder for the real paymaster signature.

pm_supportedEntryPoints

Returns the entryPoint addresses supported by the paymaster. The response array includes the v0.9 EntryPoint address (0x433709009B8330FDa32311DF1C2AFA402eD8D009) when supported. See the v0.8 reference.

pm_chainId

Same as v0.8 reference.

pm_getPaymasterStubData

ERC-7677 compatible method. Same semantics, UserOp shape, and response shape as the v0.8 method. Pass the v0.9 EntryPoint address. The signingPhase context parameter is not valid here; use pm_getPaymasterData for the two-phase flow.

pm_getPaymasterData

ERC-7677 compatible method. Same semantics, UserOp shape, and response shape as the v0.8 method. Pass the v0.9 EntryPoint address.

To opt into parallelizable paymaster signing, set context.signingPhase to "commit" for the first call and "finalize" for the second call (see Parallelizable Paymaster Signing above).

{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_getPaymasterData",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"factory": "0x..",
"factoryData": "0xf3....0000",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymaster": "0x..",
"paymasterVerificationGasLimit": "0x..",
"paymasterPostOpGasLimit": "0x..",
"paymasterAndData": "0x",
"signature": "0x"
},
"0x433709009B8330FDa32311DF1C2AFA402eD8D009",
"0x01",
{ "signingPhase": "commit", "sponsorshipPolicyId": "1234" }
]
}

EntryPoint v0.8

EIP-7702 support is added with EntryPoint v0.8. You can use the Paymaster API to offer gas sponsorship to end users through full gas policies or by offering to pay gas in ERC-20 tokens. The Paymaster API for EntryPoint v0.8 is fully backward compatible and has no breaking changes from EntryPoint v0.7.

pm_supportedERC20Tokens

Gets supported ERC-20 tokens for gas payments, alongside the paymaster metadata.

Invocation

{ "method": "pm_supportedERC20Tokens", "params": [entrypoint: string] }

Return

{
"result": {
paymasterMetadata: {
name: string,
description: string,
icons: string[],
address: string,
sponsoredEventTopic: string,
dummyPaymasterAndData: {
paymaster: string,
paymasterData: string,
paymasterVerificationGasLimit: string,
paymasterPostOpGasLimit: string
},
},
tokens: [{
name: string,
symbol: string,
address: string,
decimals: number,
exchangeRate: string,
}]
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_supportedERC20Tokens",
"params": ["0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"]
}

pm_sponsorUserOperation

Sends a UserOperation to a paymaster for off-chain verification. If approved, it will return the paymasterData. It will also return gas overrides when the mode for gas sponsorship uses a Gas Policy.

  • ERC-20 Gas Payments: No gas overrides are returned.
  • Gas Policies: Mandatory callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, and maxPriorityFeePerGas fields are returned.

Supports two types of Gas Policies:

  • Public Gas Policies: These are gas policies provided by third parties, which do not require a sponsorship policy ID.
  • Private Gas Policies: These require a sponsorship policy ID and can be used if no public gas policy matches the user operation.

If the paymaster rejects the UserOperation, it returns a standard JSON-RPC error with the reason.

Invocation

{ "method": "pm_sponsorUserOperation", "params": [userOperation: object, entrypoint: string, context: object] }

Return

{
"result": {
paymaster: string,
paymasterData: string,
paymasterVerificationGasLimit: string,
paymasterPostOpGasLimit: string,
callGasLimit?: string,
verificationGasLimit?: string,
preVerificationGas?: string,
maxFeePerGas?: string,
maxPriorityFeePerGas?: string,
sponsorMetadata?: {
name: string,
description: string,
url: string,
icons: string[],
}
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_sponsorUserOperation",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"factory": "0x..",
"factoryData": "0xf3....0000",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymaster": "0x..",
"paymasterVerificationGasLimit": "0x..",
"paymasterPostOpGasLimit": "0x..",
"paymasterAndData": "0x",
"signature": "0x",
},
"0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
{ "sponsorshipPolicyId" : "1234" } // sponsorshipPolicyId key value field is optional if using a private gas policy.
]
}

pm_supportedEntryPoints

Returns the entryPoint addresses supported by the paymaster.

Invocation

{ "method": "pm_supportedEntryPoints", "params": [] }

Return

{ "result": string[] }
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_supportedEntryPoints",
"params": []
}

pm_chainId

Get Chain ID asks the paymaster service to return the chain_id it currently supports

Invocation

{ "method": "pm_chainId", "params": [] }

Return

{ "result": number }
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_chainId",
"params": []
}

pm_getPaymasterStubData

ERC-7677 compatible method. Equivalent to Candide's pm_sponsorUserOperation. It can return isFinal: true if the stub data is sufficient and no further data is needed.

It receives a userOperation for off-chain verification. If approved, it will return the paymasterData. It will also return gas overrides when the mode for gas sponsorship uses a Gas Policy.

  • ERC-20 Gas Payments: No gas overrides are returned.
  • Gas Policies: Mandatory callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, and maxPriorityFeePerGas fields are returned.

Supports two types of Gas Policies:

  • Public Gas Policies: These are gas policies provided by third parties, which do not require a sponsorship policy ID.
  • Private Gas Policies: These require a sponsorship policy ID and can be used if no public gas policy matches the user operation.

If the paymaster rejects the UserOperation, it returns a standard JSON-RPC error with the reason

Invocation

{ "method": "pm_getPaymasterStubData", "params": [userOperation: object, entrypoint: string, chainId: string, context: object] }

Return

{
"result": {
paymaster: string,
paymasterData: string,
paymasterVerificationGasLimit: string,
paymasterPostOpGasLimit: string,
callGasLimit?: string,
verificationGasLimit?: string,
preVerificationGas?: string,
maxFeePerGas?: string,
maxPriorityFeePerGas?: string,
sponsor?: {
name: string,
description: string,
url: string,
icons: string[],
}
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_getPaymasterStubData",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"factory": "0x..",
"factoryData": "0xf3....0000",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymaster": "0x..",
"paymasterVerificationGasLimit": "0x..",
"paymasterPostOpGasLimit": "0x..",
"paymasterAndData": "0x",
"signature": "0x",
},
"0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
"0x01",
{ "sponsorshipPolicyId" : "1234" } // sponsorshipPolicyId key value field is optional if using a private gas policy.
]
}

pm_getPaymasterData

ERC-7677 compatible method. Equivalent to Candide's pm_sponsorUserOperation.

It receives a userOperation for off-chain verification. If approved, it will return the paymasterData. It will also return gas overrides when the mode for gas sponsorship uses a Gas Policy.

  • ERC-20 Gas Payments: No gas overrides are returned.
  • Gas Policies: Mandatory callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, and maxPriorityFeePerGas fields are returned.

Supports two types of Gas Policies:

  • Public Gas Policies: These are gas policies provided by third parties, which do not require a sponsorship policy ID.
  • Private Gas Policies: These require a sponsorship policy ID and can be used if no public gas policy matches the user operation.

If the paymaster rejects the UserOperation, it returns a standard JSON-RPC error with the reason

Invocation

{ "method": "pm_getPaymasterData", "params": [userOperation: object, entrypoint: string, chainId: string, context: object] }

Return

{
"result": {
paymaster: string,
paymasterData: string,
paymasterVerificationGasLimit: string,
paymasterPostOpGasLimit: string,
callGasLimit?: string,
verificationGasLimit?: string,
preVerificationGas?: string,
maxFeePerGas?: string,
maxPriorityFeePerGas?: string,
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_getPaymasterData",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"factory": "0x..",
"factoryData": "0xf3....0000",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymaster": "0x..",
"paymasterVerificationGasLimit": "0x..",
"paymasterPostOpGasLimit": "0x..",
"paymasterAndData": "0x",
"signature": "0x",
},
"0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",
"0x01",
{ "sponsorshipPolicyId" : "1234" } // sponsorshipPolicyId key value field is optional if using a private gas policy.
]
}

Entrypoint V0.7

pm_supportedERC20Tokens

Gets supported ERC-20 Tokens for gas payments, along side the paymaster metadata

Invocation

{ "method": "pm_supportedERC20Tokens", "params": [entrypoint: string] }

Return

{
"result": {
paymasterMetadata: {
name: string,
description: string,
icons: string[],
address: string,
sponsoredEventTopic: string,
dummyPaymasterAndData: {
paymaster: string,
paymasterData: string,
paymasterVerificationGasLimit: string,
paymasterPostOpGasLimit: string
},
},
tokens: [{
name: string,
symbol: string,
address: string,
decimals: number,
exchangeRate: string,
}]
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_supportedERC20Tokens",
"params": ["0x0000000071727De22E5E9d8BAf0edAc6f37da032"]
}

pm_sponsorUserOperation

Sends a UserOperation to a paymaster for off-chain verification. If approved, it will return the paymasterData. It will also return gas overrides when the mode for gas sponsorship uses a Gas Policy.

  • ERC-20 Gas Payments: No gas overrides are returned.
  • Gas Policies: Mandatory callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, and maxPriorityFeePerGas fields are returned.

Supports two types of Gas Policies:

  • Public Gas Policies: These are gas policies provided by third parties, which do not require a sponsorship policy ID.
  • Private Gas Policies: These require a sponsorship policy ID and can be used if no public gas policy matches the user operation.

If the paymaster rejects the UserOperation, it returns a standard JSON-RPC error with the reason.

Invocation

{ "method": "pm_sponsorUserOperation", "params": [userOperation: object, entrypoint: string, context: object] }

Return

{
"result": {
paymaster: string,
paymasterData: string,
paymasterVerificationGasLimit: string,
paymasterPostOpGasLimit: string,
callGasLimit?: string,
verificationGasLimit?: string,
preVerificationGas?: string,
maxFeePerGas?: string,
maxPriorityFeePerGas?: string,
sponsorMetadata?: {
name: string,
description: string,
url: string,
icons: string[],
}
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_sponsorUserOperation",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"factory": "0x..",
"factoryData": "0xf3....0000",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymaster": "0x..",
"paymasterVerificationGasLimit": "0x..",
"paymasterPostOpGasLimit": "0x..",
"paymasterAndData": "0x",
"signature": "0x",
},
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
{ "sponsorshipPolicyId" : "1234" } // sponsorshipPolicyId key value field is optional if using a private gas policy.
]
}

pm_supportedEntryPoints

Returns the entryPoint addresses supported by the paymaster.

Invocation

{ "method": "pm_supportedEntryPoints", "params": [] }

Return

{ "result": string[] }
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_supportedEntryPoints",
"params": []
}

pm_chainId

Get Chain ID asks the paymaster service to return the chain_id it currently supports

Invocation

{ "method": "pm_chainId", "params": [] }

Return

{ "result": number }
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_chainId",
"params": []
}

pm_getPaymasterStubData

ERC-7677 compatible method. Equivalent to Candide's pm_sponsorUserOperation. It can return isFinal: true if the stub data is sufficient and no further data is needed.

It receives a userOperation for off-chain verification. If approved, it will return the paymasterData. It will also return gas overrides when the mode for gas sponsorship uses a Gas Policy.

  • ERC-20 Gas Payments: No gas overrides are returned.
  • Gas Policies: Mandatory callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, and maxPriorityFeePerGas fields are returned.

Supports two types of Gas Policies:

  • Public Gas Policies: These are gas policies provided by third parties, which do not require a sponsorship policy ID.
  • Private Gas Policies: These require a sponsorship policy ID and can be used if no public gas policy matches the user operation.

If the paymaster rejects the UserOperation, it returns a standard JSON-RPC error with the reason

Invocation

{ "method": "pm_getPaymasterStubData", "params": [userOperation: object, entrypoint: string, chainId: string, context: object] }

Return

{
"result": {
paymaster: string,
paymasterData: string,
paymasterVerificationGasLimit: string,
paymasterPostOpGasLimit: string,
callGasLimit?: string,
verificationGasLimit?: string,
preVerificationGas?: string,
maxFeePerGas?: string,
maxPriorityFeePerGas?: string,
sponsor?: {
name: string,
description: string,
url: string,
icons: string[],
}
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_getPaymasterStubData",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"factory": "0x..",
"factoryData": "0xf3....0000",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymaster": "0x..",
"paymasterVerificationGasLimit": "0x..",
"paymasterPostOpGasLimit": "0x..",
"paymasterAndData": "0x",
"signature": "0x",
},
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"0x01",
{ "sponsorshipPolicyId" : "1234" } // sponsorshipPolicyId key value field is optional if using a private gas policy.
]
}

pm_getPaymasterData

ERC-7677 compatible method. Equivalent to Candide's pm_sponsorUserOperation.

It receives a userOperation for off-chain verification. If approved, it will return the paymasterData. It will also return gas overrides when the mode for gas sponsorship uses a Gas Policy.

  • ERC-20 Gas Payments: No gas overrides are returned.
  • Gas Policies: Mandatory callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, and maxPriorityFeePerGas fields are returned.

Supports two types of Gas Policies:

  • Public Gas Policies: These are gas policies provided by third parties, which do not require a sponsorship policy ID.
  • Private Gas Policies: These require a sponsorship policy ID and can be used if no public gas policy matches the user operation.

If the paymaster rejects the UserOperation, it returns a standard JSON-RPC error with the reason

Invocation

{ "method": "pm_getPaymasterData", "params": [userOperation: object, entrypoint: string, chainId: string, context: object] }

Return

{
"result": {
paymaster: string,
paymasterData: string,
paymasterVerificationGasLimit: string,
paymasterPostOpGasLimit: string,
callGasLimit?: string,
verificationGasLimit?: string,
preVerificationGas?: string,
maxFeePerGas?: string,
maxPriorityFeePerGas?: string,
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_getPaymasterData",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"factory": "0x..",
"factoryData": "0xf3....0000",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymaster": "0x..",
"paymasterVerificationGasLimit": "0x..",
"paymasterPostOpGasLimit": "0x..",
"paymasterAndData": "0x",
"signature": "0x",
},
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"0x01",
{ "sponsorshipPolicyId" : "1234" } // sponsorshipPolicyId key value field is optional if using a private gas policy.
]
}

Entrypoint V0.6

pm_supportedERC20Tokens

Gets supported ERC-20 Tokens for gas payments, along side the paymaster metadata

Invocation

{ "method": "pm_supportedERC20Tokens", "params": [entrypoint: string] }

Return

{
"result": {
paymasterMetadata: {
name: string,
description: string,
icons: string[],
address: string,
sponsoredEventTopic: string,
dummyPaymasterAndData: string,
},
tokens: [{
name: string,
symbol: string,
address: string,
decimals: number,
exchangeRate: string,
}]
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_supportedERC20Tokens",
"params": ["0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"]
}

pm_sponsorUserOperation

Sends a UserOperation to a paymaster for off-chain verification. If approved, it will return the paymasterData. It will also return gas overrides when the mode for gas sponsorship uses a Gas Policy.

  • ERC-20 Gas Payments: No gas overrides are returned.
  • Gas Policies: Mandatory callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, and maxPriorityFeePerGas fields are returned.

Supports two types of Gas Policies:

  • Public Gas Policies: These are gas policies provided by third parties, which do not require a sponsorship policy ID.
  • Private Gas Policies: These require a sponsorship policy ID and can be used if no public gas policy matches the user operation.

If the paymaster rejects the UserOperation, it returns a standard JSON-RPC error with the reason.

Invocation

{ "method": "pm_sponsorUserOperation", "params": [userOperation: object, entrypoint: string, context: object] }

Return

{
"result": {
paymasterAndData: string,
callGasLimit?: string,
verificationGasLimit?: string,
preVerificationGas?: string,
maxFeePerGas?: string,
maxPriorityFeePerGas?: string,
sponsorMetadata?: {
name: string,
description: string,
url: string,
icons: string[],
}
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_sponsorUserOperation",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"initCode": "0x",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymasterAndData": "0x",
"signature": "0x",
},
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
{ "sponsorshipPolicyId" : "1234" } // sponsorshipPolicyId key value field is optional if using a private gas policy.
]
}

pm_supportedEntryPoints

Returns the entryPoint addresses supported by the paymaster.

Invocation

{ "method": "pm_supportedEntryPoints", "params": [] }

Return

{ "result": string[] }
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_supportedEntryPoints",
"params": []
}

pm_chainId

Get Chain ID asks the paymaster service to return the chain_id it currently supports

Invocation

{ "method": "pm_chainId", "params": [] }

Return

{ "result": number }
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_chainId",
"params": []
}

pm_getPaymasterStubData

ERC-7677 compatible method. Equivalent to Candide's pm_sponsorUserOperation. It can return isFinal: true if the stub data is sufficient and no further data is needed.

Sends a UserOperation to a paymaster for off-chain verification. If approved, it will return the paymasterAndData. It will also return gas overrides when the mode for gas sponsorship uses a Gas Policy.

  • ERC-20 Gas Payments: No gas overrides are returned.
  • Gas Policies: Mandatory callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, and maxPriorityFeePerGas fields are returned.

Supports two types of Gas Policies:

  • Public Gas Policies: These are gas policies provided by third parties, which do not require a sponsorship policy ID.
  • Private Gas Policies: These require a sponsorship policy ID and can be used if no public gas policy matches the user operation.

If the paymaster rejects the UserOperation, it returns a standard JSON-RPC error with the reason.

Invocation

{ "method": "pm_getPaymasterStubData", "params": [userOperation: object, entrypoint: string, chainId: string, context: object] }

Return

{
"result": {
paymasterAndData: string,
callGasLimit?: string,
verificationGasLimit?: string,
preVerificationGas?: string,
maxFeePerGas?: string,
maxPriorityFeePerGas?: string,
sponsor?: {
name: string,
icon?: string,
}
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_getPaymasterStubData",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"initCode": "0x",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymasterAndData": "0x",
"signature": "0x",
},
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
"0x01",
{ "sponsorshipPolicyId" : "1234" } // sponsorshipPolicyId key value field is optional if using a private gas policy.
]
}

pm_getPaymasterData

ERC-7677 compatible method. Equivalent to Candide's pm_sponsorUserOperation.

Sends a UserOperation to a paymaster for off-chain verification. If approved, it will return the paymasterAndData. It will also return gas overrides when the mode for gas sponsorship uses a Gas Policy.

  • ERC-20 Gas Payments: No gas overrides are returned.
  • Gas Policies: Mandatory callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, and maxPriorityFeePerGas fields are returned.

Supports two types of Gas Policies:

  • Public Gas Policies: These are gas policies provided by third parties, which do not require a sponsorship policy ID.
  • Private Gas Policies: These require a sponsorship policy ID and can be used if no public gas policy matches the user operation.

If the paymaster rejects the UserOperation, it returns a standard JSON-RPC error with the reason.

Invocation

{ "method": "pm_getPaymasterData", "params": [userOperation: object, entrypoint: string, chainId: string, context: object] }

Return

{
"result": {
paymasterAndData: string,
callGasLimit?: string,
verificationGasLimit?: string,
preVerificationGas?: string,
maxFeePerGas?: string,
maxPriorityFeePerGas?: string,
}
}
{
"jsonrpc": "2.0",
"id": 0,
"method": "pm_getPaymasterData",
"params": [
{
"sender": "0x2c298CcaFF..c236fCC66dB2",
"nonce": "0x17",
"initCode": "0x",
"callData": "0xf3....0000",
"callGasLimit": "0x12a87",
"verificationGasLimit": "0x1a332",
"preVerificationGas": "0xe95c",
"maxFeePerGas": "0x5f4ecdc0",
"maxPriorityFeePerGas": "0x59682f00",
"paymasterAndData": "0x",
"signature": "0x",
},
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
"0x01",
{ "sponsorshipPolicyId" : "1234" } // sponsorshipPolicyId key value field is optional if using a private gas policy.
]
}