Optional
cluster: IClusterOptional
commitment: Commitment | ConnectionConfigOptional
programId: stringOptional
sendRate: numberOptional
sendThrottler: PQueueCreate Stream instance with options
Builds transaction instructions for creating multiple stream/vesting contracts without creating transactions. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
Stream base parameters and array of recipients with individual amounts and settings
Transaction configuration including sender public key, native token handling, and custom instructions
Create multiple transaction instructions
Builds multiple transactions for creating stream/vesting contracts without signing or executing them. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
IMPORTANT: When using native SOL (isNative: true), you MUST execute the prepareTx FIRST and wait for confirmation before executing the stream creation transactions. Otherwise, stream creation will fail with "InvalidAccountData".
Stream base parameters and array of recipients with individual amounts and settings
Transaction configuration including sender public key, native token handling, and custom instructions
Multiple transaction information
const result = await streamClient.buildCreateMultipleTransactions(data, { isNative: true, senderPublicKey });
// CRITICAL: Execute prepareTx first if it exists
if (result.prepareTx) {
await connection.sendAndConfirmTransaction(result.prepareTx, [signer]);
}
// Only then execute stream creation transactions
for (const item of result.transactions) {
await connection.sendAndConfirmTransaction(item.tx, [signer]);
}
Builds a transaction for creating a new stream/vesting contract without signing or executing it. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
For native SOL (isNative: true), SOL wrapping instructions are automatically included in the correct order (before stream creation) to ensure the WSOL account exists when the stream creation instruction executes.
Stream parameters including recipient, token, amount, schedule, and permissions
Transaction configuration including sender public key, native token handling, and custom instructions
Transaction and metadata information
Builds transaction instructions for creating a new stream/vesting contract without creating a transaction. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
For native SOL (isNative: true), SOL wrapping instructions are automatically included in the correct order (before stream creation) to ensure the WSOL account exists when the stream creation instruction executes.
Stream parameters including recipient, token, amount, schedule, and permissions
Transaction configuration including sender public key, native token handling, and custom instructions
Transaction instructions and metadata ID
Attempts canceling the specified stream.
Cancellation parameters including stream ID
Transaction configuration including invoker wallet, token account validation, and compute settings
Transaction result
Creates a new stream/vesting contract. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
Stream parameters including recipient, token, amount, schedule, and permissions
Transaction configuration including sender wallet, native token handling, and compute settings
Create result
Creates multiple stream/vesting contracts. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
Stream base parameters and array of recipients with individual amounts and settings
Transaction configuration including sender wallet, metadata keys, and compute settings
Multiple transaction information
Creates multiple stream/vesting contracts, and send all transactions sequentially. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee). In most cases, createMultiple should be used instead.
Stream base parameters and array of recipients with individual amounts and settings
Transaction configuration including sender wallet, metadata keys, and compute settings
Multiple transaction information
Creates a new stream/vesting contract using unchecked instruction.
Unchecked instruction differs from the regular in:
If you are not sure if you should use create or create_unchecked, go for create to be safer.
Stream parameters including recipient, token, amount, schedule, and permissions
Transaction configuration including sender wallet, metadata keys, and compute settings
Create result
Extracts error code from an error
Error
Error code
Fetch streams/contracts by providing direction. Streams are sorted by start time in ascending order.
Query parameters including address, stream type filter, and direction filter
Record of stream data
Gets default streamflow fee
Default streamflow fee
Gets fees for a given address
Query parameters containing the partner address to check for custom fees
Fees
Fetch stream data by its id (address).
Query parameters containing the stream ID to fetch
Stream data
Returns total fee percent, streamflow fees + partner fees
structure with address for which we need to derive fee, either sender or partner usually
Optional
chainSpecificParams: anyadditional parameters required by chain client
fee as floating number, so if fee is 0.99%, it will return 0.99
Creates Transaction Instructions for cancel
Cancellation parameters including stream ID
Transaction configuration including invoker wallet, token account validation, and compute settings
Transaction instructions
Creates Transaction Instructions for cancel
Cancellation parameters including stream ID
Transaction configuration including invoker wallet, token account validation, and compute settings
Transaction instructions
Creates Transaction Instructions for cancel
Cancellation parameters including stream ID
Transaction configuration including invoker wallet, token account validation, and compute settings
Transaction instructions
Creates a new stream/vesting contract. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
Stream parameters including recipient, token, amount, schedule, and permissions
Transaction configuration including sender wallet, metadata keys, and compute settings
Create stream instructions
Create Transaction instructions for createUnchecked
Create Transaction instructions for topup
Top-up parameters including stream ID and amount to add
Transaction configuration including invoker wallet, native token handling, and compute settings
Transaction instructions
Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract). Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator.
Transfer parameters including stream ID and new recipient address
Transaction configuration including invoker wallet and compute settings
Transaction instructions
Create Transaction instructions for update
Update parameters including stream ID and new settings
Transaction configuration including invoker wallet and compute settings
Transaction instructions
Creates Transaction Instructions for withdrawal
Withdrawal parameters including stream ID and amount to withdraw
Transaction configuration including invoker wallet, token account validation, and compute settings
Transaction instructions
Searches for streams/contracts by providing filters.
Search by mint, sender, recipient or closed status
Record of stream data
Tops up stream account with specified amount.
Top-up parameters including stream ID and amount to add
Transaction configuration including invoker wallet, native token handling, and compute settings
Transaction result
Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract). Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator.
Transfer parameters including stream ID and new recipient address
Transaction configuration including invoker wallet and compute settings
Transaction result
Attempts updating the stream auto withdrawal params and amount per period
Update parameters including stream ID and new settings
Transaction configuration including invoker wallet and compute settings
Transaction result
Attempts withdrawing from the specified stream.
Withdrawal parameters including stream ID and amount to withdraw
Transaction configuration including invoker wallet, token account validation, and compute settings
Transaction result
Create Stream instance with flat arguments