Skip to content
Burns a user’s channel-side token balance on the Withdraw Program to signal a pending withdrawal; an operator must subsequently call ReleaseFunds on the Escrow Program to complete settlement.

​Accounts

AccountWritableSignerDescription
user✓Token owner initiating the withdrawal
mint✓SPL token mint (burned against)
token_account✓User’s channel-side token account (source)
token_programSPL Token Program
associated_token_programAssociated Token Program

​Parameters

ParameterTypeDescription
amountu64Amount of tokens to withdraw, in the token’s smallest unit
destinationOption<Pubkey>Target wallet on Mainnet; if None, defaults to the signer’s wallet

​Returns

Returns a TransactionBuilder that can be used to build and send the transaction.

​Example

​Important Notes

  • This instruction is on the Withdraw Program (J231K9UEpS4y4KAPwGc4gsMNCjKFRMYcQBcjVW7vBhVi devnet), not the Escrow Program
  • Burning tokens on the channel side does not automatically release funds on Mainnet; an operator must subsequently call ReleaseFunds on the Escrow Program with a valid SMT exclusion proof
  • ZeroAmount error is thrown if amount is 0
  • If destination is None, the operator’s ReleaseFunds call will release funds to the signer’s wallet
For the full error code reference for both programs, see Instructions -> Error Codes.