Update auto-updated Java files
[ldk-java] / ts / structs / ChannelTransactionParameters.ts
1
2             
3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
5
6
7
8             export default class ChannelTransactionParameters extends CommonBase {
9                 constructor(_dummy: object, ptr: number) {
10                     super(ptr);
11                 }
12
13                 
14                 protected finalize() {
15                     super.finalize();
16
17                     if (this.ptr != 0) {
18                         bindings.ChannelTransactionParameters_free(this.ptr);
19                     }
20                 }
21         public ChannelPublicKeys get_holder_pubkeys() {
22                 number ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr);
23                 const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
24                 ret_hu_conv.ptrs_to.add(this);
25                 return ret_hu_conv;
26         }
27
28         public void set_holder_pubkeys(ChannelPublicKeys val) {
29                 bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val == null ? 0 : val.ptr & ~1);
30         }
31
32         public number get_holder_selected_contest_delay() {
33                 number ret = bindings.ChannelTransactionParameters_get_holder_selected_contest_delay(this.ptr);
34                 return ret;
35         }
36
37         public void set_holder_selected_contest_delay(number val) {
38                 bindings.ChannelTransactionParameters_set_holder_selected_contest_delay(this.ptr, val);
39         }
40
41         public boolean get_is_outbound_from_holder() {
42                 boolean ret = bindings.ChannelTransactionParameters_get_is_outbound_from_holder(this.ptr);
43                 return ret;
44         }
45
46         public void set_is_outbound_from_holder(boolean val) {
47                 bindings.ChannelTransactionParameters_set_is_outbound_from_holder(this.ptr, val);
48         }
49
50         public CounterpartyChannelTransactionParameters get_counterparty_parameters() {
51                 number ret = bindings.ChannelTransactionParameters_get_counterparty_parameters(this.ptr);
52                 const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
53                 ret_hu_conv.ptrs_to.add(this);
54                 return ret_hu_conv;
55         }
56
57         public void set_counterparty_parameters(CounterpartyChannelTransactionParameters val) {
58                 bindings.ChannelTransactionParameters_set_counterparty_parameters(this.ptr, val == null ? 0 : val.ptr & ~1);
59         }
60
61         public OutPoint get_funding_outpoint() {
62                 number ret = bindings.ChannelTransactionParameters_get_funding_outpoint(this.ptr);
63                 const ret_hu_conv: OutPoint = new OutPoint(null, ret);
64                 ret_hu_conv.ptrs_to.add(this);
65                 return ret_hu_conv;
66         }
67
68         public void set_funding_outpoint(OutPoint val) {
69                 bindings.ChannelTransactionParameters_set_funding_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
70         }
71
72         public COption_NoneZ get_opt_anchors() {
73                 COption_NoneZ ret = bindings.ChannelTransactionParameters_get_opt_anchors(this.ptr);
74                 return ret;
75         }
76
77         public void set_opt_anchors(COption_NoneZ val) {
78                 bindings.ChannelTransactionParameters_set_opt_anchors(this.ptr, val);
79         }
80
81         public static ChannelTransactionParameters constructor_new(ChannelPublicKeys holder_pubkeys_arg, number holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, CounterpartyChannelTransactionParameters counterparty_parameters_arg, OutPoint funding_outpoint_arg, COption_NoneZ opt_anchors_arg) {
82                 number ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr & ~1, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr & ~1, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr & ~1, opt_anchors_arg);
83                 const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
84                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
85                 return ret_hu_conv;
86         }
87
88         public number clone_ptr() {
89                 number ret = bindings.ChannelTransactionParameters_clone_ptr(this.ptr);
90                 return ret;
91         }
92
93         public ChannelTransactionParameters clone() {
94                 number ret = bindings.ChannelTransactionParameters_clone(this.ptr);
95                 const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
96                 ret_hu_conv.ptrs_to.add(this);
97                 return ret_hu_conv;
98         }
99
100         public boolean is_populated() {
101                 boolean ret = bindings.ChannelTransactionParameters_is_populated(this.ptr);
102                 return ret;
103         }
104
105         public DirectedChannelTransactionParameters as_holder_broadcastable() {
106                 number ret = bindings.ChannelTransactionParameters_as_holder_broadcastable(this.ptr);
107                 const ret_hu_conv: DirectedChannelTransactionParameters = new DirectedChannelTransactionParameters(null, ret);
108                 ret_hu_conv.ptrs_to.add(this);
109                 return ret_hu_conv;
110         }
111
112         public DirectedChannelTransactionParameters as_counterparty_broadcastable() {
113                 number ret = bindings.ChannelTransactionParameters_as_counterparty_broadcastable(this.ptr);
114                 const ret_hu_conv: DirectedChannelTransactionParameters = new DirectedChannelTransactionParameters(null, ret);
115                 ret_hu_conv.ptrs_to.add(this);
116                 return ret_hu_conv;
117         }
118
119         public Uint8Array write() {
120                 Uint8Array ret = bindings.ChannelTransactionParameters_write(this.ptr);
121                 return ret;
122         }
123
124         public static Result_ChannelTransactionParametersDecodeErrorZ constructor_read(Uint8Array ser) {
125                 number ret = bindings.ChannelTransactionParameters_read(ser);
126                 Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
127                 return ret_hu_conv;
128         }
129
130 }