Prerequisites
Before you begin, ensure that you’ve: These are required so any example below runs with a validkit and adapter.
Use with adapters on both chains
SetuseForwarder: true when you have adapters for both chains but want the
Forwarding Service to submit the mint transaction on the destination:
TypeScript
Use without a destination adapter
When you don’t have access to a wallet on the destination chain, such as with server-side or custodial bridge flows, omit the destination adapter and passrecipientAddress with useForwarder: true:
TypeScript
data field is undefined.
Forwarding fee
The Forwarding Service charges a fee that is deducted from the amount minted on the destination chain by default. When you pay fees on the source chain (config.feePayment: "source"), that fee is collected upfront in source-chain
USDC instead, and the recipient receives the exact bridge amount. When you
estimate costs for a bridge
transfer, the result includes the forwarding fee. See
How bridge fees work for details.
Solana destinations
For Solana destinations, the forwarding fee also covers creating the recipient’s USDC associated token account (ATA). When you forward a transfer to Solana, setconfig.maxFee to the forwarder
fee that estimate() returns, or
leave maxFee unset. When maxFee is unset, the SDK checks that the bridge
amount covers the forwarding fee. If it doesn’t, the SDK throws an
INPUT_INVALID_AMOUNT error before it sends any transaction.