{
  "openapi": "3.0.0",
  "info": {
    "title": "CCIP directory and configuration REST API (v1)",
    "description": "API for retrieving CCIP chain, token, lane, and rate limits information.\n\nTo get started quickly, you can download our [Postman Collection](/api/ccip/v1/postman-collection.json) which includes all endpoints and example requests.",
    "version": "1.16.0",
    "contact": {
      "name": "File issues",
      "url": "https://github.com/smartcontractkit/documentation/issues/new/choose"
    },
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    }
  },
  "servers": [
    {
      "url": "https://docs.chain.link/api/ccip/v1",
      "description": "Production server"
    },
    {
      "url": "http://localhost:4321/api/ccip/v1",
      "description": "Development server"
    }
  ],
  "tags": [
    {
      "name": "chains",
      "description": "Chain information endpoints"
    },
    {
      "name": "tokens",
      "description": "Token information endpoints"
    },
    {
      "name": "lanes",
      "description": "Cross-chain lane information endpoints with rate limits"
    }
  ],
  "paths": {
    "/chains": {
      "get": {
        "tags": ["chains"],
        "summary": "Retrieve CCIP chain information",
        "description": "Returns information about Cross-Chain Interoperability Protocol (CCIP) chains across different blockchain families (EVM, Solana, Aptos)",
        "operationId": "getChains",
        "parameters": [
          {
            "name": "environment",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["mainnet", "testnet"]
            },
            "description": "The network environment to query"
          },
          {
            "name": "chainId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by chain ID (e.g., \"1\" for Ethereum, \"56\" for BSC, or a Solana pubkey)",
            "example": "1,56"
          },
          {
            "name": "selector",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by CCIP chain selector. Multiple selectors can be specified using comma-separated values",
            "example": "5009297550715157269,13264668187771770619"
          },
          {
            "name": "internalId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by internal chain identifier. Multiple IDs can be specified using comma-separated values (e.g., \"ethereum-mainnet,bsc-mainnet\")",
            "example": "ethereum-mainnet,bsc-mainnet"
          },
          {
            "name": "outputKey",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["chainId", "selector", "internalId"],
              "default": "chainId"
            },
            "description": "Key to use for organizing the response data"
          },
          {
            "name": "enrichFeeTokens",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["true", "false"],
              "default": "false"
            },
            "description": "When set to 'true', returns detailed fee token information including addresses, names, and decimals instead of just symbol strings"
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "description": "Unified search query. Automatically detects query type: selector (>17 digits), chainId (≤17 digits or Solana base58 hash), internalId (kebab-case), or displayName (fuzzy text search). Cannot be combined with chainId, selector, or internalId filters.",
            "example": "ethereum"
          },
          {
            "name": "family",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["evm", "solana", "aptos", "sui", "tron", "canton", "ton", "stellar", "starknet"]
            },
            "description": "Filter results by chain family. Only effective when using the search parameter."
          },
          {
            "name": "internalIdFormat",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["directory", "selector"],
              "default": "selector"
            },
            "description": "Format for internal IDs in the response. 'selector' uses canonical selector names (e.g., 'ethereum-mainnet'), 'directory' uses chains.json keys (e.g., 'mainnet'). Only applies when outputKey=internalId."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with chain data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainApiResponse"
                },
                "examples": {
                  "default": {
                    "summary": "Default response (string array for feeTokens)",
                    "value": {
                      "metadata": {
                        "environment": "mainnet",
                        "timestamp": "2024-03-14T12:00:00Z",
                        "requestId": "123e4567-e89b-12d3-a456-426614174000",
                        "ignoredChainCount": 0,
                        "validChainCount": 2
                      },
                      "data": {
                        "evm": {
                          "1": {
                            "chainId": 1,
                            "displayName": "Ethereum",
                            "selector": "5009297550715157269",
                            "internalId": "ethereum-mainnet",
                            "feeTokens": ["LINK", "WETH", "GHO"],
                            "router": "0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D",
                            "rmn": "0x411dE17f12D1A34ecC7F45f49844626267c75e81",
                            "registryModule": "0x13022e3e6C77524308BD56AEd716E88311b2E533",
                            "tokenAdminRegistry": "0xb22764f98dD05c789929716D677382Df22C05Cb6",
                            "tokenPoolFactory": "0x17D8a409fE2ceF2d3808bcB61F14aBEFfc28876e",
                            "chainType": "evm",
                            "chainFamily": "evm",
                            "supported": true
                          }
                        },
                        "solana": {
                          "solana-devnet": {
                            "chainId": "solana-devnet",
                            "displayName": "Solana Devnet",
                            "selector": "16015286601757825753",
                            "internalId": "solana-devnet",
                            "feeTokens": ["LINK", "SOL"],
                            "router": "CCiPv7hcmEqNdMdJgmHDJmEJyCkBgLqxmcf87R1Gho6H",
                            "rmn": "CRmNVnB7S6SqEPFG6m9dVp9fJJCjr3TC2TiAWB3RqNod",
                            "feeQuoter": "FqbCVbS7a4ndxs9xZ8UmfL6LQsUhAJNkWxW3duJRrCWD",
                            "chainType": "solana",
                            "chainFamily": "solana",
                            "supported": true
                          }
                        }
                      },
                      "ignored": []
                    }
                  },
                  "search": {
                    "summary": "Search response (includes both supported and unsupported chains)",
                    "value": {
                      "metadata": {
                        "environment": "testnet",
                        "timestamp": "2024-03-14T12:00:00Z",
                        "requestId": "123e4567-e89b-12d3-a456-426614174000",
                        "ignoredChainCount": 0,
                        "validChainCount": 2,
                        "searchQuery": "solana",
                        "searchType": "displayName"
                      },
                      "data": {
                        "solana": {
                          "solana-devnet": {
                            "chainId": "EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG",
                            "displayName": "Solana Devnet",
                            "selector": "16015286601757825753",
                            "internalId": "solana-devnet",
                            "feeTokens": ["LINK", "SOL"],
                            "router": "CCiPv7hcmEqNdMdJgmHDJmEJyCkBgLqxmcf87R1Gho6H",
                            "rmn": "CRmNVnB7S6SqEPFG6m9dVp9fJJCjr3TC2TiAWB3RqNod",
                            "feeQuoter": "FqbCVbS7a4ndxs9xZ8UmfL6LQsUhAJNkWxW3duJRrCWD",
                            "chainType": "solana",
                            "chainFamily": "solana",
                            "supported": true
                          },
                          "solana-testnet": {
                            "chainId": "4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",
                            "displayName": "Solana Testnet",
                            "selector": "6302590918974934319",
                            "internalId": "solana-testnet",
                            "feeTokens": [],
                            "router": "",
                            "rmn": "",
                            "chainType": "solana",
                            "chainFamily": "solana",
                            "supported": false
                          }
                        }
                      },
                      "ignored": []
                    }
                  },
                  "enriched": {
                    "summary": "Enriched response (detailed objects for feeTokens when enrichFeeTokens=true)",
                    "value": {
                      "metadata": {
                        "environment": "mainnet",
                        "timestamp": "2024-03-14T12:00:00Z",
                        "requestId": "123e4567-e89b-12d3-a456-426614174000",
                        "ignoredChainCount": 0,
                        "validChainCount": 1
                      },
                      "data": {
                        "evm": {
                          "1": {
                            "chainId": 1,
                            "displayName": "Ethereum",
                            "selector": "5009297550715157269",
                            "internalId": "ethereum-mainnet",
                            "feeTokens": [
                              {
                                "symbol": "GHO",
                                "name": "Gho Token",
                                "address": "0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f",
                                "decimals": 18
                              },
                              {
                                "symbol": "LINK",
                                "name": "ChainLink Token",
                                "address": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
                                "decimals": 18
                              },
                              {
                                "symbol": "WETH",
                                "name": "Wrapped Ether",
                                "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
                                "decimals": 18
                              }
                            ],
                            "router": "0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D",
                            "rmn": "0x411dE17f12D1A34ecC7F45f49844626267c75e81",
                            "registryModule": "0x13022e3e6C77524308BD56AEd716E88311b2E533",
                            "tokenAdminRegistry": "0xb22764f98dD05c789929716D677382Df22C05Cb6",
                            "tokenPoolFactory": "0x17D8a409fE2ceF2d3808bcB61F14aBEFfc28876e",
                            "chainType": "evm",
                            "chainFamily": "evm",
                            "supported": true
                          }
                        }
                      },
                      "ignored": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokens": {
      "get": {
        "tags": ["tokens"],
        "summary": "Retrieve CCIP token information",
        "description": "Returns information about Cross-Chain Interoperability Protocol (CCIP) supported tokens. The response includes token details organized by token symbol, with chain-specific information nested under each token and indexed by chain ID or selector (depending on the outputKey parameter).",
        "operationId": "getTokens",
        "parameters": [
          {
            "name": "environment",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["mainnet", "testnet"]
            },
            "description": "The network environment to query"
          },
          {
            "name": "token_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by token canonical identifier (e.g., \"LINK\" for Chainlink token, or \"LINK,ETH\" for multiple tokens)",
            "example": "LINK,ETH"
          },
          {
            "name": "chain_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by chain ID where the token is supported (e.g., \"1\" for Ethereum, or \"1,56\" for Ethereum and BSC)",
            "example": "1,56"
          },
          {
            "name": "outputKey",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["chainId", "selector", "internalId"],
              "default": "chainId"
            },
            "description": "Key to use for organizing the response data"
          },
          {
            "name": "internalIdFormat",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["directory", "selector"],
              "default": "selector"
            },
            "description": "Format for internal IDs in the response. 'selector' uses canonical selector names (e.g., 'ethereum-mainnet'), 'directory' uses chains.json keys (e.g., 'mainnet'). Only applies when outputKey=internalId."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with token data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenApiResponse"
                },
                "example": {
                  "metadata": {
                    "environment": "mainnet",
                    "timestamp": "2024-03-14T12:00:00Z",
                    "requestId": "123e4567-e89b-12d3-a456-426614174000",
                    "ignoredTokenCount": 0,
                    "validTokenCount": 1
                  },
                  "data": {
                    "LINK": {
                      "1": {
                        "chainId": 1,
                        "chainName": "Ethereum",
                        "decimals": 18,
                        "destinations": [
                          "1088",
                          "1111",
                          "1868",
                          "2020",
                          "324",
                          "34443",
                          "42220",
                          "592",
                          "81457",
                          "8453"
                        ],
                        "name": "ChainLink Token",
                        "poolAddress": "0xE31009Ac8385147A74463F686Dd148e99d291739",
                        "poolType": "lockRelease",
                        "symbol": "LINK",
                        "tokenAddress": "0x514910771AF9Ca656af840dff83E8264EcF986CA"
                      },
                      "42220": {
                        "chainId": 42220,
                        "chainName": "Celo",
                        "decimals": 18,
                        "destinations": ["1"],
                        "name": "ChainLink Token",
                        "poolAddress": "0xEB521366531411b982D1bc822A9fa09EDd94E309",
                        "poolType": "burnMint",
                        "symbol": "LINK",
                        "tokenAddress": "0xd07294e6E917e07dfDcee882dd1e2565085C2ae0"
                      }
                    }
                  },
                  "ignored": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokens/{tokenCanonicalSymbol}": {
      "get": {
        "tags": ["tokens"],
        "summary": "Retrieve detailed token information with custom finality data",
        "description": "Returns detailed information about a specific CCIP token, including chain-specific configurations and custom finality settings (minBlockConfirmation and hasCustomFinality).",
        "operationId": "getTokenDetail",
        "parameters": [
          {
            "name": "tokenCanonicalSymbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The canonical symbol for the token (e.g., LINK, USDC, BETS)",
            "example": "BETS"
          },
          {
            "name": "environment",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["mainnet", "testnet"]
            },
            "description": "The network environment to query"
          },
          {
            "name": "outputKey",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["chainId", "selector", "internalId"],
              "default": "chainId"
            },
            "description": "Key to use for organizing the response data by chain"
          },
          {
            "name": "internalIdFormat",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["directory", "selector"],
              "default": "selector"
            },
            "description": "Format for internal IDs in the response. 'selector' uses canonical selector names (e.g., 'ethereum-mainnet'), 'directory' uses chains.json keys (e.g., 'mainnet'). Only applies when outputKey=internalId."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with token detail data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenDetailApiResponse"
                },
                "examples": {
                  "v2Pool": {
                    "summary": "v2.0 pool (BETS) with CCV features enabled",
                    "description": "For v2.0+ pools (supportsV2Features=true), ccvConfig contains thresholdAmount and customFinality shows block confirmation settings. Different chains may show different scenarios: customFinality enabled (minBlockConfirmation > 0), disabled (minBlockConfirmation = 0), or downstream API error (both null).",
                    "value": {
                      "metadata": {
                        "environment": "mainnet",
                        "timestamp": "2025-12-10T12:00:00Z",
                        "requestId": "123e4567-e89b-12d3-a456-426614174000",
                        "tokenSymbol": "BETS",
                        "chainCount": 3
                      },
                      "data": {
                        "1": {
                          "chainId": 1,
                          "chainName": "Ethereum",
                          "decimals": 18,
                          "destinations": ["56", "137"],
                          "name": "BetSwirl Token",
                          "poolAddress": "0x1B7492C3bD23A4aDB448710e4275FF14A5288932",
                          "poolType": "lockRelease",
                          "symbol": "BETS",
                          "tokenAddress": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
                          "customFinality": {
                            "hasCustomFinality": false,
                            "minBlockConfirmation": 0
                          },
                          "ccvConfig": {
                            "thresholdAmount": "10000000000000000000000"
                          },
                          "pool": {
                            "address": "0x1B7492C3bD23A4aDB448710e4275FF14A5288932",
                            "rawType": "LockReleaseTokenPool",
                            "type": "lockRelease",
                            "version": "2.0.0",
                            "advancedPoolHooks": null,
                            "supportsV2Features": true
                          }
                        },
                        "137": {
                          "chainId": 137,
                          "chainName": "Polygon",
                          "decimals": 18,
                          "destinations": ["1"],
                          "name": "BetSwirl Token",
                          "poolAddress": "0x5678...9ABC",
                          "poolType": "burnMint",
                          "symbol": "BETS",
                          "tokenAddress": "0xDEF0...1234",
                          "customFinality": {
                            "hasCustomFinality": true,
                            "minBlockConfirmation": 5
                          },
                          "ccvConfig": {
                            "thresholdAmount": "5000000000000000000000"
                          },
                          "pool": {
                            "address": "0x5678...9ABC",
                            "rawType": "BurnMintTokenPool",
                            "type": "burnMint",
                            "version": "2.0.0",
                            "advancedPoolHooks": null,
                            "supportsV2Features": true
                          }
                        },
                        "56": {
                          "chainId": 56,
                          "chainName": "BNB Smart Chain",
                          "decimals": 18,
                          "destinations": ["1"],
                          "name": "BetSwirl Token",
                          "poolAddress": "0xABCD...1234",
                          "poolType": "burnMint",
                          "symbol": "BETS",
                          "tokenAddress": "0x9876...FEDC",
                          "customFinality": {
                            "hasCustomFinality": null,
                            "minBlockConfirmation": null
                          },
                          "ccvConfig": {
                            "thresholdAmount": null
                          },
                          "pool": {
                            "address": "0xABCD...1234",
                            "rawType": "BurnMintTokenPool",
                            "type": "burnMint",
                            "version": "2.0.0",
                            "advancedPoolHooks": null,
                            "supportsV2Features": true
                          }
                        }
                      }
                    }
                  },
                  "v1Pool": {
                    "summary": "v1.x pool (GHO) with CCV features not supported",
                    "description": "For v1.x pools (supportsV2Features=false), both ccvConfig and customFinality are null because these features are not supported by v1.x pools.",
                    "value": {
                      "metadata": {
                        "environment": "mainnet",
                        "timestamp": "2025-12-10T12:00:00Z",
                        "requestId": "456e7890-e89b-12d3-a456-426614174000",
                        "tokenSymbol": "GHO",
                        "chainCount": 1
                      },
                      "data": {
                        "1": {
                          "chainId": 1,
                          "chainName": "Ethereum",
                          "decimals": 18,
                          "destinations": ["42161"],
                          "name": "Gho Token",
                          "poolAddress": "0xGHO1...5678",
                          "poolType": "lockRelease",
                          "symbol": "GHO",
                          "tokenAddress": "0x40D1...2C2f",
                          "customFinality": null,
                          "ccvConfig": null,
                          "pool": {
                            "address": "0xGHO1...5678",
                            "rawType": "LockReleaseTokenPool",
                            "type": "lockRelease",
                            "version": "1.6.0",
                            "advancedPoolHooks": null,
                            "supportsV2Features": false
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Token not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "NOT_FOUND",
                  "message": "Token 'INVALID' not found"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokens/{tokenCanonicalSymbol}/chains/{chain}": {
      "get": {
        "tags": ["tokens"],
        "summary": "Retrieve token directory data for a specific chain",
        "description": "Returns detailed token configuration for a specific chain, including pool information, CCV (Cross-Chain Verifier) configuration, and lane-specific verifiers and rate limits. This endpoint provides the data needed for cross-chain token transfer interfaces.",
        "operationId": "getTokenDirectory",
        "parameters": [
          {
            "name": "tokenCanonicalSymbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The canonical symbol for the token (e.g., LINK, USDC, LBTC)",
            "example": "LBTC"
          },
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The source chain identifier (e.g., mainnet, ethereum-testnet-sepolia)",
            "example": "mainnet"
          },
          {
            "name": "environment",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["mainnet", "testnet"]
            },
            "description": "The network environment to query"
          },
          {
            "name": "outputKey",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["chainId", "selector", "internalId"],
              "default": "chainId"
            },
            "description": "Key format to use for lane keys in the response"
          },
          {
            "name": "internalIdFormat",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["directory", "selector"],
              "default": "selector"
            },
            "description": "Format for internalId values in the response. 'selector' uses canonical selector names (e.g., 'ethereum-mainnet'), 'directory' uses chains.json keys (e.g., 'mainnet')."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with token directory data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenDirectoryApiResponse"
                },
                "examples": {
                  "v2Pool": {
                    "summary": "v2.0 pool (LBTC) with CCV features enabled",
                    "description": "For v2.0+ pools (supportsV2Features=true), ccvConfig contains thresholdAmount and verifiers include additional threshold verifiers in aboveThreshold array. customFinality shows block confirmation settings.",
                    "value": {
                      "metadata": {
                        "environment": "mainnet",
                        "timestamp": "2025-12-10T12:00:00Z",
                        "requestId": "123e4567-e89b-12d3-a456-426614174000",
                        "symbol": "LBTC",
                        "sourceChain": "ethereum-mainnet"
                      },
                      "data": {
                        "internalId": "ethereum-mainnet",
                        "chainId": 1,
                        "selector": "5009297550715157269",
                        "token": {
                          "address": "0x8236a87084f8B84306f72007F36F2618A5634494",
                          "decimals": 8
                        },
                        "pool": {
                          "address": "0x88E18636EfFC3b3cd520FC72B710eb99C0017BC7",
                          "rawType": "BurnMintTokenPool",
                          "type": "burnMint",
                          "version": "2.0.0",
                          "advancedPoolHooks": null,
                          "supportsV2Features": true
                        },
                        "ccvConfig": {
                          "thresholdAmount": "100000000000"
                        },
                        "customFinality": {
                          "hasCustomFinality": true,
                          "minBlockConfirmation": 5
                        },
                        "outboundLanes": {
                          "8453": {
                            "internalId": "ethereum-mainnet-base-1",
                            "chainId": 8453,
                            "selector": "15971525489660198786",
                            "rateLimits": {
                              "standard": {
                                "capacity": "3490000000",
                                "rate": "323148",
                                "isEnabled": true
                              },
                              "custom": {
                                "capacity": "6980000000",
                                "rate": "646296",
                                "isEnabled": true
                              }
                            },
                            "fees": {
                              "standardTransferFeeBps": 10,
                              "customTransferFeeBps": 25
                            },
                            "verifiers": {
                              "belowThreshold": ["0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D"],
                              "aboveThreshold": [
                                "0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D",
                                "0xF4c7E640EdA248ef95972845a62bdC74237805dB"
                              ]
                            }
                          }
                        },
                        "inboundLanes": {
                          "8453": {
                            "internalId": "ethereum-mainnet-base-1",
                            "chainId": 8453,
                            "selector": "15971525489660198786",
                            "rateLimits": {
                              "standard": null,
                              "custom": null
                            },
                            "fees": null,
                            "verifiers": {
                              "belowThreshold": ["0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D"],
                              "aboveThreshold": ["0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D"]
                            }
                          }
                        }
                      }
                    }
                  },
                  "v1Pool": {
                    "summary": "v1.x pool (GHO) with CCV features not supported",
                    "description": "For v1.x pools (supportsV2Features=false), both ccvConfig and customFinality are null because these features are not supported. Verifiers in lanes are also null.",
                    "value": {
                      "metadata": {
                        "environment": "mainnet",
                        "timestamp": "2025-12-10T12:00:00Z",
                        "requestId": "456e7890-e89b-12d3-a456-426614174000",
                        "symbol": "GHO",
                        "sourceChain": "ethereum-mainnet"
                      },
                      "data": {
                        "internalId": "ethereum-mainnet",
                        "chainId": 1,
                        "selector": "5009297550715157269",
                        "token": {
                          "address": "0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f",
                          "decimals": 18
                        },
                        "pool": {
                          "address": "0xGhoPool123...",
                          "rawType": "LockReleaseTokenPool",
                          "type": "lockRelease",
                          "version": "1.6.0",
                          "advancedPoolHooks": null,
                          "supportsV2Features": false
                        },
                        "ccvConfig": null,
                        "customFinality": null,
                        "outboundLanes": {
                          "42161": {
                            "internalId": "arbitrum-mainnet",
                            "chainId": 42161,
                            "selector": "4949039107694359620",
                            "rateLimits": {
                              "standard": {
                                "capacity": "5000000000000000000000",
                                "rate": "1670000000000000000",
                                "isEnabled": true
                              },
                              "custom": null
                            },
                            "fees": null,
                            "verifiers": null
                          }
                        },
                        "inboundLanes": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Token or chain not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "NOT_FOUND",
                  "message": "Token 'INVALID' not found on chain 'mainnet'"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/lanes": {
      "get": {
        "tags": ["lanes"],
        "summary": "Retrieve CCIP lane information",
        "description": "Returns information about Cross-Chain Interoperability Protocol (CCIP) lanes between supported chains. Each lane represents a unidirectional connection from a source chain to a destination chain, with associated onRamp and offRamp contracts and supported tokens.",
        "operationId": "getLanes",
        "parameters": [
          {
            "name": "environment",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["mainnet", "testnet"]
            },
            "description": "The network environment to query"
          },
          {
            "name": "sourceChainId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by source chain ID. Multiple chain IDs can be specified using comma-separated values",
            "example": "1,56"
          },
          {
            "name": "destinationChainId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by destination chain ID. Multiple chain IDs can be specified using comma-separated values",
            "example": "137,42161"
          },
          {
            "name": "sourceSelector",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by source chain CCIP selector. Multiple selectors can be specified using comma-separated values",
            "example": "5009297550715157269"
          },
          {
            "name": "destinationSelector",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by destination chain CCIP selector. Multiple selectors can be specified using comma-separated values",
            "example": "4949039107694359620"
          },
          {
            "name": "sourceInternalId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by source chain internal identifier. Multiple IDs can be specified using comma-separated values",
            "example": "ethereum-mainnet"
          },
          {
            "name": "destinationInternalId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by destination chain internal identifier. Multiple IDs can be specified using comma-separated values",
            "example": "polygon-mainnet"
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by lane version. Only lanes where both onRamp and offRamp match the specified version will be returned",
            "example": "1.6.0"
          },
          {
            "name": "outputKey",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["chainId", "selector", "internalId"],
              "default": "chainId"
            },
            "description": "Key format to use for organizing the lane keys in the response"
          },
          {
            "name": "internalIdFormat",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["directory", "selector"],
              "default": "selector"
            },
            "description": "Format for internal IDs in the response. 'selector' uses canonical selector names (e.g., 'ethereum-mainnet'), 'directory' uses chains.json keys (e.g., 'mainnet'). Only applies when outputKey=internalId."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with lane data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaneApiResponse"
                },
                "example": {
                  "metadata": {
                    "environment": "mainnet",
                    "timestamp": "2024-01-15T10:30:00Z",
                    "requestId": "123e4567-e89b-12d3-a456-426614174000",
                    "ignoredLaneCount": 0,
                    "validLaneCount": 2
                  },
                  "data": {
                    "1_to_56": {
                      "sourceChain": {
                        "chainId": 1,
                        "displayName": "Ethereum Mainnet",
                        "selector": "5009297550715157269",
                        "internalId": "ethereum-mainnet"
                      },
                      "destinationChain": {
                        "chainId": 56,
                        "displayName": "BNB Smart Chain",
                        "selector": "13264668187771770619",
                        "internalId": "bsc-mainnet"
                      },
                      "onRamp": {
                        "address": "0x925228D7B82d883Dde340A55Fe8e6dA56244A22C",
                        "version": "1.6.0",
                        "enforceOutOfOrder": false
                      },
                      "offRamp": {
                        "address": "0xdf85c8381954694E74abD07488f452b374A4B4cC",
                        "version": "1.6.0"
                      },
                      "supportedTokens": ["LINK", "CCIP-BnM", "USDC"]
                    },
                    "1_to_137": {
                      "sourceChain": {
                        "chainId": 1,
                        "displayName": "Ethereum Mainnet",
                        "selector": "5009297550715157269",
                        "internalId": "ethereum-mainnet"
                      },
                      "destinationChain": {
                        "chainId": 137,
                        "displayName": "Polygon Mainnet",
                        "selector": "4051577828743386545",
                        "internalId": "polygon-mainnet"
                      },
                      "onRamp": {
                        "address": "0x3df8dAe2d123081c4D5E946E655F7c109B9Dd630",
                        "version": "1.5.0"
                      },
                      "offRamp": {
                        "address": "0x0af338C8545eb6265FedC01BEca4cAe0d94DA9Da",
                        "version": "1.5.0"
                      },
                      "supportedTokens": ["LINK", "USDC"]
                    }
                  },
                  "ignored": []
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ChainMetadata": {
        "type": "object",
        "required": ["environment", "timestamp", "requestId", "ignoredChainCount", "validChainCount"],
        "properties": {
          "environment": {
            "type": "string",
            "enum": ["mainnet", "testnet"],
            "description": "The network environment"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO timestamp of the response"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the request"
          },
          "ignoredChainCount": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of chains ignored due to configuration issues"
          },
          "validChainCount": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of valid chains in the response"
          },
          "searchQuery": {
            "type": "string",
            "description": "The search query that was used (only present when search parameter was provided)"
          },
          "searchType": {
            "$ref": "#/components/schemas/SearchType",
            "description": "The detected type of search query (only present when search parameter was provided)"
          }
        }
      },
      "SearchType": {
        "type": "string",
        "enum": ["selector", "chainId", "internalId", "displayName"],
        "description": "The detected type of search query. 'selector' for CCIP selectors (>17 digits), 'chainId' for chain IDs (≤17 digits or Solana base58), 'internalId' for kebab-case identifiers, 'displayName' for fuzzy text search."
      },
      "FeeTokenEnriched": {
        "type": "object",
        "required": ["symbol", "name", "address", "decimals"],
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Token symbol (e.g., LINK, WETH)"
          },
          "name": {
            "type": "string",
            "description": "Token name (e.g., Chainlink, Wrapped Ether)"
          },
          "address": {
            "type": "string",
            "description": "Token contract address on this chain"
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 18,
            "description": "Number of decimals for the token"
          }
        }
      },
      "ChainDetails": {
        "type": "object",
        "required": [
          "chainId",
          "displayName",
          "selector",
          "internalId",
          "feeTokens",
          "router",
          "rmn",
          "chainType",
          "chainFamily",
          "supported"
        ],
        "properties": {
          "chainId": {
            "oneOf": [{ "type": "integer" }, { "type": "string" }],
            "description": "Identifier of the chain (numeric for EVM chains, string for Solana/Aptos chains)"
          },
          "displayName": {
            "type": "string",
            "description": "Human-readable name of the chain. For supported chains, this comes from configuration. For unsupported chains, it is derived from the internalId."
          },
          "selector": {
            "type": "string",
            "description": "CCIP chain selector"
          },
          "internalId": {
            "type": "string",
            "description": "Internal identifier for the chain"
          },
          "feeTokens": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of supported fee token symbols (when enrichFeeTokens=false)"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FeeTokenEnriched"
                },
                "description": "Detailed fee token information (when enrichFeeTokens=true)"
              }
            ],
            "description": "Fee tokens - either as string symbols or enriched objects with addresses. Empty array for unsupported chains."
          },
          "router": {
            "type": "string",
            "description": "CCIP Router contract address. Empty string for unsupported chains."
          },
          "rmn": {
            "type": "string",
            "description": "Risk Management Network contract address. Empty string for unsupported chains."
          },
          "chainType": {
            "type": "string",
            "enum": ["evm", "solana", "aptos", "sui", "canton", "ton", "tron", "stellar", "starknet"],
            "description": "Type of blockchain"
          },
          "chainFamily": {
            "type": "string",
            "enum": ["evm", "solana", "aptos", "sui", "tron", "canton", "ton", "stellar", "starknet"],
            "description": "Blockchain family grouping"
          },
          "supported": {
            "type": "boolean",
            "description": "Whether this chain is fully supported with complete configuration. Unsupported chains have minimal details (empty router, rmn, feeTokens)."
          },
          "registryModule": {
            "type": "string",
            "description": "Registry Module contract address (EVM chains only)"
          },
          "tokenAdminRegistry": {
            "type": "string",
            "description": "Token Admin Registry contract address (EVM and Aptos chains)"
          },
          "tokenPoolFactory": {
            "type": "string",
            "description": "Token Pool Factory contract address (EVM chains only)"
          },
          "feeQuoter": {
            "type": "string",
            "description": "Fee Quoter address (Solana chains only)"
          },
          "mcms": {
            "type": "string",
            "description": "MCMS (Multi-Chain Management Service) address (Aptos chains only)"
          }
        }
      },
      "ChainConfigError": {
        "type": "object",
        "required": ["chainId", "networkId", "reason", "missingFields"],
        "properties": {
          "chainId": {
            "type": "integer",
            "description": "Chain ID of the failed configuration"
          },
          "networkId": {
            "type": "string",
            "description": "Network identifier of the failed configuration"
          },
          "reason": {
            "type": "string",
            "description": "Reason for the configuration failure"
          },
          "missingFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of missing required fields"
          }
        }
      },
      "ChainApiResponse": {
        "type": "object",
        "required": ["metadata", "data", "ignored"],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/ChainMetadata"
          },
          "data": {
            "type": "object",
            "properties": {
              "evm": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ChainDetails"
                },
                "description": "EVM chain details keyed by the specified output key"
              },
              "solana": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ChainDetails"
                },
                "description": "Solana chain details keyed by the specified output key"
              },
              "aptos": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ChainDetails"
                },
                "description": "Aptos chain details keyed by the specified output key"
              },
              "sui": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ChainDetails"
                },
                "description": "Sui chain details keyed by the specified output key"
              },
              "tron": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ChainDetails"
                },
                "description": "Tron chain details keyed by the specified output key"
              },
              "canton": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ChainDetails"
                },
                "description": "Canton chain details keyed by the specified output key"
              },
              "ton": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ChainDetails"
                },
                "description": "TON chain details keyed by the specified output key"
              },
              "stellar": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ChainDetails"
                },
                "description": "Stellar chain details keyed by the specified output key"
              },
              "starknet": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ChainDetails"
                },
                "description": "Starknet chain details keyed by the specified output key"
              }
            },
            "description": "Chain details grouped by chain family"
          },
          "ignored": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainConfigError"
            },
            "description": "List of chains that could not be configured"
          }
        }
      },
      "LaneMetadata": {
        "type": "object",
        "required": ["environment", "timestamp", "requestId", "ignoredLaneCount", "validLaneCount"],
        "properties": {
          "environment": {
            "type": "string",
            "enum": ["mainnet", "testnet"],
            "description": "The network environment"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO timestamp of the response"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the request"
          },
          "ignoredLaneCount": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of lanes ignored due to configuration issues"
          },
          "validLaneCount": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of valid lanes in the response"
          }
        }
      },
      "ChainInfo": {
        "type": "object",
        "description": "Chain information used in lane endpoints. Note: chainType and chainFamily are intentionally excluded from this schema for API responses.",
        "required": ["chainId", "displayName", "selector", "internalId"],
        "properties": {
          "chainId": {
            "oneOf": [{ "type": "integer" }, { "type": "string" }],
            "description": "Identifier of the chain (numeric for EVM chains, string for Solana/Aptos chains)"
          },
          "displayName": {
            "type": "string",
            "description": "Human-readable name of the chain"
          },
          "selector": {
            "type": "string",
            "description": "CCIP chain selector as a string"
          },
          "internalId": {
            "type": "string",
            "description": "Internal identifier used in configuration"
          }
        }
      },
      "LaneDetails": {
        "type": "object",
        "required": ["sourceChain", "destinationChain", "onRamp", "offRamp", "supportedTokens"],
        "properties": {
          "sourceChain": {
            "$ref": "#/components/schemas/ChainInfo"
          },
          "destinationChain": {
            "$ref": "#/components/schemas/ChainInfo"
          },
          "onRamp": {
            "type": "object",
            "required": ["address", "version"],
            "properties": {
              "address": {
                "type": "string",
                "description": "OnRamp contract address"
              },
              "version": {
                "type": "string",
                "pattern": "^\\d+\\.\\d+\\.\\d+$",
                "description": "Normalized semantic version of the OnRamp contract"
              },
              "enforceOutOfOrder": {
                "type": "boolean",
                "description": "Whether the OnRamp enforces out-of-order execution"
              }
            }
          },
          "offRamp": {
            "type": "object",
            "required": ["address", "version"],
            "properties": {
              "address": {
                "type": "string",
                "description": "OffRamp contract address"
              },
              "version": {
                "type": "string",
                "pattern": "^\\d+\\.\\d+\\.\\d+$",
                "description": "Normalized semantic version of the OffRamp contract"
              }
            }
          },
          "supportedTokens": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of supported token keys (e.g., LINK, CCIP-BnM, USDC)"
          }
        }
      },
      "LaneConfigError": {
        "type": "object",
        "required": ["sourceChain", "destinationChain", "reason", "missingFields"],
        "properties": {
          "sourceChain": {
            "type": "string",
            "description": "Source chain identifier that failed configuration"
          },
          "destinationChain": {
            "type": "string",
            "description": "Destination chain identifier that failed configuration"
          },
          "reason": {
            "type": "string",
            "description": "Human-readable reason for the configuration failure"
          },
          "missingFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of missing or invalid configuration fields"
          }
        }
      },
      "LaneApiResponse": {
        "type": "object",
        "required": ["metadata", "data", "ignored"],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/LaneMetadata"
          },
          "data": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/LaneDetails"
            },
            "description": "Lane data organized by dynamic lane keys (e.g., '1_to_56', 'ethereum-mainnet_to_polygon-mainnet')"
          },
          "ignored": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LaneConfigError"
            },
            "description": "List of lanes that could not be configured"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": ["error", "message"],
        "properties": {
          "error": {
            "type": "string",
            "description": "Error type identifier"
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the request, useful for debugging and support"
          }
        }
      },
      "TokenMetadata": {
        "type": "object",
        "required": ["environment", "timestamp", "requestId", "ignoredTokenCount", "validTokenCount"],
        "properties": {
          "environment": {
            "type": "string",
            "enum": ["mainnet", "testnet"],
            "description": "The network environment"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO timestamp of the response"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the request"
          },
          "ignoredTokenCount": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of tokens ignored due to configuration issues"
          },
          "validTokenCount": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of valid tokens in the response"
          }
        }
      },
      "TokenChainInfo": {
        "type": "object",
        "required": ["chainId", "chainName", "tokenAddress", "decimals", "poolType", "poolAddress"],
        "properties": {
          "chainId": {
            "oneOf": [{ "type": "integer" }, { "type": "string" }],
            "description": "Identifier of the chain (numeric for EVM chains, string for Solana/Aptos chains)"
          },
          "chainName": {
            "type": "string",
            "description": "Human-readable name of the chain"
          },
          "tokenAddress": {
            "type": "string",
            "description": "Token contract address on this chain"
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 18,
            "description": "Number of decimals used for the token"
          },
          "poolType": {
            "type": "string",
            "enum": ["lockRelease", "burnMint", "usdc"],
            "description": "Type of pool for this token"
          },
          "poolAddress": {
            "type": "string",
            "description": "Token pool contract address (if applicable)"
          }
        }
      },
      "TokenChainData": {
        "type": "object",
        "required": ["chainId", "chainName", "tokenAddress", "decimals", "poolType", "poolAddress"],
        "properties": {
          "chainId": {
            "oneOf": [{ "type": "integer" }, { "type": "string" }],
            "description": "Identifier of the chain (numeric for EVM chains, string for Solana/Aptos chains)"
          },
          "chainName": {
            "type": "string",
            "description": "Human-readable name of the chain"
          },
          "tokenAddress": {
            "type": "string",
            "description": "Token contract address on this chain"
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 18,
            "description": "Number of decimals used for the token"
          },
          "poolType": {
            "type": "string",
            "enum": ["lockRelease", "burnMint", "usdc"],
            "description": "Type of pool for this token"
          },
          "poolAddress": {
            "type": "string",
            "description": "Token pool contract address (if applicable)"
          },
          "name": {
            "type": "string",
            "description": "Name of the token"
          },
          "symbol": {
            "type": "string",
            "description": "Symbol of the token"
          },
          "destinations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Destination chains this token can be sent to"
          }
        }
      },
      "TokenDetailChainData": {
        "type": "object",
        "description": "Extended token chain data with custom finality and CCV information",
        "allOf": [
          {
            "$ref": "#/components/schemas/TokenChainData"
          },
          {
            "type": "object",
            "properties": {
              "customFinality": {
                "nullable": true,
                "allOf": [{ "$ref": "#/components/schemas/CustomFinalityConfig" }],
                "description": "Custom finality configuration for v2.0+ pools. Null for v1.x pools (check pool.supportsV2Features). When present with hasCustomFinality=null and minBlockConfirmation=null, indicates downstream API error."
              },
              "ccvConfig": {
                "nullable": true,
                "allOf": [{ "$ref": "#/components/schemas/CCVConfig" }],
                "description": "CCV configuration for v2.0+ pools. Null for v1.x pools (check pool.supportsV2Features). When present with thresholdAmount=null, indicates downstream API error."
              },
              "pool": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "Pool contract address"
                  },
                  "rawType": {
                    "type": "string",
                    "description": "Raw pool type from configuration (e.g., 'LockReleaseTokenPool', 'BurnMintTokenPool', 'USDCTokenPool')"
                  },
                  "type": {
                    "type": "string",
                    "enum": ["lockRelease", "burnMint", "usdc"],
                    "description": "Normalized pool type"
                  },
                  "version": {
                    "type": "string",
                    "description": "Pool contract version"
                  },
                  "advancedPoolHooks": {
                    "type": "string",
                    "nullable": true,
                    "description": "Address of advanced pool hooks contract, or null if not configured"
                  },
                  "supportsV2Features": {
                    "type": "boolean",
                    "description": "Whether this pool supports v2 features (customFinality, ccvConfig). When true and these fields have null values inside, it indicates a downstream API error rather than feature not supported."
                  }
                },
                "description": "Pool information including version, hooks, and v2 feature support flag"
              }
            }
          }
        ]
      },
      "TokenDetailMetadata": {
        "type": "object",
        "required": ["environment", "timestamp", "requestId", "tokenSymbol", "chainCount"],
        "properties": {
          "environment": {
            "type": "string",
            "enum": ["mainnet", "testnet"],
            "description": "Network environment"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the response"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for this request"
          },
          "tokenSymbol": {
            "type": "string",
            "description": "Canonical symbol of the requested token"
          },
          "chainCount": {
            "type": "integer",
            "description": "Number of chains this token is available on"
          }
        }
      },
      "TokenDetailApiResponse": {
        "type": "object",
        "required": ["metadata", "data"],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/TokenDetailMetadata"
          },
          "data": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/TokenDetailChainData"
            },
            "description": "Token data indexed by chain ID/selector, including custom finality information"
          }
        }
      },
      "TokenDetails": {
        "type": "object",
        "required": ["symbol", "lanes", "chains"],
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Token symbol identifier"
          },
          "lanes": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Available token lanes: source chain to array of destination chains"
          },
          "chains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenChainInfo"
            },
            "description": "Detailed information about the token on each chain"
          }
        }
      },
      "TokenConfigError": {
        "type": "object",
        "required": ["symbol", "reason", "missingFields"],
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Token symbol"
          },
          "reason": {
            "type": "string",
            "description": "Reason for the configuration error"
          },
          "missingFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of missing required fields"
          }
        }
      },
      "TokenApiResponse": {
        "type": "object",
        "required": ["metadata", "data", "ignored"],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/TokenMetadata"
          },
          "data": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/TokenChainData"
              },
              "description": "Map of chain IDs/selectors to chain-specific token details"
            },
            "description": "Token data indexed by token symbol and then by chain ID/selector"
          },
          "ignored": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenConfigError"
            },
            "description": "List of tokens that were ignored due to configuration issues"
          }
        }
      },
      "TokenDirectoryMetadata": {
        "type": "object",
        "required": ["environment", "timestamp", "requestId", "symbol", "sourceChain"],
        "properties": {
          "environment": {
            "type": "string",
            "enum": ["mainnet", "testnet"],
            "description": "Network environment"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the response"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for this request"
          },
          "symbol": {
            "type": "string",
            "description": "Canonical symbol of the requested token"
          },
          "sourceChain": {
            "type": "string",
            "description": "Source chain identifier"
          }
        }
      },
      "LaneVerifiers": {
        "type": "object",
        "description": "Pre-computed verifier sets for different transfer amounts. Only present for v2.0+ pools (supportsV2Features=true). For v1.x pools, the entire verifiers field is null. Values: empty array [] = no verifiers configured, [addr1, ...] = verifiers configured, null = downstream API error.",
        "required": ["belowThreshold", "aboveThreshold"],
        "properties": {
          "belowThreshold": {
            "nullable": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Verifier addresses used when transfer amount is below the threshold. Empty array [] if no verifiers configured, null if downstream API error."
          },
          "aboveThreshold": {
            "nullable": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Verifier addresses used when transfer amount is at or above the threshold (includes all belowThreshold verifiers plus additional threshold verifiers). Empty array [] if no verifiers configured, null if downstream API error."
          }
        }
      },
      "RateLimiterConfig": {
        "type": "object",
        "description": "Rate limit configuration for a single direction (in or out)",
        "required": ["capacity", "rate", "isEnabled"],
        "properties": {
          "capacity": {
            "type": "string",
            "description": "Maximum capacity of the rate limiter bucket (in token's smallest unit)"
          },
          "rate": {
            "type": "string",
            "description": "Rate at which the bucket refills (tokens per second in smallest unit)"
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Whether rate limiting is enabled"
          }
        }
      },
      "DirectionalRateLimits": {
        "type": "object",
        "description": "Rate limits for both directions (in and out) on a lane",
        "properties": {
          "in": {
            "nullable": true,
            "allOf": [{ "$ref": "#/components/schemas/RateLimiterConfig" }],
            "description": "Inbound rate limit configuration"
          },
          "out": {
            "nullable": true,
            "allOf": [{ "$ref": "#/components/schemas/RateLimiterConfig" }],
            "description": "Outbound rate limit configuration"
          }
        }
      },
      "TokenRateLimits": {
        "type": "object",
        "description": "Rate limits for both standard and custom transfers, each with in/out directions",
        "required": ["standard", "custom"],
        "properties": {
          "standard": {
            "nullable": true,
            "allOf": [{ "$ref": "#/components/schemas/DirectionalRateLimits" }],
            "description": "Standard transfer rate limit configuration"
          },
          "custom": {
            "nullable": true,
            "allOf": [{ "$ref": "#/components/schemas/DirectionalRateLimits" }],
            "description": "Custom (custom block confirmation) transfer rate limit configuration"
          }
        }
      },
      "LaneFees": {
        "type": "object",
        "description": "Transfer fees for a lane in basis points (1 bps = 0.01%)",
        "required": ["standardTransferFeeBps", "customTransferFeeBps"],
        "properties": {
          "standardTransferFeeBps": {
            "type": "integer",
            "description": "Standard transfer fee in basis points"
          },
          "customTransferFeeBps": {
            "type": "integer",
            "description": "custom (custom block confirmation) transfer fee in basis points"
          }
        }
      },
      "TokenDirectoryLane": {
        "type": "object",
        "description": "Lane configuration for outbound or inbound transfers. Use pool.supportsV2Features to interpret verifiers: false + null = v1.x pool (not supported), true + {null, null} = downstream error, true + {[], []} = not configured, true + {[...], [...]} = configured.",
        "required": ["internalId", "chainId", "selector", "rateLimits", "fees", "verifiers"],
        "properties": {
          "internalId": {
            "type": "string",
            "description": "Internal identifier of the remote chain (destination for outbound, source for inbound)"
          },
          "chainId": {
            "oneOf": [{ "type": "integer" }, { "type": "string" }],
            "description": "Chain ID of the remote chain"
          },
          "selector": {
            "type": "string",
            "description": "CCIP chain selector of the remote chain"
          },
          "rateLimits": {
            "$ref": "#/components/schemas/TokenRateLimits",
            "description": "Rate limits for both standard and custom transfers, with in/out directions"
          },
          "fees": {
            "nullable": true,
            "allOf": [{ "$ref": "#/components/schemas/LaneFees" }],
            "description": "Transfer fees in basis points, or null if not configured"
          },
          "verifiers": {
            "nullable": true,
            "allOf": [{ "$ref": "#/components/schemas/LaneVerifiers" }],
            "description": "Verifier configuration. For v1.x pools (pool.supportsV2Features=false): null. For v2.x pools: object with arrays or null values."
          }
        }
      },
      "CCVConfig": {
        "type": "object",
        "description": "Cross-Chain Verifier (CCV) configuration for a pool. Only present for v2.0+ pools (check pool.supportsV2Features). For v1.x pools, the entire ccvConfig field is null.",
        "required": ["thresholdAmount"],
        "properties": {
          "thresholdAmount": {
            "type": "string",
            "nullable": true,
            "description": "Amount threshold (in token's smallest unit) above which additional threshold verifiers are required. Values: '0' = CCV not configured for this pool, 'N' (positive number) = CCV configured with threshold N, null = downstream API error fetching CCV config."
          }
        }
      },
      "TokenDirectoryTokenInfo": {
        "type": "object",
        "required": ["address", "decimals"],
        "properties": {
          "address": {
            "type": "string",
            "description": "Token contract address"
          },
          "decimals": {
            "type": "integer",
            "description": "Token decimals"
          }
        }
      },
      "TokenDirectoryPoolInfo": {
        "type": "object",
        "required": ["address", "rawType", "type", "version", "advancedPoolHooks", "supportsV2Features"],
        "properties": {
          "address": {
            "type": "string",
            "description": "Pool contract address"
          },
          "rawType": {
            "type": "string",
            "description": "Raw pool type from configuration (e.g., 'LockReleaseTokenPool', 'BurnMintTokenPool', 'USDCTokenPool')"
          },
          "type": {
            "type": "string",
            "enum": ["lockRelease", "burnMint", "usdc"],
            "description": "Normalized pool type"
          },
          "version": {
            "type": "string",
            "description": "Pool contract version"
          },
          "advancedPoolHooks": {
            "type": "string",
            "nullable": true,
            "description": "Address of advanced pool hooks contract, or null if not configured"
          },
          "supportsV2Features": {
            "type": "boolean",
            "description": "Whether this pool supports v2 features (customFinality, ccvConfig). When true and these fields have null values inside, it indicates a downstream API error rather than feature not supported."
          }
        }
      },
      "CustomFinalityConfig": {
        "type": "object",
        "description": "Custom finality configuration for the token on this chain. Only present for v2.0+ pools (check pool.supportsV2Features). For v1.x pools, the entire customFinality field is null. When both hasCustomFinality and minBlockConfirmation are null inside the object, it indicates a downstream API error for a v2.x pool.",
        "required": ["hasCustomFinality", "minBlockConfirmation"],
        "properties": {
          "hasCustomFinality": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether custom finality is enabled (derived from minBlockConfirmation > 0). Null indicates downstream API error."
          },
          "minBlockConfirmation": {
            "type": "integer",
            "nullable": true,
            "description": "Minimum block confirmations required. Null indicates downstream API error."
          }
        }
      },
      "TokenDirectoryData": {
        "type": "object",
        "description": "Token directory data for a specific chain",
        "required": [
          "internalId",
          "chainId",
          "selector",
          "token",
          "pool",
          "ccvConfig",
          "customFinality",
          "outboundLanes",
          "inboundLanes"
        ],
        "properties": {
          "internalId": {
            "type": "string",
            "description": "Internal chain identifier"
          },
          "chainId": {
            "oneOf": [{ "type": "integer" }, { "type": "string" }],
            "description": "Chain ID"
          },
          "selector": {
            "type": "string",
            "description": "CCIP chain selector"
          },
          "token": {
            "$ref": "#/components/schemas/TokenDirectoryTokenInfo"
          },
          "pool": {
            "$ref": "#/components/schemas/TokenDirectoryPoolInfo"
          },
          "ccvConfig": {
            "nullable": true,
            "allOf": [{ "$ref": "#/components/schemas/CCVConfig" }],
            "description": "CCV configuration for v2.0+ pools. Null for v1.x pools (check pool.supportsV2Features). When present with thresholdAmount=null, indicates downstream API error."
          },
          "customFinality": {
            "nullable": true,
            "allOf": [{ "$ref": "#/components/schemas/CustomFinalityConfig" }],
            "description": "Custom finality configuration for v2.0+ pools. Null for v1.x pools (check pool.supportsV2Features). When present with hasCustomFinality=null and minBlockConfirmation=null, indicates downstream API error."
          },
          "outboundLanes": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/TokenDirectoryLane"
            },
            "description": "Outbound lanes indexed by destination chain ID"
          },
          "inboundLanes": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/TokenDirectoryLane"
            },
            "description": "Inbound lanes indexed by source chain ID"
          }
        }
      },
      "TokenDirectoryApiResponse": {
        "type": "object",
        "required": ["metadata", "data"],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/TokenDirectoryMetadata"
          },
          "data": {
            "$ref": "#/components/schemas/TokenDirectoryData"
          }
        }
      }
    }
  }
}
