Get Single Stream By ID

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

Get Single Stream By ID

/**
 * Get Calamus Streams.
 *
 * @param streamID (string): id of stream
 *
 * @return Promise<{
 *  cancelPrivilege (number): who can cancel this stream, 0: "Only Recipient",1: "Only Sender",2: "Both",3: "Neither",
 *  chain (string): chain's name,
 *  contractTitle (string): title of contract 
 *  emailAddress (string): email address of recipient
 *  initialRelease (string): number of initial token recipient will get when withdraw
 *  isVesting (boolean): false
 *  originStatus (number): original status of stream, 1: "Not Started", 2: "Cancelled", 3: "Completed", 4: "Processing"
 *  status (number): current status of stream, 1: "Not Started", 2: "Cancelled", 3: "Completed", 4: "Processing"
 *  ratePerTime (string): number token stream in one unit time,
 *  recipient (string): wallet address of recipient
 *  sender (string): wallet address of sender
 *  releaseAmount (string): number of total token in stream
 *  releaseFrequency (number): number of time between each release (releaseFrequencyType)
 *  releaseFrequencyType (number): unit of releaseFrequency, 1: second, 2: minute, 3: hour, 4: day, 5: week, 6: month, 7: year
 *  releaseRate (string): token / one unit time
 *  startTime (number): time stream start
 *  stopTime (number): time stream end
 *  streamId (number): id of stream
 *  tokenAbbr (string): abbreviation for token 
 *  tokenDecimal (number): decimal of token
 *  tokenId (string): address of token
 *  tokenLogo (string): Logo of token (URL)
 *  transferPrivilege (number): who can transfer this stream, 0: "Only Recipient",1: "Only Sender",2: "Both",3: "Neither"
 *  trxHash (string): hash of transaction
 *  type (string): type of stream in list (Icoming/Outgoing)
 *  withdrawAmount (string): number of token recipient have withdrawn
 * }>
 */
CalamusInstance.getCalamusStreamByID("24")
    .then(result => console.log('Result: ', result)).catch(error => console.log('Error: ', error));

or use async await function

const stream = await CalamusInstance.getCalamusStreamByID("24")

Last updated