pub struct OrderIntent {
pub owner: Pubkey,
pub buy_token_account: Pubkey,
pub buy_mint: Pubkey,
pub sell_token_account: Pubkey,
pub sell_mint: Pubkey,
pub sell_amount: u64,
pub buy_amount: u64,
pub valid_to: u32,
pub flags: Flags,
pub app_data: [u8; 32],
}Fields§
§owner: PubkeyAccount authorized to create and invalidate this order and whose signature authenticates it. For off-chain orders this is the Ed25519 signer; for on-chain creation it must be the transaction signer.
buy_token_account: PubkeyToken account that receives the buy-side proceeds. Implicitly encodes the recipient.
buy_mint: PubkeyMint of the buy token.
sell_token_account: PubkeyToken account the sell-side funds are pulled from. Implicitly
encodes the spender. The settlement state PDA must hold the SPL
delegate on this account for the order to be settleable.
This token account must be owned by the intent owner. An intent
that doesn’t satisfy this property will be rejected.
sell_mint: PubkeyMint of the sell token.
sell_amount: u64Amount of the sell token. For Sell orders this is the exact
amount to be sold (subject to partially_fillable); for Buy
orders it is the maximum the user is willing to spend.
buy_amount: u64Amount of the buy token. For Buy orders this is the exact amount
to be received (subject to partially_fillable); for Sell
orders it is the minimum the user is willing to receive.
valid_to: u32Unix timestamp after which the order expires. The order cannot be executed after expiration.
flags: FlagsThe settings the encoding packs bit by bit into a single byte; see
Flags.
app_data: [u8; 32]Opaque 32 bytes set by the order creator. Not interpreted by the settlement program; used off-chain for metadata such as the frontend version, slippage hints, or attribution.
Implementations§
Trait Implementations§
Source§impl Clone for OrderIntent
impl Clone for OrderIntent
Source§fn clone(&self) -> OrderIntent
fn clone(&self) -> OrderIntent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more