> ## Documentation Index
> Fetch the complete documentation index at: https://docs.compasslabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Prepare gas-sponsored transaction

> Prepare a gas-sponsored transaction from signed EIP-712 typed data.

Submit the `owner`'s off-chain signature along with the EIP-712 typed data that was signed. Returns an unsigned transaction for the `sender` to sign and broadcast.

**How gas sponsorship works:**
1. Call an endpoint with `gas_sponsorship=true` (e.g., [/earn/transfer](https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account), [/earn/manage](https://docs.compasslabs.ai/v2/api-reference/earn/manage-earn-position), [/credit/transfer](https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account)) to get EIP-712 typed data
2. Owner signs the typed data off-chain
3. Submit signature + typed data to this endpoint
4. Sender signs and broadcasts the returned transaction, paying gas on behalf of the owner

**Note:** For gas-sponsored deposits via [/earn/transfer](https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account) or [/credit/transfer](https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account), the owner must first set up a Permit2 allowance using [/approve_transfer](https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer) (once per token).



## OpenAPI

````yaml /v2/combined_spec.json post /v2/gas_sponsorship/prepare
openapi: 3.1.0
info:
  title: Compass API
  description: Compass Labs DeFi API
  version: 0.0.1
servers:
  - url: https://api.compasslabs.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v2/gas_sponsorship/prepare:
    post:
      tags:
        - Gas Sponsorship
      summary: Prepare gas-sponsored transaction
      description: >-
        Prepare a gas-sponsored transaction from signed EIP-712 typed data.


        Submit the `owner`'s off-chain signature along with the EIP-712 typed
        data that was signed. Returns an unsigned transaction for the `sender`
        to sign and broadcast.


        **How gas sponsorship works:**

        1. Call an endpoint with `gas_sponsorship=true` (e.g.,
        [/earn/transfer](https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account),
        [/earn/manage](https://docs.compasslabs.ai/v2/api-reference/earn/manage-earn-position),
        [/credit/transfer](https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account))
        to get EIP-712 typed data

        2. Owner signs the typed data off-chain

        3. Submit signature + typed data to this endpoint

        4. Sender signs and broadcasts the returned transaction, paying gas on
        behalf of the owner


        **Note:** For gas-sponsored deposits via
        [/earn/transfer](https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account)
        or
        [/credit/transfer](https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account),
        the owner must first set up a Permit2 allowance using
        [/approve_transfer](https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer)
        (once per token).
      operationId: v2_gas_sponsorship_prepare
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SponsorGasRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SponsorGasResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from compass_api_sdk import CompassAPI, models


            with CompassAPI(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as compass_api:

                res = compass_api.gas_sponsorship.gas_sponsorship_prepare(owner="0xCE1A77F0abff993d6d3D04d44b70831c6924fb40", chain=models.Chain.ARBITRUM, eip_712={
                    "domain": {
                        "name": "USD Coin",
                        "version": "2",
                        "chain_id": 42161,
                        "verifying_contract": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                    },
                    "types": {
                        "eip712_domain": [
                            {
                                "name": "name",
                                "type": "string",
                            },
                            {
                                "name": "version",
                                "type": "string",
                            },
                            {
                                "name": "chainId",
                                "type": "uint256",
                            },
                            {
                                "name": "verifyingContract",
                                "type": "address",
                            },
                        ],
                        "permit": [
                            {
                                "name": "owner",
                                "type": "address",
                            },
                            {
                                "name": "spender",
                                "type": "address",
                            },
                            {
                                "name": "value",
                                "type": "uint256",
                            },
                            {
                                "name": "nonce",
                                "type": "uint256",
                            },
                            {
                                "name": "deadline",
                                "type": "uint256",
                            },
                        ],
                    },
                    "primary_type": "Permit",
                    "message": {
                        "owner": "0xCE1A77F0abff993d6d3D04d44b70831c6924fb40",
                        "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
                        "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
                        "nonce": "0",
                        "deadline": "1762269774",
                    },
                }, signature="0x160d2709ae195f591daa33ad6ab1fb18b8762a39d8c4466c4cbe95cf6881fc3d54d469710ef0e7fd64ecff47c1ba5741d7254903bfaebdacea5aa8289f81ba9a1c", sender="0x02122Ac49b0Be2e0eAD957F2D080805A0127Aa9d", product=models.Product.EARN)

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { CompassApiSDK } from "@compass-labs/api-sdk";

            const compassApiSDK = new CompassApiSDK({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await compassApiSDK.gasSponsorship.gasSponsorshipPrepare({
                owner: "0xCE1A77F0abff993d6d3D04d44b70831c6924fb40",
                chain: "arbitrum",
                eip712: {
                  domain: {
                    name: "USD Coin",
                    version: "2",
                    chainId: 42161,
                    verifyingContract: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                  },
                  types: {
                    eip712Domain: [
                      {
                        name: "name",
                        type: "string",
                      },
                      {
                        name: "version",
                        type: "string",
                      },
                      {
                        name: "chainId",
                        type: "uint256",
                      },
                      {
                        name: "verifyingContract",
                        type: "address",
                      },
                    ],
                    permit: [
                      {
                        name: "owner",
                        type: "address",
                      },
                      {
                        name: "spender",
                        type: "address",
                      },
                      {
                        name: "value",
                        type: "uint256",
                      },
                      {
                        name: "nonce",
                        type: "uint256",
                      },
                      {
                        name: "deadline",
                        type: "uint256",
                      },
                    ],
                  },
                  primaryType: "Permit",
                  message: {
                    owner: "0xCE1A77F0abff993d6d3D04d44b70831c6924fb40",
                    spender: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
                    value: "115792089237316195423570985008687907853269984665640564039457584007913129639935",
                    nonce: "0",
                    deadline: "1762269774",
                  },
                },
                signature: "0x160d2709ae195f591daa33ad6ab1fb18b8762a39d8c4466c4cbe95cf6881fc3d54d469710ef0e7fd64ecff47c1ba5741d7254903bfaebdacea5aa8289f81ba9a1c",
                sender: "0x02122Ac49b0Be2e0eAD957F2D080805A0127Aa9d",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    SponsorGasRequest:
      properties:
        owner:
          type: string
          title: Owner
          description: The wallet address that owns the Product Account.
          default: '0xCE1A77F0abff993d6d3D04d44b70831c6924fb40'
          examples:
            - '0xCE1A77F0abff993d6d3D04d44b70831c6924fb40'
        chain:
          $ref: '#/components/schemas/Chain'
          description: Blockchain network
          default: arbitrum
          examples:
            - arbitrum
        product:
          type: string
          enum:
            - earn
            - credit
            - tokenized_assets
          title: Product
          description: >-
            Which product the gas sponsorship is for. Determines which Product
            Account (Safe) address to use.
          default: earn
        eip_712:
          anyOf:
            - $ref: '#/components/schemas/BatchedSafeOperationsResponse-Input'
            - $ref: '#/components/schemas/PermitTypedDataResponse-Input'
            - $ref: '#/components/schemas/Permit2TypedData-Input'
          title: Eip 712
          description: The EIP-712 typed data that was signed.
          default:
            domain:
              chainId: 42161
              name: USD Coin
              verifyingContract: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
              version: '2'
            message:
              deadline: '1762269774'
              nonce: '0'
              owner: '0xCE1A77F0abff993d6d3D04d44b70831c6924fb40'
              spender: '0x000000000022D473030F116dDEE9F6B43aC78BA3'
              value: >-
                115792089237316195423570985008687907853269984665640564039457584007913129639935
            primaryType: Permit
            types:
              EIP712Domain:
                - name: name
                  type: string
                - name: version
                  type: string
                - name: chainId
                  type: uint256
                - name: verifyingContract
                  type: address
              Permit:
                - name: owner
                  type: address
                - name: spender
                  type: address
                - name: value
                  type: uint256
                - name: nonce
                  type: uint256
                - name: deadline
                  type: uint256
          examples:
            - domain:
                chainId: 42161
                name: USD Coin
                verifyingContract: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
                version: '2'
              message:
                deadline: '1762269774'
                nonce: '0'
                owner: '0xCE1A77F0abff993d6d3D04d44b70831c6924fb40'
                spender: '0x000000000022D473030F116dDEE9F6B43aC78BA3'
                value: >-
                  115792089237316195423570985008687907853269984665640564039457584007913129639935
              primaryType: Permit
              types:
                EIP712Domain:
                  - name: name
                    type: string
                  - name: version
                    type: string
                  - name: chainId
                    type: uint256
                  - name: verifyingContract
                    type: address
                Permit:
                  - name: owner
                    type: address
                  - name: spender
                    type: address
                  - name: value
                    type: uint256
                  - name: nonce
                    type: uint256
                  - name: deadline
                    type: uint256
        signature:
          type: string
          title: Signature
          description: The EIP-712 signed typed data signature.
          default: >-
            0x160d2709ae195f591daa33ad6ab1fb18b8762a39d8c4466c4cbe95cf6881fc3d54d469710ef0e7fd64ecff47c1ba5741d7254903bfaebdacea5aa8289f81ba9a1c
          examples:
            - >-
              0x160d2709ae195f591daa33ad6ab1fb18b8762a39d8c4466c4cbe95cf6881fc3d54d469710ef0e7fd64ecff47c1ba5741d7254903bfaebdacea5aa8289f81ba9a1c
        sender:
          type: string
          title: Sender
          description: The address of the wallet which will send the transaction.
          default: '0x02122Ac49b0Be2e0eAD957F2D080805A0127Aa9d'
          examples:
            - '0x02122Ac49b0Be2e0eAD957F2D080805A0127Aa9d'
      type: object
      required:
        - owner
        - chain
        - eip_712
        - signature
        - sender
      title: SponsorGasRequest
      default:
        owner: '0xCE1A77F0abff993d6d3D04d44b70831c6924fb40'
        chain: arbitrum
        eip_712:
          domain:
            chainId: 42161
            name: USD Coin
            verifyingContract: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
            version: '2'
          message:
            deadline: '1762269774'
            nonce: '0'
            owner: '0xCE1A77F0abff993d6d3D04d44b70831c6924fb40'
            spender: '0x000000000022D473030F116dDEE9F6B43aC78BA3'
            value: >-
              115792089237316195423570985008687907853269984665640564039457584007913129639935
          primaryType: Permit
          types:
            EIP712Domain:
              - name: name
                type: string
              - name: version
                type: string
              - name: chainId
                type: uint256
              - name: verifyingContract
                type: address
            Permit:
              - name: owner
                type: address
              - name: spender
                type: address
              - name: value
                type: uint256
              - name: nonce
                type: uint256
              - name: deadline
                type: uint256
        signature: >-
          0x160d2709ae195f591daa33ad6ab1fb18b8762a39d8c4466c4cbe95cf6881fc3d54d469710ef0e7fd64ecff47c1ba5741d7254903bfaebdacea5aa8289f81ba9a1c
        sender: '0x02122Ac49b0Be2e0eAD957F2D080805A0127Aa9d'
    SponsorGasResponse:
      properties:
        transaction:
          $ref: '#/components/schemas/UnsignedTransaction'
          description: >-
            Transaction to be signed & submitted via the `sender` to the
            network.
      type: object
      required:
        - transaction
      title: SponsorGasResponse
      example:
        transaction:
          chainId: '0x2105'
          data: >-
            0x6a761202000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda029130000000000000000000000000000000000000000000000000000000005f5e100
          from: '0x7B3B1F28a30276A21bE8e68E4C829972c7e641E7'
          gas: '0x7a120'
          maxFeePerGas: '0x59682f00'
          maxPriorityFeePerGas: '0x3b9aca00'
          nonce: '0x12'
          to: '0x6B90E8B4E3E971E74C1A47a3a20976377E2dB4b1'
          value: '0x0'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Chain:
      type: string
      enum:
        - base
        - ethereum
        - arbitrum
        - hyperevm
        - tempo
      title: Chain
      description: The chain to use.
    BatchedSafeOperationsResponse-Input:
      properties:
        domain:
          $ref: >-
            #/components/schemas/compass__api_backend__v2__models__safe__transact__response__batched_safe_operations__EIP712Domain
          description: EIP-712 domain separator
        types:
          $ref: >-
            #/components/schemas/compass__api_backend__v2__models__safe__transact__response__batched_safe_operations__EIP712Types
          description: EIP-712 type definitions
        primaryType:
          type: string
          const: SafeTx
          title: Primarytype
          description: Primary type for the structured data
        message:
          $ref: '#/components/schemas/SafeTxMessage'
          description: Safe transaction message data
      type: object
      required:
        - domain
        - types
        - primaryType
        - message
      title: BatchedSafeOperationsResponse
      description: Response containing EIP-712 typed data for Safe transaction signing.
      example:
        domain:
          chainId: 8453
          verifyingContract: '0x6B90E8B4E3E971E74C1A47a3a20976377E2dB4b1'
        message:
          baseGas: '0'
          data: >-
            0x8d80ff0a0000000000000000000000000000000000000000000000000000000000000020
          gasPrice: '0'
          gasToken: '0x0000000000000000000000000000000000000000'
          nonce: '7'
          operation: 1
          refundReceiver: '0x0000000000000000000000000000000000000000'
          safeTxGas: '0'
          to: '0x93C23AAE4793C14D6DF35D2A2A2234204e1559dA'
          value: '0'
        primaryType: SafeTx
        types:
          EIP712Domain:
            - name: chainId
              type: uint256
            - name: verifyingContract
              type: address
          SafeTx:
            - name: to
              type: address
            - name: value
              type: uint256
            - name: data
              type: bytes
            - name: operation
              type: uint8
            - name: safeTxGas
              type: uint256
            - name: baseGas
              type: uint256
            - name: gasPrice
              type: uint256
            - name: gasToken
              type: address
            - name: refundReceiver
              type: address
            - name: nonce
              type: uint256
    PermitTypedDataResponse-Input:
      properties:
        domain:
          $ref: >-
            #/components/schemas/compass__api_backend__v2__models__gas_sponsorship__permit_typed_data__EIP712Domain
          description: EIP-712 domain separator
        types:
          $ref: >-
            #/components/schemas/compass__api_backend__v2__models__gas_sponsorship__permit_typed_data__EIP712Types
          description: EIP-712 type definitions
        primaryType:
          type: string
          const: Permit
          title: Primarytype
          description: Primary type for the structured data
        message:
          $ref: '#/components/schemas/PermitMessage'
          description: Permit message data
      type: object
      required:
        - domain
        - types
        - primaryType
        - message
      title: PermitTypedDataResponse
      description: Response containing EIP-712 typed data for ERC-20 Permit signing.
      example:
        domain:
          chainId: 8453
          name: USD Coin
          verifyingContract: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          version: '2'
        message:
          deadline: '1735689600'
          nonce: '0'
          owner: '0x4A83b4413CF41C3244027e1590E35a0F48403F0c'
          spender: '0x6B90E8B4E3E971E74C1A47a3a20976377E2dB4b1'
          value: '100000000'
        primaryType: Permit
        types:
          EIP712Domain:
            - name: name
              type: string
            - name: version
              type: string
            - name: chainId
              type: uint256
            - name: verifyingContract
              type: address
          Permit:
            - name: owner
              type: address
            - name: spender
              type: address
            - name: value
              type: uint256
            - name: nonce
              type: uint256
            - name: deadline
              type: uint256
    Permit2TypedData-Input:
      properties:
        types:
          $ref: >-
            #/components/schemas/compass__api_backend__v2__models__gas_sponsorship__permit_2_typed_data__EIP712Types
          description: All type definitions
        primaryType:
          type: string
          const: PermitTransferFrom
          title: Primarytype
          description: Root type for signing
          default: PermitTransferFrom
        domain:
          $ref: >-
            #/components/schemas/compass__api_backend__v2__models__gas_sponsorship__permit_2_typed_data__EIP712Domain
          description: EIP-712 domain separator
        message:
          $ref: '#/components/schemas/PermitTransferFromMessage'
          description: The permit data to sign
      type: object
      required:
        - types
        - domain
        - message
      title: Permit2TypedData
      example:
        domain:
          chainId: 8453
          name: Permit2
          verifyingContract: '0x000000000022D473030F116dDEE9F6B43aC78BA3'
        message:
          deadline: 1735689600
          nonce: 0
          permitted:
            amount: 100000000
            token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          spender: '0x6B90E8B4E3E971E74C1A47a3a20976377E2dB4b1'
        primaryType: PermitTransferFrom
        types:
          EIP712Domain:
            - name: name
              type: string
            - name: chainId
              type: uint256
            - name: verifyingContract
              type: address
          PermitTransferFrom:
            - name: permitted
              type: TokenPermissions
            - name: spender
              type: address
            - name: nonce
              type: uint256
            - name: deadline
              type: uint256
          TokenPermissions:
            - name: token
              type: address
            - name: amount
              type: uint256
    UnsignedTransaction:
      properties:
        chainId:
          type: string
          title: Chainid
          description: The chain id of the transaction
        data:
          type: string
          title: Data
          description: The data of the transaction
        from:
          type: string
          title: From
          description: The sender of the transaction
        gas:
          anyOf:
            - type: string
            - type: 'null'
          title: Gas
          description: The gas of the transaction
        to:
          type: string
          title: To
          description: The recipient of the transaction
        value:
          type: string
          title: Value
          description: The value of the transaction
        nonce:
          type: string
          title: Nonce
          description: The nonce of the address
        maxFeePerGas:
          type: string
          title: Maxfeepergas
          description: The max fee per gas of the transaction
        maxPriorityFeePerGas:
          type: string
          title: Maxpriorityfeepergas
          description: The max priority fee per gas of the transaction
      type: object
      required:
        - chainId
        - data
        - from
        - gas
        - to
        - value
        - nonce
        - maxFeePerGas
        - maxPriorityFeePerGas
      title: UnsignedTransaction
      example:
        chainId: '0x2105'
        data: >-
          0x1688f0b900000000000000000000000029fcb43b46531bca003ddc8fcb67ffe91900c762000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000675f4a3d
        from: '0x4A83b4413CF41C3244027e1590E35a0F48403F0c'
        gas: '0x7a120'
        maxFeePerGas: '0x59682f00'
        maxPriorityFeePerGas: '0x3b9aca00'
        nonce: '0x5'
        to: '0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67'
        value: '0x0'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    compass__api_backend__v2__models__safe__transact__response__batched_safe_operations__EIP712Domain:
      properties:
        chainId:
          type: integer
          title: Chainid
          description: Chain ID
        verifyingContract:
          type: string
          title: Verifyingcontract
          description: Address of the Product Account
      type: object
      required:
        - chainId
        - verifyingContract
      title: EIP712Domain
      description: The EIP-712 domain separator.
    compass__api_backend__v2__models__safe__transact__response__batched_safe_operations__EIP712Types:
      properties:
        EIP712Domain:
          items:
            $ref: '#/components/schemas/EIP712DomainField'
          type: array
          title: Eip712Domain
          description: EIP712Domain type definition
        SafeTx:
          items:
            $ref: '#/components/schemas/SafeTxField'
          type: array
          title: Safetx
          description: SafeTx type definition
      type: object
      required:
        - EIP712Domain
        - SafeTx
      title: EIP712Types
      description: The type definitions for EIP-712 structured data.
    SafeTxMessage:
      properties:
        to:
          type: string
          title: To
          description: Destination address
        value:
          type: string
          title: Value
          description: Value in wei as a string
        data:
          type: string
          title: Data
          description: Transaction data as hex string
        operation:
          $ref: '#/components/schemas/OperationType'
          description: Operation type (0=Call, 1=DelegateCall)
        safeTxGas:
          type: string
          title: Safetxgas
          description: Gas for the transaction
        baseGas:
          type: string
          title: Basegas
          description: Base gas costs
        gasPrice:
          type: string
          title: Gasprice
          description: Gas price
        gasToken:
          type: string
          title: Gastoken
          description: Token address for gas payment
        refundReceiver:
          type: string
          title: Refundreceiver
          description: Address to receive gas refund
        nonce:
          type: string
          title: Nonce
          description: Transaction nonce
      type: object
      required:
        - to
        - value
        - data
        - operation
        - safeTxGas
        - baseGas
        - gasPrice
        - gasToken
        - refundReceiver
        - nonce
      title: SafeTxMessage
      description: The message data for the transaction.
    compass__api_backend__v2__models__gas_sponsorship__permit_typed_data__EIP712Domain:
      properties:
        name:
          type: string
          title: Name
          description: Token name
        version:
          type: string
          title: Version
          description: Token version (usually '1' or '2')
        chainId:
          type: integer
          title: Chainid
          description: Chain ID
        verifyingContract:
          type: string
          title: Verifyingcontract
          description: Token contract address
      type: object
      required:
        - name
        - version
        - chainId
        - verifyingContract
      title: EIP712Domain
      description: The EIP-712 domain separator for ERC-20 Permit.
    compass__api_backend__v2__models__gas_sponsorship__permit_typed_data__EIP712Types:
      properties:
        EIP712Domain:
          items:
            $ref: '#/components/schemas/EIP712DomainField'
          type: array
          title: Eip712Domain
          description: EIP712Domain type definition
        Permit:
          items:
            $ref: '#/components/schemas/PermitField'
          type: array
          title: Permit
          description: Permit type definition
      type: object
      required:
        - EIP712Domain
        - Permit
      title: EIP712Types
      description: The type definitions for EIP-712 structured data (ERC-20 Permit).
    PermitMessage:
      properties:
        owner:
          type: string
          title: Owner
          description: Token owner address
        spender:
          type: string
          title: Spender
          description: Address authorized to spend tokens
        value:
          type: string
          title: Value
          description: Amount to approve (as string)
        nonce:
          type: string
          title: Nonce
          description: Current permit nonce for the owner
        deadline:
          type: string
          title: Deadline
          description: Permit expiry timestamp
      type: object
      required:
        - owner
        - spender
        - value
        - nonce
        - deadline
      title: PermitMessage
      description: The message data for an ERC-20 Permit.
    compass__api_backend__v2__models__gas_sponsorship__permit_2_typed_data__EIP712Types:
      properties:
        EIP712Domain:
          items:
            $ref: '#/components/schemas/EIP712Field'
          type: array
          title: Eip712Domain
          description: Standard EIP-712 domain type
          default:
            - name: name
              type: string
            - name: chainId
              type: uint256
            - name: verifyingContract
              type: address
        TokenPermissions:
          items:
            $ref: '#/components/schemas/EIP712Field'
          type: array
          title: Tokenpermissions
          description: TokenPermissions struct
          default:
            - name: token
              type: address
            - name: amount
              type: uint256
        PermitTransferFrom:
          items:
            $ref: '#/components/schemas/EIP712Field'
          type: array
          title: Permittransferfrom
          description: Main permit message type
          default:
            - name: permitted
              type: TokenPermissions
            - name: spender
              type: address
            - name: nonce
              type: uint256
            - name: deadline
              type: uint256
      type: object
      title: EIP712Types
    compass__api_backend__v2__models__gas_sponsorship__permit_2_typed_data__EIP712Domain:
      properties:
        name:
          type: string
          const: Permit2
          title: Name
          description: Must be 'Permit2'
          default: Permit2
        chainId:
          type: integer
          title: Chainid
          description: EVM chain ID
        verifyingContract:
          type: string
          title: Verifyingcontract
          description: Permit2 contract address
      type: object
      required:
        - chainId
        - verifyingContract
      title: EIP712Domain
    PermitTransferFromMessage:
      properties:
        permitted:
          $ref: '#/components/schemas/TokenPermissions'
          description: Token and max amount
        spender:
          type: string
          title: Spender
          description: Address allowed to transfer (caller of permitTransferFrom)
        nonce:
          type: integer
          minimum: 0
          title: Nonce
          description: Unique nonce to prevent replay
        deadline:
          type: integer
          minimum: 0
          title: Deadline
          description: Unix timestamp after which signature expires
      type: object
      required:
        - permitted
        - spender
        - nonce
        - deadline
      title: PermitTransferFromMessage
    EIP712DomainField:
      properties:
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
      type: object
      required:
        - name
        - type
      title: EIP712DomainField
      description: A field in the EIP712Domain type definition.
    SafeTxField:
      properties:
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
      type: object
      required:
        - name
        - type
      title: SafeTxField
      description: A field in the SafeTx type definition.
    OperationType:
      type: integer
      enum:
        - 0
        - 1
      title: OperationType
      description: Safe operation types.
    PermitField:
      properties:
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
      type: object
      required:
        - name
        - type
      title: PermitField
      description: A field in the Permit type definition.
    EIP712Field:
      properties:
        name:
          type: string
          title: Name
          description: Field name in the struct
        type:
          type: string
          title: Type
          description: EVM type (e.g., address, uint256, TokenPermissions)
      type: object
      required:
        - name
        - type
      title: EIP712Field
    TokenPermissions:
      properties:
        token:
          type: string
          title: Token
          description: ERC-20 token address
        amount:
          type: integer
          minimum: 0
          title: Amount
          description: Maximum amount allowed to transfer
      type: object
      required:
        - token
        - amount
      title: TokenPermissions
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Compass API Key. Get your key
        [here](https://www.compasslabs.ai/dashboard).

````