pub struct MintQuote {
pub id: QuoteId,
pub amount: Option<Amount>,
pub unit: CurrencyUnit,
pub request: String,
pub expiry: u64,
pub request_lookup_id: PaymentIdentifier,
pub pubkey: Option<PublicKey>,
pub created_time: u64,
pub payments: Vec<IncomingPayment>,
pub payment_method: PaymentMethod,
pub issuance: Vec<Issuance>,
/* private fields */
}
Expand description
Mint Quote Info
Fields§
§id: QuoteId
Quote id
amount: Option<Amount>
Amount of quote
unit: CurrencyUnit
Unit of quote
request: String
Quote payment request e.g. bolt11
expiry: u64
Expiration time of quote
request_lookup_id: PaymentIdentifier
Value used by ln backend to look up state of request
pubkey: Option<PublicKey>
Pubkey
created_time: u64
Unix time quote was created
payments: Vec<IncomingPayment>
Payment of payment(s) that filled quote
payment_method: PaymentMethod
Payment Method
issuance: Vec<Issuance>
Payment of payment(s) that filled quote
Implementations§
Source§impl MintQuote
impl MintQuote
Sourcepub fn new(
id: Option<QuoteId>,
request: String,
unit: CurrencyUnit,
amount: Option<Amount>,
expiry: u64,
request_lookup_id: PaymentIdentifier,
pubkey: Option<PublicKey>,
amount_paid: Amount,
amount_issued: Amount,
payment_method: PaymentMethod,
created_time: u64,
payments: Vec<IncomingPayment>,
issuance: Vec<Issuance>,
) -> Self
pub fn new( id: Option<QuoteId>, request: String, unit: CurrencyUnit, amount: Option<Amount>, expiry: u64, request_lookup_id: PaymentIdentifier, pubkey: Option<PublicKey>, amount_paid: Amount, amount_issued: Amount, payment_method: PaymentMethod, created_time: u64, payments: Vec<IncomingPayment>, issuance: Vec<Issuance>, ) -> Self
Create new MintQuote
Sourcepub fn increment_amount_paid(
&mut self,
additional_amount: Amount,
) -> Result<Amount, Error>
pub fn increment_amount_paid( &mut self, additional_amount: Amount, ) -> Result<Amount, Error>
Increment the amount paid on the mint quote by a given amount
Sourcepub fn amount_paid(&self) -> Amount
pub fn amount_paid(&self) -> Amount
Amount paid
Sourcepub fn increment_amount_issued(
&mut self,
additional_amount: Amount,
) -> Result<Amount, Error>
pub fn increment_amount_issued( &mut self, additional_amount: Amount, ) -> Result<Amount, Error>
Increment the amount issued on the mint quote by a given amount
Sourcepub fn amount_issued(&self) -> Amount
pub fn amount_issued(&self) -> Amount
Amount issued
Sourcepub fn state(&self) -> MintQuoteState
pub fn state(&self) -> MintQuoteState
Get state of mint quote
Sourcepub fn payment_ids(&self) -> Vec<&String>
pub fn payment_ids(&self) -> Vec<&String>
Existing payment ids of a mint quote
Sourcepub fn amount_mintable(&self) -> Amount
pub fn amount_mintable(&self) -> Amount
Amount mintable Returns the amount that is still available for minting.
The value is computed as the difference between the total amount that
has been paid for this issuance (self.amount_paid
) and the amount
that has already been issued (self.amount_issued
). In other words,