Usage
quote(input)
What the withdrawal costs this user, from Chipi: { feeBps, sponsored, userReceives }. sponsored says whether Chipi pays Circle’s fee back to the recipient on the destination chain.
chain(CctpEvmChain),amount(string | number),walletAddress(string: the Chipi wallet),getBearerToken.
withdrawAsync(input)
- The signer, as
useCallAnyContract:wallet(WalletData), and eitherusePasskey: truewithexternalUserId(and optionallycredentialId) or anencryptKey. chain(CctpEvmChain): the destination chain, fromCCTP_EVM_CHAINS.recipient(string): the destination EVM address. Checked before signing: 40 hex digits, not the zero address, and a correct EIP-55 checksum when it carries mixed case.amount(string | number): human USDC.getBearerToken(() => Promise<string | null | undefined>): asked at every step.onStatus(optional):({ step, eta, burnTxHash?, destTxHash? }) => void. Steps:quoting,burning,attesting,recording,finalizing,done.
maxFee is the quoted fee, so Circle attests fast; Circle only takes the real fee.
Resolves with { burnTxHash, destTxHash, recipient, quote }.
Errors
ACrossChainWithdrawError means the Starknet burn is done and the delivery did not finish. It carries burnTxHash: call finalizeCrossChainWithdrawal again (the relayer is idempotent). Any other error happened before signing.
