X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FChannelInfo.ts;h=19a1837936d72c45f008a5c5c752215f8f524795;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=ea7a292f8cacf9cabb302524ee2571cb7ff1ab46;hpb=276893d3b8bd3fcb2bb10e3cab73a69d34831909;p=ldk-java diff --git a/ts/structs/ChannelInfo.ts b/ts/structs/ChannelInfo.ts index ea7a292f..19a18379 100644 --- a/ts/structs/ChannelInfo.ts +++ b/ts/structs/ChannelInfo.ts @@ -27,16 +27,17 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_features(ChannelFeatures val) { bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1); - this.ptrs_to.add(val); } - public Uint8Array get_node_one() { - Uint8Array ret = bindings.ChannelInfo_get_node_one(this.ptr); - return ret; + public NodeId get_node_one() { + number ret = bindings.ChannelInfo_get_node_one(this.ptr); + const ret_hu_conv: NodeId = new NodeId(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; } - public void set_node_one(Uint8Array val) { - bindings.ChannelInfo_set_node_one(this.ptr, val); + public void set_node_one(NodeId val) { + bindings.ChannelInfo_set_node_one(this.ptr, val == null ? 0 : val.ptr & ~1); } public DirectionalChannelInfo get_one_to_two() { @@ -48,16 +49,17 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_one_to_two(DirectionalChannelInfo val) { bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0 : val.ptr & ~1); - this.ptrs_to.add(val); } - public Uint8Array get_node_two() { - Uint8Array ret = bindings.ChannelInfo_get_node_two(this.ptr); - return ret; + public NodeId get_node_two() { + number ret = bindings.ChannelInfo_get_node_two(this.ptr); + const ret_hu_conv: NodeId = new NodeId(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; } - public void set_node_two(Uint8Array val) { - bindings.ChannelInfo_set_node_two(this.ptr, val); + public void set_node_two(NodeId val) { + bindings.ChannelInfo_set_node_two(this.ptr, val == null ? 0 : val.ptr & ~1); } public DirectionalChannelInfo get_two_to_one() { @@ -69,7 +71,17 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_two_to_one(DirectionalChannelInfo val) { bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : val.ptr & ~1); - this.ptrs_to.add(val); + } + + public Option_u64Z get_capacity_sats() { + number ret = bindings.ChannelInfo_get_capacity_sats(this.ptr); + Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public void set_capacity_sats(Option_u64Z val) { + bindings.ChannelInfo_set_capacity_sats(this.ptr, val.ptr); } public ChannelAnnouncement get_announcement_message() { @@ -81,7 +93,11 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_announcement_message(ChannelAnnouncement val) { bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1); - this.ptrs_to.add(val); + } + + public number clone_ptr() { + number ret = bindings.ChannelInfo_clone_ptr(this.ptr); + return ret; } public ChannelInfo clone() {