Update auto-generated bindings
[ldk-java] / ts / structs / ChannelInfo.ts
index 6ea880e41cc267bc7f1fd3b9e2540d4d3266a5d7..0101375df6dd49e9792caf1560c5035a8556524f 100644 (file)
@@ -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,25 @@ 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 static ChannelInfo constructor_new(ChannelFeatures features_arg, NodeId node_one_arg, DirectionalChannelInfo one_to_two_arg, NodeId node_two_arg, DirectionalChannelInfo two_to_one_arg, Option_u64Z capacity_sats_arg, ChannelAnnouncement announcement_message_arg) {
+               number ret = bindings.ChannelInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, node_one_arg == null ? 0 : node_one_arg.ptr & ~1, one_to_two_arg == null ? 0 : one_to_two_arg.ptr & ~1, node_two_arg == null ? 0 : node_two_arg.ptr & ~1, two_to_one_arg == null ? 0 : two_to_one_arg.ptr & ~1, capacity_sats_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+               const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public number clone_ptr() {
+               number ret = bindings.ChannelInfo_clone_ptr(this.ptr);
+               return ret;
+       }
+
+       public ChannelInfo clone() {
+               number ret = bindings.ChannelInfo_clone(this.ptr);
+               const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
        }
 
        public Uint8Array write() {