- public Result_PaymentSecretAPIErrorZ create_inbound_payment_for_hash(byte[] payment_hash, Option_u64Z min_value_msat, int invoice_expiry_delta_secs, long user_payment_id) {
- long ret = bindings.ChannelManager_create_inbound_payment_for_hash(this.ptr, payment_hash, min_value_msat.ptr, invoice_expiry_delta_secs, user_payment_id);
+ public Result_PaymentSecretNoneZ create_inbound_payment_for_hash(byte[] payment_hash, Option_u64Z min_value_msat, int invoice_expiry_delta_secs) {
+ long ret = bindings.ChannelManager_create_inbound_payment_for_hash(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), min_value_msat.ptr, invoice_expiry_delta_secs);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payment_hash);
+ Reference.reachabilityFence(min_value_msat);
+ Reference.reachabilityFence(invoice_expiry_delta_secs);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_PaymentSecretNoneZ ret_hu_conv = Result_PaymentSecretNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Legacy version of [`create_inbound_payment_for_hash`]. Use this method if you wish to share
+ * serialized state with LDK node(s) running 0.0.103 and earlier.
+ *
+ * # Note
+ * This method is deprecated and will be removed soon.
+ *
+ * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
+ */
+ public Result_PaymentSecretAPIErrorZ create_inbound_payment_for_hash_legacy(byte[] payment_hash, Option_u64Z min_value_msat, int invoice_expiry_delta_secs) {
+ long ret = bindings.ChannelManager_create_inbound_payment_for_hash_legacy(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), min_value_msat.ptr, invoice_expiry_delta_secs);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payment_hash);
+ Reference.reachabilityFence(min_value_msat);
+ Reference.reachabilityFence(invoice_expiry_delta_secs);