Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.arc.network/llms.txt

Use this file to discover all available pages before exploring further.

App Kit includes the Swap capability that lets you swap two tokens on the same blockchain in a few lines of code. It supports many stablecoins (including USDC, EURC, USDT, USDe, DAI, and PYUSD) and native tokens on supported blockchains. You need a (free) kit key from the Circle Console to use Swap.
Among testnets, only Arc Testnet supports Swap (USDC and EURC only). Use mainnet for Swap on any other blockchains.

Quick look

This example swaps USDC for EURC in a single method call:
TypeScript
// Swap 1.00 USDC for EURC on Arc Testnet
const result = await kit.swap({
  from: { adapter: viemAdapter, chain: "Arc_Testnet" },
  tokenIn: "USDC",
  tokenOut: "EURC",
  amountIn: "1.00",
  config: {
    kitKey: process.env.KIT_KEY as string, // Your kit key from the Circle Console
  },
});
For a complete end-to-end flow, follow the quickstart: Swap Tokens on a Blockchain.

Installation

App Kit comes with the Swap capability installed by default. If you’ve already installed App Kit, you can skip this section. If you only need to swap and don’t want the full App Kit, you can install just the Swap package. Install the Swap package and the adapter that matches your environment:
npm install @circle-fin/swap-kit @circle-fin/adapter-viem-v2 viem