Trait 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) -> 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§

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) -> Option<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§