pub struct CreateInvoiceRequest {
pub expiry_secs: u32,
pub amount: Option<Amount>,
pub description: Option<String>,
pub description_hash: Option<[u8; 32]>,
pub payer_note: Option<BoundedNote>,
}Fields§
§expiry_secs: u32§amount: Option<Amount>§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 (or description
hash) to be set.
NOTE: If both description and description_hash are set, node will
return an error.
description_hash: Option<[u8; 32]>A 256-bit hash. Commonly a hash of a long description.
This field is used to associate description longer than 639 bytes to
the invoice. Also known as ‘h tag in BOLT11’.
This field is required to build invoices for the LNURL (LUD06)
receiving flow. Not used in other flows.
NOTE: If both description and description_hash are set, node will
return an error.
payer_note: Option<BoundedNote>An optional note from the payer, stored with this inbound payment.
For LNURL-pay, set from the LUD-12 comment.
Trait Implementations§
Source§impl Default for CreateInvoiceRequest
impl Default for CreateInvoiceRequest
Source§fn default() -> CreateInvoiceRequest
fn default() -> CreateInvoiceRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreateInvoiceRequest
impl<'de> Deserialize<'de> for CreateInvoiceRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreateInvoiceRequest
impl RefUnwindSafe for CreateInvoiceRequest
impl Send for CreateInvoiceRequest
impl Sync for CreateInvoiceRequest
impl Unpin for CreateInvoiceRequest
impl UnsafeUnpin for CreateInvoiceRequest
impl UnwindSafe for CreateInvoiceRequest
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
Mutably borrows from an owned value. Read more