pub struct CreateOfferRequest {
pub expiry_secs: Option<u32>,
pub amount: Option<Amount>,
pub description: Option<String>,
pub max_quantity: Option<MaxQuantity>,
pub issuer: Option<String>,
}Fields§
§expiry_secs: Option<u32>§amount: Option<Amount>The amount we’re requesting for payments using this offer.
If None, the offer is variable amount and the payer can choose any
value.
If Some, the offer amount is fixed and the payer must pay exactly
this value (per item, see max_quantity).
description: Option<String>The description to be encoded into the invoice.
If None, the description field inside the invoice will be an empty
string (“”), as lightning requires a description to be set.
max_quantity: Option<MaxQuantity>The max number of items that can be purchased in any one payment for the offer.
NOTE: this is not related to single-use vs reusable offers.
The expected amount paid for this offer is offer.amount * quantity,
where offer.amount is the value per item and quantity is the number
of items chosen by the payer. The payer’s chosen quantity must be
in the range: 0 < quantity <= offer.max_quantity.
If None, defaults to MaxQuantity::ONE, i.e., the expected paid
amount is just offer.amount.
issuer: Option<String>The issuer of the offer.
If Some, offer will encode the string. Bolt12 spec expects this tring
to be a domain or a user@domain address.
If None, offer issuer will encode “lexe.app” as the issuer.