pub struct SwapClient { /* private fields */ }Expand description
Configured RPC-backed swap client.
Implementations§
Source§impl SwapClient
impl SwapClient
Sourcepub async fn quote_exact_input<R>(
&self,
request: R,
) -> SwapResult<ExactInputQuoteResult>where
R: Borrow<ExactInputQuoteRequest>,
pub async fn quote_exact_input<R>(
&self,
request: R,
) -> SwapResult<ExactInputQuoteResult>where
R: Borrow<ExactInputQuoteRequest>,
Executes an exact-input quote through the configured EVM transport.
Sourcepub async fn quote_exact_input_with<R>(
&self,
request: R,
cancellation: Option<&CancellationToken>,
) -> SwapResult<ExactInputQuoteResult>where
R: Borrow<ExactInputQuoteRequest>,
pub async fn quote_exact_input_with<R>(
&self,
request: R,
cancellation: Option<&CancellationToken>,
) -> SwapResult<ExactInputQuoteResult>where
R: Borrow<ExactInputQuoteRequest>,
Executes an exact-input quote while observing an optional cancellation token.
Sourcepub async fn prepare_exact_input_swap<R>(
&self,
request: R,
) -> SwapExecutionResult<ExactInputSwapPreparation>where
R: Borrow<PrepareExactInputSwapRequest>,
pub async fn prepare_exact_input_swap<R>(
&self,
request: R,
) -> SwapExecutionResult<ExactInputSwapPreparation>where
R: Borrow<PrepareExactInputSwapRequest>,
Prepares an unsigned ERC20-to-ERC20 router transaction from a fresh quote and the reviewed execution capability for the selected pool.
The returned transaction is a chain-bound SDK envelope. It does not contain approval calldata, a signature, a nonce, fees, or a send operation; the caller’s wallet remains responsible for those actions.
Sourcepub async fn prepare_exact_input_swap_with<R>(
&self,
request: R,
cancellation: Option<&CancellationToken>,
) -> SwapExecutionResult<ExactInputSwapPreparation>where
R: Borrow<PrepareExactInputSwapRequest>,
pub async fn prepare_exact_input_swap_with<R>(
&self,
request: R,
cancellation: Option<&CancellationToken>,
) -> SwapExecutionResult<ExactInputSwapPreparation>where
R: Borrow<PrepareExactInputSwapRequest>,
Prepares an unsigned swap while observing an optional cancellation token.
Sourcepub async fn simulate_exact_input_swap<R>(
&self,
request: R,
) -> SwapExecutionResult<ExactInputSwapSimulation>where
R: Borrow<PrepareExactInputSwapRequest>,
pub async fn simulate_exact_input_swap<R>(
&self,
request: R,
) -> SwapExecutionResult<ExactInputSwapSimulation>where
R: Borrow<PrepareExactInputSwapRequest>,
Simulates a freshly prepared unsigned ERC20-to-ERC20 router call.
Sourcepub async fn simulate_exact_input_swap_with<R>(
&self,
request: R,
cancellation: Option<&CancellationToken>,
) -> SwapExecutionResult<ExactInputSwapSimulation>where
R: Borrow<PrepareExactInputSwapRequest>,
pub async fn simulate_exact_input_swap_with<R>(
&self,
request: R,
cancellation: Option<&CancellationToken>,
) -> SwapExecutionResult<ExactInputSwapSimulation>where
R: Borrow<PrepareExactInputSwapRequest>,
Simulates a freshly prepared swap while observing an optional cancellation token.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SwapClient
impl !UnwindSafe for SwapClient
impl Freeze for SwapClient
impl Send for SwapClient
impl Sync for SwapClient
impl Unpin for SwapClient
impl UnsafeUnpin for SwapClient
Blanket Implementations§
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
Mutably borrows from an owned value. Read more