import type { Account, Address, BaseUnits, ChainContract, ControlFlowOptions, NativeUnits } from '../../../types.js'; import type { Chain } from '../index.js'; import type { FeeValuesEIP1559, Client } from 'viem'; /** * Parameters for the {@link bridge} function. */ export type BridgeParams = { /** The sender's address or account */ from: Address | Account; /** The recipient's address or account. */ to: Address | Account; /** The amount to be transferred */ amount: BaseUnits | NativeUnits; /** The address of the token. Must be on the same chain as `from`. */ token: Address | ChainContract; /** The gas limit for the transaction. */ gas?: bigint; /** The fee values for the transaction. */ fees?: FeeValuesEIP1559; /** The blockchain network on which the transaction will be executed. */ chain?: Chain; }; /** * Transfers tokens via CCTP. * * @param client - The client instance to use for the operation. * @returns Returns the attestation of the transaction hash. * * @example * Transfer tokens from one account to another using CCTP. * ```typescript * const [ account_1 ] = await client.getAccounts({ address: '0x123', chain: ETH_SEPOLIA }) * const [ account_2 ] = await client.getAccounts({ address: '0x321', chain: MATIC_AMOY }) * * await client.bridge({ * from: account_1, * to: account_2, * amount: 1n, * token: ETH_SEPOLIA.contracts.USDC, * }) * ``` */ export declare function bridge(client: Client, params: BridgeParams & ControlFlowOptions & { /** Includes the approve() step in the transaction. */ withApprove?: boolean; }): Promise<`0x${string}`>;