Skip to main content
The getDepositAddress function generates a smart account address that facilitates user operations. In this section, we’ll explore how to use this function to seamlessly bridge funds across chains.

Expected parameters

getDepositAddress accepts the following parameters:
ParameterTypeDescription
destinationChainIdstring Destination chain id
destinationTokenAddressstring Address of the final token on the destination chain
toAmountBigIntDesired amount on destination chain
destinationRecipientstringTarget contract address on destination chain
transferType”onramp” | “cex” | “wallet”Specifies the type of the transfer
routeTypestringDefault route is Value. The type of route to be preferred. It can be Value,Fee and Time
provider (optional)“moonpay” | “mesh-connect” | “kado”Specifies the provider used for execution
fromChainId (optional)numberSource chain id
fromTokenAddress (optional)stringAddress of initial token on source chain
fromAddress (optional)stringAddress of the sender on the source chain
fromAmount (optional)BigIntAmount of the initial token on the source chain
slippage (optional)string
transferOut (optional)any[]
targetCalldata(optional)stringEncoded calldata for execution on the destination chain
gasLimit (optional)stringCustom gas limit
userOpHash (optional)string
userOperations (optional)string

Function call

The getDepositAddress function generates an address based on the provided payload, which must then be funded and submitted on-chain.
Using onramp

Response

The response from the getDepositAddress is:
For more comprehensive implementation, refer cookbook example.

Support

If you face any trouble, feel free to reach out to our engineers in the Telegram support group.