]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/ChannelDetails.ts
Update auto-generate bindings (incl new RL clone methods)
[ldk-java] / ts / structs / ChannelDetails.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 ChannelDetails 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.ChannelDetails_free(this.ptr);
19                     }
20                 }
21         public Uint8Array get_channel_id() {
22                 Uint8Array ret = bindings.ChannelDetails_get_channel_id(this.ptr);
23                 return ret;
24         }
25
26         public void set_channel_id(Uint8Array val) {
27                 bindings.ChannelDetails_set_channel_id(this.ptr, val);
28         }
29
30         public ChannelCounterparty get_counterparty() {
31                 number ret = bindings.ChannelDetails_get_counterparty(this.ptr);
32                 const ret_hu_conv: ChannelCounterparty = new ChannelCounterparty(null, ret);
33                 ret_hu_conv.ptrs_to.add(this);
34                 return ret_hu_conv;
35         }
36
37         public void set_counterparty(ChannelCounterparty val) {
38                 bindings.ChannelDetails_set_counterparty(this.ptr, val == null ? 0 : val.ptr & ~1);
39         }
40
41         public OutPoint get_funding_txo() {
42                 number ret = bindings.ChannelDetails_get_funding_txo(this.ptr);
43                 const ret_hu_conv: OutPoint = new OutPoint(null, ret);
44                 ret_hu_conv.ptrs_to.add(this);
45                 return ret_hu_conv;
46         }
47
48         public void set_funding_txo(OutPoint val) {
49                 bindings.ChannelDetails_set_funding_txo(this.ptr, val == null ? 0 : val.ptr & ~1);
50         }
51
52         public Option_u64Z get_short_channel_id() {
53                 number ret = bindings.ChannelDetails_get_short_channel_id(this.ptr);
54                 Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
55                 ret_hu_conv.ptrs_to.add(this);
56                 return ret_hu_conv;
57         }
58
59         public void set_short_channel_id(Option_u64Z val) {
60                 bindings.ChannelDetails_set_short_channel_id(this.ptr, val.ptr);
61         }
62
63         public number get_channel_value_satoshis() {
64                 number ret = bindings.ChannelDetails_get_channel_value_satoshis(this.ptr);
65                 return ret;
66         }
67
68         public void set_channel_value_satoshis(number val) {
69                 bindings.ChannelDetails_set_channel_value_satoshis(this.ptr, val);
70         }
71
72         public Option_u64Z get_unspendable_punishment_reserve() {
73                 number ret = bindings.ChannelDetails_get_unspendable_punishment_reserve(this.ptr);
74                 Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
75                 ret_hu_conv.ptrs_to.add(this);
76                 return ret_hu_conv;
77         }
78
79         public void set_unspendable_punishment_reserve(Option_u64Z val) {
80                 bindings.ChannelDetails_set_unspendable_punishment_reserve(this.ptr, val.ptr);
81         }
82
83         public number get_user_channel_id() {
84                 number ret = bindings.ChannelDetails_get_user_channel_id(this.ptr);
85                 return ret;
86         }
87
88         public void set_user_channel_id(number val) {
89                 bindings.ChannelDetails_set_user_channel_id(this.ptr, val);
90         }
91
92         public number get_outbound_capacity_msat() {
93                 number ret = bindings.ChannelDetails_get_outbound_capacity_msat(this.ptr);
94                 return ret;
95         }
96
97         public void set_outbound_capacity_msat(number val) {
98                 bindings.ChannelDetails_set_outbound_capacity_msat(this.ptr, val);
99         }
100
101         public number get_inbound_capacity_msat() {
102                 number ret = bindings.ChannelDetails_get_inbound_capacity_msat(this.ptr);
103                 return ret;
104         }
105
106         public void set_inbound_capacity_msat(number val) {
107                 bindings.ChannelDetails_set_inbound_capacity_msat(this.ptr, val);
108         }
109
110         public Option_u32Z get_confirmations_required() {
111                 number ret = bindings.ChannelDetails_get_confirmations_required(this.ptr);
112                 Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
113                 ret_hu_conv.ptrs_to.add(this);
114                 return ret_hu_conv;
115         }
116
117         public void set_confirmations_required(Option_u32Z val) {
118                 bindings.ChannelDetails_set_confirmations_required(this.ptr, val.ptr);
119         }
120
121         public Option_u16Z get_force_close_spend_delay() {
122                 number ret = bindings.ChannelDetails_get_force_close_spend_delay(this.ptr);
123                 Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret);
124                 ret_hu_conv.ptrs_to.add(this);
125                 return ret_hu_conv;
126         }
127
128         public void set_force_close_spend_delay(Option_u16Z val) {
129                 bindings.ChannelDetails_set_force_close_spend_delay(this.ptr, val.ptr);
130         }
131
132         public boolean get_is_outbound() {
133                 boolean ret = bindings.ChannelDetails_get_is_outbound(this.ptr);
134                 return ret;
135         }
136
137         public void set_is_outbound(boolean val) {
138                 bindings.ChannelDetails_set_is_outbound(this.ptr, val);
139         }
140
141         public boolean get_is_funding_locked() {
142                 boolean ret = bindings.ChannelDetails_get_is_funding_locked(this.ptr);
143                 return ret;
144         }
145
146         public void set_is_funding_locked(boolean val) {
147                 bindings.ChannelDetails_set_is_funding_locked(this.ptr, val);
148         }
149
150         public boolean get_is_usable() {
151                 boolean ret = bindings.ChannelDetails_get_is_usable(this.ptr);
152                 return ret;
153         }
154
155         public void set_is_usable(boolean val) {
156                 bindings.ChannelDetails_set_is_usable(this.ptr, val);
157         }
158
159         public boolean get_is_public() {
160                 boolean ret = bindings.ChannelDetails_get_is_public(this.ptr);
161                 return ret;
162         }
163
164         public void set_is_public(boolean val) {
165                 bindings.ChannelDetails_set_is_public(this.ptr, val);
166         }
167
168         public static ChannelDetails constructor_new(Uint8Array channel_id_arg, ChannelCounterparty counterparty_arg, OutPoint funding_txo_arg, Option_u64Z short_channel_id_arg, number channel_value_satoshis_arg, Option_u64Z unspendable_punishment_reserve_arg, number user_channel_id_arg, number outbound_capacity_msat_arg, number inbound_capacity_msat_arg, Option_u32Z confirmations_required_arg, Option_u16Z force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_funding_locked_arg, boolean is_usable_arg, boolean is_public_arg) {
169                 number ret = bindings.ChannelDetails_new(channel_id_arg, counterparty_arg == null ? 0 : counterparty_arg.ptr & ~1, funding_txo_arg == null ? 0 : funding_txo_arg.ptr & ~1, short_channel_id_arg.ptr, channel_value_satoshis_arg, unspendable_punishment_reserve_arg.ptr, user_channel_id_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg.ptr, force_close_spend_delay_arg.ptr, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg);
170                 const ret_hu_conv: ChannelDetails = new ChannelDetails(null, ret);
171                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
172                 return ret_hu_conv;
173         }
174
175         public ChannelDetails clone() {
176                 number ret = bindings.ChannelDetails_clone(this.ptr);
177                 const ret_hu_conv: ChannelDetails = new ChannelDetails(null, ret);
178                 ret_hu_conv.ptrs_to.add(this);
179                 return ret_hu_conv;
180         }
181
182 }