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

# Execute token-layer action

> 
    Generic action endpoint for Token Layer handlers.

    Supported actions:
    - register
    - createToken
    - tradeToken
    - sendTransaction
    - transferToken
    - claimRewards
    - createReferralCode
    - enterReferralCode
    - mintUsd

    Authentication modes:
    - JWT bearer
    - API key bearer
    - Wallet signature bearer (Authorization: Bearer 0x...)

    For wallet-signature auth:
    - signature must be a valid EIP-712 signature over the typed request payload
    - nonce is timestamp in milliseconds
    - expiresAfter is expiration window in milliseconds
    - action.message and action.signature are required for register action
    - action.message must include a 13-digit millisecond timestamp (e.g. "timestamp: 1737600000000")
    - action.message timestamp must exactly match nonce and be within expiresAfter
  

See the integration guide for action-by-action examples and flow:

* [Token Layer Action Guide](/guides/token-layer-actions)


## OpenAPI

````yaml post /token-layer
openapi: 3.0.3
info:
  title: Token Layer API
  version: 1.0.0
  description: |2-

          Token Layer is an omnichain token trading platform where users can create and trade tokens across multiple chains.

          This API provides comprehensive access to token operations, trading, earnings,
          blockchain transactions, and portfolio management.

          ## Base URL
          All endpoints are accessed via: `https://api.tokenlayer.network/{endpoint}`

          ## Authentication
          Most endpoints require authentication using an JWT token or API key passed as a Bearer token in the Authorization header.

          ## Rate Limiting
          API calls are rate limited per user. Please implement appropriate backoff strategies.
        
  contact:
    name: Token Layer API Support
    url: https://app.tokenlayer.network
servers:
  - url: https://api.tokenlayer.network/functions/v1
    description: Production server
  - url: https://api.tokenlayer.network/functions/v1
    description: Staging server
security: []
tags:
  - name: Tokens
    description: Token creation, browsing, search, trading, and price operations
  - name: Transactions
    description: Blockchain transactions (send, tip, ownership checks)
paths:
  /token-layer:
    post:
      tags:
        - Transactions
        - Tokens
      summary: Execute token-layer action
      description: |2-

            Generic action endpoint for Token Layer handlers.

            Supported actions:
            - register
            - createToken
            - tradeToken
            - sendTransaction
            - transferToken
            - claimRewards
            - createReferralCode
            - enterReferralCode
            - mintUsd

            Authentication modes:
            - JWT bearer
            - API key bearer
            - Wallet signature bearer (Authorization: Bearer 0x...)

            For wallet-signature auth:
            - signature must be a valid EIP-712 signature over the typed request payload
            - nonce is timestamp in milliseconds
            - expiresAfter is expiration window in milliseconds
            - action.message and action.signature are required for register action
            - action.message must include a 13-digit millisecond timestamp (e.g. "timestamp: 1737600000000")
            - action.message timestamp must exactly match nonce and be within expiresAfter
          
      operationId: tokenLayerAction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenLayerRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenLayerResponse'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenLayerError'
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenLayerError'
        '429':
          description: Response 429
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenLayerError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenLayerError'
      security:
        - BearerAuth: []
components:
  schemas:
    TokenLayerRequest:
      anyOf:
        - $ref: '#/components/schemas/RegisterTokenLayerRequest'
        - $ref: '#/components/schemas/CreateTokenLayerRequest'
        - $ref: '#/components/schemas/TradeTokenLayerRequest'
        - $ref: '#/components/schemas/SendTransactionLayerRequest'
        - $ref: '#/components/schemas/TransferTokenLayerRequest'
        - $ref: '#/components/schemas/ClaimRewardsLayerRequest'
        - $ref: '#/components/schemas/CreateReferralCodeLayerRequest'
        - $ref: '#/components/schemas/EnterReferralCodeLayerRequest'
        - $ref: '#/components/schemas/MintUsdLayerRequest'
    TokenLayerResponse:
      oneOf:
        - $ref: '#/components/schemas/RegisterActionResponse'
        - $ref: '#/components/schemas/CreateTokenActionResponse'
        - type: object
          properties:
            actionType:
              type: string
              enum:
                - tradeToken
            name:
              type: string
              enum:
                - tradeToken
          required:
            - actionType
            - name
        - type: object
          properties:
            actionType:
              type: string
              enum:
                - sendTransaction
            name:
              type: string
              enum:
                - sendTransaction
          required:
            - actionType
            - name
        - type: object
          properties:
            actionType:
              type: string
              enum:
                - transferToken
            name:
              type: string
              enum:
                - transferToken
          required:
            - actionType
            - name
        - type: object
          properties:
            actionType:
              type: string
              enum:
                - claimRewards
            name:
              type: string
              enum:
                - claimRewards
          required:
            - actionType
            - name
        - type: object
          properties:
            actionType:
              type: string
              enum:
                - createReferralCode
            name:
              type: string
              enum:
                - createReferralCode
          required:
            - actionType
            - name
        - type: object
          properties:
            actionType:
              type: string
              enum:
                - enterReferralCode
            name:
              type: string
              enum:
                - enterReferralCode
          required:
            - actionType
            - name
        - type: object
          properties:
            actionType:
              type: string
              enum:
                - mintUsd
            name:
              type: string
              enum:
                - mintUsd
          required:
            - actionType
            - name
    TokenLayerError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
        code:
          type: string
        details:
          nullable: true
      required:
        - error
    RegisterTokenLayerRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - Mainnet
            - Testnet
          description: Environment indicator included in typed-data payload
        nonce:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: >-
            Nonce timestamp in milliseconds. Required for wallet-signature
            authentication.
          example: 1737600000000
        expiresAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Expiration window in milliseconds
          example: 300000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: Required when using wallet signature auth (Bearer wallet address)
          example: 0x5f2a...
        signatureChainId:
          type: string
          pattern: ^0x[0-9a-fA-F]+$
          description: >-
            Required when using wallet signature auth. EIP-712 domain chainId in
            hex.
          example: '0x1'
        action:
          $ref: '#/components/schemas/RegisterAction'
      required:
        - source
        - expiresAfter
        - action
      description: Envelope for register action
      title: Register
    CreateTokenLayerRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - Mainnet
            - Testnet
          description: Environment indicator included in typed-data payload
        nonce:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: >-
            Nonce timestamp in milliseconds. Required for wallet-signature
            authentication.
          example: 1737600000000
        expiresAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Expiration window in milliseconds
          example: 300000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: Required when using wallet signature auth (Bearer wallet address)
          example: 0x5f2a...
        signatureChainId:
          type: string
          pattern: ^0x[0-9a-fA-F]+$
          description: >-
            Required when using wallet signature auth. EIP-712 domain chainId in
            hex.
          example: '0x1'
        action:
          $ref: '#/components/schemas/CreateTokenAction'
      required:
        - source
        - expiresAfter
        - action
      description: Envelope for createToken action
      title: Create Token
    TradeTokenLayerRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - Mainnet
            - Testnet
          description: Environment indicator included in typed-data payload
        nonce:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: >-
            Nonce timestamp in milliseconds. Required for wallet-signature
            authentication.
          example: 1737600000000
        expiresAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Expiration window in milliseconds
          example: 300000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: Required when using wallet signature auth (Bearer wallet address)
          example: 0x5f2a...
        signatureChainId:
          type: string
          pattern: ^0x[0-9a-fA-F]+$
          description: >-
            Required when using wallet signature auth. EIP-712 domain chainId in
            hex.
          example: '0x1'
        action:
          $ref: '#/components/schemas/TradeTokenAction'
      required:
        - source
        - expiresAfter
        - action
    SendTransactionLayerRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - Mainnet
            - Testnet
          description: Environment indicator included in typed-data payload
        nonce:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: >-
            Nonce timestamp in milliseconds. Required for wallet-signature
            authentication.
          example: 1737600000000
        expiresAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Expiration window in milliseconds
          example: 300000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: Required when using wallet signature auth (Bearer wallet address)
          example: 0x5f2a...
        signatureChainId:
          type: string
          pattern: ^0x[0-9a-fA-F]+$
          description: >-
            Required when using wallet signature auth. EIP-712 domain chainId in
            hex.
          example: '0x1'
        action:
          $ref: '#/components/schemas/SendTransactionAction'
      required:
        - source
        - expiresAfter
        - action
    TransferTokenLayerRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - Mainnet
            - Testnet
          description: Environment indicator included in typed-data payload
        nonce:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: >-
            Nonce timestamp in milliseconds. Required for wallet-signature
            authentication.
          example: 1737600000000
        expiresAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Expiration window in milliseconds
          example: 300000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: Required when using wallet signature auth (Bearer wallet address)
          example: 0x5f2a...
        signatureChainId:
          type: string
          pattern: ^0x[0-9a-fA-F]+$
          description: >-
            Required when using wallet signature auth. EIP-712 domain chainId in
            hex.
          example: '0x1'
        action:
          $ref: '#/components/schemas/TransferTokenAction'
      required:
        - source
        - expiresAfter
        - action
    ClaimRewardsLayerRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - Mainnet
            - Testnet
          description: Environment indicator included in typed-data payload
        nonce:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: >-
            Nonce timestamp in milliseconds. Required for wallet-signature
            authentication.
          example: 1737600000000
        expiresAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Expiration window in milliseconds
          example: 300000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: Required when using wallet signature auth (Bearer wallet address)
          example: 0x5f2a...
        signatureChainId:
          type: string
          pattern: ^0x[0-9a-fA-F]+$
          description: >-
            Required when using wallet signature auth. EIP-712 domain chainId in
            hex.
          example: '0x1'
        action:
          $ref: '#/components/schemas/ClaimRewardsAction'
      required:
        - source
        - expiresAfter
        - action
    CreateReferralCodeLayerRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - Mainnet
            - Testnet
          description: Environment indicator included in typed-data payload
        nonce:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: >-
            Nonce timestamp in milliseconds. Required for wallet-signature
            authentication.
          example: 1737600000000
        expiresAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Expiration window in milliseconds
          example: 300000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: Required when using wallet signature auth (Bearer wallet address)
          example: 0x5f2a...
        signatureChainId:
          type: string
          pattern: ^0x[0-9a-fA-F]+$
          description: >-
            Required when using wallet signature auth. EIP-712 domain chainId in
            hex.
          example: '0x1'
        action:
          $ref: '#/components/schemas/CreateReferralCodeAction'
      required:
        - source
        - expiresAfter
        - action
    EnterReferralCodeLayerRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - Mainnet
            - Testnet
          description: Environment indicator included in typed-data payload
        nonce:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: >-
            Nonce timestamp in milliseconds. Required for wallet-signature
            authentication.
          example: 1737600000000
        expiresAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Expiration window in milliseconds
          example: 300000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: Required when using wallet signature auth (Bearer wallet address)
          example: 0x5f2a...
        signatureChainId:
          type: string
          pattern: ^0x[0-9a-fA-F]+$
          description: >-
            Required when using wallet signature auth. EIP-712 domain chainId in
            hex.
          example: '0x1'
        action:
          $ref: '#/components/schemas/EnterReferralCodeAction'
      required:
        - source
        - expiresAfter
        - action
    MintUsdLayerRequest:
      type: object
      properties:
        source:
          type: string
          enum:
            - Mainnet
            - Testnet
          description: Environment indicator included in typed-data payload
        nonce:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: >-
            Nonce timestamp in milliseconds. Required for wallet-signature
            authentication.
          example: 1737600000000
        expiresAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Expiration window in milliseconds
          example: 300000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: Required when using wallet signature auth (Bearer wallet address)
          example: 0x5f2a...
        signatureChainId:
          type: string
          pattern: ^0x[0-9a-fA-F]+$
          description: >-
            Required when using wallet signature auth. EIP-712 domain chainId in
            hex.
          example: '0x1'
        action:
          $ref: '#/components/schemas/MintUsdAction'
      required:
        - source
        - expiresAfter
        - action
    RegisterActionResponse:
      type: object
      properties:
        actionType:
          type: string
          enum:
            - register
        name:
          type: string
          enum:
            - register
        success:
          type: boolean
          enum:
            - true
        userId:
          type: string
          format: uuid
        walletAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        method:
          type: string
          enum:
            - web3
      required:
        - actionType
        - name
        - success
        - userId
        - walletAddress
        - method
      title: Register Response
    CreateTokenActionResponse:
      type: object
      properties:
        actionType:
          type: string
          enum:
            - createToken
        name:
          type: string
          enum:
            - createToken
        success:
          type: boolean
          enum:
            - true
        executed:
          type: boolean
        transactionHash:
          type: string
        chainId:
          type: integer
          description: Numeric chain ID for the transaction
          example: 84532
        transaction:
          type: object
          properties:
            to:
              type: string
            data:
              type: string
            value:
              type: string
            gasLimit:
              type: string
          required:
            - to
            - data
            - value
            - gasLimit
          description: >-
            Deprecated: Use transactions array instead. Single transaction
            object for backwards compatibility.
        transactions:
          type: array
          items:
            type: object
            properties:
              to:
                type: string
              data:
                type: string
              value:
                type: string
              gasLimit:
                type: string
              description:
                type: string
              chainId:
                type: integer
              chainType:
                type: string
              chainSlug:
                type: string
              transactionDelay:
                type: integer
            required:
              - to
              - data
              - value
          description: >-
            Array of transactions to execute. May include USDC approval
            transaction if initial purchase is requested.
        metadata:
          type: object
          properties:
            tokenUri:
              type: string
            tokenId:
              type: string
            name:
              type: string
            symbol:
              type: string
            slug:
              type: string
            token_layer_id:
              type: string
              nullable: true
              description: Token Layer ID (calculated hash)
              example: >-
                0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
            description:
              type: string
            hubUrl:
              type: string
              format: uri
              description: Direct URL to the token hub page
              example: https://app.tokenlayer.network/token/my-cool-token
            addresses:
              type: object
              properties:
                evm:
                  type: string
                solana:
                  type: string
              required:
                - evm
                - solana
          required:
            - tokenUri
            - tokenId
            - name
            - symbol
            - slug
            - description
            - hubUrl
            - addresses
      required:
        - actionType
        - name
        - success
      title: Create Token Response
    RegisterAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - register
        method:
          type: string
          enum:
            - web3
          description: Identity registration method
          example: web3
        message:
          type: string
          minLength: 1
          description: >-
            Signed message for Web3 bootstrap. Must include a 13-digit ms
            timestamp (e.g. 'timestamp: 1737600000000') matching nonce.
          example: >-
            TokenLayer register\naddress:
            0xafe140dbfe00606990d913c04efd318701c99d17\ntimestamp: 1737600000000
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]{130}$
          description: >-
            Signature for register message. message timestamp (ms) must equal
            nonce and be within expiresAfter window.
          example: 0xaabb...
      required:
        - type
        - method
        - message
        - signature
      description: Register a new wallet address with Token Layer
      title: Register
    CreateTokenAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - createToken
        name:
          type: string
          minLength: 1
          description: Token name
          example: My Cool Token
        symbol:
          type: string
          minLength: 1
          maxLength: 10
          description: Token symbol (ticker)
          example: MCT
        description:
          type: string
          minLength: 1
          description: Token description
          example: A revolutionary new token
        image:
          type: string
          minLength: 1
          description: >-
            Token logo image - can be either a URL or base64-encoded image data
            (data:image/...)
          example: >-
            https://example.com/logo.png or
            data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==
        banner:
          type: string
          minLength: 1
          description: >-
            Banner image - can be either a URL or base64-encoded image data
            (data:image/...)
          example: >-
            https://example.com/banner.png or
            data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==
        video:
          type: string
          minLength: 1
          description: >-
            Promotional video - can be either a URL or base64-encoded video data
            (data:video/...)
          example: >-
            https://example.com/promo.mp4 or
            data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC
        links:
          type: object
          properties:
            website:
              type: string
              format: uri
              description: Project website URL
              example: https://example.com
            twitter:
              type: string
              format: uri
              description: Twitter/X profile URL
              example: https://twitter.com/example
            youtube:
              type: string
              format: uri
              description: YouTube channel URL
              example: https://youtube.com/@example
            discord:
              type: string
              format: uri
              description: Discord server invite URL
              example: https://discord.gg/example
            telegram:
              type: string
              format: uri
              description: Telegram group/channel URL
              example: https://t.me/example
          description: Optional social media and website links
        chainSlug:
          $ref: '#/components/schemas/ChainSlug'
        destinationChains:
          type: array
          items:
            $ref: '#/components/schemas/ChainSlug'
          description: >-
            Optional array of destination chain slugs for cross-chain token
            deployment and migration endpoints. Defaults to [base-sepolia,
            bnb-testnet, solana-devnet]. The initial chain will be automatically
            excluded from migration endpoints.
          example:
            - base-sepolia
            - bnb-testnet
            - solana-devnet
        poolType:
          type: string
          enum:
            - meme
            - startup-preseed
            - test
          description: >-
            Type of token pool. Defaults to "meme". Maps to: meme=7,
            startup-preseed=8
          example: meme
        userAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: >-
            User wallet address (optional - if not provided, will use user's
            Privy wallet from user_wallets table)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
        builder:
          $ref: '#/components/schemas/Builder'
        token_referral:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: >-
            Token referral address for attribution (optional - defaults to zero
            address). Used to attribute referral fees to a specific address.
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
        tags:
          type: array
          items:
            type: string
          description: Optional hashtags/tags for the token
          example:
            - defi
            - meme
        amountIn:
          type: number
          minimum: 0
          description: >-
            Optional USD amount to spend on initial token purchase (in USD). Use
            0 or omit to skip initial purchase.
          example: 10
        tokensOut:
          type: number
          minimum: 0
          description: >-
            Optional number of tokens to purchase initially. Use 0 or omit to
            skip initial purchase. If both amountIn and tokensOut are provided,
            tokensOut takes priority.
          example: 1000
        maxAmountIn:
          type: number
          minimum: 0
          description: >-
            Maximum USD amount willing to spend when tokensOut is specified.
            This value comes from the Quoter contract quote and includes
            slippage protection. Required when tokensOut is provided.
          example: 15.5
      required:
        - type
        - name
        - symbol
        - description
        - image
        - chainSlug
      description: Create a new token on Token Layer
      title: Create Token
    TradeTokenAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - tradeToken
        tokenId:
          type: string
          format: uuid
        userAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: >-
            User wallet address (optional - if not provided, will use user's
            Privy wallet from user_wallets table)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
        builder:
          $ref: '#/components/schemas/Builder'
        token_referral:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: >-
            Token referral address for attribution (optional - defaults to zero
            address). Used to attribute referral fees to a specific address.
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
        chainSlug:
          $ref: '#/components/schemas/ChainSlug'
        direction:
          type: string
          enum:
            - buy
            - sell
        buyAmountUSD:
          type: number
          minimum: 0
          exclusiveMinimum: true
        buyAmountToken:
          anyOf:
            - type: number
              minimum: 0
              exclusiveMinimum: true
            - type: string
          description: >-
            Token amount to buy (number for regular amounts, string for exact
            wei values at 100%)
          example: 1000
        sellAmountToken:
          anyOf:
            - type: number
              minimum: 0
              exclusiveMinimum: true
            - type: string
          description: >-
            Token amount to sell (number for regular amounts, string for exact
            wei values at 100%)
          example: 1000
        sellAmountUSD:
          type: number
          minimum: 0
          exclusiveMinimum: true
      required:
        - type
        - tokenId
        - chainSlug
        - direction
    SendTransactionAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - sendTransaction
        to:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Recipient address
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
        amount:
          type: string
          description: Amount in wei (as string to handle large numbers)
          example: '1000000000000000000'
        data:
          type: string
          pattern: ^0x[a-fA-F0-9]*$
          description: Optional transaction data (hex string)
          example: 0x
        chainSlug:
          $ref: '#/components/schemas/ChainSlug'
      required:
        - type
        - to
        - amount
        - chainSlug
    TransferTokenAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - transferToken
        token_id:
          type: string
          format: uuid
        recipient_address:
          type: string
          description: Recipient address (supports both EVM and Solana formats)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
        amount:
          type: string
          description: Human-readable amount (e.g., "100.5")
          example: '100.5'
        from_chain_slug:
          allOf:
            - $ref: '#/components/schemas/ChainSlug'
            - description: Source chain slug
        to_chain_slug:
          allOf:
            - $ref: '#/components/schemas/ChainSlug'
            - description: Destination chain slug
        wallet_address:
          type: string
          description: >-
            User wallet address (optional - will be fetched from user_wallets if
            not provided, supports both EVM and Solana formats)
      required:
        - type
        - token_id
        - recipient_address
        - amount
        - from_chain_slug
        - to_chain_slug
    ClaimRewardsAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - claimRewards
        currencyAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        chains:
          type: array
          items:
            type: string
      required:
        - type
    CreateReferralCodeAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - createReferralCode
        code:
          type: string
          pattern: ^[a-zA-Z0-9]{4,20}$
          description: Custom referral code (4-20 alphanumeric characters)
          example: ALICE2025
        network_mode:
          type: string
          enum:
            - testnet
            - mainnet
            - both
          default: mainnet
          description: Network mode for this referral code
          example: mainnet
      required:
        - type
        - code
    EnterReferralCodeAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - enterReferralCode
        referral_code:
          type: string
          description: The referral code to enter
          example: alice2025
        network_mode:
          type: string
          enum:
            - testnet
            - mainnet
            - both
          default: mainnet
          description: Network mode for this referral code
          example: mainnet
      required:
        - type
        - referral_code
    MintUsdAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - mintUsd
        chainSlug:
          $ref: '#/components/schemas/ChainSlug'
        amount:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          default: 100000
          description: Amount of USD to mint (defaults to 100,000)
          example: 100000
        userAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: User wallet address to mint tokens to
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
      required:
        - type
        - chainSlug
        - userAddress
    ChainSlug:
      type: string
      enum:
        - solana
        - solana-devnet
        - arbitrum
        - base
        - base-sepolia
        - avalanche
        - op-bnb
        - bnb
        - bnb-testnet
        - ethereum
        - monad
        - unichain
        - unichain-testnet
        - abstract
        - polygon
        - zksync
        - zksync-testnet
      description: >-
        Blockchain identifier. Supported chains: solana, solana-devnet,
        arbitrum, base, base-sepolia, avalanche, op-bnb, bnb, bnb-testnet,
        ethereum, monad, unichain, unichain-testnet, abstract, polygon, zksync,
        zksync-testnet
      example: base-sepolia
    Builder:
      type: object
      properties:
        code:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Builder address for attribution
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
        fee:
          type: integer
          minimum: 0
          maximum: 10000
          description: Builder fee in basis points (bps). 1 bps = 0.01%. Max 10000 (100%).
          example: 50
      required:
        - code
        - fee
      description: >-
        Builder attribution information (optional). Includes address and fee in
        bps.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token or API key

````