+ * Returns an error if the input at `input_idx` does not exist, has a non-empty `script_sig`,
+ * is not spending the outpoint described by [`descriptor.outpoint`],
+ * or if an output descriptor `script_pubkey` does not match the one we can spend.
+ *
+ * [`descriptor.outpoint`]: StaticPaymentOutputDescriptor::outpoint
+ */
+ public Result_WitnessNoneZ sign_counterparty_payment_input(byte[] spend_tx, long input_idx, org.ldk.structs.StaticPaymentOutputDescriptor descriptor) {
+ long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(spend_tx);
+ Reference.reachabilityFence(input_idx);
+ Reference.reachabilityFence(descriptor);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_WitnessNoneZ ret_hu_conv = Result_WitnessNoneZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(descriptor); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sign the single input of `spend_tx` at index `input_idx` which spends the output
+ * described by `descriptor`, returning the witness stack for the input.
+ *
+ * Returns an error if the input at `input_idx` does not exist, has a non-empty `script_sig`,
+ * is not spending the outpoint described by [`descriptor.outpoint`], does not have a
+ * sequence set to [`descriptor.to_self_delay`], or if an output descriptor
+ * `script_pubkey` does not match the one we can spend.
+ *
+ * [`descriptor.outpoint`]: DelayedPaymentOutputDescriptor::outpoint
+ * [`descriptor.to_self_delay`]: DelayedPaymentOutputDescriptor::to_self_delay
+ */
+ public Result_WitnessNoneZ sign_dynamic_p2wsh_input(byte[] spend_tx, long input_idx, org.ldk.structs.DelayedPaymentOutputDescriptor descriptor) {
+ long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(spend_tx);
+ Reference.reachabilityFence(input_idx);
+ Reference.reachabilityFence(descriptor);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_WitnessNoneZ ret_hu_conv = Result_WitnessNoneZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(descriptor); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new EntropySource which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
+ */
+ public EntropySource as_EntropySource() {
+ long ret = bindings.InMemorySigner_as_EntropySource(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ EntropySource ret_hu_conv = new EntropySource(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new ChannelSigner which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ChannelSigner must be freed before this_arg is