Skip to main content
By default, the App Kit SDK uses CCTP’s Fast Transfer feature to optimize for speed. However, this can incur higher fees. If performance is not a concern, you can specify a slow transfer speed, which uses CCTP’s Standard Transfer feature. To balance performance and cost, you can set the maximum fee you want to pay on fast bridge transfers. The transfer switches to slow if the cost is above your limit.

Prerequisites

Before you begin, ensure that you’ve: These are required so any example below runs with a valid kit and adapter.

Configure slow speed

This code configures a slow transfer speed:
TypeScript
import { AppKit } from "@circle-fin/app-kit";
import { createViemAdapterFromPrivateKey } from "@circle-fin/adapter-viem-v2";

const kit = new AppKit();

const adapter = createViemAdapterFromPrivateKey({
  privateKey: process.env.EVM_PRIVATE_KEY as string,
});

const result = await kit.bridge({
  from: { adapter, chain: "Ethereum_Sepolia" },
  to: { adapter, chain: "Arc_Testnet" },
  amount: "1.00",
  config: { transferSpeed: "SLOW" },
});

Configure maximum fee

Set the maximum fee that you want to pay for the CCTP fast burn.
For bridges from Arc Testnet, the amount must exceed the CCTPv2 max fee (around 1.4 USDC). If the amount is too low, the burn step can revert with "Max fee must be less than amount".
This code configures a maximum fee of 0.10 USDC:
TypeScript
import { AppKit } from "@circle-fin/app-kit";
import { createViemAdapterFromPrivateKey } from "@circle-fin/adapter-viem-v2";

const kit = new AppKit();

const adapter = createViemAdapterFromPrivateKey({
  privateKey: process.env.EVM_PRIVATE_KEY as string,
});

const result = await kit.bridge({
  from: { adapter, chain: "Ethereum_Sepolia" },
  to: {
    adapter,
    chain: "Arc_Testnet",
  },
  amount: "1.00",
  config: {
    transferSpeed: "FAST", // Fast transfer speed (can be omitted)
    maxFee: "0.10", // Max 0.10 USDC fee
  },
});