Link.prepareWithdrawal (Legacy version)

As of version 2.0.25 of the @imtbl/imx-link-sdk, the response for the Link function prepareWithdrawal has been updated to return the following information:

{
    withdrawalId: number // The ID of the specific withdrawal
}

The response can be obtained by saving the results of the Promise returned by prepareWithdrawal:

const response = await link.prepareWithdrawal({
    type: ETHTokenType.ETH,
  amount: '0.001' //The amount of the token to withdraw
})

 console.log(response)
 // returns { withdrawalId: 123456 }

Did this page help you?