}
/**
- * Minimum allowed satoshis when a channel is funded, this is supplied by the sender and so
+ * Minimum allowed satoshis when a channel is funded. This is supplied by the sender and so
* only applies to inbound channels.
*
* Default value: 0.
}
/**
- * Minimum allowed satoshis when a channel is funded, this is supplied by the sender and so
+ * Minimum allowed satoshis when a channel is funded. This is supplied by the sender and so
* only applies to inbound channels.
*
* Default value: 0.
Reference.reachabilityFence(val);
}
+ /**
+ * Maximum allowed satoshis when a channel is funded. This is supplied by the sender and so
+ * only applies to inbound channels.
+ *
+ * Default value: 2^24 - 1.
+ */
+ public long get_max_funding_satoshis() {
+ long ret = bindings.ChannelHandshakeLimits_get_max_funding_satoshis(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Maximum allowed satoshis when a channel is funded. This is supplied by the sender and so
+ * only applies to inbound channels.
+ *
+ * Default value: 2^24 - 1.
+ */
+ public void set_max_funding_satoshis(long val) {
+ bindings.ChannelHandshakeLimits_set_max_funding_satoshis(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
/**
* The remote node sets a limit on the minimum size of HTLCs we can send to them. This allows
* you to limit the maximum minimum-size they can require.
Reference.reachabilityFence(val);
}
+ /**
+ * Whether we implicitly trust funding transactions generated by us for our own outbound
+ * channels to not be double-spent.
+ *
+ * If this is set, we assume that our own funding transactions are *never* double-spent, and
+ * thus we can trust them without any confirmations. This is generally a reasonable
+ * assumption, given we're the only ones who could ever double-spend it (assuming we have sole
+ * control of the signing keys).
+ *
+ * You may wish to un-set this if you allow the user to (or do in an automated fashion)
+ * double-spend the funding transaction to RBF with an alternative channel open.
+ *
+ * This only applies if our counterparty set their confirmations-required value to 0, and we
+ * always trust our own funding transaction at 1 confirmation irrespective of this value.
+ * Thus, this effectively acts as a `min_minimum_depth`, with the only possible values being
+ * `true` (0) and `false` (1).
+ *
+ * Default value: true
+ */
+ public boolean get_trust_own_funding_0conf() {
+ boolean ret = bindings.ChannelHandshakeLimits_get_trust_own_funding_0conf(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Whether we implicitly trust funding transactions generated by us for our own outbound
+ * channels to not be double-spent.
+ *
+ * If this is set, we assume that our own funding transactions are *never* double-spent, and
+ * thus we can trust them without any confirmations. This is generally a reasonable
+ * assumption, given we're the only ones who could ever double-spend it (assuming we have sole
+ * control of the signing keys).
+ *
+ * You may wish to un-set this if you allow the user to (or do in an automated fashion)
+ * double-spend the funding transaction to RBF with an alternative channel open.
+ *
+ * This only applies if our counterparty set their confirmations-required value to 0, and we
+ * always trust our own funding transaction at 1 confirmation irrespective of this value.
+ * Thus, this effectively acts as a `min_minimum_depth`, with the only possible values being
+ * `true` (0) and `false` (1).
+ *
+ * Default value: true
+ */
+ public void set_trust_own_funding_0conf(boolean val) {
+ bindings.ChannelHandshakeLimits_set_trust_own_funding_0conf(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
/**
* Set to force an incoming channel to match our announced channel preference in
* [`ChannelConfig::announced_channel`].
/**
* Constructs a new ChannelHandshakeLimits given each field
*/
- public static ChannelHandshakeLimits of(long min_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, short min_max_accepted_htlcs_arg, int max_minimum_depth_arg, boolean force_announced_channel_preference_arg, short their_to_self_delay_arg) {
- long ret = bindings.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
+ public static ChannelHandshakeLimits of(long min_funding_satoshis_arg, long max_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, short min_max_accepted_htlcs_arg, int max_minimum_depth_arg, boolean trust_own_funding_0conf_arg, boolean force_announced_channel_preference_arg, short their_to_self_delay_arg) {
+ long ret = bindings.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, max_minimum_depth_arg, trust_own_funding_0conf_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
Reference.reachabilityFence(min_funding_satoshis_arg);
+ Reference.reachabilityFence(max_funding_satoshis_arg);
Reference.reachabilityFence(max_htlc_minimum_msat_arg);
Reference.reachabilityFence(min_max_htlc_value_in_flight_msat_arg);
Reference.reachabilityFence(max_channel_reserve_satoshis_arg);
Reference.reachabilityFence(min_max_accepted_htlcs_arg);
Reference.reachabilityFence(max_minimum_depth_arg);
+ Reference.reachabilityFence(trust_own_funding_0conf_arg);
Reference.reachabilityFence(force_announced_channel_preference_arg);
Reference.reachabilityFence(their_to_self_delay_arg);
if (ret >= 0 && ret <= 4096) { return null; }
- ChannelHandshakeLimits ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeLimits(null, ret); }
+ org.ldk.structs.ChannelHandshakeLimits ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelHandshakeLimits(null, ret); }
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
long ret = bindings.ChannelHandshakeLimits_clone(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- ChannelHandshakeLimits ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeLimits(null, ret); }
+ org.ldk.structs.ChannelHandshakeLimits ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelHandshakeLimits(null, ret); }
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
public static ChannelHandshakeLimits with_default() {
long ret = bindings.ChannelHandshakeLimits_default();
if (ret >= 0 && ret <= 4096) { return null; }
- ChannelHandshakeLimits ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeLimits(null, ret); }
+ org.ldk.structs.ChannelHandshakeLimits ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelHandshakeLimits(null, ret); }
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}