pub struct InvoicePayerUsingTime<P: Deref, R: Router, L: Deref, E: BaseEventHandler, T: Time>where
    P::Target: Payer,
    L::Target: Logger,
{ /* private fields */ }
Expand description

(C-not exported) generally all users should use the InvoicePayer type alias.

Implementations§

Creates an invoice payer that retries failed payment paths.

Will forward any Event::PaymentPathFailed events to the decorated event_handler once retry has been exceeded for a given Invoice.

Pays the given Invoice, caching it for later use in case a retry is needed.

Invoice::payment_hash is used as the PaymentId, which ensures idempotency as long as the payment is still pending. Once the payment completes or fails, you must ensure that a second payment with the same PaymentHash is never sent.

If you wish to use a different payment idempotency token, see Self::pay_invoice_with_id.

Pays the given Invoice with a custom idempotency key, caching the invoice for later use in case a retry is needed.

Note that idempotency is only guaranteed as long as the payment is still pending. Once the payment completes or fails, no idempotency guarantees are made.

You should ensure that the Invoice::payment_hash is unique and the same PaymentHash has never been paid before.

See Self::pay_invoice for a variant which uses the PaymentHash for the idempotency token.

Pays the given zero-value Invoice using the given amount, caching it for later use in case a retry is needed.

Invoice::payment_hash is used as the PaymentId, which ensures idempotency as long as the payment is still pending. Once the payment completes or fails, you must ensure that a second payment with the same PaymentHash is never sent.

If you wish to use a different payment idempotency token, see Self::pay_zero_value_invoice_with_id.

Pays the given zero-value Invoice using the given amount and custom idempotency key, caching the invoice for later use in case a retry is needed.

Note that idempotency is only guaranteed as long as the payment is still pending. Once the payment completes or fails, no idempotency guarantees are made.

You should ensure that the Invoice::payment_hash is unique and the same PaymentHash has never been paid before.

See Self::pay_zero_value_invoice for a variant which uses the PaymentHash for the idempotency token.

Pays pubkey an amount using the hash of the given preimage, caching it for later use in case a retry is needed.

The hash of the PaymentPreimage is used as the PaymentId, which ensures idempotency as long as the payment is still pending. Once the payment completes or fails, you must ensure that a second payment with the same PaymentPreimage is never sent.

Pays pubkey an amount using the hash of the given preimage and a custom idempotency key, caching the invoice for later use in case a retry is needed.

Note that idempotency is only guaranteed as long as the payment is still pending. Once the payment completes or fails, no idempotency guarantees are made.

You should ensure that the PaymentPreimage is unique and the corresponding PaymentHash has never been paid before.

Removes the payment cached by the given payment hash.

Should be called once a payment has failed or succeeded if not using InvoicePayer as an EventHandler. Otherwise, calling this method is unnecessary.

Intercepts events required by the InvoicePayer and forwards them to the underlying event handler, if necessary, to handle them asynchronously.

Trait Implementations§

Handles the given Event. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.