Make genbindings.sh only build one of java/wasm, test wasm in CI
[ldk-java] / ts / structs / AcceptChannel.ts
index bcd54516bfab8732647fe558d425068d44d692fb..4e102c77817673f1ac0b4940fae7f834bbdc4c2a 100644 (file)
@@ -18,19 +18,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.AcceptChannel_free(this.ptr);
                     }
                 }
-       public AcceptChannel clone() {
-               number ret = bindings.AcceptChannel_clone(this.ptr);
-               const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_temporary_channel_id() {
                Uint8Array ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
                return ret;
        }
 
        public void set_temporary_channel_id(Uint8Array val) {
-               bindings.AcceptChannel_set_temporary_channel_id(this.ptr, val);
+               bindings.AcceptChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
        }
 
        public number get_dust_limit_satoshis() {
@@ -102,7 +96,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_funding_pubkey(Uint8Array val) {
-               bindings.AcceptChannel_set_funding_pubkey(this.ptr, val);
+               bindings.AcceptChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
        }
 
        public Uint8Array get_revocation_basepoint() {
@@ -111,7 +105,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_revocation_basepoint(Uint8Array val) {
-               bindings.AcceptChannel_set_revocation_basepoint(this.ptr, val);
+               bindings.AcceptChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
        }
 
        public Uint8Array get_payment_point() {
@@ -120,7 +114,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_payment_point(Uint8Array val) {
-               bindings.AcceptChannel_set_payment_point(this.ptr, val);
+               bindings.AcceptChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
        }
 
        public Uint8Array get_delayed_payment_basepoint() {
@@ -129,7 +123,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_delayed_payment_basepoint(Uint8Array val) {
-               bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, val);
+               bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
        }
 
        public Uint8Array get_htlc_basepoint() {
@@ -138,7 +132,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_htlc_basepoint(Uint8Array val) {
-               bindings.AcceptChannel_set_htlc_basepoint(this.ptr, val);
+               bindings.AcceptChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
        }
 
        public Uint8Array get_first_per_commitment_point() {
@@ -147,7 +141,19 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_first_per_commitment_point(Uint8Array val) {
-               bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val);
+               bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
+       }
+
+       public number clone_ptr() {
+               number ret = bindings.AcceptChannel_clone_ptr(this.ptr);
+               return ret;
+       }
+
+       public AcceptChannel clone() {
+               number ret = bindings.AcceptChannel_clone(this.ptr);
+               const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
        }
 
        public Uint8Array write() {
@@ -155,9 +161,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static AcceptChannel constructor_read(Uint8Array ser) {
+       public static Result_AcceptChannelDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.AcceptChannel_read(ser);
-               const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
+               Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }