- * See [`pay_zero_value_invoice`] for a variant which uses the [`PaymentHash`] for the
- * idempotency token.
- */
- public static Result_NonePaymentErrorZ pay_zero_value_invoice_with_id(org.ldk.structs.Bolt11Invoice invoice, long amount_msats, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.ChannelManager channelmanager) {
- long ret = bindings.pay_zero_value_invoice_with_id(invoice == null ? 0 : invoice.ptr, amount_msats, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, channelmanager == null ? 0 : channelmanager.ptr);
- Reference.reachabilityFence(invoice);
- Reference.reachabilityFence(amount_msats);
- Reference.reachabilityFence(payment_id);
- Reference.reachabilityFence(retry_strategy);
- Reference.reachabilityFence(channelmanager);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_NonePaymentErrorZ ret_hu_conv = Result_NonePaymentErrorZ.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(invoice); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(retry_strategy); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channelmanager); };
- return ret_hu_conv;
- }
-
- /**
- * Sends payment probes over all paths of a route that would be used to pay the given invoice.
- *
- * See [`ChannelManager::send_preflight_probes`] for more information.
- */
- public static Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ preflight_probe_invoice(org.ldk.structs.Bolt11Invoice invoice, org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.Option_u64Z liquidity_limit_multiplier) {
- long ret = bindings.preflight_probe_invoice(invoice == null ? 0 : invoice.ptr, channelmanager == null ? 0 : channelmanager.ptr, liquidity_limit_multiplier.ptr);
- Reference.reachabilityFence(invoice);
- Reference.reachabilityFence(channelmanager);
- Reference.reachabilityFence(liquidity_limit_multiplier);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ ret_hu_conv = Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(invoice); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channelmanager); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(liquidity_limit_multiplier); };
- return ret_hu_conv;
- }
-
- /**
- * Sends payment probes over all paths of a route that would be used to pay the given zero-value
- * invoice using the given amount.