Usage
quote(input)
Both speeds for an amount, before anything is signed. Returns Promise<Record<CctpFinality, CctpQuote>>.
chain(CctpEvmChain): the source chain, fromCCTP_EVM_CHAINS.amount(string | number): human USDC, e.g."25".
CctpQuote has feeBps, fee and feeUsdc (Circle’s fee, taken from the amount), receives and receivesUsdc, and eta ({ minSeconds, maxSeconds }, the attestation time; formatCctpEta(eta) turns it into copy).
depositAsync(input)
provider(Eip1193Provider): the user’s EVM wallet, e.g.(await discoverEvmWallets())[0].provider.chain(CctpEvmChain): the source chain.amount(string | number): human USDC.walletAddress(string): the Chipi wallet that receives the USDC. It is the only possible recipient and is checked before signing.finality("standard"|"fast", optional):standard(default) is free and waits for the source chain’s finality (15–20 minutes from an L2);fastcosts Circle’s fee and takes about a minute.getBearerToken(() => Promise<string | null | undefined>): called at every step, since tokens expire during the wait.onStatus(optional):({ step, eta, burnTxHash?, mintTxHash? }) => void. Steps:quoting,switching-chain,approving,burning,registering,attesting,minting,recording,done.account(optional): the EVM account to burn from; defaults to the wallet’s first account.pollIntervalMs(optional, default 15000) andtimeoutMs(optional, default 45 minutes): how the hook follows the mint. On timeout it resolves withmintTxHash: null; the deposit still completes server-side.
{ burnTxHash, sourceDomain, mintTxHash, account, batched, quote, startedAt }.
Errors
ACrossChainDepositError means the burn already happened on the source chain and a later step failed. It carries burnTxHash and sourceDomain: register again with registerCctpDeposit, or follow the deposit with useCctpDepositStatus. Any other error happened before signing; nothing moved.
Return Value
quote: the quote function abovedeposit: fire-and-forget depositdepositAsync: Promise-based depositdata: the last resultisLoading,isError,error,isSuccess,reset: mutation state
