X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FChannelTransactionParameters.ts;h=1877ccee35f4f87c164155f1141ac5a0d227a7ad;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=3d6e367ffae3a59ae6e21524534ab287335112fd;hpb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;p=ldk-java diff --git a/ts/structs/ChannelTransactionParameters.ts b/ts/structs/ChannelTransactionParameters.ts index 3d6e367f..1877ccee 100644 --- a/ts/structs/ChannelTransactionParameters.ts +++ b/ts/structs/ChannelTransactionParameters.ts @@ -18,15 +18,10 @@ 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; } @@ -56,6 +51,7 @@ 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; } @@ -67,6 +63,7 @@ import * as bindings from '../bindings' // TODO: figure out location 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; } @@ -78,12 +75,20 @@ import * as bindings from '../bindings' // TODO: figure out location 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 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 boolean is_populated() { boolean ret = bindings.ChannelTransactionParameters_is_populated(this.ptr); return ret; @@ -92,12 +97,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 +113,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; }