pub fn payment_parameters_from_invoice(
    invoice: &Bolt11Invoice
) -> Result<(PaymentHash, RecipientOnionFields, RouteParameters), ()>
Expand description

Builds the necessary parameters to pay or pre-flight probe the given 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 no amount specified, in which case payment_parameters_from_zero_amount_invoice should be used.