#[repr(C)]pub struct TokenStreamData {Show 13 fields
pub magic: u64,
pub created_at: u64,
pub withdrawn_amount: u64,
pub canceled_at: u64,
pub cancellable_at: u64,
pub last_withdrawn_at: u64,
pub sender: Pubkey,
pub sender_tokens: Pubkey,
pub recipient: Pubkey,
pub recipient_tokens: Pubkey,
pub mint: Pubkey,
pub escrow_tokens: Pubkey,
pub ix: StreamInstruction,
}Expand description
TokenStreamData is the struct containing metadata for an SPL token stream.
Fields§
§magic: u64Magic bytes
created_at: u64Timestamp when stream was created
withdrawn_amount: u64Amount of funds withdrawn
canceled_at: u64Timestamp when stream was canceled (if canceled)
cancellable_at: u64Timestamp at which stream can be safely canceled by a 3rd party (Stream is either fully vested or there isn’t enough capital to keep it active)
last_withdrawn_at: u64Timestamp of the last withdrawal
sender: PubkeyPubkey of the stream initializer
sender_tokens: PubkeyPubkey of the stream initializer’s token account
recipient: PubkeyPubkey of the stream recipient
recipient_tokens: PubkeyPubkey of the stream recipient’s token account
mint: PubkeyPubkey of the token mint
escrow_tokens: PubkeyPubkey of the account holding the locked tokens
ix: StreamInstructionThe stream instruction
Implementations§
Source§impl TokenStreamData
impl TokenStreamData
Sourcepub fn new(
created_at: u64,
sender: Pubkey,
sender_tokens: Pubkey,
recipient: Pubkey,
recipient_tokens: Pubkey,
mint: Pubkey,
escrow_tokens: Pubkey,
start_time: u64,
end_time: u64,
total_amount: u64,
period: u64,
cliff: u64,
cliff_amount: u64,
) -> Self
pub fn new( created_at: u64, sender: Pubkey, sender_tokens: Pubkey, recipient: Pubkey, recipient_tokens: Pubkey, mint: Pubkey, escrow_tokens: Pubkey, start_time: u64, end_time: u64, total_amount: u64, period: u64, cliff: u64, cliff_amount: u64, ) -> Self
Initialize a new TokenStreamData struct.
Trait Implementations§
Source§impl BorshDeserialize for TokenStreamData
impl BorshDeserialize for TokenStreamData
Source§impl BorshSerialize for TokenStreamData
impl BorshSerialize for TokenStreamData
Source§impl Debug for TokenStreamData
impl Debug for TokenStreamData
Source§impl Default for TokenStreamData
impl Default for TokenStreamData
Source§fn default() -> TokenStreamData
fn default() -> TokenStreamData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TokenStreamData
impl RefUnwindSafe for TokenStreamData
impl Send for TokenStreamData
impl Sync for TokenStreamData
impl Unpin for TokenStreamData
impl UnwindSafe for TokenStreamData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more