#[repr(C)]
pub struct Contract {
Show 26 fields pub magic: u64, pub version: u8, pub created_at: u64, pub amount_withdrawn: u64, pub canceled_at: u64, pub end_time: 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 streamflow_treasury: Pubkey, pub streamflow_treasury_tokens: Pubkey, pub streamflow_fee_total: u64, pub streamflow_fee_withdrawn: u64, pub streamflow_fee_percent: f32, pub partner: Pubkey, pub partner_tokens: Pubkey, pub partner_fee_total: u64, pub partner_fee_withdrawn: u64, pub partner_fee_percent: f32, pub ix: CreateParams, pub ix_padding: Vec<u8>, pub closed: bool,
}
Expand description

The struct containing metadata for an SPL token stream

Fields

magic: u64

Magic bytes

version: u8

Version of the program

created_at: u64

Timestamp when stream was created

amount_withdrawn: u64

Amount of funds withdrawn

canceled_at: u64

Timestamp when stream was canceled (if canceled)

end_time: u64

Timestamp 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: u64

Timestamp of the last withdrawal

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

Escrow account holding the locked tokens for recipient

streamflow_treasury: Pubkey

Streamflow treasury authority

streamflow_treasury_tokens: Pubkey

Escrow account holding the locked tokens for Streamflow (fee account)

streamflow_fee_total: u64

The total fee amount for streamflow

streamflow_fee_withdrawn: u64

The withdrawn fee amount for streamflow

streamflow_fee_percent: f32

Fee percentage for Streamflow

partner: Pubkey

Streamflow partner authority

partner_tokens: Pubkey

Escrow account holding the locked tokens for Streamflow partner (fee account)

partner_fee_total: u64

The total fee amount for the partner

partner_fee_withdrawn: u64

The withdrawn fee amount for the partner

partner_fee_percent: f32

Fee percentage for partner

ix: CreateParams

The stream instruction

ix_padding: Vec<u8>

Padding for ix: CreateParams to allow for future upgrades.

closed: bool

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.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.