pub fn create(
ctx: Context<'_, '_, '_, '_, Create<'_>>,
start_time: u64,
net_amount_deposited: u64,
period: u64,
amount_per_period: u64,
cliff: u64,
cliff_amount: u64,
cancelable_by_sender: bool,
cancelable_by_recipient: bool,
automatic_withdrawal: bool,
transferable_by_sender: bool,
transferable_by_recipient: bool,
can_topup: bool,
stream_name: [u8; 64],
withdraw_frequency: u64,
pausable: Option<bool>,
can_update_rate: Option<bool>,
) -> Result<()>Expand description
Create a Stream
ยงArguments
ctx- Accounts that will be used on Stream creationstart_time- Unix Timestamp for Stream start, can be 0 to use current timenet_amount_deposited- Amount of Tokens to deposit to the Streamperiod- Unlock Period in Seconds, tokens will be unlocked everyperiodsecondsamount_per_period- Unlock Amount, everyperiodwe unlockamount_per_periodtokenscliff- Unix Timestamp of Cliff (first unlock), can be 0 to use current time or not use at allcliff_amount- Cliff Amount of tokens, can 0 to not use Cliff at allcancelable_by_sender- Whether Stream can by cancelled by Sendercancelable_by_recipient- Whether Stream can be cancelled by Recipientautomatic_withdrawal- Whether automatic withdrawals are enabledtransferable_by_sender- Whether Stream can be transferred by Sendertransferable_by_recipient- Whether Stream can be transferred by Recipientcan_topup- Whether Stream can be topped up (deposit additional tokens) by Senderstream_name- Name of the Streamwithdraw_frequency- ifautomatic_withdrawalis on, everywithdraw_frequencyseconds all unlocked tokens will be sent to the recipientpausable- Whether Stream can be paused by Sendercan_update_rate- Whether Sender can updateamount_per_periodvalue of the Stream viaupdatemethod