pub struct PaymentQuoteResponse {
pub request_lookup_id: Option<PaymentIdentifier>,
pub amount: Amount<CurrencyUnit>,
pub fee: Amount<CurrencyUnit>,
pub state: MeltQuoteState,
pub extra_json: Option<Value>,
pub estimated_blocks: Option<u32>,
pub fee_options: Option<Vec<MeltQuoteOnchainFeeOption>>,
}Expand description
Payment quote response
Fields§
§request_lookup_id: Option<PaymentIdentifier>Request look up id
For onchain quotes, this MUST be
Some(PaymentIdentifier::QuoteId(quote_id)) where quote_id is the
value supplied by the mint in
OnchainOutgoingPaymentOptions::quote_id. The mint validates this
echo and rejects mismatches — see
OnchainOutgoingPaymentOptions::quote_id for the full contract.
amount: Amount<CurrencyUnit>Amount (typed with unit for compile-time safety)
fee: Amount<CurrencyUnit>Fee required for melt (typed with unit for compile-time safety)
state: MeltQuoteStateStatus
extra_json: Option<Value>Extra payment-method-specific fields
estimated_blocks: Option<u32>Estimated confirmation target in blocks for onchain quotes.
Onchain backends must return explicit fee_options; this field remains
a convenience mirror of the quoted or selected confirmation target.
fee_options: Option<Vec<MeltQuoteOnchainFeeOption>>Explicit onchain fee options the backend is willing to honor.
For onchain melt quotes the mint enforces that fee_options is
non-empty.
Backends assign stable fee_index values and must be able to honor the
selected value later in OnchainOutgoingPaymentOptions::fee_index.
The mint validates, persists, and exposes these values unchanged.
Onchain backends must return Some(vec) here. Empty vectors produce
Error::OnchainFeeOptionsEmpty,
and the quote is not persisted.
Implementations§
Source§impl PaymentQuoteResponse
impl PaymentQuoteResponse
Sourcepub fn unit(&self) -> &CurrencyUnit
pub fn unit(&self) -> &CurrencyUnit
Get the currency unit
Trait Implementations§
Source§impl Clone for PaymentQuoteResponse
impl Clone for PaymentQuoteResponse
Source§fn clone(&self) -> PaymentQuoteResponse
fn clone(&self) -> PaymentQuoteResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PaymentQuoteResponse
impl Debug for PaymentQuoteResponse
impl Eq for PaymentQuoteResponse
Source§impl Hash for PaymentQuoteResponse
impl Hash for PaymentQuoteResponse
Source§impl PartialEq for PaymentQuoteResponse
impl PartialEq for PaymentQuoteResponse
Source§fn eq(&self, other: &PaymentQuoteResponse) -> bool
fn eq(&self, other: &PaymentQuoteResponse) -> bool
self and other values to be equal, and is used by ==.