pub struct CreateBridgeRequest {
pub recipient: String,
pub route: BridgeRoutePair,
pub amount: u128,
pub refund_address: Option<String>,
pub fee_policy: Option<FeePolicy>,
pub max_slippage_bps: Option<u32>,
}Fields§
§recipient: StringWho to pay, as given to BridgingClient::get_routes.
route: BridgeRoutePairA route from BridgingClient::get_routes
for this recipient.
amount: u128Amount in the base units of the route’s amount_side, per its
decimals: the recipient’s stablecoin when they are paid in one,
otherwise what the payer pays (sats over Lightning, or their
stablecoin). A stablecoin amount at parity is the USD value:
1_000_000 is 1 USDC at 6 decimals.
refund_address: Option<String>The payer’s address on the source chain, where the deposit is refunded
if the recipient can’t be paid. Required to pay a Lightning address or
when the payer sends from an exchange, and advised for BSC and Tron:
unset, the provider refunds the sending address only when that is
safe. When the payer pays over Lightning, it is a Lightning
address, a Cash App $cashtag or an amountless BOLT11 invoice that
doesn’t expire before the bridge, refunded if the payment fails before
the swap. Anything else is rejected.
fee_policy: Option<FeePolicy>Whether fees are added on top of amount (FeesExcluded, the default)
or deducted from it (FeesIncluded).
max_slippage_bps: Option<u32>Maximum slippage tolerance in basis points. Unset uses the configured default.
Trait Implementations§
Source§impl Clone for CreateBridgeRequest
impl Clone for CreateBridgeRequest
Source§fn clone(&self) -> CreateBridgeRequest
fn clone(&self) -> CreateBridgeRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CreateBridgeRequest
impl RefUnwindSafe for CreateBridgeRequest
impl Send for CreateBridgeRequest
impl Sync for CreateBridgeRequest
impl Unpin for CreateBridgeRequest
impl UnsafeUnpin for CreateBridgeRequest
impl UnwindSafe for CreateBridgeRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request