- public void set_our_htlc_minimum_msat(ChannelHandshakeConfig this_ptr, long val) {
- bindings.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
- this.ptrs_to.add(this_ptr);
+ /**
+ * Set to the smallest value HTLC we will accept to process.
+ *
+ * This value is sent to our counterparty on channel-open and we close the channel any time
+ * our counterparty misbehaves by sending us an HTLC with a value smaller than this.
+ *
+ * Default value: 1. If the value is less than 1, it is ignored and set to 1, as is required
+ * by the protocol.
+ */
+ public void set_our_htlc_minimum_msat(long val) {
+ bindings.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this.ptr, val);
+ }
+
+ /**
+ * Constructs a new ChannelHandshakeConfig given each field
+ */
+ public static ChannelHandshakeConfig of(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) {
+ long ret = bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeConfig(null, ret); }
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;