3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class UnsignedChannelAnnouncement extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.UnsignedChannelAnnouncement_free(this.ptr);
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);
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);
33 public Uint8Array get_chain_hash() {
34 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_chain_hash(this.ptr);
38 public void set_chain_hash(Uint8Array val) {
39 bindings.UnsignedChannelAnnouncement_set_chain_hash(this.ptr, val);
42 public number get_short_channel_id() {
43 number ret = bindings.UnsignedChannelAnnouncement_get_short_channel_id(this.ptr);
47 public void set_short_channel_id(number val) {
48 bindings.UnsignedChannelAnnouncement_set_short_channel_id(this.ptr, val);
51 public Uint8Array get_node_id_1() {
52 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_node_id_1(this.ptr);
56 public void set_node_id_1(Uint8Array val) {
57 bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val);
60 public Uint8Array get_node_id_2() {
61 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_node_id_2(this.ptr);
65 public void set_node_id_2(Uint8Array val) {
66 bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val);
69 public Uint8Array get_bitcoin_key_1() {
70 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_bitcoin_key_1(this.ptr);
74 public void set_bitcoin_key_1(Uint8Array val) {
75 bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val);
78 public Uint8Array get_bitcoin_key_2() {
79 Uint8Array ret = bindings.UnsignedChannelAnnouncement_get_bitcoin_key_2(this.ptr);
83 public void set_bitcoin_key_2(Uint8Array val) {
84 bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val);
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);
94 public Uint8Array write() {
95 Uint8Array ret = bindings.UnsignedChannelAnnouncement_write(this.ptr);
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);