# wallet_requestQuote_v0

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://api.g.alchemy.com/v2/{apiKey}

This method is used to request swap quotes

Reference: https://www.alchemy.com/docs/wallets/api-reference/smart-wallets/wallet-api-endpoints/wallet-request-quote-v-0

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| params[0] | object | Yes |  |

## Result

**requestQuoteResponse** (object)

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "wallet_requestQuote_v0",
  "params": [
    {
      "from": "0xa363219d7C0b8673df17529D469Db9eFF0f35D2A",
      "fromToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEee",
      "toToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "minimumToAmount": "0x5F5E100",
      "chainId": "0xa4b1",
      "capabilities": {
        "paymasterService": {
          "policyId": "11111111-2222-3333-4444-555555555555"
        }
      },
      "postCalls": [
        {
          "to": "0x1234567890123456789012345678901234567890",
          "data": "0x"
        }
      ]
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "rawCalls": false,
    "quote": {
      "fromAmount": "0x123",
      "minimumToAmount": "0x456",
      "expiry": "0x1234567890"
    },
    "type": "user-operation-v070",
    "data": {
      "sender": "0xa363219d7C0b8673df17529D469Db9eFF0f35D2A",
      "nonce": "0x10000000000000000",
      "callData": "0x34fcd5be0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000001234567890123456789012345678901234567890000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
      "paymaster": "0x3f222Df6aB18C1E10d0Ec136503c3B0dfd929048",
      "paymasterData": "0x0000000000000000682d7e7c9fa6f71c28c31141a11ac9eb2bdbe898ddbd42a4f7085f8bb3380ba75dd9231a386e24fe5a84777217c907391e983b5b0f78a4a9d0fd1c8631dd22c10e106b461c",
      "paymasterPostOpGasLimit": "0x0",
      "paymasterVerificationGasLimit": "0x74d3",
      "maxPriorityFeePerGas": "0x60e4b0",
      "maxFeePerGas": "0x1bf52290",
      "callGasLimit": "0x2bb8",
      "verificationGasLimit": "0xc845",
      "preVerificationGas": "0x14b74"
    },
    "chainId": "0x66eee",
    "signatureRequest": {
      "type": "personal_sign",
      "data": {
        "raw": "0xc69e468aa6fafb5c7298c02841e76f976b433018266af39a5807bc29ea9ad392"
      },
      "rawPayload": "0x2a8073568c8fad3edf15f70c3471a7fff18e1d57c650a501ab47f57a5c1f0e39"
    },
    "feePayment": {
      "sponsored": false,
      "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "maxAmount": "0x1f34"
    },
    "details": {
      "type": "user-operation",
      "data": {
        "hash": "0xc69e468aa6fafb5c7298c02841e76f976b433018266af39a5807bc29ea9ad392",
        "calls": [
          {
            "to": "0x1234567890123456789012345678901234567890",
            "data": "0x"
          }
        ]
      }
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://api.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "wallet_requestQuote_v0",
  "params": [
    {
      "from": "0xa363219d7C0b8673df17529D469Db9eFF0f35D2A",
      "fromToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEee",
      "toToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "minimumToAmount": "0x5F5E100",
      "chainId": "0xa4b1",
      "capabilities": {
        "paymasterService": {
          "policyId": "11111111-2222-3333-4444-555555555555"
        }
      },
      "postCalls": [
        {
          "to": "0x1234567890123456789012345678901234567890",
          "data": "0x"
        }
      ]
    }
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'wallet_requestQuote_v0',
    params: [
      {
        from: '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A',
        fromToken: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEee',
        toToken: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831',
        minimumToAmount: '0x5F5E100',
        chainId: '0xa4b1',
        capabilities: {paymasterService: {policyId: '11111111-2222-3333-4444-555555555555'}},
        postCalls: [{to: '0x1234567890123456789012345678901234567890', data: '0x'}]
      }
    ]
  })
};

fetch('https://api.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "wallet_requestQuote_v0",
    "params": [
        {
            "from": "0xa363219d7C0b8673df17529D469Db9eFF0f35D2A",
            "fromToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEee",
            "toToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
            "minimumToAmount": "0x5F5E100",
            "chainId": "0xa4b1",
            "capabilities": { "paymasterService": { "policyId": "11111111-2222-3333-4444-555555555555" } },
            "postCalls": [
                {
                    "to": "0x1234567890123456789012345678901234567890",
                    "data": "0x"
                }
            ]
        }
    ]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"wallet_requestQuote_v0\",\n  \"params\": [\n    {\n      \"from\": \"0xa363219d7C0b8673df17529D469Db9eFF0f35D2A\",\n      \"fromToken\": \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEee\",\n      \"toToken\": \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\",\n      \"minimumToAmount\": \"0x5F5E100\",\n      \"chainId\": \"0xa4b1\",\n      \"capabilities\": {\n        \"paymasterService\": {\n          \"policyId\": \"11111111-2222-3333-4444-555555555555\"\n        }\n      },\n      \"postCalls\": [\n        {\n          \"to\": \"0x1234567890123456789012345678901234567890\",\n          \"data\": \"0x\"\n        }\n      ]\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://api.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"wallet_requestQuote_v0\",\n  \"params\": [\n    {\n      \"from\": \"0xa363219d7C0b8673df17529D469Db9eFF0f35D2A\",\n      \"fromToken\": \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEee\",\n      \"toToken\": \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\",\n      \"minimumToAmount\": \"0x5F5E100\",\n      \"chainId\": \"0xa4b1\",\n      \"capabilities\": {\n        \"paymasterService\": {\n          \"policyId\": \"11111111-2222-3333-4444-555555555555\"\n        }\n      },\n      \"postCalls\": [\n        {\n          \"to\": \"0x1234567890123456789012345678901234567890\",\n          \"data\": \"0x\"\n        }\n      ]\n    }\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://api.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"wallet_requestQuote_v0\",\n  \"params\": [\n    {\n      \"from\": \"0xa363219d7C0b8673df17529D469Db9eFF0f35D2A\",\n      \"fromToken\": \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEee\",\n      \"toToken\": \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\",\n      \"minimumToAmount\": \"0x5F5E100\",\n      \"chainId\": \"0xa4b1\",\n      \"capabilities\": {\n        \"paymasterService\": {\n          \"policyId\": \"11111111-2222-3333-4444-555555555555\"\n        }\n      },\n      \"postCalls\": [\n        {\n          \"to\": \"0x1234567890123456789012345678901234567890\",\n          \"data\": \"0x\"\n        }\n      ]\n    }\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: wallet_requestQuote_v0
description: This method is used to request swap quotes
params:
  - name: params[0]
    required: true
    schema:
      anyOf:
        - anyOf:
            - anyOf:
                - description: Specify exact 'from' amount
                  type: object
                  required:
                    - chainId
                    - from
                    - fromAmount
                    - fromToken
                    - toToken
                  properties:
                    from:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                    chainId:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid hex string starting with '0x'
                    fromToken:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                    toToken:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                    slippage:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid hex string starting with '0x'
                    postCalls:
                      type: array
                      items:
                        type: object
                        required:
                          - to
                        properties:
                          to:
                            type: string
                            pattern: ^0x.*$
                            errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                          data:
                            type: string
                            pattern: ^0x.*$
                            errorMessage: Must be a valid hex string starting with '0x'
                          value:
                            type: string
                            pattern: ^0x.*$
                            errorMessage: Must be a valid hex string starting with '0x'
                    returnRawCalls:
                      type: boolean
                      description: Must be 'false' or undefined
                    capabilities:
                      type: object
                      properties:
                        permissions:
                          anyOf:
                            - type: object
                              required:
                                - context
                              properties:
                                context:
                                  type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                              description: Permissions context
                            - type: object
                              required:
                                - sessionId
                                - signature
                              properties:
                                sessionId:
                                  type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                                signature:
                                  type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                              description: Remote permission
                        paymasterService:
                          anyOf:
                            - type: object
                              required:
                                - policyId
                              properties:
                                policyId:
                                  type: string
                                  description: The policy ID to use
                                  format: uuid
                              description: Single policy ID
                            - type: object
                              required:
                                - policyIds
                              properties:
                                policyIds:
                                  type: array
                                  description: The policy IDs to use
                                  items:
                                    type: string
                                    format: uuid
                              description: Multiple policy IDs
                          type: object
                          properties:
                            onlyEstimation:
                              type: boolean
                              description: If true, will only estimate fees. Skips signature request and gas sponsorship
                            erc20:
                              anyOf:
                                - type: object
                                  required:
                                    - tokenAddress
                                    - preOpSettings
                                  properties:
                                    tokenAddress:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                                      description: The address of the token to pay gas with
                                    maxTokenAmount:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid hex string starting with '0x'
                                      description: The maximum amount of tokens to allow during ERC20 gas payment
                                    preOpSettings:
                                      type: object
                                      required:
                                        - autoPermit
                                      description: ERC20 Paymaster Settings for pre-op policies (autoPermit)
                                      properties:
                                        autoPermit:
                                          type: object
                                          required:
                                            - below
                                            - amount
                                          description: Settings for automatically injecting a Permit signature for ERC20 gas payment
                                          properties:
                                            below:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The amount below which a Permit signature will be injected
                                            amount:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The amount of tokens to Permit to the paymaster for gas payment
                                            durationSeconds:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The duration of the Permit signature in seconds
                                  additionalProperties: false
                                  description: ERC20 Paymaster Settings with preOpSettings (autoPermit)
                                - type: object
                                  required:
                                    - tokenAddress
                                    - preOpSettings
                                  properties:
                                    tokenAddress:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                                      description: The address of the token to pay gas with
                                    maxTokenAmount:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid hex string starting with '0x'
                                      description: The maximum amount of tokens to allow during ERC20 gas payment
                                    preOpSettings:
                                      type: object
                                      required:
                                        - permitDetails
                                      description: ERC20 Paymaster Settings for pre-op policies (permitDetails)
                                      properties:
                                        permitDetails:
                                          type: object
                                          required:
                                            - deadline
                                            - value
                                          description: Details of the returned Permit signature
                                          properties:
                                            deadline:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The deadline in the signed Permit object
                                            value:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The value in the signed Permit object
                                  additionalProperties: false
                                  description: ERC20 Paymaster Settings with preOpSettings (permitDetails)
                                - type: object
                                  required:
                                    - tokenAddress
                                    - postOpSettings
                                  properties:
                                    tokenAddress:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                                      description: The address of the token to pay gas with
                                    maxTokenAmount:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid hex string starting with '0x'
                                      description: The maximum amount of tokens to allow during ERC20 gas payment
                                    postOpSettings:
                                      type: object
                                      description: ERC20 Paymaster Settings for post-op policies
                                      properties:
                                        autoApprove:
                                          anyOf:
                                            - type: boolean
                                              description: Automatically inject approval for the exact amount needed for this operation
                                            - type: object
                                              required:
                                                - below
                                                - amount
                                              properties:
                                                below:
                                                  type: string
                                                  pattern: ^0x.*$
                                                  errorMessage: Must be a valid hex string starting with '0x'
                                                  description: The amount below which an approval will be injected
                                                amount:
                                                  type: string
                                                  pattern: ^0x.*$
                                                  errorMessage: Must be a valid hex string starting with '0x'
                                                  description: The amount of tokens to approve to the paymaster for gas payment
                                              description: Settings for automatically injecting an approval for ERC20 gas payment with specific thresholds
                                  additionalProperties: false
                                  description: ERC20 Paymaster Settings with postOpSettings
                                - type: object
                                  required:
                                    - tokenAddress
                                  properties:
                                    tokenAddress:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                                      description: The address of the token to pay gas with
                                    maxTokenAmount:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid hex string starting with '0x'
                                      description: The maximum amount of tokens to allow during ERC20 gas payment
                                  additionalProperties: false
                                  description: No auto approval (requires manual ERC20 approvals to paymaster contract)
                              description: ERC20 Paymaster Settings
                              errorMessage: 'ERC20 settings must specify only one of: preOpSettings, postOpSettings, or neither (for manual approvals). Cannot specify both preOpSettings and postOpSettings'
                            webhookData:
                              type: string
                              description: Additional data you can include in the request, such as proof of humanity, if you have enabled custom rules in your Gas Manager policy.
                        gasParamsOverride:
                          type: object
                          minProperties: 1
                          properties:
                            preVerificationGas:
                              anyOf:
                                - type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                                  description: Absolute
                                - type: object
                                  required:
                                    - multiplier
                                  properties:
                                    multiplier:
                                      type: number
                                  description: Multiplier
                            verificationGasLimit:
                              anyOf:
                                - type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                                  description: Absolute
                                - type: object
                                  required:
                                    - multiplier
                                  properties:
                                    multiplier:
                                      type: number
                                  description: Multiplier
                            callGasLimit:
                              anyOf:
                                - type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                                  description: Absolute
                                - type: object
                                  required:
                                    - multiplier
                                  properties:
                                    multiplier:
                                      type: number
                                  description: Multiplier
                            paymasterVerificationGasLimit:
                              anyOf:
                                - type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                                  description: Absolute
                                - type: object
                                  required:
                                    - multiplier
                                  properties:
                                    multiplier:
                                      type: number
                                  description: Multiplier
                            paymasterPostOpGasLimit:
                              anyOf:
                                - type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                                  description: Absolute
                                - type: object
                                  required:
                                    - multiplier
                                  properties:
                                    multiplier:
                                      type: number
                                  description: Multiplier
                            maxFeePerGas:
                              anyOf:
                                - type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                                  description: Absolute
                                - type: object
                                  required:
                                    - multiplier
                                  properties:
                                    multiplier:
                                      type: number
                                  description: Multiplier
                            maxPriorityFeePerGas:
                              anyOf:
                                - type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                                  description: Absolute
                                - type: object
                                  required:
                                    - multiplier
                                  properties:
                                    multiplier:
                                      type: number
                                  description: Multiplier
                        eip7702Auth:
                          anyOf:
                            - type: object
                              required:
                                - delegation
                              properties:
                                account:
                                  type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                                delegation:
                                  anyOf:
                                    - enum:
                                        - ModularAccountV2
                                    - enum:
                                        - '0x69007702764179f14F51cdce752f4f775d74E139'
                                        - '0x0000000000000000000000000000000000000000'
                              description: Specify EIP-7702 delegation
                            - type: boolean
                              description: 'Use default EIP-7702 delegation (Note: EIP-7702 is enabled by default unless you first call `wallet_requestAccount` to get a smart contract address.)'
                        nonceOverride:
                          type: object
                          required:
                            - nonceKey
                          properties:
                            nonceKey:
                              type: string
                              pattern: ^0x.*$
                              errorMessage: Must be a valid hex string starting with '0x'
                              description: Override nonce key as hex string
                        stateOverride:
                          type: object
                          description: Mapping from account address to overrides
                          additionalProperties:
                            anyOf:
                              - description: Account override with full state or state diff
                                type: object
                                anyOf:
                                  - type: object
                                    required:
                                      - state
                                    properties:
                                      state:
                                        type: object
                                        additionalProperties:
                                          type: string
                                          pattern: ^0x.*$
                                          errorMessage: Must be a valid hex string starting with '0x'
                                    description: Full account state
                                  - type: object
                                    required:
                                      - stateDiff
                                    properties:
                                      stateDiff:
                                        type: object
                                        additionalProperties:
                                          type: string
                                          pattern: ^0x.*$
                                          errorMessage: Must be a valid hex string starting with '0x'
                                    description: Account state diff
                                properties:
                                  balance:
                                    type: string
                                    pattern: ^0x.*$
                                    errorMessage: Must be a valid hex string starting with '0x'
                                  nonce:
                                    type: string
                                    pattern: ^0x.*$
                                    errorMessage: Must be a valid hex string starting with '0x'
                                  code:
                                    type: string
                                    pattern: ^0x.*$
                                    errorMessage: Must be a valid hex string starting with '0x'
                              - type: object
                                properties:
                                  balance:
                                    type: string
                                    pattern: ^0x.*$
                                    errorMessage: Must be a valid hex string starting with '0x'
                                  nonce:
                                    type: string
                                    pattern: ^0x.*$
                                    errorMessage: Must be a valid hex string starting with '0x'
                                  code:
                                    type: string
                                    pattern: ^0x.*$
                                    errorMessage: Must be a valid hex string starting with '0x'
                                description: Account override without state changes
                        experimental_dataSuffix:
                          type: object
                          required:
                            - value
                          description: ERC-8021 transaction attribution data suffix. The wallet appends these bytes to calldata to enable interoperable attribution tracking.
                          properties:
                            value:
                              type: string
                              pattern: ^0x.*$
                              errorMessage: Must be a valid hex string starting with '0x'
                    fromAmount:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid hex string starting with '0x'
                - description: Specify minimum 'to' amount
                  type: object
                  required:
                    - chainId
                    - from
                    - fromToken
                    - minimumToAmount
                    - toToken
                  properties:
                    from:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                    chainId:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid hex string starting with '0x'
                    fromToken:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                    toToken:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                    slippage:
                      type: string
                      pattern: ^0x.*$
                      errorMessage: Must be a valid hex string starting with '0x'
                    postCalls:
                      type: array
                      items:
                        type: object
                        required:
                          - to
                        properties:
                          to:
                            type: string
                            pattern: ^0x.*$
                            errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                          data:
                            type: string
                            pattern: ^0x.*$
                            errorMessage: Must be a valid hex string starting with '0x'
                          value:
                            type: string
                            pattern: ^0x.*$
                            errorMessage: Must be a valid hex string starting with '0x'
                    returnRawCalls:
                      type: boolean
                      description: Must be 'false' or undefined
                    capabilities:
                      type: object
                      properties:
                        permissions:
                          anyOf:
                            - type: object
                              required:
                                - context
                              properties:
                                context:
                                  type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                              description: Permissions context
                            - type: object
                              required:
                                - sessionId
                                - signature
                              properties:
                                sessionId:
                                  type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                                signature:
                                  type: string
                                  pattern: ^0x.*$
                                  errorMessage: Must be a valid hex string starting with '0x'
                              description: Remote permission
                        paymasterService:
                          anyOf:
                            - type: object
                              required:
                                - policyId
                              properties:
                                policyId:
                                  type: string
                                  description: The policy ID to use
                                  format: uuid
                              description: Single policy ID
                            - type: object
                              required:
                                - policyIds
                              properties:
                                policyIds:
                                  type: array
                                  description: The policy IDs to use
                                  items:
                                    type: string
                                    format: uuid
                              description: Multiple policy IDs
                          type: object
                          properties:
                            onlyEstimation:
                              type: boolean
                              description: If true, will only estimate fees. Skips signature request and gas sponsorship
                            erc20:
                              anyOf:
                                - type: object
                                  required:
                                    - tokenAddress
                                    - preOpSettings
                                  properties:
                                    tokenAddress:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                                      description: The address of the token to pay gas with
                                    maxTokenAmount:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid hex string starting with '0x'
                                      description: The maximum amount of tokens to allow during ERC20 gas payment
                                    preOpSettings:
                                      type: object
                                      required:
                                        - autoPermit
                                      description: ERC20 Paymaster Settings for pre-op policies (autoPermit)
                                      properties:
                                        autoPermit:
                                          type: object
                                          required:
                                            - below
                                            - amount
                                          description: Settings for automatically injecting a Permit signature for ERC20 gas payment
                                          properties:
                                            below:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The amount below which a Permit signature will be injected
                                            amount:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The amount of tokens to Permit to the paymaster for gas payment
                                            durationSeconds:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The duration of the Permit signature in seconds
                                  additionalProperties: false
                                  description: ERC20 Paymaster Settings with preOpSettings (autoPermit)
                                - type: object
                                  required:
                                    - tokenAddress
                                    - preOpSettings
                                  properties:
                                    tokenAddress:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                                      description: The address of the token to pay gas with
                                    maxTokenAmount:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid hex string starting with '0x'
                                      description: The maximum amount of tokens to allow during ERC20 gas payment
                                    preOpSettings:
                                      type: object
                                      required:
                                        - permitDetails
                                      description: ERC20 Paymaster Settings for pre-op policies (permitDetails)
                                      properties:
                                        permitDetails:
                                          type: object
                                          required:
                                            - deadline
                                            - value
                                          description: Details of the returned Permit signature
                                          properties:
                                            deadline:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The deadline in the signed Permit object
                                            value:
                                              type: string
                                              pattern: ^0x.*$
                                              errorMessage: Must be a valid hex string starting with '0x'
                                              description: The value in the signed Permit object
                                  additionalProperties: false
                                  description: ERC20 Paymaster Settings with preOpSettings (permitDetails)
                                - type: object
                                  required:
                                    - tokenAddress
                                    - postOpSettings
                                  properties:
                                    tokenAddress:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
                                      description: The address of the token to pay gas with
                                    maxTokenAmount:
                                      type: string
                                      pattern: ^0x.*$
                                      errorMessage: Must be a valid hex string starting with '0x'
                                      description: The maximum amount of tokens to allow during ERC20 gas payment
                                    postOpSettings:
                                      type: object
                                      description: ERC20 Paymaster Settings for post-op policies
                                      properties:
                                        autoApprove:
                                          anyOf:
                                            - type: boolean
                                              description: Automatically inject approval for the exact amount needed for this operation
                                            - type: object
                                              required:
                                                - below
                                                - amount
                                              properties:
                                                below:
                                                  type: string
                                                  pattern: ^0x.*$
                                                  errorMessage: Must be a valid hex string starting with '0x'
# ... truncated (157589 chars) to keep this page under agent context limits.
```
