CrestFi
  • 🫐CrestFi
  • 🚀Getting Started
    • ☃️How to get started?
    • 🤑Benefits of Using CrestFi
    • 💵Deposit
    • ⏳Start Streaming
    • 💰Withdraw Funds
  • 🔒Safe
    • 🗝️Create Safe
    • 💵Deposit in Safe
    • 💸Sending a Transaction
    • ⚧Signing a Transaction
  • CrestFi Evm
    • 📦CrestFi Evm Sdk
      • CrestFi Stream Client
        • Creating Clients
        • Whitelisting Tokens
        • Deposit into Crest Wallet
        • Withdraw from Crest Wallet
        • Initiating a Stream
        • Pause/Resume/Cancel Stream
        • Updating a Stream
        • Withdraw Streamed Tokens
        • Getting Stream Details
      • CrestFi Bulk Client
        • Bulk Instant Transfer
      • CrestFi Multisig Stream
        • NFT
Powered by GitBook
On this page
Export as PDF
  1. CrestFi Evm
  2. CrestFi Evm Sdk
  3. CrestFi Stream Client

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 crestfiClient.initStream(
  streamName,
  amount,
  tokenAddress,
  receiver,
  startTime,
  endTime,
  canCancel,
  canPause,
  customOverrides
);

console.log("Initiate Stream Receipt:", receipt);
PreviousWithdraw from Crest WalletNextPause/Resume/Cancel Stream

Last updated 4 months ago

📦