[TS] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[ldk-java] / src / main / java / org / ldk / structs / UtilMethods.java
index b6e562537627209c4cc1c35cc369f4c5bb0dbd98..5d4e3cd33777facb99293034eed723ec99ee5a4f 100644 (file)
@@ -117,6 +117,72 @@ public class UtilMethods {
                return ret_hu_conv;
        }
 
+       /**
+        * Extracts the block height (most significant 3-bytes) from the `short_channel_id`
+        */
+       public static int block_from_scid(long short_channel_id) {
+               int ret = bindings.block_from_scid(short_channel_id);
+               Reference.reachabilityFence(short_channel_id);
+               return ret;
+       }
+
+       /**
+        * Extracts the tx index (bytes [2..4]) from the `short_channel_id`
+        */
+       public static int tx_index_from_scid(long short_channel_id) {
+               int ret = bindings.tx_index_from_scid(short_channel_id);
+               Reference.reachabilityFence(short_channel_id);
+               return ret;
+       }
+
+       /**
+        * Extracts the vout (bytes [0..2]) from the `short_channel_id`
+        */
+       public static short vout_from_scid(long short_channel_id) {
+               short ret = bindings.vout_from_scid(short_channel_id);
+               Reference.reachabilityFence(short_channel_id);
+               return ret;
+       }
+
+       /**
+        * Constructs a `short_channel_id` using the components pieces. Results in an error
+        * if the block height, tx index, or vout index overflow the maximum sizes.
+        */
+       public static Result_u64ShortChannelIdErrorZ scid_from_parts(long block, long tx_index, long vout_index) {
+               long ret = bindings.scid_from_parts(block, tx_index, vout_index);
+               Reference.reachabilityFence(block);
+               Reference.reachabilityFence(tx_index);
+               Reference.reachabilityFence(vout_index);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Read a C2Tuple_BestBlockOutputSweeperZ from a byte array, created by C2Tuple_BestBlockOutputSweeperZ_write
+        */
+       public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(byte[] ser, org.ldk.structs.BroadcasterInterface arg_a, org.ldk.structs.FeeEstimator arg_b, org.ldk.structs.Option_FilterZ arg_c, org.ldk.structs.OutputSpender arg_d, org.ldk.structs.ChangeDestinationSource arg_e, org.ldk.structs.KVStore arg_f, org.ldk.structs.Logger arg_g) {
+               long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr, arg_d.ptr, arg_e.ptr, arg_f.ptr, arg_g.ptr);
+               Reference.reachabilityFence(ser);
+               Reference.reachabilityFence(arg_a);
+               Reference.reachabilityFence(arg_b);
+               Reference.reachabilityFence(arg_c);
+               Reference.reachabilityFence(arg_d);
+               Reference.reachabilityFence(arg_e);
+               Reference.reachabilityFence(arg_f);
+               Reference.reachabilityFence(arg_g);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_a); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_b); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_c); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_d); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_e); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_f); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_g); };
+               return ret_hu_conv;
+       }
+
        /**
         * Read a MonitorEvent from a byte array, created by MonitorEvent_write
         */
@@ -143,12 +209,39 @@ public class UtilMethods {
                return ret_hu_conv;
        }
 
+       /**
+        * Peel one layer off an incoming onion, returning a [`PendingHTLCInfo`] that contains information
+        * about the intended next-hop for the HTLC.
+        * 
+        * This does all the relevant context-free checks that LDK requires for payment relay or
+        * acceptance. If the payment is to be received, and the amount matches the expected amount for
+        * a given invoice, this indicates the [`msgs::UpdateAddHTLC`], once fully committed in the
+        * channel, will generate an [`Event::PaymentClaimable`].
+        * 
+        * [`Event::PaymentClaimable`]: crate::events::Event::PaymentClaimable
+        */
+       public static Result_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(org.ldk.structs.UpdateAddHTLC msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, int cur_height, boolean accept_mpp_keysend, boolean allow_skimmed_fees) {
+               long ret = bindings.peel_payment_onion(msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees);
+               Reference.reachabilityFence(msg);
+               Reference.reachabilityFence(node_signer);
+               Reference.reachabilityFence(logger);
+               Reference.reachabilityFence(cur_height);
+               Reference.reachabilityFence(accept_mpp_keysend);
+               Reference.reachabilityFence(allow_skimmed_fees);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(msg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
+               return ret_hu_conv;
+       }
+
        /**
         * Fetches the set of [`InitFeatures`] flags that are provided by or required by
         * [`ChannelManager`].
         */
        public static InitFeatures provided_init_features(org.ldk.structs.UserConfig config) {
-               long ret = bindings.provided_init_features(config == null ? 0 : config.ptr);
+               long ret = bindings.provided_init_features(config.ptr);
                Reference.reachabilityFence(config);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
@@ -161,7 +254,7 @@ public class UtilMethods {
         * Read a C2Tuple_ThirtyTwoBytesChannelManagerZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelManagerZ_write
         */
        public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelManagerZ_read(byte[] ser, EntropySource arg_entropy_source, NodeSigner arg_node_signer, SignerProvider arg_signer_provider, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Router arg_router, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
-               long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr).toArray() : null));
+               long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config.ptr, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16.ptr).toArray() : null));
                Reference.reachabilityFence(ser);
                Reference.reachabilityFence(arg_entropy_source);
                Reference.reachabilityFence(arg_node_signer);
@@ -188,6 +281,40 @@ public class UtilMethods {
                return ret_hu_conv;
        }
 
+       /**
+        * Adds a tweak to a public key to derive a new public key.
+        * 
+        * May panic if `tweak` is not the output of a SHA-256 hash.
+        */
+       public static byte[] add_public_key_tweak(byte[] base_point, byte[] tweak) {
+               byte[] ret = bindings.add_public_key_tweak(InternalUtils.check_arr_len(base_point, 33), InternalUtils.check_arr_len(tweak, 32));
+               Reference.reachabilityFence(base_point);
+               Reference.reachabilityFence(tweak);
+               return ret;
+       }
+
+       /**
+        * Read a InboundHTLCStateDetails from a byte array, created by InboundHTLCStateDetails_write
+        */
+       public static Result_COption_InboundHTLCStateDetailsZDecodeErrorZ InboundHTLCStateDetails_read(byte[] ser) {
+               long ret = bindings.InboundHTLCStateDetails_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_COption_InboundHTLCStateDetailsZDecodeErrorZ ret_hu_conv = Result_COption_InboundHTLCStateDetailsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Read a OutboundHTLCStateDetails from a byte array, created by OutboundHTLCStateDetails_write
+        */
+       public static Result_COption_OutboundHTLCStateDetailsZDecodeErrorZ OutboundHTLCStateDetails_read(byte[] ser) {
+               long ret = bindings.OutboundHTLCStateDetails_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_COption_OutboundHTLCStateDetailsZDecodeErrorZ ret_hu_conv = Result_COption_OutboundHTLCStateDetailsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
        /**
         * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment`], but no
         * `ChannelManager` is required. Useful for generating invoices for [phantom node payments] without
@@ -206,7 +333,7 @@ public class UtilMethods {
         * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material
         */
        public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.EntropySource entropy_source, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create(keys == null ? 0 : keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create(keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(keys);
                Reference.reachabilityFence(min_value_msat);
                Reference.reachabilityFence(invoice_expiry_delta_secs);
@@ -235,7 +362,7 @@ public class UtilMethods {
         * [phantom node payments]: crate::sign::PhantomKeysManager
         */
        public static Result_ThirtyTwoBytesNoneZ create_from_hash(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, byte[] payment_hash, int invoice_expiry_delta_secs, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_from_hash(keys == null ? 0 : keys.ptr, min_value_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_from_hash(keys.ptr, min_value_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(keys);
                Reference.reachabilityFence(min_value_msat);
                Reference.reachabilityFence(payment_hash);
@@ -268,7 +395,7 @@ public class UtilMethods {
         * Gets the weight for an HTLC-Success transaction.
         */
        public static long htlc_success_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) {
-               long ret = bindings.htlc_success_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr);
+               long ret = bindings.htlc_success_tx_weight(channel_type_features.ptr);
                Reference.reachabilityFence(channel_type_features);
                return ret;
        }
@@ -277,7 +404,7 @@ public class UtilMethods {
         * Gets the weight for an HTLC-Timeout transaction.
         */
        public static long htlc_timeout_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) {
-               long ret = bindings.htlc_timeout_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr);
+               long ret = bindings.htlc_timeout_tx_weight(channel_type_features.ptr);
                Reference.reachabilityFence(channel_type_features);
                return ret;
        }
@@ -308,7 +435,7 @@ public class UtilMethods {
         * Build a closing transaction
         */
        public static byte[] build_closing_transaction(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, org.ldk.structs.OutPoint funding_outpoint) {
-               byte[] ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr);
+               byte[] ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint.ptr);
                Reference.reachabilityFence(to_holder_value_sat);
                Reference.reachabilityFence(to_counterparty_value_sat);
                Reference.reachabilityFence(to_holder_script);
@@ -328,18 +455,6 @@ public class UtilMethods {
                return ret;
        }
 
-       /**
-        * Derives a per-commitment-transaction public key (eg an htlc key or a delayed_payment key)
-        * from the base point and the per_commitment_key. This is the public equivalent of
-        * derive_private_key - using only public keys to derive a public key instead of private keys.
-        */
-       public static byte[] derive_public_key(byte[] per_commitment_point, byte[] base_point) {
-               byte[] ret = bindings.derive_public_key(InternalUtils.check_arr_len(per_commitment_point, 33), InternalUtils.check_arr_len(base_point, 33));
-               Reference.reachabilityFence(per_commitment_point);
-               Reference.reachabilityFence(base_point);
-               return ret;
-       }
-
        /**
         * Derives a per-commitment-transaction revocation key from its constituent parts.
         * 
@@ -355,33 +470,13 @@ public class UtilMethods {
                return ret;
        }
 
-       /**
-        * Derives a per-commitment-transaction revocation public key from its constituent parts. This is
-        * the public equivalend of derive_private_revocation_key - using only public keys to derive a
-        * public key instead of private keys.
-        * 
-        * Only the cheating participant owns a valid witness to propagate a revoked
-        * commitment transaction, thus per_commitment_point always come from cheater
-        * and revocation_base_point always come from punisher, which is the broadcaster
-        * of the transaction spending with this key knowledge.
-        * 
-        * Note that this is infallible iff we trust that at least one of the two input keys are randomly
-        * generated (ie our own).
-        */
-       public static byte[] derive_public_revocation_key(byte[] per_commitment_point, byte[] countersignatory_revocation_base_point) {
-               byte[] ret = bindings.derive_public_revocation_key(InternalUtils.check_arr_len(per_commitment_point, 33), InternalUtils.check_arr_len(countersignatory_revocation_base_point, 33));
-               Reference.reachabilityFence(per_commitment_point);
-               Reference.reachabilityFence(countersignatory_revocation_base_point);
-               return ret;
-       }
-
        /**
         * A script either spendable by the revocation
         * key or the broadcaster_delayed_payment_key and satisfying the relative-locktime OP_CSV constrain.
         * Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions.
         */
-       public static byte[] get_revokeable_redeemscript(byte[] revocation_key, short contest_delay, byte[] broadcaster_delayed_payment_key) {
-               byte[] ret = bindings.get_revokeable_redeemscript(InternalUtils.check_arr_len(revocation_key, 33), contest_delay, InternalUtils.check_arr_len(broadcaster_delayed_payment_key, 33));
+       public static byte[] get_revokeable_redeemscript(org.ldk.structs.RevocationKey revocation_key, short contest_delay, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key) {
+               byte[] ret = bindings.get_revokeable_redeemscript(revocation_key.ptr, contest_delay, broadcaster_delayed_payment_key.ptr);
                Reference.reachabilityFence(revocation_key);
                Reference.reachabilityFence(contest_delay);
                Reference.reachabilityFence(broadcaster_delayed_payment_key);
@@ -393,7 +488,7 @@ public class UtilMethods {
         * the channel type.
         */
        public static byte[] get_counterparty_payment_script(org.ldk.structs.ChannelTypeFeatures channel_type_features, byte[] payment_key) {
-               byte[] ret = bindings.get_counterparty_payment_script(channel_type_features == null ? 0 : channel_type_features.ptr, InternalUtils.check_arr_len(payment_key, 33));
+               byte[] ret = bindings.get_counterparty_payment_script(channel_type_features.ptr, InternalUtils.check_arr_len(payment_key, 33));
                Reference.reachabilityFence(channel_type_features);
                Reference.reachabilityFence(payment_key);
                return ret;
@@ -404,7 +499,7 @@ public class UtilMethods {
         * does not need to have its previous_output_index filled.
         */
        public static byte[] get_htlc_redeemscript(org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.TxCreationKeys keys) {
-               byte[] ret = bindings.get_htlc_redeemscript(htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, keys == null ? 0 : keys.ptr);
+               byte[] ret = bindings.get_htlc_redeemscript(htlc.ptr, channel_type_features.ptr, keys.ptr);
                Reference.reachabilityFence(htlc);
                Reference.reachabilityFence(channel_type_features);
                Reference.reachabilityFence(keys);
@@ -431,8 +526,8 @@ public class UtilMethods {
         * Panics if htlc.transaction_output_index.is_none() (as such HTLCs do not appear in the
         * commitment transaction).
         */
-       public static byte[] build_htlc_transaction(byte[] commitment_txid, int feerate_per_kw, short contest_delay, org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, byte[] broadcaster_delayed_payment_key, byte[] revocation_key) {
-               byte[] ret = bindings.build_htlc_transaction(InternalUtils.check_arr_len(commitment_txid, 32), feerate_per_kw, contest_delay, htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, InternalUtils.check_arr_len(broadcaster_delayed_payment_key, 33), InternalUtils.check_arr_len(revocation_key, 33));
+       public static byte[] build_htlc_transaction(byte[] commitment_txid, int feerate_per_kw, short contest_delay, org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key, org.ldk.structs.RevocationKey revocation_key) {
+               byte[] ret = bindings.build_htlc_transaction(InternalUtils.check_arr_len(commitment_txid, 32), feerate_per_kw, contest_delay, htlc.ptr, channel_type_features.ptr, broadcaster_delayed_payment_key.ptr, revocation_key.ptr);
                Reference.reachabilityFence(commitment_txid);
                Reference.reachabilityFence(feerate_per_kw);
                Reference.reachabilityFence(contest_delay);
@@ -447,7 +542,7 @@ public class UtilMethods {
         * Returns the witness required to satisfy and spend a HTLC input.
         */
        public static byte[] build_htlc_input_witness(byte[] local_sig, byte[] remote_sig, org.ldk.structs.Option_ThirtyTwoBytesZ preimage, byte[] redeem_script, org.ldk.structs.ChannelTypeFeatures channel_type_features) {
-               byte[] ret = bindings.build_htlc_input_witness(InternalUtils.check_arr_len(local_sig, 64), InternalUtils.check_arr_len(remote_sig, 64), preimage.ptr, redeem_script, channel_type_features == null ? 0 : channel_type_features.ptr);
+               byte[] ret = bindings.build_htlc_input_witness(InternalUtils.check_arr_len(local_sig, 64), InternalUtils.check_arr_len(remote_sig, 64), preimage.ptr, redeem_script, channel_type_features.ptr);
                Reference.reachabilityFence(local_sig);
                Reference.reachabilityFence(remote_sig);
                Reference.reachabilityFence(preimage);
@@ -522,7 +617,7 @@ public class UtilMethods {
         * Returns an error if it is invalid.
         */
        public static Result_NoneLightningErrorZ verify_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
-               long ret = bindings.verify_node_announcement(msg == null ? 0 : msg.ptr);
+               long ret = bindings.verify_node_announcement(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
@@ -536,7 +631,7 @@ public class UtilMethods {
         * Returns an error if one of the signatures is invalid.
         */
        public static Result_NoneLightningErrorZ verify_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) {
-               long ret = bindings.verify_channel_announcement(msg == null ? 0 : msg.ptr);
+               long ret = bindings.verify_channel_announcement(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
@@ -574,7 +669,7 @@ public class UtilMethods {
         * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static Result_RouteLightningErrorZ find_route(byte[] our_node_pubkey, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, @Nullable ChannelDetails[] first_hops, org.ldk.structs.Logger logger, org.ldk.structs.ScoreLookUp scorer, org.ldk.structs.ProbabilisticScoringFeeParameters score_params, byte[] random_seed_bytes) {
-               long ret = bindings.find_route(InternalUtils.check_arr_len(our_node_pubkey, 33), route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, logger.ptr, scorer.ptr, score_params == null ? 0 : score_params.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
+               long ret = bindings.find_route(InternalUtils.check_arr_len(our_node_pubkey, 33), route_params.ptr, network_graph.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, logger.ptr, scorer.ptr, score_params.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
                Reference.reachabilityFence(our_node_pubkey);
                Reference.reachabilityFence(route_params);
                Reference.reachabilityFence(network_graph);
@@ -601,7 +696,7 @@ public class UtilMethods {
         * Re-uses logic from `find_route`, so the restrictions described there also apply here.
         */
        public static Result_RouteLightningErrorZ build_route_from_hops(byte[] our_node_pubkey, byte[][] hops, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger, byte[] random_seed_bytes) {
-               long ret = bindings.build_route_from_hops(InternalUtils.check_arr_len(our_node_pubkey, 33), hops != null ? Arrays.stream(hops).map(hops_conv_8 -> InternalUtils.check_arr_len(hops_conv_8, 33)).toArray(byte[][]::new) : null, route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, logger.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
+               long ret = bindings.build_route_from_hops(InternalUtils.check_arr_len(our_node_pubkey, 33), hops != null ? Arrays.stream(hops).map(hops_conv_8 -> InternalUtils.check_arr_len(hops_conv_8, 33)).toArray(byte[][]::new) : null, route_params.ptr, network_graph.ptr, logger.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
                Reference.reachabilityFence(our_node_pubkey);
                Reference.reachabilityFence(hops);
                Reference.reachabilityFence(route_params);
@@ -634,7 +729,7 @@ public class UtilMethods {
         * 
         * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
         */
-       public static Result_C2Tuple_CVec_u8ZusizeZNoneZ SpendableOutputDescriptor_create_spendable_outputs_psbt(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) {
+       public static Result_C2Tuple_CVec_u8Zu64ZNoneZ SpendableOutputDescriptor_create_spendable_outputs_psbt(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) {
                long ret = bindings.SpendableOutputDescriptor_create_spendable_outputs_psbt(descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr);
                Reference.reachabilityFence(descriptors);
                Reference.reachabilityFence(outputs);
@@ -642,31 +737,71 @@ public class UtilMethods {
                Reference.reachabilityFence(feerate_sat_per_1000_weight);
                Reference.reachabilityFence(locktime);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Result_C2Tuple_CVec_u8ZusizeZNoneZ ret_hu_conv = Result_C2Tuple_CVec_u8ZusizeZNoneZ.constr_from_ptr(ret);
+               Result_C2Tuple_CVec_u8Zu64ZNoneZ ret_hu_conv = Result_C2Tuple_CVec_u8Zu64ZNoneZ.constr_from_ptr(ret);
                for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(descriptors_conv_27); }; };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(locktime); };
                return ret_hu_conv;
        }
 
+       /**
+        * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
+        * `path`, first calling [`Destination::resolve`] on `path.destination` with the given
+        * [`ReadOnlyNetworkGraph`].
+        * 
+        * Returns the node id of the peer to send the message to, the message itself, and any addresses
+        * needed to connect to the first node.
+        * 
+        * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.ReadOnlyNetworkGraph network_graph, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) {
+               long ret = bindings.create_onion_message_resolving_destination(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, network_graph.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr);
+               Reference.reachabilityFence(entropy_source);
+               Reference.reachabilityFence(node_signer);
+               Reference.reachabilityFence(node_id_lookup);
+               Reference.reachabilityFence(network_graph);
+               Reference.reachabilityFence(path);
+               Reference.reachabilityFence(contents);
+               Reference.reachabilityFence(reply_path);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(network_graph); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(path); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(contents); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reply_path); };
+               return ret_hu_conv;
+       }
+
        /**
         * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
         * `path`.
         * 
-        * Returns both the node id of the peer to send the message to and the message itself.
+        * Returns the node id of the peer to send the message to, the message itself, and any addresses
+        * needed to connect to the first node.
+        * 
+        * Returns [`SendError::UnresolvedIntroductionNode`] if:
+        * - `destination` contains a blinded path with an [`IntroductionNode::DirectedShortChannelId`],
+        * - unless it can be resolved by [`NodeIdLookUp::next_node_id`].
+        * Use [`create_onion_message_resolving_destination`] instead to resolve the introduction node
+        * first with a [`ReadOnlyNetworkGraph`].
         * 
         * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) {
-               long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, path == null ? 0 : path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr);
+       public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) {
+               long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr);
                Reference.reachabilityFence(entropy_source);
                Reference.reachabilityFence(node_signer);
+               Reference.reachabilityFence(node_id_lookup);
                Reference.reachabilityFence(path);
                Reference.reachabilityFence(contents);
                Reference.reachabilityFence(reply_path);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ ret_hu_conv = Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ.constr_from_ptr(ret);
+               Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(path); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(contents); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reply_path); };
@@ -680,7 +815,7 @@ public class UtilMethods {
         * receiver.
         */
        public static Result_PeeledOnionNoneZ peel_onion_message(org.ldk.structs.OnionMessage msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.CustomOnionMessageHandler custom_handler) {
-               long ret = bindings.peel_onion_message(msg == null ? 0 : msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr);
+               long ret = bindings.peel_onion_message(msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr);
                Reference.reachabilityFence(msg);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -706,13 +841,40 @@ public class UtilMethods {
        /**
         * Create a one-hop blinded path for a payment.
         */
-       public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, org.ldk.structs.EntropySource entropy_source) {
-               long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs == null ? 0 : payee_tlvs.ptr, entropy_source.ptr);
+       public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) {
+               long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs.ptr, min_final_cltv_expiry_delta, entropy_source.ptr);
+               Reference.reachabilityFence(payee_node_id);
+               Reference.reachabilityFence(payee_tlvs);
+               Reference.reachabilityFence(min_final_cltv_expiry_delta);
+               Reference.reachabilityFence(entropy_source);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payee_tlvs); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Create a blinded path for a payment, to be forwarded along `intermediate_nodes`.
+        * 
+        * Errors if:
+        * a provided node id is invalid
+        * [`BlindedPayInfo`] calculation results in an integer overflow
+        * any unknown features are required in the provided [`ForwardTlvs`]
+        * 
+        * [`ForwardTlvs`]: crate::blinded_path::payment::ForwardTlvs
+        */
+       public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(ForwardNode[] intermediate_nodes, byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, long htlc_maximum_msat, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) {
+               long ret = bindings.BlindedPath_new_for_payment(intermediate_nodes != null ? Arrays.stream(intermediate_nodes).mapToLong(intermediate_nodes_conv_13 -> intermediate_nodes_conv_13.ptr).toArray() : null, InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs.ptr, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source.ptr);
+               Reference.reachabilityFence(intermediate_nodes);
                Reference.reachabilityFence(payee_node_id);
                Reference.reachabilityFence(payee_tlvs);
+               Reference.reachabilityFence(htlc_maximum_msat);
+               Reference.reachabilityFence(min_final_cltv_expiry_delta);
                Reference.reachabilityFence(entropy_source);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
+               for (ForwardNode intermediate_nodes_conv_13: intermediate_nodes) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(intermediate_nodes_conv_13); }; };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payee_tlvs); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
                return ret_hu_conv;
@@ -763,141 +925,48 @@ public class UtilMethods {
        }
 
        /**
-        * Pays the given [`Bolt11Invoice`], retrying if needed based on [`Retry`].
+        * Builds the necessary parameters to pay or pre-flight probe the given zero-amount
+        * [`Bolt11Invoice`] using [`ChannelManager::send_payment`] or
+        * [`ChannelManager::send_preflight_probes`].
         * 
-        * [`Bolt11Invoice::payment_hash`] is used as the [`PaymentId`], which ensures idempotency as long
-        * as the payment is still pending. If the payment succeeds, you must ensure that a second payment
-        * with the same [`PaymentHash`] is never sent.
+        * Prior to paying, you must ensure that the [`Bolt11Invoice::payment_hash`] is unique and the
+        * same [`PaymentHash`] has never been paid before.
         * 
-        * If you wish to use a different payment idempotency token, see [`pay_invoice_with_id`].
-        */
-       public static Result_ThirtyTwoBytesPaymentErrorZ pay_invoice(org.ldk.structs.Bolt11Invoice invoice, org.ldk.structs.Retry retry_strategy, org.ldk.structs.ChannelManager channelmanager) {
-               long ret = bindings.pay_invoice(invoice == null ? 0 : invoice.ptr, retry_strategy.ptr, channelmanager == null ? 0 : channelmanager.ptr);
-               Reference.reachabilityFence(invoice);
-               Reference.reachabilityFence(retry_strategy);
-               Reference.reachabilityFence(channelmanager);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_ThirtyTwoBytesPaymentErrorZ ret_hu_conv = Result_ThirtyTwoBytesPaymentErrorZ.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;
-       }
-
-       /**
-        * Pays the given [`Bolt11Invoice`] with a 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_invoice`] for a variant which uses the [`PaymentHash`] for the idempotency token.
-        */
-       public static Result_NonePaymentErrorZ pay_invoice_with_id(org.ldk.structs.Bolt11Invoice invoice, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.ChannelManager channelmanager) {
-               long ret = bindings.pay_invoice_with_id(invoice == null ? 0 : invoice.ptr, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, channelmanager == null ? 0 : channelmanager.ptr);
-               Reference.reachabilityFence(invoice);
-               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;
-       }
-
-       /**
-        * Pays the given zero-value [`Bolt11Invoice`] using the given amount, retrying if needed based on
-        * [`Retry`].
+        * Will always succeed unless the invoice has an amount specified, in which case
+        * [`payment_parameters_from_invoice`] should be used.
         * 
-        * [`Bolt11Invoice::payment_hash`] is used as the [`PaymentId`], which ensures idempotency as long
-        * as the payment is still pending. If the payment succeeds, 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
-        * [`pay_zero_value_invoice_with_id`].
+        * [`ChannelManager::send_payment`]: lightning::ln::channelmanager::ChannelManager::send_payment
+        * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
         */
-       public static Result_ThirtyTwoBytesPaymentErrorZ pay_zero_value_invoice(org.ldk.structs.Bolt11Invoice invoice, long amount_msats, org.ldk.structs.Retry retry_strategy, org.ldk.structs.ChannelManager channelmanager) {
-               long ret = bindings.pay_zero_value_invoice(invoice == null ? 0 : invoice.ptr, amount_msats, retry_strategy.ptr, channelmanager == null ? 0 : channelmanager.ptr);
+       public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_zero_amount_invoice(org.ldk.structs.Bolt11Invoice invoice, long amount_msat) {
+               long ret = bindings.payment_parameters_from_zero_amount_invoice(invoice.ptr, amount_msat);
                Reference.reachabilityFence(invoice);
-               Reference.reachabilityFence(amount_msats);
-               Reference.reachabilityFence(retry_strategy);
-               Reference.reachabilityFence(channelmanager);
+               Reference.reachabilityFence(amount_msat);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Result_ThirtyTwoBytesPaymentErrorZ ret_hu_conv = Result_ThirtyTwoBytesPaymentErrorZ.constr_from_ptr(ret);
+               Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.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;
        }
 
        /**
-        * Pays the given zero-value [`Bolt11Invoice`] using the given amount and custom idempotency key,
-        * retrying if needed based on [`Retry`].
+        * Builds the necessary parameters to pay or pre-flight probe the given [`Bolt11Invoice`] using
+        * [`ChannelManager::send_payment`] or [`ChannelManager::send_preflight_probes`].
         * 
-        * 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.
+        * Prior to paying, you must ensure that the [`Bolt11Invoice::payment_hash`] is unique and the
+        * same [`PaymentHash`] has never been paid before.
         * 
-        * You should 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.
         * 
-        * See [`pay_zero_value_invoice`] for a variant which uses the [`PaymentHash`] for the
-        * idempotency token.
+        * [`ChannelManager::send_payment`]: lightning::ln::channelmanager::ChannelManager::send_payment
+        * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
         */
-       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);
+       public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_invoice(org.ldk.structs.Bolt11Invoice invoice) {
+               long ret = bindings.payment_parameters_from_invoice(invoice.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);
+               Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.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.
-        * 
-        * See [`ChannelManager::send_preflight_probes`] for more information.
-        */
-       public static Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ preflight_probe_zero_value_invoice(org.ldk.structs.Bolt11Invoice invoice, long amount_msat, org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.Option_u64Z liquidity_limit_multiplier) {
-               long ret = bindings.preflight_probe_zero_value_invoice(invoice == null ? 0 : invoice.ptr, amount_msat, channelmanager == null ? 0 : channelmanager.ptr, liquidity_limit_multiplier.ptr);
-               Reference.reachabilityFence(invoice);
-               Reference.reachabilityFence(amount_msat);
-               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;
        }
 
@@ -944,7 +1013,7 @@ public class UtilMethods {
         * available and the current time is supplied by the caller.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, java.lang.String description, int invoice_expiry_delta_secs, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) {
-               long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
+               long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(description);
@@ -1009,7 +1078,7 @@ public class UtilMethods {
         * available and the current time is supplied by the caller.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, int invoice_expiry_delta_secs, org.ldk.structs.Sha256 description_hash, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) {
-               long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash == null ? 0 : description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
+               long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(invoice_expiry_delta_secs);
@@ -1052,7 +1121,7 @@ public class UtilMethods {
         * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -1090,7 +1159,7 @@ public class UtilMethods {
         * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -1116,7 +1185,7 @@ public class UtilMethods {
         * available and the current time is supplied by the caller.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -1143,7 +1212,7 @@ public class UtilMethods {
         * available and the current time is supplied by the caller.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -1170,7 +1239,7 @@ public class UtilMethods {
         * the payment hash is also involved outside the scope of lightning.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs, byte[] payment_hash, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.check_arr_len(payment_hash, 32), min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.check_arr_len(payment_hash, 32), min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);