fd70cb97486eb83d9849a971f3104e9b6437c166
[ldk-java] / src / main / java / org / ldk / structs / DelayedPaymentOutputDescriptor.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
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 {
13                 super.finalize();
14                 if (ptr != 0) { bindings.DelayedPaymentOutputDescriptor_free(ptr); }
15         }
16
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);
21                 return ret_hu_conv;
22         }
23
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);
27         }
28
29         public byte[] get_per_commitment_point() {
30                 byte[] ret = bindings.DelayedPaymentOutputDescriptor_get_per_commitment_point(this.ptr);
31                 return ret;
32         }
33
34         public void set_per_commitment_point(byte[] val) {
35                 bindings.DelayedPaymentOutputDescriptor_set_per_commitment_point(this.ptr, val);
36         }
37
38         public short get_to_self_delay() {
39                 short ret = bindings.DelayedPaymentOutputDescriptor_get_to_self_delay(this.ptr);
40                 return ret;
41         }
42
43         public void set_to_self_delay(short val) {
44                 bindings.DelayedPaymentOutputDescriptor_set_to_self_delay(this.ptr, val);
45         }
46
47         public void set_output(TxOut val) {
48                 bindings.DelayedPaymentOutputDescriptor_set_output(this.ptr, val.ptr);
49         }
50
51         public byte[] get_revocation_pubkey() {
52                 byte[] ret = bindings.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this.ptr);
53                 return ret;
54         }
55
56         public void set_revocation_pubkey(byte[] val) {
57                 bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val);
58         }
59
60         public byte[] get_channel_keys_id() {
61                 byte[] ret = bindings.DelayedPaymentOutputDescriptor_get_channel_keys_id(this.ptr);
62                 return ret;
63         }
64
65         public void set_channel_keys_id(byte[] val) {
66                 bindings.DelayedPaymentOutputDescriptor_set_channel_keys_id(this.ptr, val);
67         }
68
69         public long get_channel_value_satoshis() {
70                 long ret = bindings.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this.ptr);
71                 return ret;
72         }
73
74         public void set_channel_value_satoshis(long val) {
75                 bindings.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val);
76         }
77
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);
83                 return ret_hu_conv;
84         }
85
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);
90                 return ret_hu_conv;
91         }
92
93 }