5866e91333e19ba91f17515091c8a821c153e807
[ldk-java] / ts / structs / DirectionalChannelInfo.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 DirectionalChannelInfo 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.DirectionalChannelInfo_free(this.ptr);
19                     }
20                 }
21         public DirectionalChannelInfo clone() {
22                 number ret = bindings.DirectionalChannelInfo_clone(this.ptr);
23                 const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
24                 ret_hu_conv.ptrs_to.add(this);
25                 return ret_hu_conv;
26         }
27
28         public number get_last_update() {
29                 number ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr);
30                 return ret;
31         }
32
33         public void set_last_update(number val) {
34                 bindings.DirectionalChannelInfo_set_last_update(this.ptr, val);
35         }
36
37         public boolean get_enabled() {
38                 boolean ret = bindings.DirectionalChannelInfo_get_enabled(this.ptr);
39                 return ret;
40         }
41
42         public void set_enabled(boolean val) {
43                 bindings.DirectionalChannelInfo_set_enabled(this.ptr, val);
44         }
45
46         public number get_cltv_expiry_delta() {
47                 number ret = bindings.DirectionalChannelInfo_get_cltv_expiry_delta(this.ptr);
48                 return ret;
49         }
50
51         public void set_cltv_expiry_delta(number val) {
52                 bindings.DirectionalChannelInfo_set_cltv_expiry_delta(this.ptr, val);
53         }
54
55         public number get_htlc_minimum_msat() {
56                 number ret = bindings.DirectionalChannelInfo_get_htlc_minimum_msat(this.ptr);
57                 return ret;
58         }
59
60         public void set_htlc_minimum_msat(number val) {
61                 bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
62         }
63
64         public RoutingFees get_fees() {
65                 number ret = bindings.DirectionalChannelInfo_get_fees(this.ptr);
66                 const ret_hu_conv: RoutingFees = new RoutingFees(null, ret);
67                 ret_hu_conv.ptrs_to.add(this);
68                 return ret_hu_conv;
69         }
70
71         public void set_fees(RoutingFees val) {
72                 bindings.DirectionalChannelInfo_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
73                 this.ptrs_to.add(val);
74         }
75
76         public ChannelUpdate get_last_update_message() {
77                 number ret = bindings.DirectionalChannelInfo_get_last_update_message(this.ptr);
78                 const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
79                 ret_hu_conv.ptrs_to.add(this);
80                 return ret_hu_conv;
81         }
82
83         public void set_last_update_message(ChannelUpdate val) {
84                 bindings.DirectionalChannelInfo_set_last_update_message(this.ptr, val == null ? 0 : val.ptr & ~1);
85                 this.ptrs_to.add(val);
86         }
87
88         public Uint8Array write() {
89                 Uint8Array ret = bindings.DirectionalChannelInfo_write(this.ptr);
90                 return ret;
91         }
92
93         public static DirectionalChannelInfo constructor_read(Uint8Array ser) {
94                 number ret = bindings.DirectionalChannelInfo_read(ser);
95                 const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
96                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
97                 return ret_hu_conv;
98         }
99
100 }