Skip to main content

Cashmere Agent SDK

The official TypeScript SDK for programmatic and AI-agent-driven USDC transfers. It requires Node.js 22 or later.
The SDK covers 17 chains (14 EVM chains, Solana, Aptos and Sui) and sends every route over CCTP V2. It also ships an MCP server, an agent skill for payments, and tool schemas for OpenAI, LangChain, Hermes and other frameworks. Configure only the chains you send from. Paste each key as the wallet exports it: Each option also takes an optional rpcUrl. Load keys from the environment or a secret manager, never from source code.
The Agent Integration guide covers the MCP server (Claude Desktop, Claude Code, Hermes Agent), the agent skill and framework setup (LangChain, OpenAI function calling, Hermes, crewAI).

Direct Integration (No SDK)

Call the contracts yourself when the user signs in their own wallet (a dApp or wallet UI), or when your backend isn’t written in TypeScript:
  1. Fetch a signed fee quote from the Gas API.
  2. Pass it to the CashmereCCTP contracts, as described in From Quote to Call.
  3. Track each transfer with the Transaction APIs.
The Developer Quickstart walks through all three on EVM.

Helper Snippets

Each helper fetches a quote for the V2 entry points. A quote is valid for about 100 seconds, and its fee and deadline are signed: pass them to the contract unchanged. Always send isNative: the Gas API answers HTTP 500 without it.

TypeScript (EVM)

Go (EVM)

Rust (Solana, Aptos, Sui)

local is 5 on Solana, 9 on Aptos and 8 on Sui. Keep version=2: without it the message has no version byte and the V2 entry points reject the signature. Native fees are lamports on Solana, octas on Aptos and MIST on Sui. Signed Payloads shows what each chain verifies.

Resources