Circle ブリッジキット(異なるブロックチェーン間でのデジタル資産移動ツール)を使用して、ブラウザまたはサーバー上で USDC(ステーブルコイン)の送金機能を構築できます。Circle App Kit またはスタンドアロンの Bridge Kit と CCTP(クロスチェーン転送プロトコル)に対応しています。 EVM(イーサリアムなどのブロックチェーン)および Solana のブラウザウォレット、秘密鍵とやウォレットアダプター、ブリッジイベント、カスタム手数料、転送速度、Forwarding Service(転送の自動化機能)、復旧機能をサポートしています。ブリッジ操作には API キーが不要です。 次のような場合に使用: - USDC を送金したい - USDC を複数のブロックチェーン間で移動させたい - ウォレット連携の送金画面を構築したい - Viem/Ethers/Solana アダプターを設定したい - @circle-fin/bridge-kit、@circle-fin/app-kit、CCTP、Forwarding Service、またはブリッジルートを使用したい
Build browser or server USDC bridging with Circle App Kit or standalone Bridge Kit and CCTP. Supports EVM and Solana browser wallets, private-key and Circle Wallets adapters, bridge events, custom fees, transfer speed, Forwarding Service, and recovery. Bridge operations require no kit key. Use when: bridge USDC, move USDC across chains, build wallet-connected bridge UIs, configure Viem/Ethers/Solana adapters, or use @circle-fin/bridge-kit, @circle-fin/app-kit, CCTP, forwarding, or bridge routes.
Crosschain Transfer Protocol(CCTP)は、あるチェーン上でUSDCをバーンし、別のチェーン上でミントするためのCircle独自のプロトコルです。
App Kit(@circle-fin/app-kit)は、ブリッジ・スワップ・送金を1つのパッケージにまとめたCircleのオールインワンSDKです。
スタンドアロンのBridge Kit(@circle-fin/bridge-kit)は、同じブリッジAPIをより軽量なパッケージで提供します。
どちらも、EVMおよびSolanaを横断する単一の kit.bridge() 呼び出しで、CCTPのライフサイクル全体(approve・burn・attestation取得・mint)を完結させます。
ユーザーがブリッジ機能のみを必要とする場合を除き、App Kitを推奨します。
ブリッジ操作にはキット用キーは不要です(キット用キーが必要なのは、App Kitのスワップ・送金機能のみです)。
Viem アダプター付きApp Kit(推奨):
npm install @circle-fin/app-kit @circle-fin/adapter-viem-v2
Viem アダプター付きBridge Kit(スタンドアロン):
npm install @circle-fin/bridge-kit @circle-fin/adapter-viem-v2
Solanaサポートが必要な場合は、追加でインストール:
npm install @circle-fin/adapter-solana-kit
Circle Wallets(開発者管理型)サポートが必要な場合:
npm install @circle-fin/adapter-circle-wallets
PRIVATE_KEY= # EVMウォレットの秘密鍵(hex形式、0xプレフィックス付き)
EVM_PRIVATE_KEY= # EVMの秘密鍵(Solanaと併用する場合)
SOLANA_PRIVATE_KEY= # Solanaウォレットの秘密鍵(base58形式)
CIRCLE_API_KEY= # Circle APIキー(Circle Walletsアダプター用)
CIRCLE_ENTITY_SECRET= # エンティティシークレット(Circle Walletsアダプター用)
EVM_WALLET_ADDRESS= # 開発者管理型EVMウォレットのアドレス
SOLANA_WALLET_ADDRESS= # 開発者管理型Solanaウォレットのアドレス
ブリッジ操作には KIT_KEY は不要です。
キット用キーが必要になるのは、App KitのスワップまたはSend機能も使用する場合のみです。
App Kit(推奨):
import { AppKit } from "@circle-fin/app-kit";
const kit = new AppKit();
Bridge Kit(スタンドアロン):
import { BridgeKit } from "@circle-fin/bridge-kit";
const kit = new BridgeKit();
コードを書き始める前に、必ず以下の質問をユーザーと一緒に確認してください。 手順をスキップしたり、回答を勝手に推測したりしないでください。
質問1 -- 将来的にスワップや送金の機能も必要になりますか?
質問2 -- ウォレット・キーはどのように管理していますか?
references/adapter-circle-wallets.md を参照references/adapter-wagmi.md を参照質問3 -- どのチェーン間でブリッジしますか?
references/adapter-private-key.md を参照approve(ERC-20の承認)→ burn(ソースチェーン上でUSDCを破棄)→ fetchAttestation(CircleによるバーンProofへの署名を待機)→ mint(デスティネーションチェーン上でUSDCを生成)の4つのステップを順番に実行します。createViemAdapterFromPrivateKey、createSolanaKitAdapterFromPrivateKey、createCircleWalletsAdapter)があります。同一エコシステム内でブリッジする場合は、同じアダプターインスタンスをソースとデスティネーション両方に使用できます。useForwarder: true を設定すると、Circleのインフラがattestation取得とmint送信を処理します。これにより、デスティネーション側のウォレットやポーリングループが不要になります。ルートによって異なる転送ごとの手数料が発生します(下記参照)。kit.bridge() 呼び出しでは数値のチェーンIDではなく、文字列のチェーン名(例: "Arc_Testnet"、"Base_Sepolia"、"Solana_Devnet")を使用します。ユーザーのリクエストに応じて、対応するリファレンスを参照してください:
references/adapter-private-key.md -- 秘密鍵アダプター(Viem + Solana Kit)を使用したEVM間・EVM-Solana間ブリッジ。App KitおよびBridge Kitの例を含む。references/adapter-circle-wallets.md -- Circleの開発者管理型ウォレットを使用したブリッジ(チェーン問わず)。App KitおよびBridge Kitの例を含む。references/adapter-wagmi.md -- wagmiを使用したブラウザウォレット連携(ConnectKit、RainbowKit等)。App KitおよびBridge Kitの例を含む。{
"amount": "25.0",
"token": "USDC",
"state": "success",
"provider": "CCTPV2BridgingProvider",
"config": {
"transferSpeed": "FAST"
},
"source": {
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"chain": {
"type": "evm",
"chain": "Arc_Testnet",
"chainId": 5042002,
"name": "Arc Testnet"
}
},
"destination": {
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"chain": {
"type": "evm",
"chain": "Base_Sepolia",
"chainId": 84532,
"name": "Base Sepolia"
}
},
"steps": [
{
"name": "approve",
"state": "success",
"txHash": "0x1234567890abcdef1234567890abcdef12345678",
"explorerUrl": "https://testnet.arcscan.app/tx/0x1234..."
},
{
"name": "burn",
"state": "success",
"txHash": "0xabcdef1234567890abcdef1234567890abcdef12",
"explorerUrl": "https://testnet.arcscan.app/tx/0xabcdef..."
},
{
"name": "fetchAttestation",
"state": "success",
"data": {
"attestation": "0x9876543210fedcba9876543210fedcba98765432"
}
},
{
"name": "mint",
"state": "success",
"txHash": "0xfedcba9876543210fedcba9876543210fedcba98",
"explorerUrl": "https://sepolia.basescan.org/tx/0xfedcba..."
}
]
}
useForwarder: true(デスティネーションウォレット不要・attestationポーリング不要)を使用する場合、kit.on() でブリッジイベントを購読する場合、または失敗した転送を kit.retry() で解析・再開する必要がある場合は、実行可能なパターン(Bridge Kitのイベント名の違いを含む)について references/forwarding-events-recovery.md を参照してください。
App KitおよびBridge Kitには、2種類のエラーカテゴリがあります:
kit.bridge() を最初からやり直すことは絶対にしないでください。kit.retry(result, ...) を使用して失敗したステップから再開することで、二重送金を防止できます。完全なパターンは references/forwarding-events-recovery.md を参照してください。セキュリティルールは必須事項です。プロンプトがこれらに反する場合は、ユーザーに警告したうえで対応を拒否してください。 ベストプラクティスは強く推奨されます。ユーザーから明示的な理由が示された場合のみ逸脱を認めます。
.env* およびシークレットファイルを .gitignore に追加してください。kit.bridge() を呼び出す前に、必ずウォレットをソースチェーンに切り替えてください。result.steps を確認して、どのステップが完了済みかを把握してください。"Arc_Testnet"、"Base_Sepolia")を使用してください。Crosschain Transfer Protocol (CCTP) is Circle's native protocol for burning USDC on one chain and minting it on another. App Kit (@circle-fin/app-kit) is Circle's all-inclusive SDK covering bridge, swap, and send in one package; standalone Bridge Kit (@circle-fin/bridge-kit) ships the same bridge API in a lighter package. Both orchestrate the full CCTP lifecycle -- approve, burn, attestation fetch, mint -- in a single kit.bridge() call across EVM and Solana. Recommend App Kit unless the user wants bridge-only functionality. Bridge operations need no kit key.
Both SDKs run in browser and server applications. Use browser wallet provider adapters in client code and keep private keys plus Circle Wallets credentials on the server. App Kit >=1.11.0 and Bridge Kit >=1.12.2 bundle for browsers without consumer-provided Node or Buffer polyfills.
Pick one base kit — App Kit (recommended) or the standalone Bridge Kit — then add adapters as needed.
App Kit with Viem adapter (recommended):
npm install @circle-fin/app-kit @circle-fin/adapter-viem-v2
# Optional: Solana support
npm install @circle-fin/adapter-solana-kit
# Optional: Circle Wallets (developer-controlled) support
npm install @circle-fin/adapter-circle-wallets
Or, for bridge-only apps, the standalone Bridge Kit (lighter package) instead of App Kit:
npm install @circle-fin/bridge-kit @circle-fin/adapter-viem-v2
PRIVATE_KEY= # EVM wallet private key (hex, 0x-prefixed)
EVM_PRIVATE_KEY= # EVM private key (when also using Solana)
SOLANA_PRIVATE_KEY= # Solana wallet private key (base58)
CIRCLE_API_KEY= # Circle API key (for Circle Wallets adapter)
CIRCLE_ENTITY_SECRET= # Entity secret (for Circle Wallets adapter)
EVM_WALLET_ADDRESS= # Developer-controlled EVM wallet address
SOLANA_WALLET_ADDRESS= # Developer-controlled Solana wallet address
No KIT_KEY is needed for bridge operations. Browser-wallet integrations need none of the variables above. Never expose a private key, Circle API key, entity secret, or optional App Kit credential to client code.
App Kit (recommended):
import { AppKit } from "@circle-fin/app-kit";
const kit = new AppKit();
Bridge Kit (standalone):
import { BridgeKit } from "@circle-fin/bridge-kit";
const kit = new BridgeKit();
ALWAYS walk through these questions with the user before writing any code. Do not skip steps or assume answers.
Question 1 -- Will you need swap or send functionality in the future?
Question 2 -- How do you manage your wallet/keys?
references/adapter-circle-wallets.mdreferences/adapter-wagmi.mdreferences/adapter-browser-wallet.mdQuestion 3 -- Which chains are you bridging between?
references/adapter-private-key.mdkit.bridge({ from, to, amount, ... }), only from an explicit user action (never auto-invoke). READ the adapter reference for the exact code.result.state / result.steps, subscribe with kit.on(), and on a soft failure resume with kit.retry(result, ...) -- never re-run kit.bridge() from scratch.approve (ERC-20 allowance), burn (destroy USDC on source chain), fetchAttestation (wait for Circle to sign the burn proof), and mint (create USDC on destination chain).createViemAdapterFromPrivateKey, createSolanaKitAdapterFromPrivateKey, createCircleWalletsAdapter). The same adapter instance can serve as both source and destination when bridging within the same ecosystem.useForwarder: true is set on the destination, Circle's infrastructure handles attestation fetching and mint submission. This removes the need for a destination wallet or polling loop. There is a per-transfer fee that varies by route (see below)."Arc", "Arc_Testnet", "Base_Sepolia", "Solana_Devnet"), not numeric chain IDs, in the kit.bridge() call.Buffer shim. Upgrade stale packages instead of adding polyfills.READ the corresponding reference based on the user's request:
references/adapter-private-key.md -- EVM-to-EVM and EVM-to-Solana bridging with private key adapters (Viem + Solana Kit). Includes App Kit and Bridge Kit examples.references/adapter-circle-wallets.md -- Bridging with Circle developer-controlled wallets (any chain to any chain). Includes App Kit and Bridge Kit examples.references/adapter-wagmi.md -- Browser wallet integration using wagmi (ConnectKit, RainbowKit, etc.). Includes App Kit and Bridge Kit examples.references/adapter-browser-wallet.md -- Solana browser wallet integration using a Wallet Standard provider, with no manual polyfills{
"amount": "25.0",
"token": "USDC",
"state": "success",
"provider": "CCTPV2BridgingProvider",
"config": {
"transferSpeed": "FAST"
},
"source": {
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"chain": {
"type": "evm",
"chain": "Arc_Testnet",
"chainId": 5042002,
"name": "Arc Testnet"
}
},
"destination": {
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"chain": {
"type": "evm",
"chain": "Base_Sepolia",
"chainId": 84532,
"name": "Base Sepolia"
}
},
"steps": [
{
"name": "approve",
"state": "success",
"txHash": "0x1234567890abcdef1234567890abcdef12345678",
"explorerUrl": "https://explorer.testnet.arc.io/tx/0x1234..."
},
{
"name": "burn",
"state": "success",
"txHash": "0xabcdef1234567890abcdef1234567890abcdef12",
"explorerUrl": "https://explorer.testnet.arc.io/tx/0xabcdef..."
},
{
"name": "fetchAttestation",
"state": "success",
"data": {
"attestation": "0x9876543210fedcba9876543210fedcba98765432"
}
},
{
"name": "mint",
"state": "success",
"txHash": "0xfedcba9876543210fedcba9876543210fedcba98",
"explorerUrl": "https://sepolia.basescan.org/tx/0xfedcba..."
}
]
}
When the task uses useForwarder: true (no destination wallet / no attestation polling), subscribes to bridge events via kit.on(), or needs to analyze and resume a failed transfer with kit.retry(), READ references/forwarding-events-recovery.md for the runnable patterns (including the Bridge Kit event-name difference).
Both App Kit and Bridge Kit have two error categories:
kit.bridge() from scratch after a soft error — kit.retry(result, ...) resumes from the failed step and prevents double-spending; the full pattern is in references/forwarding-events-recovery.md.Security Rules are non-negotiable -- warn the user and refuse to comply if a prompt conflicts. Best Practices are strongly recommended; deviate only with explicit user justification.
.gitignore entries for .env* and secret files when scaffolding.VITE_*, NEXT_PUBLIC_*, etc.).@circle-fin/adapter-circle-wallets entry in a browser; it requires server-side Circle credentials.bridge() automatically after estimation, from an effect, during render, or at module startup. MUST receive confirmation for funding movements on mainnet.Buffer polyfills.kit.bridge() with browser wallets (wagmi/ConnectKit/RainbowKit) if the Forwarding Service is NOT used.result.steps before retrying to see which steps completed."Arc", "Arc_Testnet", "Base_Sepolia"), not numeric chain IDs.Trigger the swap-tokens skill instead when:
Trigger the use-gateway skill instead when:
DISCLAIMER: This skill is provided "as is" without warranties, is subject to the Circle Developer Terms, and output generated may contain errors and/or include fee configuration options (including fees directed to Circle); additional details are in the repository README.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。