Bindings updates
[ldk-java] / ts / structs / ChannelInfo.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 ChannelInfo 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.ChannelInfo_free(this.ptr);
19                     }
20                 }
21         public ChannelFeatures get_features() {
22                 number ret = bindings.ChannelInfo_get_features(this.ptr);
23                 const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
24                 return ret_hu_conv;
25         }
26
27         public void set_features(ChannelFeatures val) {
28                 bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
29                 this.ptrs_to.add(val);
30         }
31
32         public Uint8Array get_node_one() {
33                 Uint8Array ret = bindings.ChannelInfo_get_node_one(this.ptr);
34                 return ret;
35         }
36
37         public void set_node_one(Uint8Array val) {
38                 bindings.ChannelInfo_set_node_one(this.ptr, val);
39         }
40
41         public DirectionalChannelInfo get_one_to_two() {
42                 number ret = bindings.ChannelInfo_get_one_to_two(this.ptr);
43                 const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
44                 return ret_hu_conv;
45         }
46
47         public void set_one_to_two(DirectionalChannelInfo val) {
48                 bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0 : val.ptr & ~1);
49                 this.ptrs_to.add(val);
50         }
51
52         public Uint8Array get_node_two() {
53                 Uint8Array ret = bindings.ChannelInfo_get_node_two(this.ptr);
54                 return ret;
55         }
56
57         public void set_node_two(Uint8Array val) {
58                 bindings.ChannelInfo_set_node_two(this.ptr, val);
59         }
60
61         public DirectionalChannelInfo get_two_to_one() {
62                 number ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
63                 const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
64                 return ret_hu_conv;
65         }
66
67         public void set_two_to_one(DirectionalChannelInfo val) {
68                 bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : val.ptr & ~1);
69                 this.ptrs_to.add(val);
70         }
71
72         public ChannelAnnouncement get_announcement_message() {
73                 number ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
74                 const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
75                 return ret_hu_conv;
76         }
77
78         public void set_announcement_message(ChannelAnnouncement val) {
79                 bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
80                 this.ptrs_to.add(val);
81         }
82
83         public Uint8Array write() {
84                 Uint8Array ret = bindings.ChannelInfo_write(this.ptr);
85                 return ret;
86         }
87
88         public static ChannelInfo constructor_read(Uint8Array ser) {
89                 number ret = bindings.ChannelInfo_read(ser);
90                 const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
91                 return ret_hu_conv;
92         }
93
94 }