+ /**
+ * Creates an unsigned [`PartiallySignedTransaction`] which spends the given descriptors to
+ * the given outputs, plus an output to the given change destination (if sufficient
+ * change value remains). The PSBT will have a feerate, at least, of the given value.
+ *
+ * The `locktime` argument is used to set the transaction's locktime. If `None`, the
+ * transaction will have a locktime of 0. It it recommended to set this to the current block
+ * height to avoid fee sniping, unless you have some specific reason to use a different
+ * locktime.
+ *
+ * Returns the PSBT and expected max transaction weight.
+ *
+ * Returns `Err(())` if the output value is greater than the input value minus required fee,
+ * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
+ * does not match the one we can spend.
+ *
+ * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
+ */
+ public static Result_C2Tuple_PartiallySignedTransactionusizeZNoneZ SpendableOutputDescriptor_create_spendable_outputs_psbt(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_PackedLockTimeZ 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);
+ Reference.reachabilityFence(change_destination_script);
+ Reference.reachabilityFence(feerate_sat_per_1000_weight);
+ Reference.reachabilityFence(locktime);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_PartiallySignedTransactionusizeZNoneZ ret_hu_conv = Result_C2Tuple_PartiallySignedTransactionusizeZNoneZ.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;
+ }
+
+ /**
+ * Returns whether `tlv_type` corresponds to a TLV record for Offers.
+ */
+ public static boolean OffersMessage_is_known_type(long tlv_type) {
+ boolean ret = bindings.OffersMessage_is_known_type(tlv_type);
+ Reference.reachabilityFence(tlv_type);
+ return ret;
+ }
+