Function payment_parameters_from_variable_amount_invoice

Source
pub fn payment_parameters_from_variable_amount_invoice(
    invoice: &Bolt11Invoice,
    amount_msat: u64,
) -> Result<(PaymentHash, RecipientOnionFields, RouteParameters), ()>
Expand description

Builds the necessary parameters to pay or pre-flight probe the given variable-amount (also known as ‘zero-amount’) Bolt11Invoice using ChannelManager::send_payment or ChannelManager::send_preflight_probes.

Prior to paying, you must ensure that the Bolt11Invoice::payment_hash is unique and the same PaymentHash has never been paid before.

Will always succeed unless the invoice has an amount specified, in which case payment_parameters_from_invoice should be used.