> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chipipay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# v14.18.0: fund a Chipi wallet from any chain

> What v14.18.0 adds: cross-chain USDC through Circle's CCTP V2, from Base and other EVM chains into a Chipi wallet and back, with one hook each, real fees and ETAs, and the recipient always checked.

> [!NOTE]
>
> v14.18.0 lets a user bring native USDC from **Base** (and Arbitrum, Optimism, Polygon or Ethereum) into their Chipi wallet, and send it back out, through Circle's Cross-Chain Transfer Protocol. One hook each, the Starknet mint paid by Chipi, and every step reporting how long it usually takes. Everything is additive: 14.17.x code keeps working unchanged.

## TL;DR: does this affect me?

| Your setup | Action |
| - | - |
| You don't move USDC across chains | **None.** No existing call changed. |
| Your users hold USDC on Base and you want it in their Chipi wallet | Add `useCrossChainDeposit`: see [Cross-chain USDC](https://docs.chipipay.com/sdk/guides/cross-chain-usdc.md). |
| Your users want to withdraw to an EVM address | Add `useCrossChainWithdraw`. Chipi's relayer delivers on the destination; `quote` tells you whether Chipi pays Circle's fee back for this user. |
| You run deposits from a server | `ChipiSDK.registerCctpDeposit`, `getCctpDepositStatus`, `recordCrossChainDeposit` and the three withdrawal methods take the secret key. |
| You need Solana, Expo or Python | Not in this release; see below. |

## Deposits (`useCrossChainDeposit`, `useCctpDepositStatus`)

1. `quote({ chain, amount })` returns both speeds: **standard** (free; about 15–20 minutes from an L2, since Circle waits for Ethereum finality) and **fast** (Circle's fee, 1.3 bps from Base; about a minute). The user picks.
2. `depositAsync` burns through the user's EVM wallet (any EIP-1193 provider; one prompt when the wallet batches with EIP-5792, two otherwise), registers the burn with Chipi the moment its hash exists, waits for Chipi to mint on Starknet, and records the deposit in the wallet's history.
3. `onStatus` reports each step with its usual duration (`formatCctpEta`), so the UI shows "attesting, 15 to 20 minutes" instead of a spinner.

The recipient is always the Chipi wallet, and `assertMintRecipient` decodes the encoded recipient back and compares it before anything is signed: a wrong recipient is the only way to lose a deposit, and it can't happen here. Once the burn is registered, the deposit completes even if the page closes: Chipi's delivery mints from its own account. `useCctpDepositStatus(burnTxHash)` resumes it on any device.

## Withdrawals (`useCrossChainWithdraw`)

Quote from Chipi (Circle's fast fee out of Starknet is 12 bps; `sponsored` says whether Chipi pays it back to the recipient), burn on Starknet with the wallet's own signer (passkey or `encryptKey`), wait for the burn, record it, and have Chipi's relayer run `receiveMessage` on the destination chain. Always fast finality: a standard transfer out of Starknet waits hours for the L1 proof. The destination address is checked (hex, non-zero, EIP-55 when mixed case) before signing.

## Building blocks (`@chipi-stack/backend`)

* `CCTP_EVM_CHAINS`, `cctpEvmChainByKey`, `CCTP_STARKNET`: addresses with their sources, each checked on-chain. `verified: true` marks Base, where Chipi has run real transfers.
* `cctpQuote`, `cctpRoute`, `cctpAttestationEta`, `cctpStepEta`, `formatCctpEta`: Circle's live fee API and attestation times per source chain and finality.
* `depositFromEvm`, `discoverEvmWallets`: the EIP-1193 deposit, with the chain switched and checked, balance and allowance read, batch or approve + burn, and the receipt checked.
* `buildCctpWithdrawToEvmCalls`, `buildCctpWithdrawCalls`, `cctpMaxFee`, `buildCctpReceiveMessageCall`: the Starknet calls.
* `starknetAddressToMintRecipient`, `assertMintRecipient`, `evmAddressToMintRecipient`, `assertEvmAddress`, `parseUsdc`, `formatUsdc`.
* `decodeCctpMessage`, `isCctpMessageExpired`: Circle's attested message, field by field (a fast attestation expires about 24 hours after signing; Chipi re-attests it, nothing is lost).

```ts theme={null}
import { CCTP_EVM_CHAINS, cctpQuote, formatCctpEta } from "@chipi-stack/backend";

const base = CCTP_EVM_CHAINS.find((c) => c.key === "base")!;
const quotes = await cctpQuote({ sourceDomain: base.domain, destinationDomain: 25, amount: "25" });
console.log(`free in ${formatCctpEta(quotes.standard.eta)}, or ${quotes.fast.feeUsdc} USDC in ${formatCctpEta(quotes.fast.eta)}`);
```

## Server (`ChipiSDK`)

`registerCctpDeposit`, `getCctpDepositStatus`, `recordCrossChainDeposit`, `quoteCrossChainWithdrawal`, `recordCrossChainWithdrawal`, `finalizeCrossChainWithdrawal`. Chipi reads a withdrawal's amount, destination and recipient from the burn's own `DepositForBurn` event, so the values a client records only need to agree with the chain. `finalize` answers 409 while the burn isn't confirmed on Starknet yet; retry it.

## Not in this release

* **Solana** deposits and withdrawals: coming as an optional entry point, so apps that don't need them don't load `@solana/web3.js`.
* **Expo**: `depositFromEvm` needs a browser EIP-1193 provider.
* **Python SDK**: no cross-chain methods yet.
* Arbitrum, Optimism, Polygon and Ethereum are wired and listed but not yet exercised end to end by Chipi.

## Related

* [Cross-chain USDC](https://docs.chipipay.com/sdk/guides/cross-chain-usdc.md)
* [useCrossChainDeposit](https://docs.chipipay.com/sdk/nextjs/hooks/use-cross-chain-deposit.md), [useCctpDepositStatus](https://docs.chipipay.com/sdk/nextjs/hooks/use-cctp-deposit-status.md), [useCrossChainWithdraw](https://docs.chipipay.com/sdk/nextjs/hooks/use-cross-chain-withdraw.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.