pub struct SwapInstructionsPostBuilder<'a> { /* private fields */ }Expand description
Additive request builder for SwapInstructionsPost.
Implementations§
Source§impl<'a> SwapInstructionsPostBuilder<'a>
impl<'a> SwapInstructionsPostBuilder<'a>
Sourcepub fn request(self, request: SwapV1SwapRequest) -> Self
pub fn request(self, request: SwapV1SwapRequest) -> Self
Replace the complete request body.
Sourcepub fn as_legacy_transaction(self, as_legacy_transaction: bool) -> Self
pub fn as_legacy_transaction(self, as_legacy_transaction: bool) -> Self
Set the optional request-body field asLegacyTransaction.
Sourcepub fn blockhash_slots_to_expiry(self, blockhash_slots_to_expiry: i64) -> Self
pub fn blockhash_slots_to_expiry(self, blockhash_slots_to_expiry: i64) -> Self
Set the optional request-body field blockhashSlotsToExpiry.
Sourcepub fn compute_unit_price_micro_lamports(
self,
compute_unit_price_micro_lamports: u64,
) -> Self
pub fn compute_unit_price_micro_lamports( self, compute_unit_price_micro_lamports: u64, ) -> Self
Set the optional request-body field computeUnitPriceMicroLamports.
Sourcepub fn destination_token_account(
self,
destination_token_account: String,
) -> Self
pub fn destination_token_account( self, destination_token_account: String, ) -> Self
Set the optional request-body field destinationTokenAccount.
Sourcepub fn dynamic_compute_unit_limit(
self,
dynamic_compute_unit_limit: bool,
) -> Self
pub fn dynamic_compute_unit_limit( self, dynamic_compute_unit_limit: bool, ) -> Self
Set the optional request-body field dynamicComputeUnitLimit.
Sourcepub fn dynamic_slippage(self, dynamic_slippage: bool) -> Self
pub fn dynamic_slippage(self, dynamic_slippage: bool) -> Self
Set the optional request-body field dynamicSlippage.
Sourcepub fn fee_account(self, fee_account: String) -> Self
pub fn fee_account(self, fee_account: String) -> Self
Set the optional request-body field feeAccount.
Sourcepub fn native_destination_account(
self,
native_destination_account: String,
) -> Self
pub fn native_destination_account( self, native_destination_account: String, ) -> Self
Set the optional request-body field nativeDestinationAccount.
Sourcepub fn prioritization_fee_lamports(
self,
prioritization_fee_lamports: SwapV1SwapRequestPrioritizationFeeLamports,
) -> Self
pub fn prioritization_fee_lamports( self, prioritization_fee_lamports: SwapV1SwapRequestPrioritizationFeeLamports, ) -> Self
Set the optional request-body field prioritizationFeeLamports.
Sourcepub fn skip_user_accounts_rpc_calls(
self,
skip_user_accounts_rpc_calls: bool,
) -> Self
pub fn skip_user_accounts_rpc_calls( self, skip_user_accounts_rpc_calls: bool, ) -> Self
Set the optional request-body field skipUserAccountsRpcCalls.
Sourcepub fn tracking_account(self, tracking_account: String) -> Self
pub fn tracking_account(self, tracking_account: String) -> Self
Set the optional request-body field trackingAccount.
Set the optional request-body field useSharedAccounts.
Sourcepub fn wrap_and_unwrap_sol(self, wrap_and_unwrap_sol: bool) -> Self
pub fn wrap_and_unwrap_sol(self, wrap_and_unwrap_sol: bool) -> Self
Set the optional request-body field wrapAndUnwrapSol.
Sourcepub async fn send(
self,
) -> Result<SwapV1SwapInstructionsResponse, ApiOpError<Value>>
pub async fn send( self, ) -> Result<SwapV1SwapInstructionsResponse, ApiOpError<Value>>
Send the request through the existing flat operation method.