pub struct Quote {Show 16 fields
pub id: String,
pub direction: SwapDirection,
pub mode: SwapMode,
pub chain: EvmChain,
pub chain_id: Option<u64>,
pub zec_amount_zat: u64,
pub usd_amount: u128,
pub token: Hex,
pub token_symbol: String,
pub rate: f64,
pub maker_zcash_pubkey: Hex,
pub maker_evm_address: Hex,
pub zcash_lock_blocks: u32,
pub evm_lock_seconds: u32,
pub expires_at: u64,
pub exact_out: bool,
}Expand description
A maker’s offer. Deserialize runs super::parse_quote (shape only); check a quote with
super::validate_quote before acting on it.
Fields§
§id: StringA UUID.
direction: SwapDirectionAlways ZEC_TO_USD.
mode: SwapModehtlc or adaptor.
chain: EvmChainChain the stablecoins are paid on.
chain_id: Option<u64>Chain id of chain on the maker’s side (absent from 0.1 makers). The taker rejects a mismatch.
zec_amount_zat: u64ZEC the taker sends, in zatoshi (a decimal string on the wire).
usd_amount: u128Stablecoin the taker receives, in token base units (a decimal string on the wire).
token: HexToken address.
token_symbol: StringToken symbol.
rate: f64USD per ZEC used for this quote (a JavaScript number on the wire).
maker_zcash_pubkey: HexCompressed secp256k1 pubkey the maker uses on Zcash (HTLC claimer, or its half of the 2-of-2).
maker_evm_address: HexThe maker’s EVM address (its escrow client’s account).
zcash_lock_blocks: u32Blocks until the taker may refund on Zcash.
evm_lock_seconds: u32Seconds until the maker may refund on the EVM chain. Must end well before the Zcash refund height.
expires_at: u64Unix seconds after which the quote is no longer honored.
exact_out: boolSet when the quote is for an exact dollar amount (a payment): usd_amount is fixed and ZEC rounds up.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Quote
impl<'de> Deserialize<'de> for Quote
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Quote, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Quote, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Quote
impl Serialize for Quote
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Quote
Auto Trait Implementations§
impl Freeze for Quote
impl RefUnwindSafe for Quote
impl Send for Quote
impl Sync for Quote
impl Unpin for Quote
impl UnsafeUnpin for Quote
impl UnwindSafe for Quote
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
impl<'de, T> BorrowedRpcObject<'de> for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 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