pub struct CreateOrder {Show 16 fields
pub program: StoreProgram,
pub payer: StringPubkey,
pub receiver: Option<StringPubkey>,
pub nonce: Option<NonceBytes>,
pub execution_lamports: u64,
pub kind: CreateOrderKind,
pub collateral_or_swap_out_token: StringPubkey,
pub params: CreateOrderParams,
pub pay_token: Option<StringPubkey>,
pub pay_token_account: Option<StringPubkey>,
pub receive_token: Option<StringPubkey>,
pub swap_path: Vec<StringPubkey>,
pub unwrap_native_on_receive: bool,
pub callback: Option<Callback>,
pub skip_position_creation: bool,
pub force_position_creation: bool,
}Expand description
Builder for the create_order instruction.
Fields§
§program: StoreProgramProgram.
payer: StringPubkeyPayer (a.k.a. owner).
receiver: Option<StringPubkey>Reciever.
nonce: Option<NonceBytes>Nonce for the order.
execution_lamports: u64Execution fee paid to the keeper in lamports.
kind: CreateOrderKindOrder Kind.
collateral_or_swap_out_token: StringPubkeyCollateral or swap out token.
params: CreateOrderParamsOrder Parameters.
pay_token: Option<StringPubkey>Pay token.
pay_token_account: Option<StringPubkey>Pay token account.
receive_token: Option<StringPubkey>Receive token.
swap_path: Vec<StringPubkey>Swap path.
unwrap_native_on_receive: boolWhether to unwrap the native token when receiving (e.g., convert WSOL to SOL).
callback: Option<Callback>Callback.
skip_position_creation: boolWhether to skip position account creation.
force_position_creation: boolWhether to force position account creation.
Implementations§
Source§impl CreateOrder
impl CreateOrder
Sourcepub fn builder() -> CreateOrderBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> CreateOrderBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building CreateOrder.
On the builder, call .program(...)(optional), .payer(...), .receiver(...)(optional), .nonce(...)(optional), .execution_lamports(...)(optional), .kind(...), .collateral_or_swap_out_token(...), .params(...), .pay_token(...)(optional), .pay_token_account(...)(optional), .receive_token(...)(optional), .swap_path(...)(optional), .unwrap_native_on_receive(...)(optional), .callback(...)(optional), .skip_position_creation(...)(optional), .force_position_creation(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of CreateOrder.
Trait Implementations§
Source§impl Clone for CreateOrder
impl Clone for CreateOrder
Source§fn clone(&self) -> CreateOrder
fn clone(&self) -> CreateOrder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateOrder
impl Debug for CreateOrder
Source§impl<'de> Deserialize<'de> for CreateOrder
impl<'de> Deserialize<'de> for CreateOrder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromRpcClientWith<CreateOrder> for CreateOrderHint
impl FromRpcClientWith<CreateOrder> for CreateOrderHint
Source§async fn from_rpc_client_with<'a>(
builder: &'a CreateOrder,
client: &'a impl RpcClient,
) -> Result<Self>
async fn from_rpc_client_with<'a>( builder: &'a CreateOrder, client: &'a impl RpcClient, ) -> Result<Self>
RpcClient.Source§impl FromWasmAbi for CreateOrderwhere
Self: DeserializeOwned,
impl FromWasmAbi for CreateOrderwhere
Self: DeserializeOwned,
Source§impl IntoAtomicGroup for CreateOrder
impl IntoAtomicGroup for CreateOrder
Source§type Hint = CreateOrderHint
type Hint = CreateOrderHint
Source§fn into_atomic_group(
self,
hint: &Self::Hint,
) -> Result<AtomicGroup, SolanaUtilsError>
fn into_atomic_group( self, hint: &Self::Hint, ) -> Result<AtomicGroup, SolanaUtilsError>
AtomicGroup.Source§fn into_atomic_group_with_rpc_client(
self,
client: &impl RpcClient,
) -> impl Future<Output = Result<AtomicGroup, Error>>
fn into_atomic_group_with_rpc_client( self, client: &impl RpcClient, ) -> impl Future<Output = Result<AtomicGroup, Error>>
client_traits only.AtomicGroup with RPC client.Source§impl MarketTokenIxBuilder for CreateOrder
impl MarketTokenIxBuilder for CreateOrder
Source§fn market_token(&self) -> &Pubkey
fn market_token(&self) -> &Pubkey
Source§impl OptionFromWasmAbi for CreateOrderwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for CreateOrderwhere
Self: DeserializeOwned,
Source§impl RefFromWasmAbi for CreateOrderwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for CreateOrderwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
Self are recovered from.Source§type Anchor = SelfOwner<CreateOrder>
type Anchor = SelfOwner<CreateOrder>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for CreateOrder
impl Serialize for CreateOrder
Source§impl StoreProgramIxBuilder for CreateOrder
impl StoreProgramIxBuilder for CreateOrder
Source§fn store_program(&self) -> &StoreProgram
fn store_program(&self) -> &StoreProgram
StoreProgram.Source§impl Tsify for CreateOrder
impl Tsify for CreateOrder
const DECL: &'static str = "/**\n * Builder for the `create_order` instruction.\n */\nexport interface CreateOrder {\n /**\n * Program.\n */\n program?: StoreProgram;\n /**\n * Payer (a.k.a. owner).\n */\n payer: StringPubkey;\n /**\n * Reciever.\n */\n receiver?: StringPubkey | undefined;\n /**\n * Nonce for the order.\n */\n nonce?: NonceBytes | undefined;\n /**\n * Execution fee paid to the keeper in lamports.\n */\n execution_lamports?: number;\n /**\n * Order Kind.\n */\n kind: CreateOrderKind;\n /**\n * Collateral or swap out token.\n */\n collateral_or_swap_out_token: StringPubkey;\n /**\n * Order Parameters.\n */\n params: CreateOrderParams;\n /**\n * Pay token.\n */\n pay_token?: StringPubkey | undefined;\n /**\n * Pay token account.\n */\n pay_token_account?: StringPubkey | undefined;\n /**\n * Receive token.\n */\n receive_token?: StringPubkey | undefined;\n /**\n * Swap path.\n */\n swap_path?: StringPubkey[];\n /**\n * Whether to unwrap the native token when receiving (e.g., convert WSOL to SOL).\n */\n unwrap_native_on_receive?: boolean;\n /**\n * Callback.\n */\n callback?: Callback | undefined;\n /**\n * Whether to skip position account creation.\n */\n skip_position_creation?: boolean;\n /**\n * Whether to force position account creation.\n */\n force_position_creation?: boolean;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
Source§impl VectorFromWasmAbi for CreateOrderwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for CreateOrderwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl WasmDescribeVector for CreateOrder
impl WasmDescribeVector for CreateOrder
Auto Trait Implementations§
impl Freeze for CreateOrder
impl RefUnwindSafe for CreateOrder
impl Send for CreateOrder
impl Sync for CreateOrder
impl Unpin for CreateOrder
impl UnwindSafe for CreateOrder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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