- * If you wish to use a different payment idempotency token, see
- * [`pay_zero_value_invoice_with_id`].
- */
- public static constructor_pay_zero_value_invoice(invoice: Bolt11Invoice, amount_msats: bigint, retry_strategy: Retry, channelmanager: ChannelManager): Result_ThirtyTwoBytesPaymentErrorZ {
- const ret: bigint = bindings.pay_zero_value_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), amount_msats, CommonBase.get_ptr_of(retry_strategy), channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager));
- const ret_hu_conv: Result_ThirtyTwoBytesPaymentErrorZ = Result_ThirtyTwoBytesPaymentErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, invoice);
- CommonBase.add_ref_from(ret_hu_conv, retry_strategy);
- CommonBase.add_ref_from(ret_hu_conv, channelmanager);
- return ret_hu_conv;
- }
-
- /**
- * Pays the given zero-value [`Bolt11Invoice`] using the given amount and custom idempotency key,
- * retrying if needed based on [`Retry`].
- *
- * 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 [`Bolt11Invoice::payment_hash`] is unique and the same
- * [`PaymentHash`] has never been paid before.
- *
- * See [`pay_zero_value_invoice`] for a variant which uses the [`PaymentHash`] for the
- * idempotency token.
- */
- public static constructor_pay_zero_value_invoice_with_id(invoice: Bolt11Invoice, amount_msats: bigint, payment_id: Uint8Array, retry_strategy: Retry, channelmanager: ChannelManager): Result_NonePaymentErrorZ {
- const ret: bigint = bindings.pay_zero_value_invoice_with_id(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), amount_msats, bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(retry_strategy), channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager));
- const ret_hu_conv: Result_NonePaymentErrorZ = Result_NonePaymentErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, invoice);
- CommonBase.add_ref_from(ret_hu_conv, retry_strategy);
- CommonBase.add_ref_from(ret_hu_conv, channelmanager);
- return ret_hu_conv;
- }
-
- /**
- * Sends payment probes over all paths of a route that would be used to pay the given invoice.