Struct Bolt11InvoiceParameters
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§
§impl Default for Bolt11InvoiceParameters
impl Default for Bolt11InvoiceParameters
§fn default() -> Bolt11InvoiceParameters
fn default() -> Bolt11InvoiceParameters
Auto Trait Implementations§
impl Freeze for Bolt11InvoiceParameters
impl Send for Bolt11InvoiceParameters
impl Sync for Bolt11InvoiceParameters
impl RefUnwindSafe for Bolt11InvoiceParameters
impl Unpin for Bolt11InvoiceParameters
impl UnwindSafe for Bolt11InvoiceParameters
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request