Struct streamflow_timelock::state::TokenStreamData[][src]

#[repr(C)]
pub struct TokenStreamData { pub magic: u64, pub ix: StreamInstruction, pub created_at: u64, pub withdrawn: u64, pub cancel_time: u64, pub sender: Pubkey, pub sender_tokens: Pubkey, pub recipient: Pubkey, pub recipient_tokens: Pubkey, pub mint: Pubkey, pub escrow_tokens: Pubkey, }
Expand description

TokenStreamData is the struct containing metadata for an SPL token stream.

Fields

magic: u64

Magic bytes

ix: StreamInstruction

The stream instruction

created_at: u64

Timestamp when stream was created

withdrawn: u64

Amount of funds withdrawn

cancel_time: u64

Timestamp at which stream can be safely cancelled by a 3rd party (Stream is either fully vested or there isn’t enough capital to keep it active)

sender: Pubkey

Pubkey of the stream initializer

sender_tokens: Pubkey

Pubkey of the stream initializer’s token account

recipient: Pubkey

Pubkey of the stream recipient

recipient_tokens: Pubkey

Pubkey of the stream recipient’s token account

mint: Pubkey

Pubkey of the token mint

escrow_tokens: Pubkey

Pubkey of the account holding the locked tokens

Implementations

Initialize a new TokenStreamData struct.

Calculate amount available for withdrawal with given timestamp.

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Serialize this instance into a vector of bytes.

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.