Withdraw Stream

https://www.npmjs.com/package/calamus-sdk

Withdraw Stream

/**
 * Withdraw Stream.
 *
 * @param streamID (string): ID of stream
 * @param amount (string): amount of token user want to withdraw
 * @param withdrawAll (boolean): withdraw all amount or not
 *
 * @return Promise<{
 *  stream_id: id of stream, 
 *  trx_hash: hash of transaction
 * }>
 */
CalamusInstance.withdrawCalamusStream("2", "10", false)
    .then(result => console.log('Result: ', result)).catch(error => console.log('Error: ', error));

or use async await function

const result = await CalamusInstance.withdrawCalamusStream("2", "10", false)

Last updated