Bolt11InvoiceParameters

Struct Bolt11InvoiceParameters 

Source
pub struct Bolt11InvoiceParameters {
    pub amount_msats: Option<u64>,
    pub description: Bolt11InvoiceDescription,
    pub invoice_expiry_delta_secs: Option<u32>,
    pub min_final_cltv_expiry_delta: Option<u16>,
    pub payment_hash: Option<PaymentHash>,
}
Expand description

Parameters used with create_bolt11_invoice.

Fields§

§amount_msats: Option<u64>

The amount for the invoice, if any.

§description: Bolt11InvoiceDescription

The description for what the invoice is for, or hash of such description.

§invoice_expiry_delta_secs: Option<u32>

The invoice expiration relative to its creation time. If not set, the invoice will expire in DEFAULT_EXPIRY_TIME by default.

The creation time used is the duration since the Unix epoch for std builds. For non-std builds, the highest block timestamp seen is used instead. In the latter case, use a long enough expiry to account for the average block time.

§min_final_cltv_expiry_delta: Option<u16>

The minimum cltv_expiry for the last HTLC in the route. If not set, will use MIN_FINAL_CLTV_EXPIRY_DELTA.

If set, must be at least MIN_FINAL_CLTV_EXPIRY_DELTA, and a three-block buffer will be added as well to allow for up to a few new block confirmations during routing.

§payment_hash: Option<PaymentHash>

The payment hash used in the invoice. If not set, a payment hash will be generated using a preimage that can be reproduced by ChannelManager without storing any state.

Uses the payment hash if set. This may be useful if you’re building an on-chain swap or involving another protocol where the payment hash is also involved outside the scope of lightning.

Trait Implementations§

Source§

impl Default for Bolt11InvoiceParameters

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.