AppKit Class
TheAppKit is how you’ll perform all stablecoin operations including
crosschain bridging, same-chain swaps, token transfers, and fee estimation. It
also enables you to add event listeners for bridge transfers.
constructor(config?)
Creates a newAppKit instance.
Usage
AppKitConfig
Methods
bridge(params)
Execute a crosschain USDC bridge transfer. Transfers USDC between different blockchain networks using Circle’s Cross-Chain Transfer Protocol (CCTP). Supports both fast and standard transfer speeds with automatic attestation handling.
Returns
Promise<BridgeResult<'USDC'>>
Usage Example
estimateBridge(params)
Estimate the bridge operation. Calculates gas costs, protocol fees, and optional custom fees for a crosschain bridge transfer without executing the transaction. Useful for displaying cost estimates to users before they confirm a transfer.
Returns
Promise<ReceiveExactEstimateResult>
ReceiveExactEstimateResult
Return a receive-exact bridge estimate backed by a short-lived signed quote.ReceiveExactFeeItem
Describe one signed Fee Service line item in human-readable USDC.
Usage Example
estimateSend(params)
Estimate network fees for a send operation. Prepare the send (validation + recipient resolution) and returns the gas estimate without executing the actual transaction. This allows developers to show users the cost before committing to the transfer.SendParams
Parameters for sending USDC, USDT, native tokens, or custom ERC-20/SPL tokens. This interface is the canonical input for send operations in App Kit. It supports sending to either a destination Adapter (recipient derives from the adapter’s default account) or an explicit recipientstring address.
- The
fromfield provides the source signing context and chain. - The
tofield identifies the destination as an adapter or an explicit address. - The
amountfield is a human-readable decimal string (for example,'10.5'). - The
tokenfield selects the asset to move and defaults to'USDC'.
Returns
Promise<EstimatedGas>
EstimatedGas
Estimated gas information for a blockchain transaction. This interface provides a unified way to represent gas costs across different blockchain networks, supporting both EVM-style gas calculations and other fee models.estimateSwap(params)
Estimate the output and fees for a swap operation. Calculates the expected output amount, minimum output (with slippage), and fee breakdown for a token swap without executing the transaction.SwapParams
Returns
Promise<SwapEstimate>
SwapEstimate
Estimation result for a swap operation. Contains the provider’s swap quote including minimum output (stop limit), estimated output amount, fee breakdown, and input context fields
Usage Example
getSupportedChains(operationType)
Get chains supported by AppKit operations. Returns blockchain networks that support specific stablecoin operations. When no operation type is specified, returns all chains supporting any operation (bridge, swap, earn, or unified balance).GetSupportedChainsOptions
Options for filtering supported chains.
Returns
ChainDefinition[]
Usage Examples
getSwapStatus(params)
Fetch the current status of a swap from the Stablecoin Service. Delegates to SwapKit.getSwapStatus. Performs a single HTTP request and returns the service’s snapshot of the swap’s state. For crosschain swaps the status can remain'PENDING' for several minutes while attestation and destination-chain
mint complete; callers are responsible for polling — re-calling this method with
a delay — until progress.status is terminal ('DONE', 'FAILED', or
'NOT_FOUND'). Use AppKit.waitForSwap if you’d rather not write the polling
loop yourself.
GetSwapStatusParams
Parameters for SwapKit.getSwapStatus.
Returns
Promise<SwapStatusResult>
SwapStatusResult
Result of a swap status lookup — a single snapshot of the swap’s state at the time of the call.
Usage Examples
getTokenRates(params)
Fetch cached USD rates for one or more tokens from the Stablecoin Service. Two lookup modes are supported:- Per-chain dump: omit
tokensto retrieve every rate cached forchain. - Targeted lookup: supply
tokens(up to 100) to retrieve a specific set of rates onchain. Each entry may be a registered token symbol (e.g.'USDC','EURC'), the literal'NATIVE', the chain’s native gas symbol (e.g.'ETH'on Ethereum), or a raw EVM address / Solana mint. Unknown strings are rejected with aKitError.
chain accepts any
Blockchain value or ChainDefinition, not just the swap-supported subset. Chains
the cron does not track return an empty rates map.
Response keys preserve the service’s canonical casing: EVM hex addresses are
lowercased, Solana base58 mints are case-preserved. Lowercase EVM addresses
before indexing into result.rates[chain].
Native gas rates: 'NATIVE' (or a chain’s native currency symbol) translates to
the chain’s native sentinel address — 0xEee… for EVM, 1111… for Solana —
before querying the service.
GetTokenRatesParams
Parameters for SwapKit.getTokenRates.
Returns
Promise<GetTokenRatesResponse>
ChainIdentifier
Chain identifier that can be used in transfer parameters and factory functions. This can be either:- A ChainDefinition object
- A Blockchain enum value (e.g., Blockchain.Ethereum)
- A string literal of the blockchain value (e.g., “Ethereum”)
off(action)
Unregister an event handler for a specific AppKit action. This method removes a previously registered event handler. You must pass the exact same handler function reference that was used during registration. Use the wildcard* to remove handlers listening to all actions.
Usage Example
on(action)
Register an event handler for a specific AppKit action. Subscribe to step events from bridge, earn, or unified balance operations. Action names are namespaced:bridge., earn., and unifiedBalance.. Use ''
to receive every action.
Handlers receive strongly-typed payloads for the chosen action. Multiple
handlers may be registered for the same action.
Usage Example
removeCustomFeePolicy(operation)
Remove an AppKit-level custom fee policy for one operation. Bridge and swap policies are removed from AppKit’s persistent context so future operations fall back to legacy fee hooks. Unified balance policies are also removed from the namespaced Unified Balance Kit.
Usage Example
retryBridge(result)
Retry a failed crosschain USDC bridge transfer. Resume a bridge operation that failed due to a transient error. Use isRetryableError to check whether a failed step’s error is eligible for retry before calling this method.BridgeResult
Result object returned after a successful crosschain bridge operation. This interface contains all the details about a completed bridge, including the bridge parameters, source and destination information, and the sequence of steps that were executed.RetryContext
Context for retry operations containing source and destination adapter contexts. This interface provides the necessary context for retry operations, including both the source adapter context (where the retry originates) and the destination adapter context (where the retry is targeted). This ensures that retry operations have access to both the source and destination chain information needed for validation and execution. The destination adapter (to) is optional to support forwarder-only
destinations where Circle’s Orbit relayer handles the mint transaction without
requiring a destination adapter. When to is undefined, the retry operation
relies on IRIS API confirmation instead of on-chain transaction confirmation.
Returns
Promise<BridgeResult<TToken>>
Usage Example
send(params)
Execute a send operation for known token aliases (USDC, USDT, NATIVE) or custom ERC-20/SPL tokens. For custom tokens, the token address must be provided. This method handles the complete send transfer flow using the underlying AppKit infrastructure. It supports sending to either a destination adapter or an explicit recipient address, with full type safety and comprehensive error handling.SendParams
Parameters for sending USDC, USDT, native tokens, or custom ERC-20/SPL tokens. This interface is the canonical input for send operations in App Kit. It supports sending to either a destination Adapter (recipient derives from the adapter’s default account) or an explicit recipientstring address.
- The
fromfield provides the source signing context and chain. - The
tofield identifies the destination as an adapter or an explicit address. - The
amountfield is a human-readable decimal string (for example,'10.5'). - The
tokenfield selects the asset to move and defaults to'USDC'.
Returns
Promise<BridgeStep>
BridgeStep
A step in the bridge process.
Usage Examples
setCustomFeePolicy(policy)
Set operation-scoped custom fee policies. Configure custom fees for only the operations that need them. Bridge and swap policies are forwarded to the underlying kits when those operations run. Unified balance policies are applied immediately to the namespaced Unified Balance Kit.AppKitCustomFeePolicy
Operation-scoped custom fee policies configured at the AppKit level. Each property is optional so consumers can enable custom fees only for the operation they use. AppKit forwards the supplied policy to the matching underlying kit when that operation runs.
Usage Example
swap(params)
Execute a same-chain token swap operation. Swaps between USDC, USDT, and native tokens on the same blockchain with configurable slippage tolerance and allowance strategies.SwapParams
Returns
Promise<SwapResult>
SwapResult
Result of an executed swap operation. Captures the source-chain execution outcome for a swap transaction.
Usage Example
waitForSwap(params)
Poll the Stablecoin Service until a swap reaches a terminal status ('DONE',
'FAILED', 'NOT_FOUND') or timeoutMs elapses.
Delegates to SwapKit.waitForSwap. Use this after kit.swap() to collapse the
while (status === 'PENDING') polling loop into a single awaitable. Same-chain
swaps return on the first poll because they are already terminal at swap time;
crosschain swaps follow an escalating backoff (3s → 6s → 12s → 24s → 24s) until
the wait budget expires. Timeouts surface as a RETRYABLE KitError so callers
can re-invoke with the same txHash.
WaitForSwapParams
Parameters for SwapKit.waitForSwap.Promise<SwapStatusResult>
SwapStatusResult
Result of a swap status lookup — a single snapshot of the swap’s state at the time of the call.WaitForSwapResultParams
waitForSwap parameter shape that pipes a SwapResult straight through — the
most ergonomic form when you’ve just called SwapKit.swap or SwapKit.executeSwap.
WaitForSwapDiscreteParams
waitForSwap parameter shape for callers that don’t have a SwapResult on hand —
e.g. picking up an in-flight swap from a persisted record or a copy-pasted tx
hash.
Usage Examples
kit.unifiedBalance Methods
unifiedBalance is a property on every AppKit instance. Call these methods as
kit.unifiedBalance.methodName().
addDelegate(params)
Grant spending rights to another address on the owner’s account.UpdateDelegateParams
Parameters for adding or removing a delegate on a Gateway account.
Returns
Promise<UpdateDelegateResult>
UpdateDelegateResult
Result returned after a successful add or remove delegate operation.
Usage Example
deposit(params)
Deposit USDC into the caller’s account on a specific chain.DepositParams
Parameters for depositing tokens into the caller’s own Gateway account on a specific chain.
Returns
Promise<DepositResult>
DepositResult
Result returned after a successful deposit operation.
Usage Example
depositFor(params)
Deposit USDC into another account (not the caller’s).DepositForParams
Parameters for depositing tokens into another Gateway account.
Returns
Promise<DepositResult>
DepositResult
Result returned after a successful deposit operation.
Usage Example
estimateDeposit(params)
Estimate fees for a crosschain deposit without executing it. Returns plain, serializable data that can be spread directly into UnifiedBalanceKit.deposit or UnifiedBalanceKit.depositFor:typescript const estimate = await kit.estimateDeposit({ from, amount, to }) const result = await kit.deposit({ ...estimate, from })
EstimateDepositParams
Parameters for estimating the fees of a fast crosschain deposit. The result is plain, serializable data — no live adapter reference is included. Pass the result (plusfrom) directly to DepositParams or DepositForParams for
execution:
typescript const estimate = await kit.estimateDeposit({ from, amount, token, to }) const result = await kit.deposit({ ...estimate, from })
Returns
Promise<EstimateDepositResult>
EstimateDepositResult
Fee-preview result returned byestimateDeposit.
Plain, serializable data — no live adapter reference. Pass the result directly
to deposit or depositFor (re-attaching only from):
typescript const estimate = await kit.estimateDeposit({ from, amount, token, to }) const result = await kit.deposit({ ...estimate, from })
FeeQuoteExchangeRates
USD exchange-rate metadata. Non-binding, useful for USD-denominated fee estimates.feeTokenUsd prices the
source-chain fee token (the token feeTotalAmount is denominated in).
estimateSpend(params)
Estimate the fees for a spend operation without executing it.SpendParams
Parameters for spending (minting) USDC on a destination chain from one or more Gateway account sources.Promise<EstimateSpendResult>
EstimateSpendResult
Cost estimation for a spend (mint) operation.
Usage Example
getBalances(params)
Fetch aggregated and per-chain balances for one or more accounts.GetBalancesParams
Parameters for the balances and pending-deposits API requests. Specify thetoken to query and one or more sources identifying the accounts
or adapters whose balances should be retrieved. When includePending is true,
the result includes pending balances and pending transaction details per chain.
Returns
Promise<GetBalancesResult>
GetBalancesResult
Result returned from the provider’sgetBalances method (combined confirmed and
pending).
When includePending is false (default), only totalConfirmedBalance and
breakdown with confirmed fields are returned. When includePending is true,
totalPendingBalance is present and breakdown entries include pending amounts
and pendingTransactions per chain.
NetworkType
Network type for balance queries when the target chain(s) are not explicitly specified. Default is mainnet.BalanceWithPendingBreakdown
Per-account balance breakdown used in GetBalancesResult. WhenincludePending is true, totalPending is present and each chain entry
may include pendingBalance and pendingTransactions.
ChainBalanceBreakdown
Per-chain balance within a breakdown in GetBalancesResult. WhenincludePending is true, pendingBalance and pendingTransactions are
present.
PendingBalanceTransaction
A pending transaction included in GetBalancesResult whenincludePending is
true.
getDelegateStatus(params)
Check the finality-aware delegate status of an address.GetDelegateStatusParams
Parameters for checking the delegate status of an address on a Gateway account.
Returns
Promise<DelegateStatus>
DelegateStatus
The finality-aware status of a delegate on a Gateway account.'none'— not a delegate on-chain.'pending'— delegate set on-chain but Gateway hasn’t finalized it yet; spend will fail until the status advances to'ready'.'ready'— finalized at Gateway; spend will succeed.
getSupportedChains(token)
Get all chains supported by the unified balance operations.GetSupportedChainsOptions
Options for filtering supported chains.
Returns
ChainDefinition[]
Usage Example
initiateRemoveFund(params)
Initiate a trustless recovery removal from an account. Usespend for normal movement out of a Unified Balance. removeFund is a
recovery path for situations where the normal spend flow is unavailable. Calling
this method starts the 7-day withdrawal delay before the removal can be
completed.
InitiateRemoveFundParams
Parameters for initiating a delayed recovery fund removal from a Gateway account.
Returns
Promise<InitiateRemoveFundResult>
InitiateRemoveFundResult
Result returned after successfully initiating a fund removal.
Usage Example
off(action)
Unregister an event handler for a specific gateway lifecycle action. Removes a previously registered event handler. You must pass the exact same handler function reference that was used during registration.
Usage Example
on(action)
Register an event handler for a specific gateway lifecycle action. Subscribe to events emitted during gateway operations such as deposit, spend, getBalances, etc. Handlers receive strongly-typed payloads based on the action name. Multiple handlers can be registered for the same action, and all will be invoked when the action occurs. Use the wildcard'*' to listen to all actions.
Note: TypeScript autocomplete may only show '*' due to internal type erasure.
The following action names are available at runtime and can be imported as
GatewayActionName from @circle-fin/provider-gateway-v1:
Usage Example
removeCustomFeePolicy()
Remove the custom fee policy for the kit.removeDelegate(params)
Revoke spending rights from a delegate on the owner’s account.UpdateDelegateParams
Parameters for adding or removing a delegate on a Gateway account.
Returns
Promise<UpdateDelegateResult>
UpdateDelegateResult
Result returned after a successful add or remove delegate operation.
Usage Example
removeFeeRecipients()
Remove the declarative fee recipient map for the kit.removeFund(params)
Complete a trustless recovery removal after the withdrawal delay. Usespend for normal movement out of a Unified Balance. removeFund is a
recovery path for situations where the normal spend flow is unavailable. Both
EVM and Solana removals require a 7-day withdrawal delay after
initiateRemoveFund before funds can be removed.
RemoveFundParams
Parameters for completing a recovery fund removal after the withdrawal delay.
Returns
Promise<RemoveFundResult>
RemoveFundResult
Result returned after successfully completing a fund removal.
Usage Example
setCustomFeePolicy(policy)
Set a custom fee policy for spend operations. Once set, every subsequentspend() and estimateSpend() call will include the computed fee unless
overridden by per-call config.customFee.
CustomFeePolicy
setFeeRecipients(config)
Set a declarative fee recipient map, keyed by chain type. Once set,spend()/estimateSpend() resolve the fee recipient by looking up
the spend’s destination chain type in this map — taking priority over
customFeePolicy’s resolveFeeRecipientAddress callback.
FeeRecipientsConfig
spend(params)
Spend (mint) USDC on a destination chain by pulling funds from one or more account sources.SpendParams
Parameters for spending (minting) USDC on a destination chain from one or more Gateway account sources.Promise<SpendResult>
SpendResult
Result returned after a successful spend (mint) operation.AllocationResult
Extends Allocation with the resolved source Gateway account address.SpendStep
Data payload for a single step in a spend operation.
Usage Example
kit.earn Methods
earn is a property on every AppKit instance. Call these methods as
kit.earn.methodName().
deposit(params)
Deposit into an earn vault.
Returns
Promise<EarnSameChainDepositResult>
EarnSameChainDepositResult
Result of a deposit operation returned by EarningProvider.deposit. Contains the confirmed on-chain transaction hash and explorer URL alongside the vault and deposit amount.exploreVaults(params)
Discover earn vaults available on a chain.
Returns
Promise<EarnExploreVaultsResult>
EarnExploreVaultsResult
Result of a vault discovery query.exploreVaultsIterator(params)
Lazily iterate every earn vault available on a chain.
Returns
AsyncGenerator<EarnVaultInfo, void, undefined>
Usage Example
getCrossChainDepositStatus(params)
Fetch the current status of a crosschain Earn deposit.
Returns
Promise<EarnCrossChainDepositStatus>
getDepositQuote(params)
Fetch a deposit quote.
Returns
Promise<EarnDepositQuoteInfo>
EarnDepositQuoteInfo
Result of a deposit quote operation.getPosition(params)
Fetch wallet position information for an earn vault.
Returns
Promise<EarnPositionInfo>
EarnPositionInfo
Position information returned by the SDK.EarnAccruedRewardInfo
Accrued reward returned by the SDK in human-readable decimal form.EarnPositionPnLInfo
Profit-and-loss calculation state returned by the SDK.getVaults(params)
Fetch earn vault information.
Returns
Promise<EarnGetVaultsResult>
EarnGetVaultsResult
Result of a batch vault lookup.getWithdrawalQuote(params)
Fetch a withdrawal quote.
Returns
Promise<EarnWithdrawalQuoteInfo>
EarnWithdrawalQuoteInfo
Result of a withdrawal quote operation.retry(error)
Resume a multi-phase earn operation that previously failed. Pass the KitError caught fromdeposit, withdraw, or claimRewards. The
error carries the original inputs and step progress, so completed phases (for
example a successful token approval) can be skipped. Call
isRetryableError(error) first.
Returns
Promise<EarnDepositOutcome \| EarnWithdrawResult \| EarnClaimRewardsResult>
EarnDepositOutcome
Result of a deposit operation returned by EarningProvider.deposit.kind is always set at runtime, but it is optional on the same-chain member, so
narrow against the required crosschain discriminator.
EarnCrossChainDepositResult
Result of a crosschain deposit submitted through the bridge flow.EarnClaimRewardsResult
Kit-level result of a claim rewards operation.EarnClaimedRewardsResult
Kit-level result returned after claimable rewards are submitted on-chain.EarnClaimedAmount
Kit-level reward amount returned from a claim rewards operation.waitForCrossChainDeposit(params)
Poll a crosschain Earn deposit until it reaches a terminal bridge state.
Returns
Promise<EarnCrossChainDepositWaitResult>
EarnCrossChainDepositWaitResult
Result returned by waiters for crosschain Earn deposits. The raw bridge status is preserved instatus. outcome summarizes why the
wait stopped, while terminal and timedOut let callers branch without
re-deriving bridge lifecycle semantics.
EarnCrossChainDepositWaitOutcome
Normalized outcome used by crosschain deposit waiters.timeout is a waiter outcome only; it is not derived from an API status.
withdraw(params)
Withdraw from an earn vault.
Returns
Promise<EarnWithdrawResult>
EarnWithdrawResult
Result of a withdrawal operation returned by EarningProvider.withdraw. Contains the confirmed on-chain transaction hash and explorer URL alongside the vault and withdrawal amount.kit.onramp Methods
onramp is a property on every AppKit instance. Call these methods as
kit.onramp.methodName().
fetchSession(options)
POST a session request to the host-app endpoint and return the minted session.
FetchOnrampSessionOptions
Options accepted by fetchOnrampSession.
Returns
Promise<OnrampSession>
Usage Example
mountIframe(options)
Mount the onramp widget inline into a host DOM element.OnrampIframeOptions
Iframe-only launch options.
Returns
OnrampWidget
Usage Example
openWindow(options)
Open the onramp widget in a popup window.OnrampWindowOptions
Window-only launch options.
Returns
OnrampWindowResult
OnrampWindowResult
Discriminated result ofonrampKit.openWindow().
Supporting Types
Common
AdapterContext
Represents the context of an adapter used for crosschain operations. An AdapterContext must always specify both the adapter and the chain explicitly. The address field behavior is determined by the adapter’s address control model:- Developer-controlled adapters: The
addressfield is required because each operation must explicitly specify which address to use. - User-controlled adapters: The
addressfield is forbidden because the address is automatically resolved from the connected wallet or signer. - Legacy adapters: The
addressfield remains optional for backward compatibility.
DeveloperFeeHooks
Chains
BaseChainDefinition
Base information that all chain definitions must include.Blockchain
Enumeration of all blockchains known to this library. This enum contains every blockchain that has a chain definition, regardless of whether bridging is currently supported. For chains that support bridging via CCTPv2, see BridgeChain.Algorand, Algorand_Testnet, Aptos, Aptos_Testnet, Arbitrum,
Arbitrum_Sepolia, Arc, Arc_Testnet, Avalanche, Avalanche_Fuji, Base,
Base_Sepolia, Celo, Celo_Alfajores_Testnet, Codex, Codex_Testnet,
Cronos, Cronos_Testnet, Edge, Edge_Testnet, Ethereum,
Ethereum_Sepolia, Hedera, Hedera_Testnet, HyperEVM, HyperEVM_Testnet,
Injective, Injective_Testnet, Ink, Ink_Testnet, Linea,
Linea_Sepolia, Monad, Monad_Testnet, Morph, Morph_Testnet, NEAR,
NEAR_Testnet, Noble, Noble_Testnet, Optimism, Optimism_Sepolia,
Pharos, Pharos_Testnet, Plasma, Plasma_Testnet, Plume,
Plume_Testnet, Polkadot_Asset_Hub, Polkadot_Westmint, Polygon,
Polygon_Amoy_Testnet, Sei, Sei_Testnet, Solana, Solana_Devnet,
Sonic, Sonic_Testnet, Stellar, Stellar_Testnet, Sui, Sui_Testnet,
Unichain, Unichain_Sepolia, World_Chain, World_Chain_Sepolia, X_Layer,
X_Layer_Testnet, XDC, XDC_Apothem, ZKSync_Era, ZKSync_Sepolia
ChainDefinition
Public chain definition type.Currency
Represents basic information about a currency or token.EVMChainDefinition
Represents chain definitions for Ethereum Virtual Machine (EVM) compatible blockchains.KitContractType
Available kit contract types for enhanced chain functionality.NonEVMChainDefinition
Represents chain definitions for non-EVM blockchains.TokenInfo
Represents the metadata associated with a token.Event Actions
AppKitActions
All actions available in AppKit.AppKitBridgeActions
Prefixed bridge actions for AppKit. All BridgeKit events are prefixed withbridge. to namespace them within the
AppKit event system.
AppKitEarnActions
Prefixed earn actions for AppKit. Earn step events are exposed under theearn. namespace (for example
earn.deposit, earn.approve, earn.withdraw) so they can be subscribed to
via kit.on() alongside bridge and unified balance events.
AppKitUnifiedBalanceActions
Prefixed unified balance actions for AppKit. All UnifiedBalanceKit (Gateway) events are prefixed withunifiedBalance. to
namespace them within the AppKit event system.
Bridge
BridgeChain
Enumeration of blockchains that support crosschain bridging via CCTPv2. The enum is derived from the full Blockchain enum but filtered to only include chains with active CCTPv2 support. When new chains gain CCTPv2 support, they are added to this enum.Arbitrum, Arbitrum_Sepolia, Arc, Arc_Testnet, Avalanche,
Avalanche_Fuji, Base, Base_Sepolia, Codex, Codex_Testnet, Cronos,
Cronos_Testnet, Edge, Edge_Testnet, Ethereum, Ethereum_Sepolia,
HyperEVM, HyperEVM_Testnet, Injective, Injective_Testnet, Ink,
Ink_Testnet, Linea, Linea_Sepolia, Monad, Monad_Testnet, Morph,
Morph_Testnet, Optimism, Optimism_Sepolia, Pharos, Pharos_Testnet,
Plasma, Plasma_Testnet, Plume, Plume_Testnet, Polygon,
Polygon_Amoy_Testnet, Sei, Sei_Testnet, Solana, Solana_Devnet,
Sonic, Sonic_Testnet, Unichain, Unichain_Sepolia, World_Chain,
World_Chain_Sepolia, X_Layer, X_Layer_Testnet, XDC, XDC_Apothem
BridgeChainIdentifier
Type representing valid bridge chain identifiers. This type constrains chain parameters to only accept chains that support CCTPv2 bridging Accepts:- A BridgeChain enum value (e.g.,
BridgeChain.Ethereum) - A string literal matching a BridgeChain value (e.g.,
'Ethereum') - A ChainDefinition object for a supported chain
BridgeConfig
Configuration options for customizing bridge behavior.BridgeParams
Parameters for initiating a crosschain USDC bridge transfer. This type is used as the primary input to BridgeKit.bridge, allowing users to specify the source and destination adapters, transfer amount, and optional configuration.- The
fromfield specifies the source adapter context (wallet and chain). - The
tofield specifies the destination, supporting both explicit and derived recipient addresses. - The
configfield allows customization of bridge behavior (e.g., transfer speed). - The
tokenfield is optional and defaults to'USDC'. It accepts'USDC', a known CCTPx symbol, or a bytes32 CCTPx token id.
BridgeWarning
A non-fatal advisory surfaced on a BridgeResult or an EstimateResult. Warnings report things the caller should know about that did not fail the operation — for example a requested FAST transfer that was degraded to SLOW. They are additive and optional: providers populate them when relevant and leavewarnings undefined otherwise, so consumers that ignore the field are
unaffected.
The codes are shared across both results, so a check written against one works
against the other. A code is raised only where its condition can arise, so an
estimate reaches a subset of what a bridge does.
CCTPConfig
Configuration for the Cross-Chain Transfer Protocol (CCTP).CCTPMergedConfig
Merged CCTP contract configuration. Used by chains that deploy a single unified CCTP contract. This simplified architecture is used by newer chain integrations.CCTPSplitConfig
Split CCTP contract configuration. Used by chains that deploy separate TokenMessenger and MessageTransmitter contracts. This is the traditional CCTP architecture used by most EVM chains.TransferSpeed
Transfer speed options for crosschain operations. Defines the available speed modes for CCTPv2 transfers, affecting both transfer time and potential fee implications.FAST, SLOW
Swap
AllowanceStrategy
Allowance strategy for token approvals during swap operations. Defines how token allowances should be granted to the swap contract:permit: Use EIP-2612 permit signature (gas-efficient, no approval transaction)approve: Traditional approval transaction
permit with fallback to approve if permit is not
supported.
SwapConfig
Configuration options for swap operations. Controls swap behavior including allowance strategy, slippage tolerance, minimum output amounts, custom fees, and kit identification.SwapDestinationLeg
Destination-leg transaction and token information reported by the service. Present on SwapStatusResult once the service reports destination data. Omitted while the destination leg is still in-flight.SwapProgress
Lifecycle snapshot for a swap. Grouped so progress signals live in one place on both SwapResult and SwapStatusResult.SwapSourceLeg
Source-leg transaction and token information reported by the service. Populated on SwapStatusResult from the service’ssendingTxHash. token is
shape-reserved for future service support (the status endpoint does not report
source-token metadata today) so consumers can rely on a symmetric source /
destination layout.
SwapStatus
All possible status values for a swap tracked by the Stablecoin Service.'PENDING' means the swap is still in-flight. Callers should keep calling
SwapKit.getSwapStatus on 'PENDING' until the status becomes terminal (see
SwapTerminalStatus).
SwapTerminalStatus
Terminal status values for a swap tracked by the Stablecoin Service.'DONE' indicates the swap completed (including any crosschain delivery).
'FAILED' indicates the swap failed after on-chain submission. 'NOT_FOUND'
indicates the service has no record of the transaction.
Unified Balance
FeeAllocation
Per-chain breakdown of a fee amount.FeeEntry
A single fee line item within an estimate.FeeType
Fee category describing the origin of a fee line item.'provider'— Fee charged by the crosschain provider (e.g. protocol fee).'gasFee'— On-chain gas cost denominated in the transfer token (e.g. USDC).'kit'— Fee charged by the kit / developer integration.'forwarder'— Fee charged by Circle’s Forwarding Service for automatic mint.
SupportedToken
SupportedTokenInput
Case-insensitive variant of SupportedToken for user-facing input. Accepts the canonical uppercase form, fully lowercase, and title-case (e.g.'USDC', 'usdc', 'Usdc'). Arbitrary mixed-case input like 'uSdC' is
handled at runtime by the Zod schema and normalizeToken, so exhaustive
compile-time permutations are unnecessary. Avoiding a recursive
CasePermutations type prevents 2^N type-literal explosion as the token list
grows.
UnifiedBalanceChain
Enumeration of blockchains that support Gateway V1 operations (deposit, spend, balance, delegate, removeFund). Derived from the full Blockchain enum but filtered to only include chains with active Gateway V1 contract support. When new chains gain Gateway V1 support, they are added to this enum.Arbitrum, Arbitrum_Sepolia, Arc, Arc_Testnet, Avalanche,
Avalanche_Fuji, Base, Base_Sepolia, Ethereum, Ethereum_Sepolia,
HyperEVM, HyperEVM_Testnet, Optimism, Optimism_Sepolia, Polygon,
Polygon_Amoy_Testnet, Sei, Sei_Testnet, Solana, Solana_Devnet,
Sonic, Sonic_Testnet, Unichain, Unichain_Sepolia, World_Chain,
World_Chain_Sepolia
UnifiedBalanceChainIdentifier
Type representing valid unified-balance chain identifiers. Constrains chain parameters to only accept chains that support Gateway V1 operations. Accepts:- An UnifiedBalanceChain enum value (e.g.,
UnifiedBalanceChain.Ethereum) - A string literal matching an UnifiedBalanceChain value (e.g.,
'Ethereum') - A ChainDefinition object for a supported chain
UnifiedBalanceKitConfig
Configuration options for initializing a UnifiedBalanceKit instance. When no providers are specified, the kit uses the default Gateway v1 provider. Any additional providers supplied via config are appended to the defaults.Onramp
OnrampDepositInfo
Deposit metadata shared byDEPOSIT_SUBMITTED and DEPOSIT_SETTLED.
OnrampDepositNotCompletedCode
Codes the widget is documented to send on aDEPOSIT_NOT_COMPLETED envelope.
Widened to any string — see LiteralUnion.
OnrampDepositNotCompletedEnvelope
The deposit flow ended without a settled deposit.OnrampDepositSettledEnvelope
A previously submitted deposit settled on-chain.OnrampDepositSubmittedEnvelope
The customer submitted a deposit request.OnrampEventEnvelope
Discriminated union of the onramp event envelopes the kit knows about, discriminated onevent.
OnrampInitializationErrorCode
Codes the widget is documented to send on anINITIALIZATION_ERROR envelope.
Widened to any string — see LiteralUnion.
OnrampInitializationErrorEnvelope
The widget reports that it could not start.OnrampInitializationSuccessEnvelope
The widget loaded successfully and the session token was accepted.OnrampSession
One session as returned by the Onramp session endpoint (POST /v1/stablecoinKits/sessions), after the server kit unwraps the
{ data } envelope.
OnrampWidget
Handle returned byonrampKit.mountIframe() and the 'opened' branch of
onrampKit.openWindow().
OnrampWidgetLifecycle
Lifecycle state of an active widget.OnrampWindowBlockedReason
WhyonrampKit.openWindow() could not open a usable popup.
Earn
EarnAssetAmount
Token amount returned by the SDK in human-readable decimal form.EarnBridgeCctpStatus
CCTP attestation status for a crosschain bridge deposit.EarnBridgeHopStatus
Status of one hop (source relay or destination mint) of a crosschain bridge deposit. Thestatus field is an API-defined lifecycle string (e.g. 'COMPLETE',
'NOT_STARTED'). Additive backend fields (chain, domain, relay/tx ids) are
preserved verbatim.
EarnClaimRewardsQuoteInfo
Result of a claim rewards quote operation.EarnCrossChainDepositStatus
Structured status of a crosschain Earn deposit, keyed by execId. The top-levelstatus is the overall API-defined bridge lifecycle string (e.g.
'PENDING', 'ATTESTING', 'COMPLETE'). The nested source, cctp, and
destination objects expose per-hop progress when the API returns them.
EarnGasFeeEstimate
Estimated native gas fee for one transaction in an Earn quote. A discriminated union onfees: a successful estimate carries EarnEstimatedGas
details and no error; a failed estimate carries fees: null and a sanitized
error message.
EarnGasFeeEstimateBase
Fields shared by both EarnGasFeeEstimate variants.EarnVaultInfo
Vault information returned by the SDK. Derived with a distributiveOmit so each opportunity variant keeps its
product-specific fields and the productType discriminant.
Miscellaneous
DepositConfig
Transfer-speed configuration for a deposit operation.DepositProgress
Relay progress for a crosschain (FAST) deposit. Set afterdepositFastCrossChain completes the ~60-second relay wait. Always
present on the FAST path; absent on same-chain STANDARD deposits.
Event Types
Bridge Events
Bridge events are emitted for each provider in the kit. Events for the built-in CCTP provider follow its transaction steps. You can subscribe to each event multiple times with different callbacks. Bridge events are prefixed withbridge. to namespace them within AppKit:
Usage Example