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§

source

fn invoice_hash(&self) -> [u8; 32]

The hash of the invoice, as a unique ID

source

fn payment_hash(&self) -> PaymentHash

The payment hash of the invoice

source

fn amount_milli_satoshis(&self) -> u64

Invoiced amount

source

fn description(&self) -> String

Description

source

fn payee_pub_key(&self) -> PublicKey

Payee’s public key

source

fn duration_since_epoch(&self) -> Duration

Timestamp of the payment, as duration since the UNIX epoch

source

fn expiry_duration(&self) -> Duration

Expiry, as duration since the timestamp

Implementors§