[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / ReadOnlyNetworkGraph.cs
index 15b8005a083772f6d4b8590d3e98d81a4b46b2a0..0434b8903716fd7efb0f015ec6d2b4fe1e4c5346 100644 (file)
@@ -34,9 +34,11 @@ public class ReadOnlyNetworkGraph : CommonBase, IDisposable {
         * Returns the list of channels in the graph
         */
        public long[] list_channels() {
-               long[] ret = bindings.ReadOnlyNetworkGraph_list_channels(this.ptr);
+               long ret = bindings.ReadOnlyNetworkGraph_list_channels(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               long[] ret_conv = InternalUtils.decodeUint64Array(ret);
+               return ret_conv;
        }
 
        /**
@@ -59,16 +61,18 @@ public class ReadOnlyNetworkGraph : CommonBase, IDisposable {
         * Returns the list of nodes in the graph
         */
        public NodeId[] list_nodes() {
-               long[] ret = bindings.ReadOnlyNetworkGraph_list_nodes(this.ptr);
+               long ret = bindings.ReadOnlyNetworkGraph_list_nodes(this.ptr);
                GC.KeepAlive(this);
-               int ret_conv_8_len = ret.Length;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               int ret_conv_8_len = InternalUtils.getArrayLength(ret);
                NodeId[] ret_conv_8_arr = new NodeId[ret_conv_8_len];
                for (int i = 0; i < ret_conv_8_len; i++) {
-                       long ret_conv_8 = ret[i];
+                       long ret_conv_8 = InternalUtils.getU64ArrayElem(ret, i);
                        org.ldk.structs.NodeId ret_conv_8_hu_conv = null; if (ret_conv_8 < 0 || ret_conv_8 > 4096) { ret_conv_8_hu_conv = new org.ldk.structs.NodeId(null, ret_conv_8); }
                        if (ret_conv_8_hu_conv != null) { ret_conv_8_hu_conv.ptrs_to.AddLast(this); };
                        ret_conv_8_arr[i] = ret_conv_8_hu_conv;
                }
+               bindings.free_buffer(ret);
                return ret_conv_8_arr;
        }
 
@@ -77,12 +81,12 @@ public class ReadOnlyNetworkGraph : CommonBase, IDisposable {
         * Returns None if the requested node is completely unknown,
         * or if node announcement for the node was never received.
         */
-       public Option_CVec_NetAddressZZ get_addresses(byte[] pubkey) {
-               long ret = bindings.ReadOnlyNetworkGraph_get_addresses(this.ptr, InternalUtils.check_arr_len(pubkey, 33));
+       public Option_CVec_SocketAddressZZ get_addresses(byte[] pubkey) {
+               long ret = bindings.ReadOnlyNetworkGraph_get_addresses(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(pubkey, 33)));
                GC.KeepAlive(this);
                GC.KeepAlive(pubkey);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret);
+               org.ldk.structs.Option_CVec_SocketAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_SocketAddressZZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
                return ret_hu_conv;
        }