]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/ChannelAnnouncement.ts
Update auto-generated bindings to 0.0.103
[ldk-java] / ts / structs / ChannelAnnouncement.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 ChannelAnnouncement 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.ChannelAnnouncement_free(this.ptr);
19                     }
20                 }
21         public Uint8Array get_node_signature_1() {
22                 Uint8Array ret = bindings.ChannelAnnouncement_get_node_signature_1(this.ptr);
23                 return ret;
24         }
25
26         public void set_node_signature_1(Uint8Array val) {
27                 bindings.ChannelAnnouncement_set_node_signature_1(this.ptr, val);
28         }
29
30         public Uint8Array get_node_signature_2() {
31                 Uint8Array ret = bindings.ChannelAnnouncement_get_node_signature_2(this.ptr);
32                 return ret;
33         }
34
35         public void set_node_signature_2(Uint8Array val) {
36                 bindings.ChannelAnnouncement_set_node_signature_2(this.ptr, val);
37         }
38
39         public Uint8Array get_bitcoin_signature_1() {
40                 Uint8Array ret = bindings.ChannelAnnouncement_get_bitcoin_signature_1(this.ptr);
41                 return ret;
42         }
43
44         public void set_bitcoin_signature_1(Uint8Array val) {
45                 bindings.ChannelAnnouncement_set_bitcoin_signature_1(this.ptr, val);
46         }
47
48         public Uint8Array get_bitcoin_signature_2() {
49                 Uint8Array ret = bindings.ChannelAnnouncement_get_bitcoin_signature_2(this.ptr);
50                 return ret;
51         }
52
53         public void set_bitcoin_signature_2(Uint8Array val) {
54                 bindings.ChannelAnnouncement_set_bitcoin_signature_2(this.ptr, val);
55         }
56
57         public UnsignedChannelAnnouncement get_contents() {
58                 number ret = bindings.ChannelAnnouncement_get_contents(this.ptr);
59                 const ret_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, ret);
60                 ret_hu_conv.ptrs_to.add(this);
61                 return ret_hu_conv;
62         }
63
64         public void set_contents(UnsignedChannelAnnouncement val) {
65                 bindings.ChannelAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr & ~1);
66         }
67
68         public static ChannelAnnouncement constructor_new(Uint8Array node_signature_1_arg, Uint8Array node_signature_2_arg, Uint8Array bitcoin_signature_1_arg, Uint8Array bitcoin_signature_2_arg, UnsignedChannelAnnouncement contents_arg) {
69                 number ret = bindings.ChannelAnnouncement_new(node_signature_1_arg, node_signature_2_arg, bitcoin_signature_1_arg, bitcoin_signature_2_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1);
70                 const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
71                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
72                 return ret_hu_conv;
73         }
74
75         public ChannelAnnouncement clone() {
76                 number ret = bindings.ChannelAnnouncement_clone(this.ptr);
77                 const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
78                 ret_hu_conv.ptrs_to.add(this);
79                 return ret_hu_conv;
80         }
81
82         public Uint8Array write() {
83                 Uint8Array ret = bindings.ChannelAnnouncement_write(this.ptr);
84                 return ret;
85         }
86
87         public static Result_ChannelAnnouncementDecodeErrorZ constructor_read(Uint8Array ser) {
88                 number ret = bindings.ChannelAnnouncement_read(ser);
89                 Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
90                 return ret_hu_conv;
91         }
92
93 }