X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelTransactionParameters.java;h=a64af1735bba87cdeb038d5612cf647bb3130c93;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=9a8899d00e2794f039af70e973eabbbcb70f01f9;hpb=a9b82019e7ffa7d32d44943133bb64e1197bd2f1;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ChannelTransactionParameters.java b/src/main/java/org/ldk/structs/ChannelTransactionParameters.java index 9a8899d0..a64af173 100644 --- a/src/main/java/org/ldk/structs/ChannelTransactionParameters.java +++ b/src/main/java/org/ldk/structs/ChannelTransactionParameters.java @@ -14,15 +14,10 @@ public class ChannelTransactionParameters extends CommonBase { if (ptr != 0) { bindings.ChannelTransactionParameters_free(ptr); } } - public ChannelTransactionParameters clone() { - long ret = bindings.ChannelTransactionParameters_clone(this.ptr); - ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret); - return ret_hu_conv; - } - public ChannelPublicKeys get_holder_pubkeys() { long ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr); ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -52,6 +47,7 @@ public class ChannelTransactionParameters extends CommonBase { public CounterpartyChannelTransactionParameters get_counterparty_parameters() { long ret = bindings.ChannelTransactionParameters_get_counterparty_parameters(this.ptr); CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -63,6 +59,7 @@ public class ChannelTransactionParameters extends CommonBase { public OutPoint get_funding_outpoint() { long ret = bindings.ChannelTransactionParameters_get_funding_outpoint(this.ptr); OutPoint ret_hu_conv = new OutPoint(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -74,12 +71,20 @@ public class ChannelTransactionParameters extends CommonBase { 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) { long 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(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() { + long ret = bindings.ChannelTransactionParameters_clone(this.ptr); + ChannelTransactionParameters ret_hu_conv = 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; @@ -88,12 +93,14 @@ public class ChannelTransactionParameters extends CommonBase { public DirectedChannelTransactionParameters as_holder_broadcastable() { long ret = bindings.ChannelTransactionParameters_as_holder_broadcastable(this.ptr); DirectedChannelTransactionParameters ret_hu_conv = new DirectedChannelTransactionParameters(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } public DirectedChannelTransactionParameters as_counterparty_broadcastable() { long ret = bindings.ChannelTransactionParameters_as_counterparty_broadcastable(this.ptr); DirectedChannelTransactionParameters ret_hu_conv = new DirectedChannelTransactionParameters(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -102,9 +109,9 @@ public class ChannelTransactionParameters extends CommonBase { return ret; } - public static ChannelTransactionParameters constructor_read(byte[] ser) { + public static Result_ChannelTransactionParametersDecodeErrorZ constructor_read(byte[] ser) { long ret = bindings.ChannelTransactionParameters_read(ser); - ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret); + Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }