Initiating a Stream

To initiate a stream, use the initStream() method:

const streamName = "MyStream";
const amount = "100";
const tokenAddress = "0x1234567890abcdef..";
const receiver = "0xabcdef1234567890..";
const startTime = 1654320000;
const endTime = 1657008000;
const canCancel = true;
const canPause = true;
const customOverrides = {
  gasLimit: 25000000,
};

const receipt = await zebecClient.initStream(
  streamName,
  amount,
  tokenAddress,
  receiver,
  startTime,
  endTime,
  canCancel,
  canPause,
  customOverrides
);

console.log("Initiate Stream Receipt:", receipt);

Last updated