X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FChannelTransactionParameters.ts;h=8b49117e04f80b9009681b2e38d230187073e4a6;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=3d6e367ffae3a59ae6e21524534ab287335112fd;hpb=acecce750cf1159a51f9d1a4dbfd717520739e92;p=ldk-java diff --git a/ts/structs/ChannelTransactionParameters.ts b/ts/structs/ChannelTransactionParameters.ts index 3d6e367f..8b49117e 100644 --- a/ts/structs/ChannelTransactionParameters.ts +++ b/ts/structs/ChannelTransactionParameters.ts @@ -18,21 +18,15 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.ChannelTransactionParameters_free(this.ptr); } } - public ChannelTransactionParameters clone() { - number ret = bindings.ChannelTransactionParameters_clone(this.ptr); - const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret); - return ret_hu_conv; - } - public ChannelPublicKeys get_holder_pubkeys() { 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 number get_holder_selected_contest_delay() { @@ -56,31 +50,50 @@ import * as bindings from '../bindings' // TODO: figure out location public CounterpartyChannelTransactionParameters get_counterparty_parameters() { 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() { 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, number holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, CounterpartyChannelTransactionParameters counterparty_parameters_arg, OutPoint funding_outpoint_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); + 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(holder_pubkeys_arg); - ret_hu_conv.ptrs_to.add(counterparty_parameters_arg); - ret_hu_conv.ptrs_to.add(funding_outpoint_arg); + 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; } @@ -92,12 +105,14 @@ import * as bindings from '../bindings' // TODO: figure out location public DirectedChannelTransactionParameters as_holder_broadcastable() { 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() { 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; } @@ -106,9 +121,9 @@ import * as bindings from '../bindings' // TODO: figure out location return ret; } - public static ChannelTransactionParameters constructor_read(Uint8Array ser) { + public static Result_ChannelTransactionParametersDecodeErrorZ constructor_read(Uint8Array ser) { number ret = bindings.ChannelTransactionParameters_read(ser); - const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret); + Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }