1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class DelayedPaymentOutputDescriptor extends CommonBase {
10 DelayedPaymentOutputDescriptor(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.DelayedPaymentOutputDescriptor_free(ptr); }
17 public OutPoint get_outpoint() {
18 long ret = bindings.DelayedPaymentOutputDescriptor_get_outpoint(this.ptr);
19 OutPoint ret_hu_conv = new OutPoint(null, ret);
20 ret_hu_conv.ptrs_to.add(this);
24 public void set_outpoint(OutPoint val) {
25 bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
26 this.ptrs_to.add(val);
29 public byte[] get_per_commitment_point() {
30 byte[] ret = bindings.DelayedPaymentOutputDescriptor_get_per_commitment_point(this.ptr);
34 public void set_per_commitment_point(byte[] val) {
35 bindings.DelayedPaymentOutputDescriptor_set_per_commitment_point(this.ptr, val);
38 public short get_to_self_delay() {
39 short ret = bindings.DelayedPaymentOutputDescriptor_get_to_self_delay(this.ptr);
43 public void set_to_self_delay(short val) {
44 bindings.DelayedPaymentOutputDescriptor_set_to_self_delay(this.ptr, val);
47 public void set_output(TxOut val) {
48 bindings.DelayedPaymentOutputDescriptor_set_output(this.ptr, val.ptr);
51 public byte[] get_revocation_pubkey() {
52 byte[] ret = bindings.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this.ptr);
56 public void set_revocation_pubkey(byte[] val) {
57 bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val);
60 public byte[] get_channel_keys_id() {
61 byte[] ret = bindings.DelayedPaymentOutputDescriptor_get_channel_keys_id(this.ptr);
65 public void set_channel_keys_id(byte[] val) {
66 bindings.DelayedPaymentOutputDescriptor_set_channel_keys_id(this.ptr, val);
69 public long get_channel_value_satoshis() {
70 long ret = bindings.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this.ptr);
74 public void set_channel_value_satoshis(long val) {
75 bindings.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val);
78 public static DelayedPaymentOutputDescriptor constructor_new(OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, TxOut output_arg, byte[] revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) {
79 long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, per_commitment_point_arg, to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg, channel_keys_id_arg, channel_value_satoshis_arg);
80 DelayedPaymentOutputDescriptor ret_hu_conv = new DelayedPaymentOutputDescriptor(null, ret);
81 ret_hu_conv.ptrs_to.add(ret_hu_conv);
82 ret_hu_conv.ptrs_to.add(outpoint_arg);
86 public DelayedPaymentOutputDescriptor clone() {
87 long ret = bindings.DelayedPaymentOutputDescriptor_clone(this.ptr);
88 DelayedPaymentOutputDescriptor ret_hu_conv = new DelayedPaymentOutputDescriptor(null, ret);
89 ret_hu_conv.ptrs_to.add(this);