- public void set_their_to_self_delay(ChannelHandshakeLimits this_ptr, short val) {
- bindings.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
- this.ptrs_to.add(this_ptr);
+ /**
+ * Set to the amount of time we're willing to wait to claim money back to us.
+ *
+ * Not checking this value would be a security issue, as our peer would be able to set it to
+ * max relative lock-time (a year) and we would \"lose\" money as it would be locked for a long time.
+ *
+ * Default value: MAX_LOCAL_BREAKDOWN_TIMEOUT (1008), which we also enforce as a maximum value
+ * so you can tweak config to reduce the loss of having useless locked funds (if your peer accepts)
+ */
+ public void set_their_to_self_delay(short val) {
+ bindings.ChannelHandshakeLimits_set_their_to_self_delay(this.ptr, val);
+ }
+
+ /**
+ * Constructs a new ChannelHandshakeLimits given each field
+ */
+ public static ChannelHandshakeLimits constructor_new(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, long min_dust_limit_satoshis_arg, long max_dust_limit_satoshis_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, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
+ ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;