pub struct InvoiceBuilder { /* private fields */ }Expand description
Builder for creating BOLT11 invoices.
Implementations§
Source§impl InvoiceBuilder
impl InvoiceBuilder
Sourcepub fn amount_msat(self, amount: u64) -> Self
pub fn amount_msat(self, amount: u64) -> Self
Set the amount in millisatoshis.
Sourcepub fn amount_sats(self, sats: u64) -> Self
pub fn amount_sats(self, sats: u64) -> Self
Set the amount in satoshis.
Sourcepub fn description(self, desc: &str) -> Self
pub fn description(self, desc: &str) -> Self
Set the description.
Sourcepub fn payment_hash(self, hash: PaymentHash) -> Self
pub fn payment_hash(self, hash: PaymentHash) -> Self
Set the payment hash.
Sourcepub fn route_hint(self, hint: RouteHint) -> Self
pub fn route_hint(self, hint: RouteHint) -> Self
Add a route hint.
Sourcepub fn min_final_cltv_expiry(self, blocks: u32) -> Self
pub fn min_final_cltv_expiry(self, blocks: u32) -> Self
Set the minimum final CLTV expiry.
Sourcepub fn build(self) -> Result<InvoiceData, LightningError>
pub fn build(self) -> Result<InvoiceData, LightningError>
Build the invoice data.
Note: This creates the invoice data structure but does not encode it to a full BOLT11 string (which requires signing).
Auto Trait Implementations§
impl Freeze for InvoiceBuilder
impl RefUnwindSafe for InvoiceBuilder
impl Send for InvoiceBuilder
impl Sync for InvoiceBuilder
impl Unpin for InvoiceBuilder
impl UnwindSafe for InvoiceBuilder
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