[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / TxAddOutput.cs
index 7b31d9e145c7c6d788a579c9007372c6f33a09d6..be541edbcd41d917d83a95a73009f7e54b540614 100644 (file)
@@ -19,16 +19,18 @@ public class TxAddOutput : CommonBase {
         * The channel ID
         */
        public byte[] get_channel_id() {
-               byte[] ret = bindings.TxAddOutput_get_channel_id(this.ptr);
+               long ret = bindings.TxAddOutput_get_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;
        }
 
        /**
         * The channel ID
         */
        public void set_channel_id(byte[] val) {
-               bindings.TxAddOutput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+               bindings.TxAddOutput_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
                GC.KeepAlive(this);
                GC.KeepAlive(val);
        }
@@ -75,16 +77,18 @@ public class TxAddOutput : CommonBase {
         * The scriptPubKey for the output
         */
        public byte[] get_script() {
-               byte[] ret = bindings.TxAddOutput_get_script(this.ptr);
+               long ret = bindings.TxAddOutput_get_script(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
        }
 
        /**
         * The scriptPubKey for the output
         */
        public void set_script(byte[] val) {
-               bindings.TxAddOutput_set_script(this.ptr, val);
+               bindings.TxAddOutput_set_script(this.ptr, InternalUtils.encodeUint8Array(val));
                GC.KeepAlive(this);
                GC.KeepAlive(val);
        }
@@ -93,7 +97,7 @@ public class TxAddOutput : CommonBase {
         * Constructs a new TxAddOutput given each field
         */
        public static TxAddOutput of(byte[] channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg) {
-               long ret = bindings.TxAddOutput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg, sats_arg, script_arg);
+               long ret = bindings.TxAddOutput_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), serial_id_arg, sats_arg, InternalUtils.encodeUint8Array(script_arg));
                GC.KeepAlive(channel_id_arg);
                GC.KeepAlive(serial_id_arg);
                GC.KeepAlive(sats_arg);
@@ -143,16 +147,18 @@ public class TxAddOutput : CommonBase {
         * Serialize the TxAddOutput object into a byte array which can be read by TxAddOutput_read
         */
        public byte[] write() {
-               byte[] ret = bindings.TxAddOutput_write(this.ptr);
+               long ret = bindings.TxAddOutput_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 TxAddOutput from a byte array, created by TxAddOutput_write
         */
        public static Result_TxAddOutputDecodeErrorZ read(byte[] ser) {
-               long ret = bindings.TxAddOutput_read(ser);
+               long ret = bindings.TxAddOutput_read(InternalUtils.encodeUint8Array(ser));
                GC.KeepAlive(ser);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxAddOutputDecodeErrorZ ret_hu_conv = Result_TxAddOutputDecodeErrorZ.constr_from_ptr(ret);