openapi: 3.0.3
info:
  title: Circle Gateway
  version: 1.0.0
  description: >
    Circle Gateway allows you to create a chain-abstracted USDC balance and
    transfer it instantly to any supported destination chain.
servers:
  - url: https://gateway-api-testnet.circle.com
  - url: https://gateway-api.circle.com
tags:
  - name: Gateway
    description: >-
      Endpoints for getting a unified USDC balance and creating attestations for
      transfer
  - name: Gateway Batch
    description: Endpoints for batch processing of EIP-3009 authorizations
  - name: Gateway x402
    description: Endpoints for x402 payment protocol integration
  - name: Webhook Subscriptions
    description: Manage webhook subscriptions for Gateway event notifications.
paths:
  /v1/balances:
    post:
      summary: Get token balances for specified addresses
      description: >-
        Returns the current available balance of each specified address across
        different domains where that address is valid
      operationId: GetTokenBalances
      tags:
        - Gateway
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetBalancesRequest'
      responses:
        '200':
          description: Successfully retrieved balances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/estimate:
    post:
      summary: Estimate fees and expiration block heights for a transfer
      description: >-
        Calculates the required fees and expiration block heights for a transfer
        without requiring signatures or executing the transaction.
      operationId: EstimateTransfer
      tags:
        - Gateway
      parameters:
        - in: query
          name: maxAttestationSize
          required: false
          schema:
            type: integer
            minimum: 1
          description: Maximum allowed size (in bytes) for the encoded attestation.
        - in: query
          name: enableForwarder
          required: false
          schema:
            type: boolean
            default: false
          description: Whether to enable the forwarding service for estimating the fees.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EstimateRequest'
      responses:
        '200':
          description: >-
            Successfully calculated the estimated fees and expiration block
            heights
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstimateResponse'
        '400':
          description: >-
            Invalid request parameters or invalid partial burn intents or burn
            intent sets.
        '500':
          description: Internal server error
  /v1/info:
    get:
      summary: Get Gateway info for supported domains and tokens
      description: >-
        Provides information about the API and details of the supported domains
        and tokens.
      operationId: GetGatewayInfo
      tags:
        - Gateway
      responses:
        '200':
          description: Gateway info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfoResponse'
  /v1/transfer:
    post:
      summary: Create a transfer attestation for transferring tokens
      description: >-
        Generates a transfer attestation and operator signature for transferring
        tokens between domains
      operationId: CreateTransferAttestation
      tags:
        - Gateway
      parameters:
        - in: query
          name: maxAttestationSize
          required: false
          schema:
            type: integer
            minimum: 1
          description: >-
            Maximum allowed size (in bytes) for the encoded attestation. If the
            attestation exceeds this size, the request will be rejected with a
            400 error.
        - in: query
          name: enableForwarder
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether to enable the forwarding service for automatic mint
            submission.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAttestationRequest'
      responses:
        '201':
          description: Successfully created transfer attestation or attestation set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferResponse'
        '400':
          description: Invalid request parameters or invalid burn intent(s)
        '500':
          description: Internal server error
  /v1/transfer/{id}:
    get:
      summary: Get a transfer by ID
      description: Returns detailed information about a transfer.
      operationId: GetTransferById
      tags:
        - Gateway
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
          description: The unique identifier of the transfer.
          example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Transfer retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferDetailsResponse'
        '400':
          $ref: '#/components/responses/DefaultError'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/transferSpec/{transferSpecHash}:
    get:
      summary: Get full TransferSpec by transferSpecHash
      description: Retrieve the full TransferSpec for a given transferSpecHash.
      operationId: GetTransferSpec
      tags:
        - Gateway
      parameters:
        - name: transferSpecHash
          in: path
          required: true
          description: The keccak256 hash of the TransferSpec
          schema:
            $ref: '#/components/schemas/Bytes32'
      responses:
        '200':
          description: TransferSpec information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferSpecResponse'
        '400':
          description: Invalid transferSpecHash format
        '404':
          description: TransferSpec not found
        '500':
          description: Internal server error
  /v1/deposits:
    post:
      summary: Get pending deposits for specified addresses
      description: >-
        Returns pending deposits for each specified depositor address across
        different domains where that address is valid.
      operationId: GetDeposits
      tags:
        - Gateway
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetDepositsRequest'
      responses:
        '200':
          description: Successfully retrieved deposits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/batch/submit:
    post:
      summary: Submit an EIP-3009 authorization to be batched
      description: |
        Submit a single-chain transfer authorization using EIP-3009 signature.
        The authorization will be verified, the sender's balance locked, and
        the transaction queued for batch processing.
      operationId: SubmitBatchAuthorization
      tags:
        - Gateway Batch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSubmitRequest'
      responses:
        '201':
          description: Successfully submitted batch transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique identifier for the submitted batch transaction.
                required:
                  - id
        '400':
          description: Invalid or malformed request body
        '409':
          description: Nonce has already been used
  /v1/x402/settle:
    post:
      summary: Settle an x402 payment
      description: |
        Settles an x402 payment by submitting the EIP-3009 authorization.
        The authorization will be verified, the sender's balance locked, and
        the transaction queued for batch processing.
      operationId: SettleX402Payment
      tags:
        - Gateway x402
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentPayload:
                  $ref: '#/components/schemas/PaymentPayload'
                paymentRequirements:
                  $ref: '#/components/schemas/PaymentRequirements'
              required:
                - paymentPayload
                - paymentRequirements
      responses:
        '200':
          description: Settlement result. Check the success field for outcome.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - transaction
                  - network
                properties:
                  success:
                    type: boolean
                    description: Whether the settlement was successful.
                  errorReason:
                    type: string
                    description: Error code. Present when success is false.
                    enum:
                      - unsupported_scheme
                      - unsupported_network
                      - unsupported_asset
                      - invalid_payload
                      - address_mismatch
                      - amount_mismatch
                      - invalid_signature
                      - authorization_not_yet_valid
                      - authorization_expired
                      - authorization_validity_too_short
                      - self_transfer
                      - insufficient_balance
                      - nonce_already_used
                      - unsupported_domain
                      - wallet_not_found
                  payer:
                    type: string
                    description: >-
                      The sender address (present on success or when
                      identifiable).
                  transaction:
                    type: string
                    description: Transaction UUID on success, empty string on failure.
                  network:
                    type: string
                    description: CAIP-2 network identifier.
        '400':
          description: Invalid or malformed request body
        '500':
          description: Unexpected infrastructure error
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - errorReason
                  - transaction
                  - network
                properties:
                  success:
                    type: boolean
                    example: false
                  errorReason:
                    type: string
                    example: unexpected_error
                  transaction:
                    type: string
                    example: ''
                  network:
                    type: string
  /v1/x402/supported:
    get:
      summary: Get supported x402 payment kinds
      description: >
        Returns the payment kinds supported by Circle Gateway for x402 batching.


        Each kind includes the GatewayWallet contract address in

        `extra.verifyingContract` which clients use for EIP-712 signing, and an

        `extra.assets` array containing the supported tokens with their
        addresses,

        symbols, and decimals.
      operationId: GetSupportedX402PaymentKinds
      tags:
        - Gateway x402
      responses:
        '200':
          description: Supported payment kinds
          content:
            application/json:
              schema:
                type: object
                properties:
                  kinds:
                    type: array
                    items:
                      type: object
                      properties:
                        x402Version:
                          type: number
                          description: x402 protocol version.
                        scheme:
                          type: string
                          description: Payment scheme identifier.
                        network:
                          type: string
                          description: Network identifier.
                        extra:
                          type: object
                          description: >-
                            Scheme-specific details including contract and token
                            info.
                          properties:
                            name:
                              type: string
                              description: Contract name for EIP-712 signing.
                            version:
                              type: string
                              description: Contract version for EIP-712 signing.
                            verifyingContract:
                              type: string
                              description: >-
                                GatewayWallet contract address used for EIP-712
                                signing.
                            assets:
                              type: array
                              description: List of supported tokens on this network.
                              items:
                                type: object
                                properties:
                                  address:
                                    type: string
                                    description: Token contract address (lowercase).
                                  symbol:
                                    type: string
                                    description: Token symbol (e.g., USDC).
                                  decimals:
                                    type: number
                                    description: Token decimals (e.g., 6 for USDC).
                  extensions:
                    type: array
                    description: Supported protocol extensions.
                    items:
                      type: string
                  signers:
                    type: object
                    description: >-
                      Mapping of network identifiers to arrays of authorized
                      signer addresses.
                    additionalProperties:
                      type: array
                      items:
                        type: string
        '400':
          description: Invalid request
        '500':
          description: Internal server error
  /v1/x402/transfers/{id}:
    get:
      summary: Get an x402 transfer by ID
      description: Retrieves a single x402 transfer by its unique identifier.
      operationId: GetX402TransferById
      tags:
        - Gateway x402
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
          description: Transfer UUID.
      responses:
        '200':
          description: The transfer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/X402TransferResponse'
        '404':
          description: Transfer not found
  /v1/x402/transfers:
    get:
      summary: Search x402 transfers
      description: |
        Returns a paginated list of x402 transfers matching the given filters.
        Supports cursor-based pagination via pageAfter / pageBefore.
      operationId: SearchX402Transfers
      tags:
        - Gateway x402
      parameters:
        - in: query
          name: from
          schema:
            type: string
          description: Filter by sender address.
        - in: query
          name: to
          schema:
            type: string
          description: Filter by recipient address.
        - in: query
          name: network
          schema:
            type: string
          description: Filter by CAIP-2 network identifier (e.g., eip155:11155111).
        - in: query
          name: status
          schema:
            type: string
            enum:
              - received
              - batched
              - confirmed
              - completed
              - failed
          description: Filter by transfer status.
        - in: query
          name: token
          schema:
            type: string
            enum:
              - USDC
          description: Filter by token type.
        - in: query
          name: nonce
          schema:
            type: string
          description: Filter by EIP-3009 nonce.
        - in: query
          name: startDate
          schema:
            type: string
            format: date-time
          description: Filter transfers created on or after this date.
        - in: query
          name: endDate
          schema:
            type: string
            format: date-time
          description: Filter transfers created on or before this date.
        - in: query
          name: pageSize
          schema:
            type: integer
            minimum: 1
          description: Number of results per page.
        - in: query
          name: pageAfter
          schema:
            type: string
          description: Cursor for the next page of results.
        - in: query
          name: pageBefore
          schema:
            type: string
          description: Cursor for the previous page of results.
      responses:
        '200':
          description: Paginated list of transfers
          content:
            application/json:
              schema:
                type: object
                properties:
                  transfers:
                    type: array
                    items:
                      $ref: '#/components/schemas/X402TransferResponse'
        '400':
          description: Invalid request parameters
  /v1/x402/verify:
    post:
      summary: Verify an x402 payment payload
      description: |
        Verifies that an x402 payment payload can be processed by running
        all read-only validation checks (scheme, network, token, signature,
        temporal constraints, address/amount matching). A valid result does
        not guarantee settlement — balance and nonce checks only happen at
        settle time.
      operationId: VerifyX402Payment
      tags:
        - Gateway x402
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentPayload:
                  $ref: '#/components/schemas/PaymentPayload'
                paymentRequirements:
                  $ref: '#/components/schemas/PaymentRequirements'
              required:
                - paymentPayload
                - paymentRequirements
      responses:
        '200':
          description: Verification result
          content:
            application/json:
              schema:
                type: object
                properties:
                  isValid:
                    type: boolean
                    description: Whether the payment payload passed all validation checks.
                  invalidReason:
                    type: string
                    description: >-
                      Reason for validation failure. Present when isValid is
                      false.
                  payer:
                    type: string
                    description: The payer address extracted from the payment payload.
        '400':
          description: Invalid or malformed request body
  /v2/notifications/subscriptions/permissionless:
    servers:
      - url: https://api.circle.com
    post:
      tags:
        - Webhook Subscriptions
      summary: Create a webhook subscription
      description: >
        Create a permissionless webhook subscription by configuring an endpoint
        to receive event notifications. Specify the environment, wallet
        addresses to monitor, blockchain domains to watch, and event types to
        receive.
      operationId: createPermissionlessSubscription
      security:
        - BearerAuth: []
      parameters:
        - $ref: '#/components/parameters/XRequestId'
      requestBody:
        $ref: '#/components/requestBodies/CreatePermissionlessSubscription'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionlessSubscriptionResponse'
          description: Successfully created a webhook subscription.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
    get:
      security:
        - BearerAuth: []
      summary: Get all webhook subscriptions
      description: Retrieve an array of existing permissionless webhook subscriptions.
      parameters:
        - name: environment
          in: query
          required: false
          description: >-
            Filter subscriptions by environment. If omitted, returns
            subscriptions for all environments.
          schema:
            $ref: '#/components/schemas/PermissionlessEnvironment'
      operationId: getPermissionlessSubscriptions
      tags:
        - Webhook Subscriptions
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionlessSubscriptionsResponse'
          description: Successfully retrieved webhook subscriptions.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/NotAuthorized'
  /v2/notifications/subscriptions/permissionless/{id}:
    servers:
      - url: https://api.circle.com
    get:
      tags:
        - Webhook Subscriptions
      summary: Retrieve a webhook subscription
      description: Retrieve an existing permissionless webhook subscription.
      operationId: getPermissionlessSubscription
      security:
        - BearerAuth: []
      parameters:
        - $ref: '#/components/parameters/Id'
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionlessSubscriptionResponse'
          description: Successfully retrieved subscription.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
        - Webhook Subscriptions
      summary: Update a webhook subscription
      description: >
        Update a webhook subscription. Metadata fields can be updated
        independently. To update filters, provide `notificationTypes`,
        `addresses`, and `domains` together; those fields fully replace the
        existing filters.
      operationId: updatePermissionlessSubscription
      security:
        - BearerAuth: []
      parameters:
        - $ref: '#/components/parameters/Id'
        - $ref: '#/components/parameters/XRequestId'
      requestBody:
        $ref: '#/components/requestBodies/UpdatePermissionlessSubscription'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionlessSubscriptionResponse'
          description: Successfully updated webhook subscription.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      tags:
        - Webhook Subscriptions
      summary: Delete a webhook subscription
      description: Delete an existing permissionless webhook subscription.
      operationId: deletePermissionlessSubscription
      security:
        - BearerAuth: []
      parameters:
        - $ref: '#/components/parameters/Id'
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '204':
          description: |
            Successfully deleted subscription.
            Note: Response body is returned empty.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /v2/notifications/subscriptions/permissionless/{id}/testConnection:
    servers:
      - url: https://api.circle.com
    post:
      tags:
        - Webhook Subscriptions
      summary: Test subscription connection
      description: >-
        Verify that the subscriber endpoint for the given subscription is
        reachable.
      operationId: testPermissionlessSubscriptionConnection
      security:
        - BearerAuth: []
      parameters:
        - $ref: '#/components/parameters/Id'
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestConnectionResponse'
          description: Successfully tested the connection to the subscriber endpoint.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /v2/notifications/subscriptions/permissionless/{id}/test:
    servers:
      - url: https://api.circle.com
    post:
      tags:
        - Webhook Subscriptions
      summary: Send a test notification
      description: >
        Send a test notification to the subscriber endpoint. The notification
        has notificationType "webhooks.test".
      operationId: sendPermissionlessSubscriptionTestNotification
      security:
        - BearerAuth: []
      parameters:
        - $ref: '#/components/parameters/Id'
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '204':
          description: |
            Successfully sent a test notification.
            Note: Response body is returned empty.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /v2/notifications/publicKey/{id}:
    servers:
      - url: https://api.circle.com
    get:
      tags:
        - Webhook Subscriptions
      summary: Get a notification signature public key
      description: >
        Get the public key and algorithm used to digitally sign webhook
        notifications. Verifying the digital signature ensures the notification
        came from Circle.


        In the headers of each webhook, you can find
          1. `X-Circle-Signature`: a header containing the digital signature generated by Circle.
          2. `X-Circle-Key-Id`: a header containing the UUID. This value is used as the `ID` URL parameter to retrieve the relevant public key.
      operationId: getPermissionlessNotificationSignature
      security:
        - BearerAuth: []
      parameters:
        - $ref: '#/components/parameters/Id'
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '200':
          description: Successfully retrieved a digital notification signature.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSignaturePublicKey'
        '400':
          $ref: '#/components/responses/DefaultError'
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: PREFIX:ID:SECRET
      description: >-
        Circle's API Keys are formatted in the following structure
        "PREFIX:ID:SECRET". All three parts are required to make a successful
        request.
  schemas:
    Token:
      type: string
      description: Supported tokens for Gateway
      enum:
        - USDC
    Domain:
      type: integer
      enum:
        - 0
        - 1
        - 2
        - 3
        - 5
        - 6
        - 7
        - 10
        - 13
        - 14
        - 16
        - 19
        - 26
      description: |
        Circle domain identifiers for supported chains:

        - 0 - Ethereum
        - 1 - Avalanche
        - 2 - OP
        - 3 - Arbitrum
        - 5 - Solana
        - 6 - Base
        - 7 - Polygon PoS
        - 10 - Unichain
        - 13 - Sonic
        - 14 - World Chain
        - 16 - Sei
        - 19 - HyperEVM
        - 26 - Arc
    GetBalancesRequest:
      type: object
      properties:
        token:
          $ref: '#/components/schemas/Token'
          description: Token type to query balances for
        sources:
          type: array
          description: >-
            List of sources to query balances from. If domain is omitted from
            any source, the balances from all domains for that depositor will be
            returned.
          items:
            type: object
            properties:
              domain:
                $ref: '#/components/schemas/Domain'
                description: >-
                  Domain to query balance from. The depositor address must be
                  valid on the given domain.
              depositor:
                type: string
                description: Address of the depositor to query balance for
            required:
              - depositor
      required:
        - token
        - sources
    BalancesResponse:
      type: object
      description: Response containing token balances for specified sources
      properties:
        token:
          $ref: '#/components/schemas/Token'
          description: Token type that was queried
        balances:
          type: array
          description: List of balance responses for each source
          items:
            type: object
            properties:
              domain:
                $ref: '#/components/schemas/Domain'
                description: Domain where the balance was queried
              depositor:
                type: string
                description: Address of the depositor
              balance:
                type: string
                pattern: ^\d+(\.\d+)?$
                description: Current available balance for the depositor
            required:
              - domain
              - depositor
              - balance
      required:
        - token
        - balances
    XRequestId:
      type: string
      format: uuid
      description: >-
        A unique identifier, which can be helpful for identifying a request when
        communicating with Circle support.
      example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
    Uint256:
      type: string
      description: A large integer value, represented as a string.
      example: '1000000000000000000'
    Bytes32:
      type: string
      pattern: ^0x[a-fA-F0-9]{64}$
      example: '0x1234567890123456789012345678901234567890123456789012345678901234'
      description: A 32-byte hex string.
    Hex:
      type: string
      pattern: ^0x[a-fA-F0-9]*$
      example: '0x1a2b3c4d'
      description: A hex string.
    TransferSpec:
      type: object
      properties:
        version:
          type: integer
          minimum: 0
          maximum: 4294967295
          description: Version of the transfer spec (uint32).
          example: 1
        sourceDomain:
          type: integer
          minimum: 0
          maximum: 4294967295
          description: The domain of the wallet contract this transfer came from (uint32).
          example: 0
        destinationDomain:
          type: integer
          minimum: 0
          maximum: 4294967295
          description: >-
            The domain of the minter contract this transfer is valid for
            (uint32).
          example: 4
        sourceContract:
          $ref: '#/components/schemas/Bytes32'
          description: >-
            The address of the wallet contract on the source domain (32-byte
            padded).
        destinationContract:
          $ref: '#/components/schemas/Bytes32'
          description: >-
            The address of the minter contract on the destination domain
            (32-byte padded).
        sourceToken:
          $ref: '#/components/schemas/Bytes32'
          description: The token address on the source domain (32-byte padded).
        destinationToken:
          $ref: '#/components/schemas/Bytes32'
          description: The token address on the destination domain (32-byte padded).
        sourceDepositor:
          $ref: '#/components/schemas/Bytes32'
          description: >-
            The address to debit within the wallet contract on the source domain
            (32-byte padded).
        destinationRecipient:
          $ref: '#/components/schemas/Bytes32'
          description: >-
            The address that should receive the funds on the destination domain
            (32-byte padded).
        sourceSigner:
          $ref: '#/components/schemas/Bytes32'
          description: The signer who signed for the transfer (32-byte padded).
        destinationCaller:
          $ref: '#/components/schemas/Bytes32'
          description: >-
            The address of the caller who may use the attestation, 0 address if
            any caller (32-byte padded).
        value:
          $ref: '#/components/schemas/Uint256'
          description: The amount to be transferred.
        salt:
          $ref: '#/components/schemas/Bytes32'
          description: An arbitrary value chosen by the user to be unique.
        hookData:
          $ref: '#/components/schemas/Hex'
          description: Arbitrary bytes that may be used for onchain composition (optional).
      required:
        - version
        - sourceDomain
        - destinationDomain
        - sourceContract
        - destinationContract
        - sourceToken
        - destinationToken
        - sourceDepositor
        - destinationRecipient
        - sourceSigner
        - destinationCaller
        - value
        - salt
    RecipientSetupOptions:
      type: object
      description: >-
        Options for automatic Associated Token Account (ATA) creation on Solana.
        When the destination chain is Solana, the destinationRecipient must be
        an initialized USDC token account. If the recipient does not already
        have one, the Forwarding Service can create the ATA as part of the mint
        transaction. Omit this field if the recipient already has a USDC token
        account.
      properties:
        includeRecipientSetup:
          type: boolean
          description: >-
            Set to true to request automatic ATA creation. The Solana rent cost
            for token account creation will be included in the forwarding fee.
        recipientOwnerAddress:
          $ref: '#/components/schemas/Bytes32'
          description: >-
            The recipient's Solana wallet address in bytes32 hex format (32
            bytes, hex-encoded).
      required:
        - includeRecipientSetup
        - recipientOwnerAddress
    PartialBurnIntent:
      type: object
      description: >-
        A burn intent for estimation purposes without signatures. Optional
        maxBlockHeight and maxFee for cost estimation.
      properties:
        maxBlockHeight:
          $ref: '#/components/schemas/Uint256'
          description: >-
            The maximum block height at which this burn is valid (optional for
            estimation).
        maxFee:
          $ref: '#/components/schemas/Uint256'
          description: >-
            The maximum fee the user is willing to pay (optional for
            estimation).
        spec:
          $ref: '#/components/schemas/TransferSpec'
        recipientSetupOptions:
          $ref: '#/components/schemas/RecipientSetupOptions'
      required:
        - spec
    PartialBurnIntentSet:
      type: object
      description: A set of partial burn intents for estimation purposes.
      properties:
        intents:
          type: array
          minItems: 1
          description: >-
            Array of partial burn intents to estimate fees and expiration block
            heights for.
          items:
            $ref: '#/components/schemas/PartialBurnIntent'
      required:
        - intents
    EstimateRequest:
      type: array
      description: >-
        Batch of partial burn intents or partial burn intent sets (without
        signatures). Burn intent sets are only supported for EVM source domains.
      minItems: 1
      items:
        oneOf:
          - $ref: '#/components/schemas/PartialBurnIntent'
          - $ref: '#/components/schemas/PartialBurnIntentSet'
    CanonicalAddress:
      oneOf:
        - type: string
          pattern: ^0x[a-f0-9]{40}$
          description: EVM address in canonical format (20-byte hex lowercase)
        - type: string
          pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
          description: Solana address in canonical format (32-byte base58)
      description: >-
        Address in canonical format (not padded to 32 bytes).

        Supports multiple blockchain formats:

        - EVM chains: 20-byte hex lowercase with 0x prefix (e.g.,
        0x1234567890123456789012345678901234567890)

        - Solana: 32-byte base58 encoded (e.g.,
        9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM)
      example: '0x1234567890123456789012345678901234567890'
    EstimateTransferSpec:
      type: object
      description: >-
        Transfer specification with addresses in their canonical format (not
        padded to 32 bytes).

        Note: This schema parallels TransferSpec but documents addresses as
        returned (canonical format)

        rather than as submitted (Bytes32 padded format). Keep in sync with
        TransferSpec for non-address fields.
      properties:
        version:
          type: integer
          minimum: 0
          maximum: 4294967295
          description: Version of the transfer spec (uint32).
          example: 1
        sourceDomain:
          type: integer
          minimum: 0
          maximum: 4294967295
          description: The domain of the wallet contract this transfer came from (uint32).
          example: 0
        destinationDomain:
          type: integer
          minimum: 0
          maximum: 4294967295
          description: >-
            The domain of the minter contract this transfer is valid for
            (uint32).
          example: 4
        sourceContract:
          $ref: '#/components/schemas/CanonicalAddress'
          description: The address of the wallet contract on the source domain.
        destinationContract:
          $ref: '#/components/schemas/CanonicalAddress'
          description: The address of the minter contract on the destination domain.
        sourceToken:
          $ref: '#/components/schemas/CanonicalAddress'
          description: The token address on the source domain.
        destinationToken:
          $ref: '#/components/schemas/CanonicalAddress'
          description: The token address on the destination domain.
        sourceDepositor:
          $ref: '#/components/schemas/CanonicalAddress'
          description: >-
            The address to debit within the wallet contract on the source
            domain.
        destinationRecipient:
          $ref: '#/components/schemas/CanonicalAddress'
          description: The address that should receive the funds on the destination domain.
        sourceSigner:
          $ref: '#/components/schemas/CanonicalAddress'
          description: The signer who signed for the transfer.
        destinationCaller:
          $ref: '#/components/schemas/CanonicalAddress'
          description: >-
            The address of the caller who may use the attestation, 0 address if
            any caller.
        value:
          $ref: '#/components/schemas/Uint256'
          description: The amount to be transferred.
        salt:
          $ref: '#/components/schemas/Bytes32'
          description: An arbitrary value chosen by the user to be unique.
        hookData:
          $ref: '#/components/schemas/Hex'
          description: Arbitrary bytes that may be used for onchain composition (optional).
      required:
        - version
        - sourceDomain
        - destinationDomain
        - sourceContract
        - destinationContract
        - sourceToken
        - destinationToken
        - sourceDepositor
        - destinationRecipient
        - sourceSigner
        - destinationCaller
        - value
        - salt
    EstimateRecipientSetupOptions:
      type: object
      description: >-
        Options for automatic Associated Token Account (ATA) creation on Solana,
        as returned from the estimate endpoint. The recipientOwnerAddress is in
        canonical format (not Bytes32 padded).
      properties:
        includeRecipientSetup:
          type: boolean
          description: >-
            Set to true to request automatic ATA creation. The Solana rent cost
            for token account creation will be included in the forwarding fee.
        recipientOwnerAddress:
          $ref: '#/components/schemas/CanonicalAddress'
          description: >-
            The recipient's Solana wallet address in canonical format
            (base58-encoded public key).
          example: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
      required:
        - includeRecipientSetup
        - recipientOwnerAddress
    EstimateBurnIntent:
      type: object
      description: >-
        A burn intent returned from the estimate endpoint with addresses in
        canonical format.
      properties:
        maxBlockHeight:
          $ref: '#/components/schemas/Uint256'
          description: The maximum block height at which this burn is valid.
        maxFee:
          $ref: '#/components/schemas/Uint256'
          description: The maximum fee the user is willing to pay.
        spec:
          $ref: '#/components/schemas/EstimateTransferSpec'
        recipientSetupOptions:
          $ref: '#/components/schemas/EstimateRecipientSetupOptions'
      required:
        - maxBlockHeight
        - maxFee
        - spec
    EstimateBurnIntentSet:
      type: object
      description: >-
        A set of burn intents returned from the estimate endpoint with addresses
        in canonical format.
      properties:
        intents:
          type: array
          minItems: 1
          description: >-
            Array of burn intents with calculated fees and expiration block
            heights.
          items:
            $ref: '#/components/schemas/EstimateBurnIntent'
      required:
        - intents
    IntentFee:
      type: object
      description: Fee breakdown for a single burn intent.
      properties:
        transferSpecHash:
          $ref: '#/components/schemas/Bytes32'
          description: Keccak256 hash of the encoded transfer specification.
        domain:
          $ref: '#/components/schemas/Domain'
          description: >-
            The domain ID of the chain where the burn intent originated
            (uint32).
        baseFee:
          type: string
          description: Fixed gas fee charged for the burn transaction.
          example: '2'
        transferFee:
          type: string
          description: Variable fee based on transfer amount. Omitted for same-chain burns.
          example: '0.125'
      required:
        - transferSpecHash
        - domain
        - baseFee
    FeeSummary:
      type: object
      description: Aggregated fee information for a transfer request.
      properties:
        total:
          type: string
          description: Total fees from all burn intents across chains.
          example: '1.178'
        token:
          $ref: '#/components/schemas/Token'
          description: Token symbol.
          example: USDC
        perIntent:
          type: array
          items:
            $ref: '#/components/schemas/IntentFee'
          description: List of fee breakdowns for each burn intent.
        forwardingFee:
          type: string
          description: Forwarding fee charged for the transfer.
          example: '0.210000'
      required:
        - total
        - token
        - perIntent
    EstimateResponse:
      type: object
      description: >-
        Response containing estimated burn intents with calculated fees and
        expiration block heights.
      properties:
        body:
          type: array
          description: >-
            Array of burn intents or burn intent sets with calculated fees and
            expiration block heights.
          items:
            oneOf:
              - type: object
                properties:
                  burnIntent:
                    $ref: '#/components/schemas/EstimateBurnIntent'
                required:
                  - burnIntent
              - type: object
                properties:
                  burnIntentSet:
                    $ref: '#/components/schemas/EstimateBurnIntentSet'
                required:
                  - burnIntentSet
        fees:
          $ref: '#/components/schemas/FeeSummary'
          description: Information on the estimated fees to be charged.
      required:
        - body
        - fees
    InfoResponse:
      type: object
      description: Response containing information about supported domains and tokens
      properties:
        version:
          type: integer
          description: API version number
        domains:
          type: array
          description: List of supported domains and their contract information
          items:
            type: object
            properties:
              chain:
                type: string
                description: Human-readable chain name
                example: Ethereum
              network:
                type: string
                description: Human-readable network name
                example: Sepolia
              domain:
                $ref: '#/components/schemas/Domain'
                description: Domain identifier
              walletContract:
                type: object
                description: Wallet contract information for this domain
                properties:
                  address:
                    type: string
                    description: Address of the wallet contract
                  supportedTokens:
                    type: array
                    items:
                      $ref: '#/components/schemas/Token'
                    description: List of tokens supported by this wallet contract
                required:
                  - address
                  - supportedTokens
              minterContract:
                type: object
                description: Minter contract information for this domain
                properties:
                  address:
                    type: string
                    description: Address of the minter contract
                  supportedTokens:
                    type: array
                    items:
                      $ref: '#/components/schemas/Token'
                    description: List of tokens supported by this minter contract
                required:
                  - address
                  - supportedTokens
              processedHeight:
                type: string
                description: The latest processed block height for this network
                example: '8666762'
              burnIntentExpirationHeight:
                type: string
                description: >-
                  The current minimum accepted block height for a burn intent
                  expiration on this network. The value is based on the latest
                  confirmed block. Developers should add some buffer to this
                  value to avoid transfer request failures.
                example: '8666792'
            required:
              - chain
              - network
              - domain
              - processedHeight
              - burnIntentExpirationHeight
      required:
        - version
        - domains
    BurnIntent:
      type: object
      properties:
        maxBlockHeight:
          $ref: '#/components/schemas/Uint256'
          description: The maximum block height at which this burn is valid.
        maxFee:
          $ref: '#/components/schemas/Uint256'
          description: The maximum fee the user is willing to pay.
        spec:
          $ref: '#/components/schemas/TransferSpec'
        recipientSetupOptions:
          $ref: '#/components/schemas/RecipientSetupOptions'
      required:
        - maxBlockHeight
        - maxFee
        - spec
    SignedBurnIntent:
      type: object
      properties:
        burnIntent:
          $ref: '#/components/schemas/BurnIntent'
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]+$
          description: The signature over the burnIntent.
      required:
        - burnIntent
        - signature
    BurnIntentSet:
      type: object
      properties:
        intents:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/BurnIntent'
      required:
        - intents
    SignedBurnIntentSet:
      type: object
      properties:
        burnIntentSet:
          $ref: '#/components/schemas/BurnIntentSet'
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]+$
          description: The signature over the burnIntentSet.
      required:
        - burnIntentSet
        - signature
    CreateAttestationRequest:
      type: array
      description: >-
        Batch of signed burn intents or burn intent sets. Burn intent sets are
        only supported for EVM source domains.
      minItems: 1
      items:
        oneOf:
          - $ref: '#/components/schemas/SignedBurnIntent'
          - $ref: '#/components/schemas/SignedBurnIntentSet'
    TransferResponse:
      type: object
      description: >-
        Response containing a transfer attestation or attestation set and
        operator signature
      properties:
        transferId:
          type: string
          format: uuid
          description: The unique identifier of the transfer.
        attestation:
          type: string
          pattern: ^0x[a-fA-F0-9]+$
          description: >-
            The byte-encoded transfer attestation or attestation set that should
            be passed to the minter contract
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]+$
          description: >-
            The signature of the operator on the byte-encoded transfer
            attestation or attestation set
        fees:
          $ref: '#/components/schemas/FeeSummary'
          description: Information on the transfer fees to be charged.
        expirationBlock:
          type: string
          description: >-
            The block number on the destination chain after which this
            attestation expires.
      required:
        - attestation
        - signature
        - transferId
        - fees
        - expirationBlock
    BurnIntentSummary:
      type: object
      description: Summary information for a single burn intent.
      properties:
        transferSpecHash:
          $ref: '#/components/schemas/Hex'
          description: Keccak256 hash of the encoded transfer specification.
        maxBlockHeight:
          $ref: '#/components/schemas/Uint256'
          description: The maximum block height at which the burn intent is valid.
        maxFee:
          $ref: '#/components/schemas/Uint256'
          description: The maximum fee the user is willing to pay.
      required:
        - transferSpecHash
        - maxBlockHeight
        - maxFee
    TransferDetailsResponse:
      type: object
      description: Detailed information about a transfer
      properties:
        destinationDomain:
          $ref: '#/components/schemas/Domain'
        status:
          type: string
          enum:
            - pending
            - confirmed
            - finalized
            - failed
            - expired
          description: |
            Current status of the transfer:

            - `pending`: Transfer has been created but not yet confirmed
            onchain

            - `confirmed`: Transfer has been confirmed on the destination chain

            - `finalized`: Transfer has been finalized on the destination chain

            - `failed`: Transfer has failed (either onchain or during
            forwarding)

            - `expired`: Transfer attestation has expired
        burnIntents:
          type: array
          description: Summary of burn intents included in this transfer.
          items:
            $ref: '#/components/schemas/BurnIntentSummary'
        transactionHash:
          type: string
          description: >-
            Transaction hash of the mint transaction on the destination chain.
            Only present if the status is `confirmed`, `finalized`, or `failed`.
          example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
        forwardingDetails:
          type: object
          description: Details about the Forwarding Service, if used.
          properties:
            forwardingEnabled:
              type: boolean
              description: Indicates whether the Forwarding Service was used.
            failureReason:
              type: string
              description: >-
                Reason for forwarding failure. Only present if the transfer
                status is `failed`.
          required:
            - forwardingEnabled
        fees:
          $ref: '#/components/schemas/FeeSummary'
        attestation:
          type: object
          description: >-
            Attestation data for manual submission to the minter contract. Only
            present when forwarding is disabled.
          properties:
            payload:
              $ref: '#/components/schemas/Hex'
              description: The byte-encoded transfer attestation or attestation set.
            signature:
              $ref: '#/components/schemas/Hex'
              description: The signature of the operator on the attestation.
            expirationBlock:
              type: string
              description: >-
                The block number on the destination chain after which this
                attestation expires.
          required:
            - payload
            - signature
            - expirationBlock
      required:
        - transferSpecHash
        - maxBlockHeight
        - maxFee
    Error:
      title: Error
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: Code that corresponds to the error.
        message:
          type: string
          description: Message that describes the error.
    TransferSpecResponse:
      type: object
      description: Complete TransferSpec information
      properties:
        version:
          type: integer
          description: Version of the transfer spec (uint32).
          example: 1
        sourceDomain:
          type: integer
          description: The domain of the wallet contract this transfer came from (uint32).
          example: 0
        destinationDomain:
          type: integer
          description: >-
            The domain of the minter contract this transfer is valid for
            (uint32).
          example: 4
        sourceContract:
          type: string
          description: >-
            The address of the wallet contract on the source domain (32-byte
            padded).
          example: '0x000000000000000000000000557777735b1dd18194f1b84256be2a3cdee6cb6f'
        destinationContract:
          type: string
          description: >-
            The address of the minter contract on the destination domain
            (32-byte padded).
          example: '0x000000000000000000000000552222279206cb0434128e0cae4558a25779c79f'
        sourceToken:
          type: string
          description: The token address on the source domain (32-byte padded).
          example: '0x0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238'
        destinationToken:
          type: string
          description: The token address on the destination domain (32-byte padded).
          example: '0x000000000000000000000000036cbd53842c5426634e7929541ec2318f3dcf7e'
        sourceDepositor:
          type: string
          description: >-
            The address to debit within the wallet contract on the source domain
            (32-byte padded).
          example: '0x0000000000000000000000002b45eF6A547A73eA248A1bCED808575c5a4839eE'
        destinationRecipient:
          type: string
          description: >-
            The address that should receive the funds on the destination domain
            (32-byte padded).
          example: 0x0000000000000000000000008BA1f109551bD432803012645Hac136c95e5431
        sourceSigner:
          type: string
          description: The signer who signed for the transfer (32-byte padded).
          example: '0x000000000000000000000000742d35Cc6623C026c893b7c2FD85c4E4A0EF4321'
        destinationCaller:
          type: string
          description: >-
            The address of the caller who may use the attestation, 0 address if
            any caller (32-byte padded).
          example: '0x0000000000000000000000000000000000000000000000000000000000000000'
        value:
          type: string
          description: The amount to be transferred.
          example: '1000000'
        salt:
          type: string
          description: The salt value used in the transfer spec.
          example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
        hookData:
          type: string
          description: Additional hook data for the transfer spec.
          example: 0x
      required:
        - version
        - sourceDomain
        - destinationDomain
        - sourceContract
        - destinationContract
        - sourceToken
        - destinationToken
        - sourceDepositor
        - destinationRecipient
        - sourceSigner
        - destinationCaller
        - value
        - salt
        - hookData
    GetDepositsRequest:
      type: object
      properties:
        token:
          $ref: '#/components/schemas/Token'
          description: Token type to query deposits for
        sources:
          type: array
          description: >-
            List of sources to query deposits from. If domain is omitted from
            any source, the deposits from all domains for that depositor will be
            returned.
          items:
            type: object
            properties:
              domain:
                $ref: '#/components/schemas/Domain'
                description: >-
                  Domain to query deposits from. The depositor address must be
                  valid on the given domain.
              depositor:
                type: string
                description: Address of the depositor to query deposits for
            required:
              - depositor
      required:
        - token
        - sources
    DepositsResponse:
      type: object
      description: Response containing pending deposits for specified sources
      properties:
        token:
          $ref: '#/components/schemas/Token'
          description: Token type that was queried
        deposits:
          type: array
          description: List of pending deposits for each source
          items:
            type: object
            properties:
              depositor:
                type: string
                description: Address of the depositor
              domain:
                $ref: '#/components/schemas/Domain'
                description: Domain where the deposit was made
              transactionHash:
                type: string
                description: Transaction hash of the deposit event
                pattern: ^0x[0-9a-fA-F]{64}$
                example: >-
                  0x2c5f3e4a9e4b1a4b9c8d6a7d5b8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e
              amount:
                type: string
                pattern: ^\d+$
                description: Deposit amount in base units
              status:
                type: string
                enum:
                  - pending
                description: Status of the deposit (always 'pending' for this endpoint)
              blockHeight:
                type: string
                description: Block height when the deposit occurred
                example: '15000000'
              blockHash:
                type: string
                description: Block hash when the deposit occurred
                pattern: ^0x[0-9a-fA-F]{64}$
                example: >-
                  0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347
              blockTimestamp:
                type: string
                format: date-time
                description: Block timestamp when the deposit occurred, in ISO 8601 format
            required:
              - depositor
              - domain
              - transactionHash
              - amount
              - status
              - blockHeight
              - blockHash
              - blockTimestamp
      required:
        - token
        - deposits
    BatchSubmitRequest:
      type: object
      properties:
        token:
          type: string
          enum:
            - USDC
          description: Token type for the transfer.
        sendingDomain:
          type: integer
          description: Source domain (must equal recipientDomain for same-chain transfers).
        recipientDomain:
          type: integer
          description: >-
            Destination domain (must equal sendingDomain for same-chain
            transfers).
        auth:
          type: object
          description: Authorization data containing the EIP-3009 signature.
          properties:
            eip3009Auth:
              type: object
              description: EIP-3009 TransferWithAuthorization parameters.
              properties:
                from:
                  type: string
                  pattern: ^0x[a-fA-F0-9]{40}$
                  description: Sender address.
                to:
                  type: string
                  pattern: ^0x[a-fA-F0-9]{40}$
                  description: Recipient address.
                value:
                  type: string
                  description: Amount in base units (uint256). For USDC, 1000000 = 1 USDC.
                  example: '1000000'
                validAfter:
                  type: string
                  description: >-
                    Unix timestamp (uint256) after which the authorization is
                    valid.
                validBefore:
                  type: string
                  description: >-
                    Unix timestamp (uint256) before which the authorization is
                    valid.
                nonce:
                  type: string
                  pattern: ^0x[a-fA-F0-9]+$
                  description: Unique nonce for the authorization.
                signature:
                  type: string
                  pattern: ^0x[a-fA-F0-9]+$
                  description: EIP-3009 signature over the authorization.
      required:
        - token
        - sendingDomain
        - recipientDomain
        - auth
    ResourceInfo:
      type: object
      description: Information about the resource being paid for in an x402 payment.
      properties:
        url:
          type: string
          description: URL of the resource.
        description:
          type: string
          description: Human-readable description of the resource.
        mimeType:
          type: string
          description: Expected MIME type of the response.
      required:
        - url
    PaymentRequirements:
      type: object
      description: Defines an acceptable way to pay for a resource using the x402 protocol.
      properties:
        scheme:
          type: string
          description: Payment scheme identifier (e.g., "exact").
          example: exact
        network:
          type: string
          description: Network identifier (e.g., "base-sepolia", "base").
          example: base-sepolia
        asset:
          type: string
          description: Token contract address or symbol.
          example: '0x036CbD53842c5426634e7929541eC2318f3dCF7e'
        amount:
          type: string
          description: >-
            Payment amount in atomic units (e.g., wei). For USDC, 1000000 = 1
            USDC.
          example: '1000000'
        payTo:
          type: string
          description: Address to receive the payment.
          example: '0x1234567890abcdef1234567890abcdef12345678'
        maxTimeoutSeconds:
          type: integer
          description: Maximum time in seconds for the payment to be valid.
          example: 3600
        extra:
          type: object
          description: Scheme-specific additional parameters.
          additionalProperties: true
      required:
        - scheme
        - network
        - asset
        - amount
        - payTo
        - maxTimeoutSeconds
    PaymentPayload:
      type: object
      description: x402 payment payload containing the payment authorization and metadata.
      properties:
        x402Version:
          type: integer
          description: Version of the x402 protocol.
          example: 1
        resource:
          $ref: '#/components/schemas/ResourceInfo'
          description: Information about the resource being paid for.
        accepted:
          $ref: '#/components/schemas/PaymentRequirements'
          description: The payment requirements that were accepted by the client.
        payload:
          type: object
          description: Scheme-specific payment data (e.g., EIP-3009 authorization).
          additionalProperties: true
        extensions:
          type: object
          description: Optional protocol extensions.
          additionalProperties: true
      required:
        - x402Version
        - accepted
        - payload
    X402TransferResponse:
      type: object
      description: Response containing details of an x402 transfer.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the transfer.
        status:
          type: string
          enum:
            - received
            - batched
            - confirmed
            - completed
            - failed
          description: |
            Current status of the x402 transfer:

            - `received`: Transfer has been submitted and accepted
            - `batched`: Transfer has been included in a batch for processing
            - `confirmed`: Transfer has been confirmed onchain
            - `completed`: Transfer is fully complete
            - `failed`: Transfer has failed
        token:
          type: string
          description: Token symbol (e.g., USDC).
          example: USDC
        sendingNetwork:
          type: string
          description: CAIP-2 network identifier for the sending chain.
          example: eip155:11155111
        recipientNetwork:
          type: string
          description: CAIP-2 network identifier for the recipient chain.
          example: eip155:11155111
        fromAddress:
          type: string
          description: Sender address.
        toAddress:
          type: string
          description: Recipient address.
        amount:
          type: string
          description: Transfer amount in atomic units.
        nonce:
          type: string
          description: EIP-3009 nonce.
        txHash:
          type: string
          nullable: true
          description: >-
            Batch-level settlement transaction hash, shared by all transfers in
            the same batch. Remains null until included in a batch with a
            settlement transaction hash.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the transfer was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the transfer was last updated.
      required:
        - id
        - status
        - token
        - sendingNetwork
        - recipientNetwork
        - fromAddress
        - toAddress
        - amount
        - nonce
        - txHash
        - createdAt
        - updatedAt
    PermissionlessEnvironment:
      type: string
      description: >-
        The environment for the subscription. Use `TEST` to receive testnet
        events or `LIVE` to receive mainnet events.
      enum:
        - TEST
        - LIVE
      example: TEST
    Id:
      type: string
      format: uuid
      description: System-generated unique identifier of the resource.
      example: c4d1da72-111e-4d52-bdbf-2e74a2d803d5
    PermissionlessNotificationType:
      type: string
      description: >
        Notification type for Gateway webhook subscriptions. Omit
        `notificationTypes` or use

        `gateway.*` to subscribe to all current and future Gateway notification
        types. Use individual

        event types to restrict delivery to specific Gateway events.
      enum:
        - gateway.*
        - gateway.deposit.finalized
        - gateway.mint.finalized
        - gateway.mint.forwarded
    CreateDate:
      type: string
      format: date-time
      description: Date and time the resource was created, in ISO-8601 UTC format.
      example: '2023-01-01T12:04:05Z'
    UpdateDate:
      type: string
      format: date-time
      description: Date and time the resource was last updated, in ISO-8601 UTC format.
      example: '2023-01-01T12:04:05Z'
    PermissionlessSubscription:
      type: object
      title: PermissionlessSubscription
      description: >-
        Contains information about a permissionless webhook notification
        subscription.
      required:
        - id
        - endpoint
        - enabled
        - notificationTypes
        - restricted
        - addresses
        - domains
        - environment
        - createDate
        - updateDate
      properties:
        id:
          $ref: '#/components/schemas/Id'
        name:
          type: string
          description: Name of the webhook notification subscription.
          example: Gateway Webhooks
        endpoint:
          type: string
          description: >-
            URL of the endpoint subscribing to notifications. Must be publicly
            accessible, use HTTPS, and respond with a 2XX status to a POST
            request.
          example: https://example.org/handler/for/notifications
        enabled:
          type: boolean
          description: >-
            Whether the subscription is enabled. `true` indicates the
            subscription is enabled.
          example: true
        notificationTypes:
          type: array
          description: >-
            The notification types on which a notification will be sent.
            `gateway.*` indicates all current and future Gateway notification
            types.
          items:
            $ref: '#/components/schemas/PermissionlessNotificationType'
          example:
            - gateway.*
        restricted:
          type: boolean
          description: >-
            Whether the webhook is restricted to specific notification types. An
            unrestricted webhook will notify on all current and future
            notification types for the subscribed products. A restricted webhook
            will only notify on the notification types in the
            `notificationTypes` field.
          example: false
        addresses:
          type: array
          description: >-
            The EVM or Solana wallet addresses registered for this subscription.
            Notifications fire only for events on these addresses.
          items:
            type: string
            description: An EVM or Solana wallet address.
            example: '0x1234567890abcdef1234567890abcdef12345678'
          example:
            - '0x1234567890abcdef1234567890abcdef12345678'
        domains:
          type: array
          description: >-
            The CCTP domain identifiers for the blockchains to watch. For
            example, "0" is Ethereum and "6" is Base.
          items:
            type: string
            description: A CCTP domain identifier.
            example: '26'
          example:
            - '26'
        environment:
          $ref: '#/components/schemas/PermissionlessEnvironment'
        createDate:
          $ref: '#/components/schemas/CreateDate'
        updateDate:
          $ref: '#/components/schemas/UpdateDate'
    PermissionlessSubscriptionsResponse:
      title: PermissionlessSubscriptionsResponse
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PermissionlessSubscription'
    PermissionlessSubscriptionResponse:
      title: PermissionlessSubscriptionResponse
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PermissionlessSubscription'
    ConnectionStatus:
      type: string
      description: The result of testing the connection to the subscriber endpoint.
      enum:
        - SUCCESS
        - FAILURE
    TestConnectionResult:
      type: object
      title: TestConnectionResult
      description: The result of testing the connection to a subscriber endpoint.
      required:
        - connectionStatus
      properties:
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        statusCode:
          type: integer
          description: The HTTP status code returned by the subscriber endpoint.
          example: 200
    TestConnectionResponse:
      title: TestConnectionResponse
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TestConnectionResult'
    NotificationSignaturePublicKey:
      title: NotificationSignaturePublicKeyResponse
      type: object
      properties:
        data:
          type: object
          required:
            - id
            - algorithm
            - publicKey
            - createDate
          properties:
            id:
              type: string
              format: UUID
              example: 09379bc1-4871-45ad-8b8b-8027795df70d
            algorithm:
              type: string
              example: ECDSA_SHA_256
            publicKey:
              type: string
              example: >-
                QFkwewylAoZIzj0CBQYIKoZIzj0DAQcDQgAEEext6d7AimvYFDAKBwsUsGXrhqmRHNPYum7V/BwfvJLmJeSMe2V0b9eWKPuFxAEH8HCY/MSZdBI+q/E6IdPnSg==
            createDate:
              type: string
              example: '2023-06-01T18:18:06.931526Z'
  headers:
    XRequestId:
      description: >
        Developer-provided header parameter or Circle-generated universally
        unique identifier (UUID v4). Useful for identifying a specific request
        when communicating with Circle Support.
      schema:
        $ref: '#/components/schemas/XRequestId'
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            type: object
            title: BadRequestResponse
            required:
              - code
              - message
            properties:
              code:
                type: integer
                description: Code that corresponds to the error.
              message:
                type: string
                description: Message that describes the error.
            example:
              code: 400
              message: Bad request.
      description: Request cannot be processed due to a client error.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotFound:
      content:
        application/json:
          schema:
            type: object
            title: NotFoundResponse
            required:
              - code
              - message
            properties:
              code:
                type: integer
                description: Code that corresponds to the error.
              message:
                type: string
                description: Message that describes the error.
            example:
              code: 404
              message: Not found.
      description: Specified resource was not found.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    DefaultError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Error response
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotAuthorized:
      content:
        application/json:
          schema:
            type: object
            title: NotAuthorizedResponse
            required:
              - code
              - message
            properties:
              code:
                type: integer
                description: Code that corresponds to the error.
              message:
                type: string
                description: Message that describes the error.
            example:
              code: 401
              message: Malformed authorization.
      description: >-
        Request has not been applied because it lacks valid authentication
        credentials.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
  parameters:
    XRequestId:
      name: X-Request-Id
      in: header
      description: >
        Developer-provided identifier for this request, used for tracing
        requests in Wallets API logs and the Developer Console, and when
        communicating with Circle Support.

        **Must be a UUID to appear in logs.** Non-UUID values are accepted by
        the API but are ignored by logging and tracing systems.
      schema:
        $ref: '#/components/schemas/XRequestId'
    Id:
      name: id
      description: The universally unique identifier of the resource.
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: b3d9d2d5-4c12-4946-a09d-953e82fae2b0
  requestBodies:
    CreatePermissionlessSubscription:
      content:
        application/json:
          schema:
            description: Required parameters to create a new subscription.
            type: object
            required:
              - environment
              - endpoint
              - addresses
              - domains
            properties:
              environment:
                $ref: '#/components/schemas/PermissionlessEnvironment'
              name:
                type: string
                description: Name of the webhook notification subscription.
                example: Gateway Webhooks
              endpoint:
                type: string
                description: >-
                  URL of the endpoint to subscribe to notifications. Must be
                  publicly accessible, use HTTPS, and respond with a 2XX status
                  to a POST request.
                example: https://example.org/handler/for/notifications
              enabled:
                type: boolean
                description: Whether the subscription is enabled. Defaults to `true`.
                default: true
                example: true
              notificationTypes:
                type: array
                description: >
                  The notification types to subscribe to. If omitted or if
                  `gateway.*` is provided, the webhook is unrestricted for
                  Gateway events and the response returns `restricted: false`.
                  If individual event types are provided, the webhook is
                  restricted to those event types.
                items:
                  $ref: '#/components/schemas/PermissionlessNotificationType'
                example:
                  - gateway.*
              addresses:
                type: array
                description: >-
                  The EVM or Solana wallet addresses to monitor. Notifications
                  fire only for events on these addresses.
                items:
                  type: string
                example:
                  - '0x1234567890abcdef1234567890abcdef12345678'
              domains:
                type: array
                description: The CCTP domain identifiers for the blockchains to watch.
                items:
                  type: string
                example:
                  - '26'
      required: true
      description: Schema for the request payload to create a new subscription.
    UpdatePermissionlessSubscription:
      content:
        application/json:
          schema:
            type: object
            minProperties: 1
            description: >
              Fields to update on a subscription. Metadata fields can be updated
              independently. To update filters, provide `notificationTypes`,
              `addresses`, and `domains` together; those fields fully replace
              the existing filters when provided.
            properties:
              environment:
                $ref: '#/components/schemas/PermissionlessEnvironment'
              name:
                type: string
                description: Name of the subscription.
                example: Gateway Webhooks
              enabled:
                type: boolean
                description: Whether the subscription is enabled.
                example: true
              notificationTypes:
                type: array
                description: >
                  The notification types to subscribe to. Must be provided
                  together with `addresses` and `domains` when changing filters.
                  Fully replaces the existing list on update.
                items:
                  $ref: '#/components/schemas/PermissionlessNotificationType'
                example:
                  - gateway.deposit.finalized
                  - gateway.mint.finalized
              addresses:
                type: array
                description: >
                  The EVM or Solana wallet addresses to monitor. Must be
                  provided together with `notificationTypes` and `domains` when
                  changing filters. Fully replaces the existing list on update.
                items:
                  type: string
                example:
                  - '0x1234567890abcdef1234567890abcdef12345678'
                  - '0xabcdef1234567890abcdef1234567890abcdef12'
              domains:
                type: array
                description: >
                  The CCTP domain identifiers. Must be provided together with
                  `notificationTypes` and `addresses` when changing filters.
                  Fully replaces the existing list on update.
                items:
                  type: string
                example:
                  - '26'
                  - '3'
      required: true
      description: Schema for the request payload to update a subscription.
