Skip to content

v1.0.0 - Rewrite Stable

Choose a tag to compare

@andrevmatos andrevmatos released this 26 Feb 14:04
· 229 commits to main since this release
4cc6ccc

⬡ 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, erasableSyntaxOnly and strict
  • Node.js v20+ required. v24+ recommended for development (native TypeScript execution via node or tsx)
  • node --test tests
  • 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:
  • 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))
  • 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-cli or run ad-hoc with npx @chainlink/ccip-cli
  • Auto-detect networks from multiple RPCs passed through --rpc options, --rpcs-file=./rpcs.txt or RPC_* 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; messageId fetches 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:1 sends a ccip message on given router and lane
    • ccip-cli manual-exec <request-tx-hash> manually executes a failed message
    • ccip-cli get-supported-tokens -n ethereum-mainnet -a 0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D list tokens and their configs (searchable!)
image