Skip to content

Commit f0ef744

Browse files
committed
add lanes
1 parent b546389 commit f0ef744

File tree

8 files changed

+1393
-7
lines changed

8 files changed

+1393
-7
lines changed

public/api/ccip/v1/openapi.json

Lines changed: 355 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"openapi": "3.0.0",
33
"info": {
4-
"title": "CCIP Chains API",
5-
"description": "API for retrieving CCIP chain 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.",
6-
"version": "1.3.0",
4+
"title": "CCIP Docs config API",
5+
"description": "API for retrieving CCIP chain, token, and lane 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.",
6+
"version": "1.4.0",
77
"contact": {
88
"name": "File issues",
99
"url": "https://github.com/smartcontractkit/documentation/issues/new/choose"
@@ -31,6 +31,10 @@
3131
{
3232
"name": "tokens",
3333
"description": "Token information endpoints"
34+
},
35+
{
36+
"name": "lanes",
37+
"description": "Cross-chain lane information endpoints"
3438
}
3539
],
3640
"paths": {
@@ -291,6 +295,190 @@
291295
}
292296
}
293297
}
298+
},
299+
"/lanes": {
300+
"get": {
301+
"tags": ["lanes"],
302+
"summary": "Retrieve CCIP lane information",
303+
"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.",
304+
"operationId": "getLanes",
305+
"parameters": [
306+
{
307+
"name": "environment",
308+
"in": "query",
309+
"required": true,
310+
"schema": {
311+
"type": "string",
312+
"enum": ["mainnet", "testnet"]
313+
},
314+
"description": "The network environment to query"
315+
},
316+
{
317+
"name": "sourceChainId",
318+
"in": "query",
319+
"schema": {
320+
"type": "string"
321+
},
322+
"description": "Filter by source chain ID. Multiple chain IDs can be specified using comma-separated values",
323+
"example": "1,56"
324+
},
325+
{
326+
"name": "destinationChainId",
327+
"in": "query",
328+
"schema": {
329+
"type": "string"
330+
},
331+
"description": "Filter by destination chain ID. Multiple chain IDs can be specified using comma-separated values",
332+
"example": "137,42161"
333+
},
334+
{
335+
"name": "sourceSelector",
336+
"in": "query",
337+
"schema": {
338+
"type": "string"
339+
},
340+
"description": "Filter by source chain CCIP selector. Multiple selectors can be specified using comma-separated values",
341+
"example": "5009297550715157269"
342+
},
343+
{
344+
"name": "destinationSelector",
345+
"in": "query",
346+
"schema": {
347+
"type": "string"
348+
},
349+
"description": "Filter by destination chain CCIP selector. Multiple selectors can be specified using comma-separated values",
350+
"example": "4949039107694359620"
351+
},
352+
{
353+
"name": "sourceInternalId",
354+
"in": "query",
355+
"schema": {
356+
"type": "string"
357+
},
358+
"description": "Filter by source chain internal identifier. Multiple IDs can be specified using comma-separated values",
359+
"example": "ethereum-mainnet"
360+
},
361+
{
362+
"name": "destinationInternalId",
363+
"in": "query",
364+
"schema": {
365+
"type": "string"
366+
},
367+
"description": "Filter by destination chain internal identifier. Multiple IDs can be specified using comma-separated values",
368+
"example": "polygon-mainnet"
369+
},
370+
{
371+
"name": "version",
372+
"in": "query",
373+
"schema": {
374+
"type": "string"
375+
},
376+
"description": "Filter by lane version. Only lanes where both onRamp and offRamp match the specified version will be returned",
377+
"example": "1.6.0"
378+
},
379+
{
380+
"name": "outputKey",
381+
"in": "query",
382+
"schema": {
383+
"type": "string",
384+
"enum": ["chainId", "selector", "internalId"],
385+
"default": "chainId"
386+
},
387+
"description": "Key format to use for organizing the lane keys in the response"
388+
}
389+
],
390+
"responses": {
391+
"200": {
392+
"description": "Successful response with lane data",
393+
"content": {
394+
"application/json": {
395+
"schema": {
396+
"$ref": "#/components/schemas/LaneApiResponse"
397+
},
398+
"example": {
399+
"metadata": {
400+
"environment": "mainnet",
401+
"timestamp": "2024-01-15T10:30:00Z",
402+
"requestId": "123e4567-e89b-12d3-a456-426614174000",
403+
"ignoredLaneCount": 0,
404+
"validLaneCount": 2
405+
},
406+
"data": {
407+
"1_to_56": {
408+
"sourceChain": {
409+
"chainId": 1,
410+
"displayName": "Ethereum Mainnet",
411+
"selector": "5009297550715157269",
412+
"internalId": "ethereum-mainnet"
413+
},
414+
"destinationChain": {
415+
"chainId": 56,
416+
"displayName": "BNB Smart Chain",
417+
"selector": "13264668187771770619",
418+
"internalId": "bsc-mainnet"
419+
},
420+
"onRamp": {
421+
"address": "0x925228D7B82d883Dde340A55Fe8e6dA56244A22C",
422+
"version": "1.6.0",
423+
"enforceOutOfOrder": false
424+
},
425+
"offRamp": {
426+
"address": "0xdf85c8381954694E74abD07488f452b374A4B4cC",
427+
"version": "1.6.0"
428+
},
429+
"supportedTokens": ["LINK", "CCIP-BnM", "USDC"]
430+
},
431+
"1_to_137": {
432+
"sourceChain": {
433+
"chainId": 1,
434+
"displayName": "Ethereum Mainnet",
435+
"selector": "5009297550715157269",
436+
"internalId": "ethereum-mainnet"
437+
},
438+
"destinationChain": {
439+
"chainId": 137,
440+
"displayName": "Polygon Mainnet",
441+
"selector": "4051577828743386545",
442+
"internalId": "polygon-mainnet"
443+
},
444+
"onRamp": {
445+
"address": "0x3df8dAe2d123081c4D5E946E655F7c109B9Dd630",
446+
"version": "1.5.0"
447+
},
448+
"offRamp": {
449+
"address": "0x0af338C8545eb6265FedC01BEca4cAe0d94DA9Da",
450+
"version": "1.5.0"
451+
},
452+
"supportedTokens": ["LINK", "USDC"]
453+
}
454+
},
455+
"ignored": []
456+
}
457+
}
458+
}
459+
},
460+
"400": {
461+
"description": "Bad request - invalid parameters",
462+
"content": {
463+
"application/json": {
464+
"schema": {
465+
"$ref": "#/components/schemas/ErrorResponse"
466+
}
467+
}
468+
}
469+
},
470+
"500": {
471+
"description": "Internal server error",
472+
"content": {
473+
"application/json": {
474+
"schema": {
475+
"$ref": "#/components/schemas/ErrorResponse"
476+
}
477+
}
478+
}
479+
}
480+
}
481+
}
294482
}
295483
},
296484
"components": {
@@ -467,6 +655,170 @@
467655
}
468656
}
469657
},
658+
"LaneMetadata": {
659+
"type": "object",
660+
"required": ["environment", "timestamp", "requestId", "ignoredLaneCount", "validLaneCount"],
661+
"properties": {
662+
"environment": {
663+
"type": "string",
664+
"enum": ["mainnet", "testnet"],
665+
"description": "The network environment"
666+
},
667+
"timestamp": {
668+
"type": "string",
669+
"format": "date-time",
670+
"description": "ISO timestamp of the response"
671+
},
672+
"requestId": {
673+
"type": "string",
674+
"format": "uuid",
675+
"description": "Unique identifier for the request"
676+
},
677+
"ignoredLaneCount": {
678+
"type": "integer",
679+
"minimum": 0,
680+
"description": "Number of lanes ignored due to configuration issues"
681+
},
682+
"validLaneCount": {
683+
"type": "integer",
684+
"minimum": 0,
685+
"description": "Number of valid lanes in the response"
686+
}
687+
}
688+
},
689+
"ChainInfo": {
690+
"type": "object",
691+
"required": ["chainId", "displayName", "selector", "internalId", "chainType", "chainFamily"],
692+
"properties": {
693+
"chainId": {
694+
"oneOf": [{ "type": "integer" }, { "type": "string" }],
695+
"description": "Identifier of the chain (numeric for EVM chains, string for Solana/Aptos chains)"
696+
},
697+
"displayName": {
698+
"type": "string",
699+
"description": "Human-readable name of the chain"
700+
},
701+
"selector": {
702+
"type": "string",
703+
"description": "CCIP chain selector as a string"
704+
},
705+
"internalId": {
706+
"type": "string",
707+
"description": "Internal identifier used in configuration"
708+
},
709+
"chainType": {
710+
"type": "string",
711+
"enum": ["evm", "solana", "aptos", "sui"],
712+
"description": "Type of blockchain"
713+
},
714+
"chainFamily": {
715+
"type": "string",
716+
"enum": ["evm", "mvm", "svm"],
717+
"description": "Family of blockchain virtual machine"
718+
}
719+
}
720+
},
721+
"LaneDetails": {
722+
"type": "object",
723+
"required": ["sourceChain", "destinationChain", "onRamp", "offRamp", "supportedTokens"],
724+
"properties": {
725+
"sourceChain": {
726+
"$ref": "#/components/schemas/ChainInfo"
727+
},
728+
"destinationChain": {
729+
"$ref": "#/components/schemas/ChainInfo"
730+
},
731+
"onRamp": {
732+
"type": "object",
733+
"required": ["address", "version"],
734+
"properties": {
735+
"address": {
736+
"type": "string",
737+
"description": "OnRamp contract address"
738+
},
739+
"version": {
740+
"type": "string",
741+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
742+
"description": "Normalized semantic version of the OnRamp contract"
743+
},
744+
"enforceOutOfOrder": {
745+
"type": "boolean",
746+
"description": "Whether the OnRamp enforces out-of-order execution"
747+
}
748+
}
749+
},
750+
"offRamp": {
751+
"type": "object",
752+
"required": ["address", "version"],
753+
"properties": {
754+
"address": {
755+
"type": "string",
756+
"description": "OffRamp contract address"
757+
},
758+
"version": {
759+
"type": "string",
760+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
761+
"description": "Normalized semantic version of the OffRamp contract"
762+
}
763+
}
764+
},
765+
"supportedTokens": {
766+
"type": "array",
767+
"items": {
768+
"type": "string"
769+
},
770+
"description": "List of supported token keys (e.g., LINK, CCIP-BnM, USDC)"
771+
}
772+
}
773+
},
774+
"LaneConfigError": {
775+
"type": "object",
776+
"required": ["sourceChain", "destinationChain", "reason", "missingFields"],
777+
"properties": {
778+
"sourceChain": {
779+
"type": "string",
780+
"description": "Source chain identifier that failed configuration"
781+
},
782+
"destinationChain": {
783+
"type": "string",
784+
"description": "Destination chain identifier that failed configuration"
785+
},
786+
"reason": {
787+
"type": "string",
788+
"description": "Human-readable reason for the configuration failure"
789+
},
790+
"missingFields": {
791+
"type": "array",
792+
"items": {
793+
"type": "string"
794+
},
795+
"description": "List of missing or invalid configuration fields"
796+
}
797+
}
798+
},
799+
"LaneApiResponse": {
800+
"type": "object",
801+
"required": ["metadata", "data", "ignored"],
802+
"properties": {
803+
"metadata": {
804+
"$ref": "#/components/schemas/LaneMetadata"
805+
},
806+
"data": {
807+
"type": "object",
808+
"additionalProperties": {
809+
"$ref": "#/components/schemas/LaneDetails"
810+
},
811+
"description": "Lane data organized by dynamic lane keys (e.g., '1_to_56', 'ethereum-mainnet_to_polygon-mainnet')"
812+
},
813+
"ignored": {
814+
"type": "array",
815+
"items": {
816+
"$ref": "#/components/schemas/LaneConfigError"
817+
},
818+
"description": "List of lanes that could not be configured"
819+
}
820+
}
821+
},
470822
"ErrorResponse": {
471823
"type": "object",
472824
"required": ["error", "message"],

0 commit comments

Comments
 (0)