pub struct MeltQuoteOnchainResponse<Q> {
pub quote: Q,
pub amount: Amount,
pub unit: CurrencyUnit,
pub state: QuoteState,
pub expiry: u64,
pub request: String,
pub fee_options: Vec<MeltQuoteOnchainFeeOption>,
pub selected_fee_index: Option<u32>,
pub outpoint: Option<String>,
pub change: Option<Vec<BlindSignature>>,
}Expand description
Melt quote onchain response
Response containing the onchain melt quote details.
The POST /v1/melt/quote/onchain endpoint returns one quote with one or
more fee_options. The wallet chooses one option when executing the quote.
deny_unknown_fields is intentional: the NotificationPayload enum is
#[serde(untagged)] and melt-quote responses for different methods share
many field names. Rejecting unknown fields ensures an onchain payload cannot
silently deserialize as MeltQuoteBolt11Response (which carries fee_reserve
at the top level, while onchain carries it inside fee_options).
Fields§
§quote: QQuote Id
amount: AmountAmount to be melted
unit: CurrencyUnitUnit
state: QuoteStateQuote state
expiry: u64Unix timestamp until the quote is valid
request: StringBitcoin address to send to
fee_options: Vec<MeltQuoteOnchainFeeOption>Fee options for the transaction.
Each entry represents one fee-reserve/confirmation-target pair the mint is
willing to honor for this quote. Per NUT the mint MUST return at
least one entry; MUST NOT return multiple entries with the same
fee_index; and the list is fixed for the lifetime of the quote.
selected_fee_index: Option<u32>Selected fee option index once the quote is executed
outpoint: Option<String>Transaction outpoint (txid:vout) once broadcast
change: Option<Vec<BlindSignature>>Blind signatures for overpaid onchain fee reserve
Implementations§
Source§impl<Q> MeltQuoteOnchainResponse<Q>where
Q: ToString,
impl<Q> MeltQuoteOnchainResponse<Q>where
Q: ToString,
Sourcepub fn to_string_id(&self) -> MeltQuoteOnchainResponse<String>
pub fn to_string_id(&self) -> MeltQuoteOnchainResponse<String>
Convert the MeltQuoteOnchainResponse with a quote type Q to a String
Trait Implementations§
Source§impl<Q> Clone for MeltQuoteOnchainResponse<Q>where
Q: Clone,
impl<Q> Clone for MeltQuoteOnchainResponse<Q>where
Q: Clone,
Source§fn clone(&self) -> MeltQuoteOnchainResponse<Q>
fn clone(&self) -> MeltQuoteOnchainResponse<Q>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<Q> Debug for MeltQuoteOnchainResponse<Q>where
Q: Debug,
impl<Q> Debug for MeltQuoteOnchainResponse<Q>where
Q: Debug,
Source§impl<'de, Q> Deserialize<'de> for MeltQuoteOnchainResponse<Q>where
Q: Serialize + DeserializeOwned,
impl<'de, Q> Deserialize<'de> for MeltQuoteOnchainResponse<Q>where
Q: Serialize + DeserializeOwned,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MeltQuoteOnchainResponse<Q>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MeltQuoteOnchainResponse<Q>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl<Q> Eq for MeltQuoteOnchainResponse<Q>where
Q: Eq,
Source§impl From<MeltQuoteOnchainResponse<QuoteId>> for MeltQuoteOnchainResponse<String>
Available on crate feature mint only.
impl From<MeltQuoteOnchainResponse<QuoteId>> for MeltQuoteOnchainResponse<String>
mint only.Source§fn from(
value: MeltQuoteOnchainResponse<QuoteId>,
) -> MeltQuoteOnchainResponse<String>
fn from( value: MeltQuoteOnchainResponse<QuoteId>, ) -> MeltQuoteOnchainResponse<String>
Source§impl<Q> PartialEq for MeltQuoteOnchainResponse<Q>where
Q: PartialEq,
impl<Q> PartialEq for MeltQuoteOnchainResponse<Q>where
Q: PartialEq,
Source§fn eq(&self, other: &MeltQuoteOnchainResponse<Q>) -> bool
fn eq(&self, other: &MeltQuoteOnchainResponse<Q>) -> bool
self and other values to be equal, and is used by ==.