Update auto-updated Java files
[ldk-java] / ts / structs / ChannelTransactionParameters.ts
index 45cf099abb6c445e9290b4bc70bc32d28e08ed1f..8b49117e04f80b9009681b2e38d230187073e4a6 100644 (file)
@@ -1,38 +1,40 @@
 
+            
 import CommonBase from './CommonBase';
 import * as bindings from '../bindings' // TODO: figure out location
 
-public class ChannelTransactionParameters extends CommonBase {
-       ChannelTransactionParameters(Object _dummy, long ptr) { super(ptr); }
-       @Override @SuppressWarnings("deprecation")
-       protected void finalize() throws Throwable {
-               super.finalize();
-               if (ptr != 0) { bindings.ChannelTransactionParameters_free(ptr); }
-       }
 
-       public ChannelTransactionParameters clone() {
-               uint32_t ret = bindings.ChannelTransactionParameters_clone(this.ptr);
-               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
-               return ret_hu_conv;
-       }
 
+            export default class ChannelTransactionParameters extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.ChannelTransactionParameters_free(this.ptr);
+                    }
+                }
        public ChannelPublicKeys get_holder_pubkeys() {
-               uint32_t ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr);
-               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
+               number ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr);
+               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
        public void set_holder_pubkeys(ChannelPublicKeys val) {
                bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(val);
        }
 
-       public short get_holder_selected_contest_delay() {
-               short ret = bindings.ChannelTransactionParameters_get_holder_selected_contest_delay(this.ptr);
+       public number get_holder_selected_contest_delay() {
+               number ret = bindings.ChannelTransactionParameters_get_holder_selected_contest_delay(this.ptr);
                return ret;
        }
 
-       public void set_holder_selected_contest_delay(short val) {
+       public void set_holder_selected_contest_delay(number val) {
                bindings.ChannelTransactionParameters_set_holder_selected_contest_delay(this.ptr, val);
        }
 
@@ -46,33 +48,52 @@ public class ChannelTransactionParameters extends CommonBase {
        }
 
        public CounterpartyChannelTransactionParameters get_counterparty_parameters() {
-               uint32_t ret = bindings.ChannelTransactionParameters_get_counterparty_parameters(this.ptr);
-               CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret);
+               number ret = bindings.ChannelTransactionParameters_get_counterparty_parameters(this.ptr);
+               const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
        public void set_counterparty_parameters(CounterpartyChannelTransactionParameters val) {
                bindings.ChannelTransactionParameters_set_counterparty_parameters(this.ptr, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(val);
        }
 
        public OutPoint get_funding_outpoint() {
-               uint32_t ret = bindings.ChannelTransactionParameters_get_funding_outpoint(this.ptr);
-               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               number ret = bindings.ChannelTransactionParameters_get_funding_outpoint(this.ptr);
+               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
        public void set_funding_outpoint(OutPoint val) {
                bindings.ChannelTransactionParameters_set_funding_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(val);
        }
 
-       public static ChannelTransactionParameters constructor_new(ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, CounterpartyChannelTransactionParameters counterparty_parameters_arg, OutPoint funding_outpoint_arg) {
-               uint32_t ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr & ~1, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr & ~1, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr & ~1);
-               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(holder_pubkeys_arg);
-               ret_hu_conv.ptrs_to.add(counterparty_parameters_arg);
-               ret_hu_conv.ptrs_to.add(funding_outpoint_arg);
+       public COption_NoneZ get_opt_anchors() {
+               COption_NoneZ ret = bindings.ChannelTransactionParameters_get_opt_anchors(this.ptr);
+               return ret;
+       }
+
+       public void set_opt_anchors(COption_NoneZ val) {
+               bindings.ChannelTransactionParameters_set_opt_anchors(this.ptr, val);
+       }
+
+       public static ChannelTransactionParameters constructor_new(ChannelPublicKeys holder_pubkeys_arg, number holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, CounterpartyChannelTransactionParameters counterparty_parameters_arg, OutPoint funding_outpoint_arg, COption_NoneZ opt_anchors_arg) {
+               number ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr & ~1, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr & ~1, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr & ~1, opt_anchors_arg);
+               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public number clone_ptr() {
+               number ret = bindings.ChannelTransactionParameters_clone_ptr(this.ptr);
+               return ret;
+       }
+
+       public ChannelTransactionParameters clone() {
+               number ret = bindings.ChannelTransactionParameters_clone(this.ptr);
+               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
@@ -82,25 +103,27 @@ public class ChannelTransactionParameters extends CommonBase {
        }
 
        public DirectedChannelTransactionParameters as_holder_broadcastable() {
-               uint32_t ret = bindings.ChannelTransactionParameters_as_holder_broadcastable(this.ptr);
-               DirectedChannelTransactionParameters ret_hu_conv = new DirectedChannelTransactionParameters(null, ret);
+               number ret = bindings.ChannelTransactionParameters_as_holder_broadcastable(this.ptr);
+               const ret_hu_conv: DirectedChannelTransactionParameters = new DirectedChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
        public DirectedChannelTransactionParameters as_counterparty_broadcastable() {
-               uint32_t ret = bindings.ChannelTransactionParameters_as_counterparty_broadcastable(this.ptr);
-               DirectedChannelTransactionParameters ret_hu_conv = new DirectedChannelTransactionParameters(null, ret);
+               number ret = bindings.ChannelTransactionParameters_as_counterparty_broadcastable(this.ptr);
+               const ret_hu_conv: DirectedChannelTransactionParameters = new DirectedChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
-       public byte[] write() {
-               byte[] ret = bindings.ChannelTransactionParameters_write(this.ptr);
+       public Uint8Array write() {
+               Uint8Array ret = bindings.ChannelTransactionParameters_write(this.ptr);
                return ret;
        }
 
-       public static ChannelTransactionParameters constructor_read(byte[] ser) {
-               uint32_t ret = bindings.ChannelTransactionParameters_read(ser);
-               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
+       public static Result_ChannelTransactionParametersDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.ChannelTransactionParameters_read(ser);
+               Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }