[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / NodeAlias.cs
index b0cb8e6b8eec0c59646dc7b56799745f3c1e3910..84c9daa85f4083873191e5d97dd9864410bb2de7 100644 (file)
@@ -19,13 +19,15 @@ public class NodeAlias : CommonBase {
        }
 
        public byte[] get_a() {
-               byte[] ret = bindings.NodeAlias_get_a(this.ptr);
+               long ret = bindings.NodeAlias_get_a(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
        }
 
        public void set_a(byte[] val) {
-               bindings.NodeAlias_set_a(this.ptr, InternalUtils.check_arr_len(val, 32));
+               bindings.NodeAlias_set_a(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
                GC.KeepAlive(this);
                GC.KeepAlive(val);
        }
@@ -34,7 +36,7 @@ public class NodeAlias : CommonBase {
         * Constructs a new NodeAlias given each field
         */
        public static NodeAlias of(byte[] a_arg) {
-               long ret = bindings.NodeAlias_new(InternalUtils.check_arr_len(a_arg, 32));
+               long ret = bindings.NodeAlias_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a_arg, 32)));
                GC.KeepAlive(a_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.NodeAlias ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeAlias(null, ret); }
@@ -81,16 +83,18 @@ public class NodeAlias : CommonBase {
         * Serialize the NodeAlias object into a byte array which can be read by NodeAlias_read
         */
        public byte[] write() {
-               byte[] ret = bindings.NodeAlias_write(this.ptr);
+               long ret = bindings.NodeAlias_write(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
        }
 
        /**
         * Read a NodeAlias from a byte array, created by NodeAlias_write
         */
        public static Result_NodeAliasDecodeErrorZ read(byte[] ser) {
-               long ret = bindings.NodeAlias_read(ser);
+               long ret = bindings.NodeAlias_read(InternalUtils.encodeUint8Array(ser));
                GC.KeepAlive(ser);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeAliasDecodeErrorZ ret_hu_conv = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret);