UNPKG

dvf-client-js

Version:

<img src="https://avatars1.githubusercontent.com/u/56512535?s=200&v=4" align="right" />

26 lines (19 loc) 531 B
let withdrawalId const withdrawals = await dvf.getWithdrawals() if (withdrawals.length == 0) { console.log('creating a new withdrawal') const token = 'ETH' const amount = 0.1 const withdrawalResponse = await dvf.withdraw( token, amount, starkPrivKey ) console.log('withdrawalResponse', withdrawalResponse) withdrawalId = withdrawalResponse._id } else { withdrawalId = withdrawals[0]._id } const getWithdrawalResponse = await dvf.getWithdrawal(withdrawalId) logExampleResult(getWithdrawalResponse)