Trait lightning_signer::invoice::InvoiceAttributes
source · pub trait InvoiceAttributes {
// Required methods
fn invoice_hash(&self) -> [u8; 32];
fn payment_hash(&self) -> PaymentHash;
fn amount_milli_satoshis(&self) -> u64;
fn description(&self) -> String;
fn payee_pub_key(&self) -> PublicKey;
fn duration_since_epoch(&self) -> Duration;
fn expiry_duration(&self) -> Duration;
}
Expand description
Generic invoice methods for both BOLT-11 and BOLT-12 invoices.
Required Methods§
sourcefn invoice_hash(&self) -> [u8; 32]
fn invoice_hash(&self) -> [u8; 32]
The hash of the invoice, as a unique ID
sourcefn payment_hash(&self) -> PaymentHash
fn payment_hash(&self) -> PaymentHash
The payment hash of the invoice
sourcefn amount_milli_satoshis(&self) -> u64
fn amount_milli_satoshis(&self) -> u64
Invoiced amount
sourcefn description(&self) -> String
fn description(&self) -> String
Description
sourcefn payee_pub_key(&self) -> PublicKey
fn payee_pub_key(&self) -> PublicKey
Payee’s public key
sourcefn duration_since_epoch(&self) -> Duration
fn duration_since_epoch(&self) -> Duration
Timestamp of the payment, as duration since the UNIX epoch
sourcefn expiry_duration(&self) -> Duration
fn expiry_duration(&self) -> Duration
Expiry, as duration since the timestamp