# Paymaster API V3 RPC Methods

JSON-RPC API reference for Candide's Paymaster V3 service. Visit the [dashboard](https://dashboard.candide.dev) to get an API key for Candide's Paymaster.

## EntryPoint v0.9[​](#entrypoint-v09 "Direct link to 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[​](#parallelizable-paymaster-signing "Direct link to 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[​](#pm_supportederc20tokens "Direct link to pm_supportedERC20Tokens")

Same semantics and response shape as the [v0.8 method](#pm_supportederc20tokens). Pass the v0.9 EntryPoint address as `params[0]`.

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_supportedERC20Tokens",

  "params": ["0x433709009B8330FDa32311DF1C2AFA402eD8D009"]

}
```

### pm\_sponsorUserOperation[​](#pm_sponsoruseroperation "Direct link to pm_sponsorUserOperation")

Same semantics, UserOp shape, and response shape as the [v0.8 method](#pm_sponsoruseroperation). Pass the v0.9 EntryPoint address.

* Request Types
* Response Type

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	bigint	Anti-replay parameter (see Semi-abstracted Nonce Support)&#xA;factory	string \| null	Account factory address, only for new accounts (null if account already exists)&#xA;factoryData	string \| null	Data for account factory (null if account already exists)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymaster	string \| null	Address of paymaster contract (null if account pays for itself)&#xA;paymasterVerificationGasLimit	bigint \| null	The amount of gas to allocate for the paymaster verification step (null if no paymaster)&#xA;paymasterPostOpGasLimit	bigint \| null	The amount of gas to allocate for the paymaster post-operation code (null if no paymaster)&#xA;paymasterData	string \| null	Data for paymaster (null if no paymaster)&#xA;eip7702Auth	Authorization7702Hex \| null	EIP-7702 authorization data for EOA delegation (null if not using EIP-7702)&#xA;signature	string	Data passed into the account to verify authorization. Resolves to '0x' when the user did not provide their signature yet |
| entrypoint    | `string` — EntryPoint v0.9 address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| context       | Objectkey	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

| key                             | type       | description                                                                     |
| :------------------------------ | :--------- | :------------------------------------------------------------------------------ |
| `paymaster`                     | `string`   | Address of paymaster contract, (or empty, if account pays for itself)           |
| `paymasterVerificationGasLimit` | `string`   | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterPostOpGasLimit`       | `string`   | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterData`                 | `string`   | Data for paymaster (only if paymaster exists)                                   |
| `callGasLimit`                  | `string`   | The amount of gas to allocate the main execution call                           |
| `verificationGasLimit`          | `string`   | The amount of gas to allocate for the verification step                         |
| `preVerificationGas`            | `string`   | Extra gas to pay the bunder                                                     |
| `maxFeePerGas`                  | `string`   | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)                    |
| `maxPriorityFeePerGas`          | `string`   | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas) |
| `sponsorMetadata`               | `object`   | Information about the Gas Policy Sponsor                                        |
| `sponsorMetadata.name`          | `string`   | Name of Sponsor who is sponsoring the Gas Policy                                |
| `sponsorMetadata.description`   | `string`   | A short description of the sponsor                                              |
| `sponsorMetadata.url`           | `string`   | Website of the Sponsor                                                          |
| `sponsorMetadata.icons`         | `string[]` | Logos or Icons that the Sponsor is using to promote their Gas Policy            |

### pm\_supportedEntryPoints[​](#pm_supportedentrypoints "Direct link to 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_supportedentrypoints).

### pm\_chainId[​](#pm_chainid "Direct link to pm_chainId")

Same as [v0.8 reference](#pm_chainid).

### pm\_getPaymasterStubData[​](#pm_getpaymasterstubdata "Direct link to pm_getPaymasterStubData")

[ERC-7677](https://eips.ethereum.org/EIPS/eip-7677) compatible method. Same semantics, UserOp shape, and response shape as the [v0.8 method](#pm_getpaymasterstubdata). Pass the v0.9 EntryPoint address. The `signingPhase` context parameter is **not** valid here; use `pm_getPaymasterData` for the two-phase flow.

### pm\_getPaymasterData[​](#pm_getpaymasterdata "Direct link to pm_getPaymasterData")

[ERC-7677](https://eips.ethereum.org/EIPS/eip-7677) compatible method. Same semantics, UserOp shape, and response shape as the [v0.8 method](#pm_getpaymasterdata). 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](#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[​](#entrypoint-v08 "Direct link to 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[​](#pm_supportederc20tokens-1 "Direct link to pm_supportedERC20Tokens")

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

#### Invocation[​](#invocation "Direct link to Invocation")

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

#### Return[​](#return "Direct link to 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,

    }]

  }

}
```

* Example Request
* Example Response
* Response Types

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_supportedERC20Tokens",

  "params": ["0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymasterMetadata": {

      "name": "Candide Paymaster",

      "description": "Candide Paymaster a fast, secure and feature-rich 4337 Paymaster",

      "icons": [],

      "address": "0x7e3393ebA62DA6f555a5341E079e0F6585CE8c56",

      "sponsoredEventTopic": "0x13..fa1",

      "dummyPaymasterAndData": {

        "paymaster": "0x...",

        "paymasterData": "0x...",

        "paymasterVerificationGasLimit": "0x...",

        "paymasterPostOpGasLimit": "0x..."

      }

    },

    "tokens": [{

      "name": "Maker DAI",

      "symbol": "DAI",

      "address": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",

      "decimal": "0x12",

      "exchangeRate": "0x0ddeb609310c89b1"

    }]

  }

}
```

| Parameter         | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| :---------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| paymasterMetadata | Objectkey	type	descriptionname	string	Paymaster Name&#xA;description	string	A short description for the paymaster service&#xA;icons	string\[]	Icons associated with the paymaster service&#xA;address	string	Paymaster Contract Address&#xA;sponsoredEventTopic	string	Emitted topic event if a paymaster is being used&#xA;dummyPaymasterAndData	object	Dummy values to use for estimating user operation gas before sponsorship&#xA;dummyPaymasterAndData.paymaster	string	Address of paymaster contract&#xA;dummyPaymasterAndData.paymasterData	string	Data for paymaster&#xA;dummyPaymasterAndData.paymasterVerificationGasLimit	string	The amount of gas to allocate for the paymaster validation code&#xA;dummyPaymasterAndData.paymasterPostOpGasLimit	string	The amount of gas to allocate for the paymaster post-operation code&#xA;sponsorMetadata	object	Information about the Gas Policy Sponsor&#xA;sponsorMetadata.name	string	Name of Sponsor who is sponsoring the Gas Policy&#xA;sponsorMetadata.description	string	A short description of the sponsor&#xA;sponsorMetadata.url	string	Website of the Sponsor&#xA;sponsorMetadata.icons	string\[]	Logos or Icons that the Sponsor is using to promote their Gas Policy |
| tokens            | Object\[]key	type	descriptionname	string	Name of the ERC-20 Token&#xA;symbol	string	Token Symbol&#xA;address	string	Token contract address&#xA;decimals	number	Decimals of token&#xA;exchangeRate	string	Exchange rate of token                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

### pm\_sponsorUserOperation[​](#pm_sponsoruseroperation-1 "Direct link to 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[​](#invocation-1 "Direct link to Invocation")

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

#### Return[​](#return-1 "Direct link to 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[],

    }

  }

}
```

* Example Request
* Example Response
* Request Types
* Response Type

```
{

  "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.

  ]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymaster": "0x..",

    "paymasterData": "0x..",

    "paymasterVerificationGasLimit": "0x..",

    "paymasterPostOpGasLimit": "0x..",

    "callGasLimit": "0x...",

    "verificationGasLimit": "0x...",

    "preVerificationGas": "0x..",

    "maxFeePerGas": "0x..",

    "maxPriorityFeePerGas": "0x..",

    "sponsorMetadata": {

      "name": "Aave",

      "description": "Open Source Liquidity Protocol",

      "url": "https://app.aave.com/",

      "icons": ["https://aave.com/aave-2030-header.svg"],

    }

  }

}
```

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	string	Anti-replay parameter (see “Semi-abstracted Nonce Support” )&#xA;factory	string	account factory, only for new accounts&#xA;factoryData	string	data for account factory (only if account factory exists)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	Extra gas to pay the bunder&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymaster	string	Address of paymaster contract, (or empty, if account pays for itself)&#xA;paymasterVerificationGasLimit	bigint \| null	The amount of gas to allocate for the paymaster verification step&#xA;paymasterPostOpGasLimit	bigint \| null	The amount of gas to allocate for the paymaster post-operation code&#xA;paymasterData	string	Data for paymaster (only if paymaster exists)&#xA;signature	string	Data passed into the account to verify authorization |
| entrypoint    | Type	Descriptionstring	Entrypoint address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| context       | Object: This argument contains information about the specific paymaster implementation you are using. If use paying gas in ERC-20 Tokens, pass the token address.key	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

| key                             | type       | description                                                                     |
| :------------------------------ | :--------- | :------------------------------------------------------------------------------ |
| `paymaster`                     | `string`   | Address of paymaster contract, (or empty, if account pays for itself)           |
| `paymasterVerificationGasLimit` | `string`   | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterPostOpGasLimit`       | `string`   | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterData`                 | `string`   | Data for paymaster (only if paymaster exists)                                   |
| `callGasLimit`                  | `string`   | The amount of gas to allocate the main execution call                           |
| `verificationGasLimit`          | `string`   | The amount of gas to allocate for the verification step                         |
| `preVerificationGas`            | `string`   | Extra gas to pay the bunder                                                     |
| `maxFeePerGas`                  | `string`   | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)                    |
| `maxPriorityFeePerGas`          | `string`   | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas) |
| `sponsorMetadata`               | `object`   | Information about the Gas Policy Sponsor                                        |
| `sponsorMetadata.name`          | `string`   | Name of Sponsor who is sponsoring the Gas Policy                                |
| `sponsorMetadata.description`   | `string`   | A short description of the sponsor                                              |
| `sponsorMetadata.url`           | `string`   | Website of the Sponsor                                                          |
| `sponsorMetadata.icons`         | `string[]` | Logos or Icons that the Sponsor is using to promote their Gas Policy            |

### pm\_supportedEntryPoints[​](#pm_supportedentrypoints-1 "Direct link to pm_supportedEntryPoints")

Returns the entryPoint addresses supported by the paymaster.

#### Invocation[​](#invocation-2 "Direct link to Invocation")

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

#### Return[​](#return-2 "Direct link to Return")

```
{ "result": string[] }
```

* Example Request
* Example Response
* Response Type

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_supportedEntryPoints",

  "params": []

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": ["0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", "0x0000000071727de22e5e9d8baf0edac6f37da032", "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"] // Entrypoint addresses

}
```

| key           | type       | description                                               |
| :------------ | :--------- | :-------------------------------------------------------- |
| `entrypoints` | `string[]` | The EntryPoint Addresses that the paymaster is supporting |

### pm\_chainId[​](#pm_chainid-1 "Direct link to pm_chainId")

Get Chain ID asks the paymaster service to return the chain\_id it currently supports

#### Invocation[​](#invocation-3 "Direct link to Invocation")

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

#### Return[​](#return-3 "Direct link to Return")

```
{ "result": number }
```

* Example Request
* Example Response
* Response Type

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_chainId",

  "params": []

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": 1

}
```

| Parameter | Type     | Description                          |
| :-------- | :------- | :----------------------------------- |
| chainId   | `number` | Chain ID that the paymaster supports |

### pm\_getPaymasterStubData[​](#pm_getpaymasterstubdata-1 "Direct link to pm_getPaymasterStubData")

[ERC-7677](https://eips.ethereum.org/EIPS/eip-7677) compatible method. Equivalent to Candide's [`pm_sponsorUserOperation`](https://docs.candide.dev/wallet/paymaster/rpc-methods.md#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[​](#invocation-4 "Direct link to Invocation")

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

#### Return[​](#return-4 "Direct link to 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[],

    }

  }

}
```

* Example Request
* Example Response
* Request Types
* Response Type

```
{

  "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.

  ]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymaster": "0x..",

    "paymasterData": "0x..",

    "paymasterVerificationGasLimit": "0x..",

    "paymasterPostOpGasLimit": "0x..",

    "callGasLimit": "0x...",

    "verificationGasLimit": "0x...",

    "preVerificationGas": "0x..",

    "maxFeePerGas": "0x..",

    "maxPriorityFeePerGas": "0x..",

    "sponsor": {

      "name": "Aave",

      "description": "Open Source Liquidity Protocol",

      "url": "https://app.aave.com/",

      "icons": ["https://aave.com/aave-2030-header.svg"],

    },

    "isFinal": true,

  }

}
```

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	string	Anti-replay parameter (see “Semi-abstracted Nonce Support” )&#xA;factory	string	account factory, only for new accounts&#xA;factoryData	string	data for account factory (only if account factory exists)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	Extra gas to pay the bunder&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymaster	string	Address of paymaster contract, (or empty, if account pays for itself)&#xA;paymasterVerificationGasLimit	bigint \| null	The amount of gas to allocate for the paymaster verification step&#xA;paymasterPostOpGasLimit	bigint \| null	The amount of gas to allocate for the paymaster post-operation code&#xA;paymasterData	string	Data for paymaster (only if paymaster exists)&#xA;signature	string	Data passed into the account to verify authorization |
| entrypoint    | Type	Descriptionstring	Entrypoint address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| chainId       | Type	Descriptionstring	Chain ID in hex string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| context       | Object: This argument contains information about the specific paymaster implementation you are using. If use paying gas in ERC-20 Tokens, pass the token address.key	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

| key                             | type     | description                                                                     |
| :------------------------------ | :------- | :------------------------------------------------------------------------------ |
| `paymaster`                     | `string` | Address of paymaster contract, (or empty, if account pays for itself)           |
| `paymasterVerificationGasLimit` | `string` | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterPostOpGasLimit`       | `string` | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterData`                 | `string` | Data for paymaster (only if paymaster exists)                                   |
| `callGasLimit`                  | `string` | The amount of gas to allocate the main execution call                           |
| `verificationGasLimit`          | `string` | The amount of gas to allocate for the verification step                         |
| `preVerificationGas`            | `string` | Extra gas to pay the bunder                                                     |
| `maxFeePerGas`                  | `string` | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)                    |
| `maxPriorityFeePerGas`          | `string` | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas) |
| `sponsor`                       | `object` | Information about the Gas Policy Sponsor                                        |
| `sponsor.name`                  | `string` | Name of Sponsor who is sponsoring the Gas Policy                                |
| `sponsor.description`           | `string` | A short description of the sponsor                                              |
| `sponsor.url`                   | `string` | Website of the Sponsor                                                          |
| `sponsor.icon`                  | `string` | Logo of the Sponsor to promote their Gas Policy                                 |

### pm\_getPaymasterData[​](#pm_getpaymasterdata-1 "Direct link to pm_getPaymasterData")

[ERC-7677](https://eips.ethereum.org/EIPS/eip-7677) compatible method. Equivalent to Candide's [`pm_sponsorUserOperation`](https://docs.candide.dev/wallet/paymaster/rpc-methods.md#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[​](#invocation-5 "Direct link to Invocation")

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

#### Return[​](#return-5 "Direct link to Return")

```
{

  "result": {

    paymaster: string,

    paymasterData: string,

    paymasterVerificationGasLimit: string,

    paymasterPostOpGasLimit: string,

    callGasLimit?: string,

    verificationGasLimit?: string,

    preVerificationGas?: string,

    maxFeePerGas?: string,

    maxPriorityFeePerGas?: string,

  }

}
```

* Example Request
* Example Response
* Request Types
* Response Type

```
{

  "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.

  ]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymaster": "0x..",

    "paymasterData": "0x..",

    "paymasterVerificationGasLimit": "0x..",

    "paymasterPostOpGasLimit": "0x..",

    "callGasLimit": "0x...",

    "verificationGasLimit": "0x...",

    "preVerificationGas": "0x..",

    "maxFeePerGas": "0x..",

    "maxPriorityFeePerGas": "0x..",

  }

}
```

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	string	Anti-replay parameter (see “Semi-abstracted Nonce Support” )&#xA;factory	string	account factory, only for new accounts&#xA;factoryData	string	data for account factory (only if account factory exists)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	Extra gas to pay the bunder&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymaster	string	Address of paymaster contract, (or empty, if account pays for itself)&#xA;paymasterVerificationGasLimit	bigint \| null	The amount of gas to allocate for the paymaster verification step&#xA;paymasterPostOpGasLimit	bigint \| null	The amount of gas to allocate for the paymaster post-operation code&#xA;paymasterData	string	Data for paymaster (only if paymaster exists)&#xA;signature	string	Data passed into the account to verify authorization |
| entrypoint    | Type	Descriptionstring	Entrypoint address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| chainId       | Type	Descriptionstring	Chain ID in hex string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| context       | Object: This argument contains information about the specific paymaster implementation you are using. If use paying gas in ERC-20 Tokens, pass the token address.key	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

| key                             | type     | description                                                                     |
| :------------------------------ | :------- | :------------------------------------------------------------------------------ |
| `paymaster`                     | `string` | Address of paymaster contract, (or empty, if account pays for itself)           |
| `paymasterVerificationGasLimit` | `string` | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterPostOpGasLimit`       | `string` | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterData`                 | `string` | Data for paymaster (only if paymaster exists)                                   |
| `callGasLimit`                  | `string` | The amount of gas to allocate the main execution call                           |
| `verificationGasLimit`          | `string` | The amount of gas to allocate for the verification step                         |
| `preVerificationGas`            | `string` | Extra gas to pay the bunder                                                     |
| `maxFeePerGas`                  | `string` | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)                    |
| `maxPriorityFeePerGas`          | `string` | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas) |

## Entrypoint V0.7[​](#entrypoint-v07 "Direct link to Entrypoint V0.7")

### pm\_supportedERC20Tokens[​](#pm_supportederc20tokens-2 "Direct link to pm_supportedERC20Tokens")

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

#### Invocation[​](#invocation-6 "Direct link to Invocation")

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

#### Return[​](#return-6 "Direct link to 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,

    }]

  }

}
```

* Example Request
* Example Response
* Response Types

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_supportedERC20Tokens",

  "params": ["0x0000000071727De22E5E9d8BAf0edAc6f37da032"]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymasterMetadata": {

      "name": "Candide Paymaster",

      "description": "Candide Paymaster a fast, secure and feature-rich 4337 Paymaster",

      "icons": [],

      "address": "0x7e3393ebA62DA6f555a5341E079e0F6585CE8c56",

      "sponsoredEventTopic": "0x13..fa1",

      "dummyPaymasterAndData": {

        "paymaster": "0x...",

        "paymasterData": "0x...",

        "paymasterVerificationGasLimit": "0x...",

        "paymasterPostOpGasLimit": "0x..."

      }

    },

    "tokens": [{

      "name": "Maker DAI",

      "symbol": "DAI",

      "address": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",

      "decimal": "0x12",

      "exchangeRate": "0x0ddeb609310c89b1"

    }]

  }

}
```

| Parameter         | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| :---------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| paymasterMetadata | Objectkey	type	descriptionname	string	Paymaster Name&#xA;description	string	A short description for the paymaster service&#xA;icons	string\[]	Icons associated with the paymaster service&#xA;address	string	Paymaster Contract Address&#xA;sponsoredEventTopic	string	Emitted topic event if a paymaster is being used&#xA;dummyPaymasterAndData	object	Dummy values to use for estimating user operation gas before sponsorship&#xA;dummyPaymasterAndData.paymaster	string	Address of paymaster contract&#xA;dummyPaymasterAndData.paymasterData	string	Data for paymaster&#xA;dummyPaymasterAndData.paymasterVerificationGasLimit	string	The amount of gas to allocate for the paymaster validation code&#xA;dummyPaymasterAndData.paymasterPostOpGasLimit	string	The amount of gas to allocate for the paymaster post-operation code&#xA;sponsorMetadata	object	Information about the Gas Policy Sponsor&#xA;sponsorMetadata.name	string	Name of Sponsor who is sponsoring the Gas Policy&#xA;sponsorMetadata.description	string	A short description of the sponsor&#xA;sponsorMetadata.url	string	Website of the Sponsor&#xA;sponsorMetadata.icons	string\[]	Logos or Icons that the Sponsor is using to promote their Gas Policy |
| tokens            | Object\[]key	type	descriptionname	string	Name of the ERC-20 Token&#xA;symbol	string	Token Symbol&#xA;address	string	Token contract address&#xA;decimals	number	Decimals of token&#xA;exchangeRate	string	Exchange rate of token                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

### pm\_sponsorUserOperation[​](#pm_sponsoruseroperation-2 "Direct link to 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[​](#invocation-7 "Direct link to Invocation")

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

#### Return[​](#return-7 "Direct link to 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[],

    }

  }

}
```

* Example Request
* Example Response
* Request Types
* Response Type

```
{

  "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.

  ]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymaster": "0x..",

    "paymasterData": "0x..",

    "paymasterVerificationGasLimit": "0x..",

    "paymasterPostOpGasLimit": "0x..",

    "callGasLimit": "0x...",

    "verificationGasLimit": "0x...",

    "preVerificationGas": "0x..",

    "maxFeePerGas": "0x..",

    "maxPriorityFeePerGas": "0x..",

    "sponsorMetadata": {

      "name": "Aave",

      "description": "Open Source Liquidity Protocol",

      "url": "https://app.aave.com/",

      "icons": ["https://aave.com/aave-2030-header.svg"],

    }

  }

}
```

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	string	Anti-replay parameter (see “Semi-abstracted Nonce Support” )&#xA;factory	string	account factory, only for new accounts&#xA;factoryData	string	data for account factory (only if account factory exists)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	Extra gas to pay the bunder&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymaster	string	Address of paymaster contract, (or empty, if account pays for itself)&#xA;paymasterVerificationGasLimit	bigint \| null	The amount of gas to allocate for the paymaster verification step&#xA;paymasterPostOpGasLimit	bigint \| null	The amount of gas to allocate for the paymaster post-operation code&#xA;paymasterData	string	Data for paymaster (only if paymaster exists)&#xA;signature	string	Data passed into the account to verify authorization |
| entrypoint    | Type	Descriptionstring	Entrypoint address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| context       | Object: This argument contains information about the specific paymaster implementation you are using. If use paying gas in ERC-20 Tokens, pass the token address.key	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

| key                             | type       | description                                                                     |
| :------------------------------ | :--------- | :------------------------------------------------------------------------------ |
| `paymaster`                     | `string`   | Address of paymaster contract, (or empty, if account pays for itself)           |
| `paymasterVerificationGasLimit` | `string`   | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterPostOpGasLimit`       | `string`   | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterData`                 | `string`   | Data for paymaster (only if paymaster exists)                                   |
| `callGasLimit`                  | `string`   | The amount of gas to allocate the main execution call                           |
| `verificationGasLimit`          | `string`   | The amount of gas to allocate for the verification step                         |
| `preVerificationGas`            | `string`   | Extra gas to pay the bunder                                                     |
| `maxFeePerGas`                  | `string`   | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)                    |
| `maxPriorityFeePerGas`          | `string`   | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas) |
| `sponsorMetadata`               | `object`   | Information about the Gas Policy Sponsor                                        |
| `sponsorMetadata.name`          | `string`   | Name of Sponsor who is sponsoring the Gas Policy                                |
| `sponsorMetadata.description`   | `string`   | A short description of the sponsor                                              |
| `sponsorMetadata.url`           | `string`   | Website of the Sponsor                                                          |
| `sponsorMetadata.icons`         | `string[]` | Logos or Icons that the Sponsor is using to promote their Gas Policy            |

### pm\_supportedEntryPoints[​](#pm_supportedentrypoints-2 "Direct link to pm_supportedEntryPoints")

Returns the entryPoint addresses supported by the paymaster.

#### Invocation[​](#invocation-8 "Direct link to Invocation")

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

#### Return[​](#return-8 "Direct link to Return")

```
{ "result": string[] }
```

* Example Request
* Example Response
* Response Type

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_supportedEntryPoints",

  "params": []

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": ["0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", "0x0000000071727de22e5e9d8baf0edac6f37da032"] // Entrypoint addresses

}
```

| key           | type       | description                                               |
| :------------ | :--------- | :-------------------------------------------------------- |
| `entrypoints` | `string[]` | The EntryPoint Addresses that the paymaster is supporting |

### pm\_chainId[​](#pm_chainid-2 "Direct link to pm_chainId")

Get Chain ID asks the paymaster service to return the chain\_id it currently supports

#### Invocation[​](#invocation-9 "Direct link to Invocation")

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

#### Return[​](#return-9 "Direct link to Return")

```
{ "result": number }
```

* Example Request
* Example Response
* Response Type

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_chainId",

  "params": []

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": 1

}
```

| Parameter | Type     | Description                          |
| :-------- | :------- | :----------------------------------- |
| chainId   | `number` | Chain ID that the paymaster supports |

### pm\_getPaymasterStubData[​](#pm_getpaymasterstubdata-2 "Direct link to pm_getPaymasterStubData")

[ERC-7677](https://eips.ethereum.org/EIPS/eip-7677) compatible method. Equivalent to Candide's [`pm_sponsorUserOperation`](https://docs.candide.dev/wallet/paymaster/rpc-methods.md#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[​](#invocation-10 "Direct link to Invocation")

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

#### Return[​](#return-10 "Direct link to 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[],

    }

  }

}
```

* Example Request
* Example Response
* Request Types
* Response Type

```
{

  "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.

  ]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymaster": "0x..",

    "paymasterData": "0x..",

    "paymasterVerificationGasLimit": "0x..",

    "paymasterPostOpGasLimit": "0x..",

    "callGasLimit": "0x...",

    "verificationGasLimit": "0x...",

    "preVerificationGas": "0x..",

    "maxFeePerGas": "0x..",

    "maxPriorityFeePerGas": "0x..",

    "sponsor": {

      "name": "Aave",

      "description": "Open Source Liquidity Protocol",

      "url": "https://app.aave.com/",

      "icons": ["https://aave.com/aave-2030-header.svg"],

    },

    "isFinal": true,

  }

}
```

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	string	Anti-replay parameter (see “Semi-abstracted Nonce Support” )&#xA;factory	string	account factory, only for new accounts&#xA;factoryData	string	data for account factory (only if account factory exists)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	Extra gas to pay the bunder&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymaster	string	Address of paymaster contract, (or empty, if account pays for itself)&#xA;paymasterVerificationGasLimit	bigint \| null	The amount of gas to allocate for the paymaster verification step&#xA;paymasterPostOpGasLimit	bigint \| null	The amount of gas to allocate for the paymaster post-operation code&#xA;paymasterData	string	Data for paymaster (only if paymaster exists)&#xA;signature	string	Data passed into the account to verify authorization |
| entrypoint    | Type	Descriptionstring	Entrypoint address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| chainId       | Type	Descriptionstring	Chain ID in hex string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| context       | Object: This argument contains information about the specific paymaster implementation you are using. If use paying gas in ERC-20 Tokens, pass the token address.key	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

| key                             | type     | description                                                                     |
| :------------------------------ | :------- | :------------------------------------------------------------------------------ |
| `paymaster`                     | `string` | Address of paymaster contract, (or empty, if account pays for itself)           |
| `paymasterVerificationGasLimit` | `string` | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterPostOpGasLimit`       | `string` | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterData`                 | `string` | Data for paymaster (only if paymaster exists)                                   |
| `callGasLimit`                  | `string` | The amount of gas to allocate the main execution call                           |
| `verificationGasLimit`          | `string` | The amount of gas to allocate for the verification step                         |
| `preVerificationGas`            | `string` | Extra gas to pay the bunder                                                     |
| `maxFeePerGas`                  | `string` | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)                    |
| `maxPriorityFeePerGas`          | `string` | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas) |
| `sponsor`                       | `object` | Information about the Gas Policy Sponsor                                        |
| `sponsor.name`                  | `string` | Name of Sponsor who is sponsoring the Gas Policy                                |
| `sponsor.description`           | `string` | A short description of the sponsor                                              |
| `sponsor.url`                   | `string` | Website of the Sponsor                                                          |
| `sponsor.icon`                  | `string` | Logo of the Sponsor to promote their Gas Policy                                 |

### pm\_getPaymasterData[​](#pm_getpaymasterdata-2 "Direct link to pm_getPaymasterData")

[ERC-7677](https://eips.ethereum.org/EIPS/eip-7677) compatible method. Equivalent to Candide's [`pm_sponsorUserOperation`](https://docs.candide.dev/wallet/paymaster/rpc-methods.md#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[​](#invocation-11 "Direct link to Invocation")

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

#### Return[​](#return-11 "Direct link to Return")

```
{

  "result": {

    paymaster: string,

    paymasterData: string,

    paymasterVerificationGasLimit: string,

    paymasterPostOpGasLimit: string,

    callGasLimit?: string,

    verificationGasLimit?: string,

    preVerificationGas?: string,

    maxFeePerGas?: string,

    maxPriorityFeePerGas?: string,

  }

}
```

* Example Request
* Example Response
* Request Types
* Response Type

```
{

  "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.

  ]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymaster": "0x..",

    "paymasterData": "0x..",

    "paymasterVerificationGasLimit": "0x..",

    "paymasterPostOpGasLimit": "0x..",

    "callGasLimit": "0x...",

    "verificationGasLimit": "0x...",

    "preVerificationGas": "0x..",

    "maxFeePerGas": "0x..",

    "maxPriorityFeePerGas": "0x..",

  }

}
```

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	string	Anti-replay parameter (see “Semi-abstracted Nonce Support” )&#xA;factory	string	account factory, only for new accounts&#xA;factoryData	string	data for account factory (only if account factory exists)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	Extra gas to pay the bunder&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymaster	string	Address of paymaster contract, (or empty, if account pays for itself)&#xA;paymasterVerificationGasLimit	bigint \| null	The amount of gas to allocate for the paymaster verification step&#xA;paymasterPostOpGasLimit	bigint \| null	The amount of gas to allocate for the paymaster post-operation code&#xA;paymasterData	string	Data for paymaster (only if paymaster exists)&#xA;signature	string	Data passed into the account to verify authorization |
| entrypoint    | Type	Descriptionstring	Entrypoint address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| chainId       | Type	Descriptionstring	Chain ID in hex string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| context       | Object: This argument contains information about the specific paymaster implementation you are using. If use paying gas in ERC-20 Tokens, pass the token address.key	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

| key                             | type     | description                                                                     |
| :------------------------------ | :------- | :------------------------------------------------------------------------------ |
| `paymaster`                     | `string` | Address of paymaster contract, (or empty, if account pays for itself)           |
| `paymasterVerificationGasLimit` | `string` | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterPostOpGasLimit`       | `string` | The amount of gas to allocate for the paymaster post-operation code             |
| `paymasterData`                 | `string` | Data for paymaster (only if paymaster exists)                                   |
| `callGasLimit`                  | `string` | The amount of gas to allocate the main execution call                           |
| `verificationGasLimit`          | `string` | The amount of gas to allocate for the verification step                         |
| `preVerificationGas`            | `string` | Extra gas to pay the bunder                                                     |
| `maxFeePerGas`                  | `string` | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)                    |
| `maxPriorityFeePerGas`          | `string` | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas) |

## Entrypoint V0.6[​](#entrypoint-v06 "Direct link to Entrypoint V0.6")

### pm\_supportedERC20Tokens[​](#pm_supportederc20tokens-3 "Direct link to pm_supportedERC20Tokens")

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

#### Invocation[​](#invocation-12 "Direct link to Invocation")

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

#### Return[​](#return-12 "Direct link to 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,

    }]

  }

}
```

* Example Request
* Example Response
* Response Types

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_supportedERC20Tokens",

  "params": ["0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymasterMetadata": {

      "name": "Candide Paymaster",

      "description": "Candide Paymaster a fast, secure and feature-rich 4337 Paymaster",

      "icons": [],

      "address": "0x7e3393ebA62DA6f555a5341E079e0F6585CE8c56",

      "sponsoredEventTopic": "0x13..fa1",

      "dummyPaymasterAndData": "0x69...135",

    },

    "tokens": [{

      "name": "Maker DAI",

      "symbol": "DAI",

      "address": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",

      "decimal": "0x12",

      "exchangeRate": "0x0ddeb609310c89b1"

    }]

  }

}
```

| Parameter         | Type                                                                                                                                                                                                                                                                                                                                                                                                       |
| :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| paymasterMetadata | Objectkey	type	descriptionname	string	Paymaster Name&#xA;description	string	A short description for the paymaster service&#xA;icons	string\[]	icons associated with the paymaster service&#xA;address	string	Paymaster Contract Address&#xA;sponsoredEventTopic	string	Emmited topic event if a paymaster is being used&#xA;dummyPaymasterAndData	string	Dummy value to use for estimating userop gas before sponsorship |
| tokens            | Object\[]key	type	descriptionname	string	Name of the ERC-20 Token&#xA;symbol	string	Token Symbol&#xA;address	string	Token contract address&#xA;decimals	number	Decimals of token&#xA;exchangeRate	string	Exchange rate of token                                                                                                                                                                                        |

### pm\_sponsorUserOperation[​](#pm_sponsoruseroperation-3 "Direct link to 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[​](#invocation-13 "Direct link to Invocation")

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

#### Return[​](#return-13 "Direct link to Return")

```
{

  "result": {

    paymasterAndData: string,

    callGasLimit?: string,

    verificationGasLimit?: string,

    preVerificationGas?: string,

    maxFeePerGas?: string,

    maxPriorityFeePerGas?: string,

    sponsorMetadata?: {

      name: string,

      description: string,

      url: string,

      icons: string[],

    }

  }

}
```

* Example Request
* Example Response
* Request Types
* Response Type

```
{

  "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.

  ]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymasterAndData": "0x....",

    "callGasLimit": "0x...",

    "verificationGasLimit": "0x...",

    "preVerificationGas": "0x..",

    "maxFeePerGas": "0x..",

    "maxPriorityFeePerGas": "0x..",

    "sponsorMetadata": {

      "name": "Aave",

      "description": "Open Source Liquidity Protocol",

      "url": "https://app.aave.com/",

      "icons": ["https://aave.com/aave-2030-header.svg"],

    }

  }

}
```

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	string	Anti-replay parameter (see “Semi-abstracted Nonce Support” )&#xA;initCode	string	The initCode of the account (needed if and only if the account is not yet on-chain and needs to be created)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymasterAndData	string	Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (empty for self-sponsored transaction). Revolves to '0x' if not using a paymaster, and a paymasterDummyData when estimating gas&#xA;signature	string	The signature for the userOperation. It is the data passed into the account along with the nonce during the verification step. Resolves to '0x' when the user did not provide their signature yet |
| entrypoint    | Type	Descriptionstring	Entrypoint address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| context       | Object: This argument contains information about the specific paymaster implementation you are using. If use paying gas in ERC-20 Tokens, pass the token address.key	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

| key                    | type      | description                                                                                                          |
| :--------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------- |
| `paymasterAndData`     | `string`  | Paymaster address and data required to pass paymaster contract validation                                            |
| `callGasLimit`         | `string?` | The amount of gas to allocate the main execution call. Optional return.                                              |
| `verificationGasLimit` | `string?` | The amount of gas to allocate for the verification step. Optional return.                                            |
| `preVerificationGas`   | `string?` | The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata. Optional return. |
| `maxFeePerGas`         | `string?` | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas). Optional Return.                                       |
| `maxPriorityFeePerGas` | `string?` | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas). Optional Return                     |

### pm\_supportedEntryPoints[​](#pm_supportedentrypoints-3 "Direct link to pm_supportedEntryPoints")

Returns the entryPoint addresses supported by the paymaster.

#### Invocation[​](#invocation-14 "Direct link to Invocation")

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

#### Return[​](#return-14 "Direct link to Return")

```
{ "result": string[] }
```

* Example Request
* Example Response
* Response Type

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_supportedEntryPoints",

  "params": []

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": ["0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", "0x0000000071727de22e5e9d8baf0edac6f37da032"] // Entrypoint addresses

}
```

| key           | type       | description                                               |
| :------------ | :--------- | :-------------------------------------------------------- |
| `entrypoints` | `string[]` | The EntryPoint Addresses that the paymaster is supporting |

### pm\_chainId[​](#pm_chainid-3 "Direct link to pm_chainId")

Get Chain ID asks the paymaster service to return the chain\_id it currently supports

#### Invocation[​](#invocation-15 "Direct link to Invocation")

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

#### Return[​](#return-15 "Direct link to Return")

```
{ "result": number }
```

* Example Request
* Example Response
* Response Type

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "method": "pm_chainId",

  "params": []

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": 1

}
```

| Parameter | Type     | Description                          |
| :-------- | :------- | :----------------------------------- |
| chainId   | `number` | Chain ID that the paymaster supports |

### pm\_getPaymasterStubData[​](#pm_getpaymasterstubdata-3 "Direct link to pm_getPaymasterStubData")

[ERC-7677](https://eips.ethereum.org/EIPS/eip-7677) compatible method. Equivalent to Candide's [`pm_sponsorUserOperation`](https://docs.candide.dev/wallet/paymaster/rpc-methods.md#pm_sponsoruseroperation-1). 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[​](#invocation-16 "Direct link to Invocation")

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

#### Return[​](#return-16 "Direct link to Return")

```
{

  "result": {

    paymasterAndData: string,

    callGasLimit?: string,

    verificationGasLimit?: string,

    preVerificationGas?: string,

    maxFeePerGas?: string,

    maxPriorityFeePerGas?: string,

    sponsor?: {

      name: string,

      icon?: string,

    }

  }

}
```

* Example Request
* Example Response
* Request Types
* Response Type

```
{

  "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.

  ]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymasterAndData": "0x....",

    "callGasLimit": "0x...",

    "verificationGasLimit": "0x...",

    "preVerificationGas": "0x..",

    "maxFeePerGas": "0x..",

    "maxPriorityFeePerGas": "0x..",

    "sponsor": {

      "name": "Aave",

      "description": "Open Source Liquidity Protocol",

      "url": "https://app.aave.com/",

      "icon": "https://aave.com/aave-2030-header.svg",

    },

  }

}
```

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	string	Anti-replay parameter (see “Semi-abstracted Nonce Support” )&#xA;initCode	string	The initCode of the account (needed if and only if the account is not yet on-chain and needs to be created)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymasterAndData	string	Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (empty for self-sponsored transaction). Revolves to '0x' if not using a paymaster, and a paymasterDummyData when estimating gas&#xA;signature	string	The signature for the userOperation. It is the data passed into the account along with the nonce during the verification step. Resolves to '0x' when the user did not provide their signature yet |
| entrypoint    | Type	Descriptionstring	Entrypoint address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| chainId       | Type	Descriptionstring	Chain ID in hex string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| context       | Object: This argument contains information about the specific paymaster implementation you are using. If use paying gas in ERC-20 Tokens, pass the token address.key	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

| key                    | type      | description                                                                                        |
| :--------------------- | :-------- | :------------------------------------------------------------------------------------------------- |
| `paymasterAndData`     | `string`  | Paymaster address and data required to pass paymaster contract validation                          |
| `preVerificationGas`   | `string`  | The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata |
| `maxFeePerGas`         | `string`  | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)                                       |
| `maxPriorityFeePerGas` | `string`  | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)                    |
| `isFinal`              | `boolean` | Indicates that the caller does not need to call pm\_getPaymasterData                               |
| `sponsor`              | `object`  | Information about the Gas Policy Sponsor                                                           |
| `sponsor.name`         | `string`  | Name of Sponsor who is sponsoring the Gas Policy                                                   |
| `sponsor.description`  | `string`  | A short description of the sponsor                                                                 |
| `sponsor.url`          | `string`  | Website of the Sponsor                                                                             |
| `sponsor.icon`         | `string`  | Logo of the Sponsor to promote their Gas Policy                                                    |

### pm\_getPaymasterData[​](#pm_getpaymasterdata-3 "Direct link to pm_getPaymasterData")

[ERC-7677](https://eips.ethereum.org/EIPS/eip-7677) compatible method. Equivalent to Candide's [`pm_sponsorUserOperation`](https://docs.candide.dev/wallet/paymaster/rpc-methods.md#pm_sponsoruseroperation-1).

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[​](#invocation-17 "Direct link to Invocation")

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

#### Return[​](#return-17 "Direct link to Return")

```
{

  "result": {

    paymasterAndData: string,

    callGasLimit?: string,

    verificationGasLimit?: string,

    preVerificationGas?: string,

    maxFeePerGas?: string,

    maxPriorityFeePerGas?: string,

  }

}
```

* Example Request
* Example Response
* Request Types
* Response Type

```
{

  "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.

  ]

}
```

```
{

  "jsonrpc": "2.0",

  "id": 0,

  "result": {

    "paymasterAndData": "0x....",

    "callGasLimit": "0x...",

    "verificationGasLimit": "0x...",

    "preVerificationGas": "0x..",

    "maxFeePerGas": "0x..",

    "maxPriorityFeePerGas": "0x..",

    "sponsor": {

      "name": "Aave",

      "description": "Open Source Liquidity Protocol",

      "url": "https://app.aave.com/",

      "icon": "https://aave.com/aave-2030-header.svg",

    },

  }

}
```

| Parameter     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userOperation | Objectkey	type	descriptionsender	string	The account making the operation&#xA;nonce	string	Anti-replay parameter (see “Semi-abstracted Nonce Support” )&#xA;initCode	string	The initCode of the account (needed if and only if the account is not yet on-chain and needs to be created)&#xA;callData	string	The data to pass to the sender during the main execution call&#xA;callGasLimit	bigint	The amount of gas to allocate the main execution call&#xA;verificationGasLimit	bigint	The amount of gas to allocate for the verification step&#xA;preVerificationGas	bigint	The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata&#xA;maxFeePerGas	bigint	Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)&#xA;maxPriorityFeePerGas	bigint	Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)&#xA;paymasterAndData	string	Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (empty for self-sponsored transaction). Revolves to '0x' if not using a paymaster, and a paymasterDummyData when estimating gas&#xA;signature	string	The signature for the userOperation. It is the data passed into the account along with the nonce during the verification step. Resolves to '0x' when the user did not provide their signature yet |
| entrypoint    | Type	Descriptionstring	Entrypoint address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| chainId       | Type	Descriptionstring	Chain ID in hex string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| context       | Object: This argument contains information about the specific paymaster implementation you are using. If use paying gas in ERC-20 Tokens, pass the token address.key	type	descriptiontoken	string?	ERC20 token address, if paying gas in erc-20 tokens (optional)&#xA;sponsorshipPolicyId	string?	Sponsorship Policy ID if using a private gas policy (optional)&#xA;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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

| key                    | type     | description                                                                                        |
| :--------------------- | :------- | :------------------------------------------------------------------------------------------------- |
| `paymasterAndData`     | `string` | Paymaster address and data required to pass paymaster contract validation                          |
| `preVerificationGas`   | `string` | The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata |
| `maxFeePerGas`         | `string` | Maximum fee per gas (similar to EIP-1559 max\_fee\_per\_gas)                                       |
| `maxPriorityFeePerGas` | `string` | Maximum priority fee per gas (similar to EIP-1559 max\_priority\_fee\_per\_gas)                    |
| `sponsor`              | `object` | Information about the Gas Policy Sponsor                                                           |
| `sponsor.name`         | `string` | Name of Sponsor who is sponsoring the Gas Policy                                                   |
| `sponsor.description`  | `string` | A short description of the sponsor                                                                 |
| `sponsor.url`          | `string` | Website of the Sponsor                                                                             |
| `sponsor.icon`         | `string` | Logo of the Sponsor to promote their Gas Policy                                                    |
