X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelTransactionParameters.java;h=acf94ee71d198965ac047ea90b845f8bae2184e0;hb=a672396f21c0448656bb400cfe28b9df6e5a842b;hp=2a510c74eeadbbc05bbdebfb2723a9d4e662fcf1;hpb=5e9de82b3a7712a41189756d9d16d946142b2ac5;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ChannelTransactionParameters.java b/src/main/java/org/ldk/structs/ChannelTransactionParameters.java index 2a510c74..acf94ee7 100644 --- a/src/main/java/org/ldk/structs/ChannelTransactionParameters.java +++ b/src/main/java/org/ldk/structs/ChannelTransactionParameters.java @@ -39,7 +39,7 @@ public class ChannelTransactionParameters extends CommonBase { /** * Holder public keys */ - public void set_holder_pubkeys(ChannelPublicKeys val) { + public void set_holder_pubkeys(org.ldk.structs.ChannelPublicKeys val) { bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val == null ? 0 : val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); @@ -106,7 +106,7 @@ public class ChannelTransactionParameters extends CommonBase { * * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public void set_counterparty_parameters(@Nullable CounterpartyChannelTransactionParameters val) { + public void set_counterparty_parameters(@Nullable org.ldk.structs.CounterpartyChannelTransactionParameters val) { bindings.ChannelTransactionParameters_set_counterparty_parameters(this.ptr, val == null ? 0 : val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); @@ -133,7 +133,7 @@ public class ChannelTransactionParameters extends CommonBase { * * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None */ - public void set_funding_outpoint(@Nullable OutPoint val) { + public void set_funding_outpoint(@Nullable org.ldk.structs.OutPoint val) { bindings.ChannelTransactionParameters_set_funding_outpoint(this.ptr, val == null ? 0 : val.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(val); @@ -160,17 +160,40 @@ public class ChannelTransactionParameters extends CommonBase { Reference.reachabilityFence(val); } + /** + * Are non-zero-fee anchors are enabled (used in conjuction with opt_anchors) + * It is intended merely for backwards compatibility with signers that need it. + * There is no support for this feature in LDK channel negotiation. + */ + public COption_NoneZ get_opt_non_zero_fee_anchors() { + COption_NoneZ ret = bindings.ChannelTransactionParameters_get_opt_non_zero_fee_anchors(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Are non-zero-fee anchors are enabled (used in conjuction with opt_anchors) + * It is intended merely for backwards compatibility with signers that need it. + * There is no support for this feature in LDK channel negotiation. + */ + public void set_opt_non_zero_fee_anchors(org.ldk.enums.COption_NoneZ val) { + bindings.ChannelTransactionParameters_set_opt_non_zero_fee_anchors(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); + } + /** * Constructs a new ChannelTransactionParameters given each field */ - public static ChannelTransactionParameters of(ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, CounterpartyChannelTransactionParameters counterparty_parameters_arg, OutPoint funding_outpoint_arg, org.ldk.enums.COption_NoneZ opt_anchors_arg) { - long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, opt_anchors_arg); + public static ChannelTransactionParameters of(org.ldk.structs.ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, org.ldk.structs.CounterpartyChannelTransactionParameters counterparty_parameters_arg, org.ldk.structs.OutPoint funding_outpoint_arg, org.ldk.enums.COption_NoneZ opt_anchors_arg, org.ldk.enums.COption_NoneZ opt_non_zero_fee_anchors_arg) { + long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, opt_anchors_arg, opt_non_zero_fee_anchors_arg); Reference.reachabilityFence(holder_pubkeys_arg); Reference.reachabilityFence(holder_selected_contest_delay_arg); Reference.reachabilityFence(is_outbound_from_holder_arg); Reference.reachabilityFence(counterparty_parameters_arg); Reference.reachabilityFence(funding_outpoint_arg); Reference.reachabilityFence(opt_anchors_arg); + Reference.reachabilityFence(opt_non_zero_fee_anchors_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.ChannelTransactionParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTransactionParameters(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; @@ -198,6 +221,23 @@ public class ChannelTransactionParameters extends CommonBase { return ret_hu_conv; } + /** + * Checks if two ChannelTransactionParameterss contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(org.ldk.structs.ChannelTransactionParameters b) { + boolean ret = bindings.ChannelTransactionParameters_eq(this.ptr, b == null ? 0 : b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof ChannelTransactionParameters)) return false; + return this.eq((ChannelTransactionParameters)o); + } /** * Whether the late bound parameters are populated. */