Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Run lint
run: npm run check

- name: Validate package exports
- name: Validate ccip-sdk package exports
working-directory: ccip-sdk
run: |
# publint - check package.json exports and module format
Expand All @@ -38,6 +38,16 @@ jobs:
# Note: CJS resolution warnings are expected for ESM-only packages
npx @arethetypeswrong/cli --pack . --profile esm-only || true

- name: Validate ccip-config package exports
working-directory: ccip-config
run: |
# publint - check package.json exports and module format
npx publint

# attw - check TypeScript types resolution (informational)
# Note: CJS resolution warnings are expected for ESM-only packages
npx @arethetypeswrong/cli --pack . --profile esm-only || true

- name: Run tests with coverage
run: |
set -o pipefail
Expand Down
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- SDK: Browser compatibility - explicit `buffer` dependency and imports for cross-platform support
- CI: Added `publint` and `@arethetypeswrong/cli` validation for package exports
- ESLint: `import/no-nodejs-modules` rule prevents Node.js-only imports in SDK
- Docs: Cross-Platform Portability guidelines in CONTRIBUTING.md
- **New Package**: `@chainlink/ccip-config` - Chain deployment registry with router addresses and display names
- Tree-shakable imports: `import '@chainlink/ccip-config/chains/evm/mainnet'`
- Lookup by SDK canonical name: `getDeploymentByName('ethereum-mainnet')`
- Lookup by selector: `getRouter()`, `requireRouter()`, `getDisplayName()`
- **CLI**: New `chains` command - list, search, and lookup chain info
- Filters: `--family`, `--mainnet`, `--testnet`, `--ccip-only`
- Search: `ccip chains --search arbitrum`
- Interactive: `ccip chains -i`
- **SDK**: Browser compatibility with explicit `buffer` imports
- **CI**: Added `publint` and `@arethetypeswrong/cli` for package validation

## [0.93.0] - 2025-12-26 - Pre-release

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ TypeScript SDK and CLI for [CCIP](https://chain.link/cross-chain) (Cross-Chain I

## Packages

| Package | Description | Install |
| --------------------------------- | ----------------------------------- | ------------------------------------ |
| [@chainlink/ccip-sdk](./ccip-sdk) | TypeScript SDK for CCIP integration | `npm install @chainlink/ccip-sdk` |
| [@chainlink/ccip-cli](./ccip-cli) | Command-line interface | `npm install -g @chainlink/ccip-cli` |
| Package | Description | Install |
| ------------------------------------- | ------------------------------------ | --------------------------------------- |
| [@chainlink/ccip-sdk](./ccip-sdk) | TypeScript SDK for CCIP integration | `npm install @chainlink/ccip-sdk` |
| [@chainlink/ccip-cli](./ccip-cli) | Command-line interface | `npm install -g @chainlink/ccip-cli` |
| [@chainlink/ccip-config](./ccip-config) | Chain deployment configuration | `npm install @chainlink/ccip-config` |

## Quick Start

Expand Down
44 changes: 44 additions & 0 deletions ccip-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,50 @@ Attempts to parse hex-encoded function call data, error and revert reasons, for

It'll recursively try to decode `returnData` and `error` arguments.

### `chains`

```sh
ccip-cli chains [identifier] # List or lookup CCIP chain configuration
```

Discover and lookup CCIP chain information including router addresses.

#### Options

- `--family <evm|solana|aptos|sui|ton>`: Filter by chain family
- `--mainnet`: Show only mainnets
- `--testnet`: Show only testnets
- `--ccip-only`: Show only CCIP-enabled chains (with router addresses)
- `--search <term>` / `-s <term>`: Fuzzy search by name
- `--interactive` / `-i`: Interactive mode with type-ahead filtering
- `--json`: Output as JSON for scripting
- `--field <name>`: Output only a specific field value
- `--count`: Show count summary only

#### Examples

```sh
# List all EVM mainnets with CCIP routers
ccip-cli chains --family evm --mainnet --ccip-only

# Lookup a specific chain
ccip-cli chains ethereum-mainnet
ccip-cli chains 1 # by chainId
ccip-cli chains 5009297550715157269 # by selector

# Fuzzy search (typo-tolerant)
ccip-cli chains --search "arbtrum" # finds "arbitrum"

# Interactive mode for browsing
ccip-cli chains -i

# Get just the router address for scripting
ccip-cli chains ethereum-mainnet --field router

# JSON output
ccip-cli chains --json --family evm --mainnet
```

### `getSupportedTokens`

```sh
Expand Down
4 changes: 3 additions & 1 deletion ccip-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"typecheck": "tsc --noEmit",
"check": "npm run lint && npm run typecheck",
"build": "npm run clean && tsc -p ./tsconfig.build.json && npm run patch-dist",
"patch-dist": "chmod +x ./dist/index.js && find ./dist -type f -name \"*.js\" -exec sed -i.bkp 's|@chainlink/ccip-sdk/src/.*\\.ts|@chainlink/ccip-sdk|g' {} + && find ./dist -type f -name \"*.bkp\" -delete",
"patch-dist": "chmod +x ./dist/index.js && find ./dist -type f -name \"*.js\" -exec sed -i.bkp 's|@chainlink/ccip-sdk/src/.*\\.ts|@chainlink/ccip-sdk|g; s|@chainlink/ccip-config/src/index\\.ts|@chainlink/ccip-config|g; s|@chainlink/ccip-config/src/chains/evm/mainnet\\.ts|@chainlink/ccip-config/chains/evm/mainnet|g; s|@chainlink/ccip-config/src/chains/evm/testnet\\.ts|@chainlink/ccip-config/chains/evm/testnet|g; s|@chainlink/ccip-config/src/chains/solana/index\\.ts|@chainlink/ccip-config/chains/solana|g; s|@chainlink/ccip-config/src/chains/aptos/index\\.ts|@chainlink/ccip-config/chains/aptos|g; s|@chainlink/ccip-config/src/chains/sui/index\\.ts|@chainlink/ccip-config/chains/sui|g; s|@chainlink/ccip-config/src/chains/ton/index\\.ts|@chainlink/ccip-config/chains/ton|g' {} + && find ./dist -type f -name \"*.bkp\" -delete",
"start": "./ccip-cli",
"clean": "rm -rfv ./dist",
"prepare": "npm run build"
Expand Down Expand Up @@ -48,6 +48,7 @@
},
"dependencies": {
"@aptos-labs/ts-sdk": "^5.2.0",
"@chainlink/ccip-config": "^0.93.0",
"@chainlink/ccip-sdk": "^0.93.0",
"@coral-xyz/anchor": "^0.29.0",
"@ethers-ext/signer-ledger": "^6.0.0-beta.1",
Expand All @@ -59,6 +60,7 @@
"@ton-community/ton-ledger": "^7.3.0",
"bs58": "^6.0.0",
"ethers": "6.16.0",
"fuse.js": "^7.1.0",
"type-fest": "^5.3.1",
"yargs": "18.0.0"
},
Expand Down
Loading
Loading