UNPKG

dvf-client-js

Version:

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

17 lines (15 loc) 508 B
module.exports = async (dvf, path, token, amount) => { const tokenInfo = dvf.token.getTokenInfoOrThrow(token) const quantizedAmount = dvf.token.toQuantizedAmount(token, amount) const tempVaultId = dvf.config.DVF.tempStarkVaultId let starkVaultId = tokenInfo.starkVaultId const starkWithdrawal = await dvf.stark.ledger.createSignedTransfer( path, tokenInfo, quantizedAmount, starkVaultId, tempVaultId ) starkWithdrawal.starkVaultId = starkVaultId return starkWithdrawal }