v1.0.0 - Rewrite Stable
⬡ ccip-sdk and ccip-cli stable v1.0.0 release 🚀
Important
v1.0 is a ground-up rewrite of the v0.2 series. Existing v0.2 users should treat this as a new SDK.
Highlights
- Monorepo with two packages:
@chainlink/ccip-sdk(library) and@chainlink/ccip-cli(CLI tool) - Multi-chain family support: unified interface across EVM, Solana, Aptos, Sui (WIP), and TON (WIP)
- Decentralized (RPC) or CCIP-API data sources
- Modern TypeScript DX: NodeJS, browser, Electron, mobile
Split packages in monorepo
ccip-tools-ts now isn't a single package anymore, but instead was split into (initially) 2 packages, both kept and developed in this monorepo and published in lockstep under same version to npmjs:
- Modern TypeScript, ESM,
erasableSyntaxOnlyandstrict - Node.js v20+ required. v24+ recommended for development (native TypeScript execution via
nodeortsx) node --testtests- Tree-shakeable
- Semver: we strive to not break backwards compatibility on existing interfaces, types and methods without major version bumps, but supporting new CCIP networks, options and minor contracts versions may require keeping up-to-date with our patch releases
Tip
📚 Reference docs and complete examples can be found at https://docs.chain.link/ccip/tools/
🛠️ ccip-sdk: the developer's toolkit
- ccip-sdk is the library with which to interact with CCIP on all supported blockchain families, on any JS/TS environment (tested on NodeJS, browsers and Electron)
- Install as dependency in your project with
npm install @chainlink/ccip-sdk(or equivalent pnpm, yarn, etc) - Many different chain families supported under a single interface, with common types and interoperability:
- EVMChain
- SolanaChain
- AptosChain
- SuiChain (WIP)
- TONChain (WIP)
- Import like
import { EVMChain, type CCIPRequest } from '@chainlink/ccip-sdk' - Instantiating classes:
- From https/wss RPC endpoint:
const source = await EVMChain.fromUrl('https://<your_rpc_endpoint>')
- From provider (chain-family-dependent async constructors):
const dest = await EVMChain.fromProvider(ethers.BrowserProvider(window.ethereum))
- From https/wss RPC endpoint:
- Example: check details of CCIP message:
const request: CCIPRequest = (await source.getMessagesInTx('0xYourCcipSendTxHash'))[0]const request: CCIPRequest = await source.getMessageById('0xYourMessageId')
- Or query the API directly:
const api = CCIPAPIClient.fromUrl()const request = await api.getMessageById('0xYourMessageId')const messageIds: string[] = await api.getMessageIdsInTx('0xYourCcipSendTxHash')
🔪 ccip-cli: the poweruser's swiss-army knife
- ccip-cli is the advanced tool and reference implementation for the sdk
- Can be installed with
npm install -g @chainlink/ccip-clior run ad-hoc withnpx @chainlink/ccip-cli - Auto-detect networks from multiple RPCs passed through
--rpcoptions,--rpcs-file=./rpcs.txtorRPC_*environment variables - Read
CCIP_prefixed environment variables as options, e.g.:CCIP_VERBOSE=true - Example commands:
ccip-cli show <request-tx-hash-or-message-id>to inspect message's details;messageIdfetches info from CCIP-API, and transaction hash from RPC)ccip-cli send --source ethereum-testnet-sepolia --router 0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59 --dest ethereum-testnet-sepolia-arbitrum-1 --receiver=0xReceiver --data="hello ccip-cli" --wallet=ledger:1sends a ccip message on given router and laneccip-cli manual-exec <request-tx-hash>manually executes a failed messageccip-cli get-supported-tokens -n ethereum-mainnet -a 0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7Dlist tokens and their configs (searchable!)
