@zetachain/toolkit / withdraw
Function: withdraw()
withdraw(
this
,options
):Promise
<any
>
Initiates a withdraw transaction of a ZRC-20 token from ZetaChain to a connected chain as a native gas or ERC-20 token.
Parameters
• this: ZetaChainClient
ZetaChainClient instance.
• options
Withdrawal options.
• options.amount: string
Amount to be withdrawn in human readable form.
• options.recipient: string
Recipient address for the withdrawal. If not provided, the withdrawal is made to the signer's address.
• options.zrc20: string
ZRC-20 token contract address.
Returns
Promise
<any
>
A promise that resolves with the transaction details upon success.