3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class ChannelAnnouncement extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.ChannelAnnouncement_free(this.ptr);
21 public Uint8Array get_node_signature_1() {
22 Uint8Array ret = bindings.ChannelAnnouncement_get_node_signature_1(this.ptr);
26 public void set_node_signature_1(Uint8Array val) {
27 bindings.ChannelAnnouncement_set_node_signature_1(this.ptr, val);
30 public Uint8Array get_node_signature_2() {
31 Uint8Array ret = bindings.ChannelAnnouncement_get_node_signature_2(this.ptr);
35 public void set_node_signature_2(Uint8Array val) {
36 bindings.ChannelAnnouncement_set_node_signature_2(this.ptr, val);
39 public Uint8Array get_bitcoin_signature_1() {
40 Uint8Array ret = bindings.ChannelAnnouncement_get_bitcoin_signature_1(this.ptr);
44 public void set_bitcoin_signature_1(Uint8Array val) {
45 bindings.ChannelAnnouncement_set_bitcoin_signature_1(this.ptr, val);
48 public Uint8Array get_bitcoin_signature_2() {
49 Uint8Array ret = bindings.ChannelAnnouncement_get_bitcoin_signature_2(this.ptr);
53 public void set_bitcoin_signature_2(Uint8Array val) {
54 bindings.ChannelAnnouncement_set_bitcoin_signature_2(this.ptr, val);
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);
64 public void set_contents(UnsignedChannelAnnouncement val) {
65 bindings.ChannelAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr & ~1);
66 this.ptrs_to.add(val);
69 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) {
70 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);
71 const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
72 ret_hu_conv.ptrs_to.add(ret_hu_conv);
73 ret_hu_conv.ptrs_to.add(contents_arg);
77 public ChannelAnnouncement clone() {
78 number ret = bindings.ChannelAnnouncement_clone(this.ptr);
79 const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
80 ret_hu_conv.ptrs_to.add(this);
84 public Uint8Array write() {
85 Uint8Array ret = bindings.ChannelAnnouncement_write(this.ptr);
89 public static Result_ChannelAnnouncementDecodeErrorZ constructor_read(Uint8Array ser) {
90 number ret = bindings.ChannelAnnouncement_read(ser);
91 Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);