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) -> Option<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) -> Option<String>
fn description(&self) -> Option<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