]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/UnsignedChannelAnnouncement.ts
Merge pull request #14 from TheBlueMatt/2021-03-fix-enums
[ldk-java] / ts / structs / UnsignedChannelAnnouncement.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 UnsignedChannelAnnouncement 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.UnsignedChannelAnnouncement_free(this.ptr);
19                     }
20                 }
21         public ChannelFeatures get_features() {
22                 number ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr);
23                 const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
24                 ret_hu_conv.ptrs_to.add(this);
25                 return ret_hu_conv;
26         }
27
28         public void set_features(ChannelFeatures val) {
29                 bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
30                 this.ptrs_to.add(val);
31         }
32
33         public Uint8Array get_chain_hash() {
34                 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_chain_hash(this.ptr);
35                 return ret;
36         }
37
38         public void set_chain_hash(Uint8Array val) {
39                 bindings.UnsignedChannelAnnouncement_set_chain_hash(this.ptr, val);
40         }
41
42         public number get_short_channel_id() {
43                 number ret = bindings.UnsignedChannelAnnouncement_get_short_channel_id(this.ptr);
44                 return ret;
45         }
46
47         public void set_short_channel_id(number val) {
48                 bindings.UnsignedChannelAnnouncement_set_short_channel_id(this.ptr, val);
49         }
50
51         public Uint8Array get_node_id_1() {
52                 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_node_id_1(this.ptr);
53                 return ret;
54         }
55
56         public void set_node_id_1(Uint8Array val) {
57                 bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val);
58         }
59
60         public Uint8Array get_node_id_2() {
61                 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_node_id_2(this.ptr);
62                 return ret;
63         }
64
65         public void set_node_id_2(Uint8Array val) {
66                 bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val);
67         }
68
69         public Uint8Array get_bitcoin_key_1() {
70                 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_bitcoin_key_1(this.ptr);
71                 return ret;
72         }
73
74         public void set_bitcoin_key_1(Uint8Array val) {
75                 bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val);
76         }
77
78         public Uint8Array get_bitcoin_key_2() {
79                 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_bitcoin_key_2(this.ptr);
80                 return ret;
81         }
82
83         public void set_bitcoin_key_2(Uint8Array val) {
84                 bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val);
85         }
86
87         public UnsignedChannelAnnouncement clone() {
88                 number ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
89                 const ret_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, ret);
90                 ret_hu_conv.ptrs_to.add(this);
91                 return ret_hu_conv;
92         }
93
94         public Uint8Array write() {
95                 Uint8Array ret = bindings.UnsignedChannelAnnouncement_write(this.ptr);
96                 return ret;
97         }
98
99         public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_read(Uint8Array ser) {
100                 number ret = bindings.UnsignedChannelAnnouncement_read(ser);
101                 Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
102                 return ret_hu_conv;
103         }
104
105 }