Trait Bolt11InvoiceExt

Source
pub trait Bolt11InvoiceExt: Borrow<Bolt11Invoice> {
    // Provided method
    fn get_final_amount(
        &self,
        user_amount: Option<Amount>,
    ) -> Result<Amount, CheckAmountError> { ... }
}
Expand description

Extension trait for the Bolt11Invoice type

Provided Methods§

Source

fn get_final_amount( &self, user_amount: Option<Amount>, ) -> Result<Amount, CheckAmountError>

Get the amount to be paid. It checks both user and invoice equality if both are provided, else it tries to return one of them, or returns an error if neither are provided.

Implementors§