X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FChannelTransactionParameters.ts;h=7efbc0cf914b6c9aab402ef6bc92c8580156ee54;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=3a9d901671094b34bd2aba6154c1ae0baf56d6d9;hpb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;p=ldk-java diff --git a/ts/structs/ChannelTransactionParameters.ts b/ts/structs/ChannelTransactionParameters.ts index 3a9d9016..7efbc0cf 100644 --- a/ts/structs/ChannelTransactionParameters.ts +++ b/ts/structs/ChannelTransactionParameters.ts @@ -18,13 +18,6 @@ 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); - ret_hu_conv.ptrs_to.add(this); - 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); @@ -34,7 +27,6 @@ import * as bindings from '../bindings' // TODO: figure out location 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() { @@ -64,7 +56,6 @@ import * as bindings from '../bindings' // TODO: figure out location 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() { @@ -76,16 +67,24 @@ import * as bindings from '../bindings' // TODO: figure out location 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); const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); - 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); + 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; } @@ -113,10 +112,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); - ret_hu_conv.ptrs_to.add(ret_hu_conv); + Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }