3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class ChannelInfo extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.ChannelInfo_free(this.ptr);
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 ret_hu_conv.ptrs_to.add(this);
28 public void set_features(ChannelFeatures val) {
29 bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
30 this.ptrs_to.add(val);
33 public Uint8Array get_node_one() {
34 Uint8Array ret = bindings.ChannelInfo_get_node_one(this.ptr);
38 public void set_node_one(Uint8Array val) {
39 bindings.ChannelInfo_set_node_one(this.ptr, val);
42 public DirectionalChannelInfo get_one_to_two() {
43 number ret = bindings.ChannelInfo_get_one_to_two(this.ptr);
44 const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
45 ret_hu_conv.ptrs_to.add(this);
49 public void set_one_to_two(DirectionalChannelInfo val) {
50 bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0 : val.ptr & ~1);
51 this.ptrs_to.add(val);
54 public Uint8Array get_node_two() {
55 Uint8Array ret = bindings.ChannelInfo_get_node_two(this.ptr);
59 public void set_node_two(Uint8Array val) {
60 bindings.ChannelInfo_set_node_two(this.ptr, val);
63 public DirectionalChannelInfo get_two_to_one() {
64 number ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
65 const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
66 ret_hu_conv.ptrs_to.add(this);
70 public void set_two_to_one(DirectionalChannelInfo val) {
71 bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : val.ptr & ~1);
72 this.ptrs_to.add(val);
75 public ChannelAnnouncement get_announcement_message() {
76 number ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
77 const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
78 ret_hu_conv.ptrs_to.add(this);
82 public void set_announcement_message(ChannelAnnouncement val) {
83 bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
84 this.ptrs_to.add(val);
87 public ChannelInfo clone() {
88 number ret = bindings.ChannelInfo_clone(this.ptr);
89 const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
90 ret_hu_conv.ptrs_to.add(this);
94 public Uint8Array write() {
95 Uint8Array ret = bindings.ChannelInfo_write(this.ptr);
99 public static Result_ChannelInfoDecodeErrorZ constructor_read(Uint8Array ser) {
100 number ret = bindings.ChannelInfo_read(ser);
101 Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);