[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / OutPoint.cs
index c7187ff8ffec71f284ba19122c4ac2cd4ce05f71..2d01d0a24cc9c02ab95d5f77cff1cbb846cd3e50 100644 (file)
@@ -22,16 +22,18 @@ public class OutPoint : CommonBase {
         * The referenced transaction's txid.
         */
        public byte[] get_txid() {
-               byte[] ret = bindings.OutPoint_get_txid(this.ptr);
+               long ret = bindings.OutPoint_get_txid(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
        }
 
        /**
         * The referenced transaction's txid.
         */
        public void set_txid(byte[] val) {
-               bindings.OutPoint_set_txid(this.ptr, InternalUtils.check_arr_len(val, 32));
+               bindings.OutPoint_set_txid(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
                GC.KeepAlive(this);
                GC.KeepAlive(val);
        }
@@ -58,7 +60,7 @@ public class OutPoint : CommonBase {
         * Constructs a new OutPoint given each field
         */
        public static OutPoint of(byte[] txid_arg, short index_arg) {
-               long ret = bindings.OutPoint_new(InternalUtils.check_arr_len(txid_arg, 32), index_arg);
+               long ret = bindings.OutPoint_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(txid_arg, 32)), index_arg);
                GC.KeepAlive(txid_arg);
                GC.KeepAlive(index_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -118,25 +120,29 @@ public class OutPoint : CommonBase {
         * Convert an `OutPoint` to a lightning channel id.
         */
        public byte[] to_channel_id() {
-               byte[] ret = bindings.OutPoint_to_channel_id(this.ptr);
+               long ret = bindings.OutPoint_to_channel_id(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
        }
 
        /**
         * Serialize the OutPoint object into a byte array which can be read by OutPoint_read
         */
        public byte[] write() {
-               byte[] ret = bindings.OutPoint_write(this.ptr);
+               long ret = bindings.OutPoint_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 OutPoint from a byte array, created by OutPoint_write
         */
        public static Result_OutPointDecodeErrorZ read(byte[] ser) {
-               long ret = bindings.OutPoint_read(ser);
+               long ret = bindings.OutPoint_read(InternalUtils.encodeUint8Array(ser));
                GC.KeepAlive(ser);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);