pub struct OrderIntent {
pub owner: Pubkey,
pub buy_token_account: Pubkey,
pub sell_token_account: Pubkey,
pub sell_amount: u64,
pub buy_amount: u64,
pub valid_to: u32,
pub kind: OrderKind,
pub partially_fillable: bool,
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 both the recipient and the buy token, since SPL token accounts are token-specific.
sell_token_account: PubkeyToken account the sell-side funds are pulled from. Implicitly
encodes both the spender and the sell token. 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_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.
kind: OrderKindWhether sell_amount or buy_amount is the exact figure; the
other side is treated as the limit (minimum to receive for Sell,
maximum to spend for Buy).
partially_fillable: boolIf true, the order may be filled across multiple settlements;
proceeds and consumption scale proportionally with the amount of
the sell side that’s been used. If false, a single settlement
must consume the full sell amount (fill-or-kill).
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