1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
12 * Configuration we set when applicable.
14 * Default::default() provides sane defaults.
16 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
17 public class ChannelHandshakeConfig extends CommonBase {
18 ChannelHandshakeConfig(Object _dummy, long ptr) { super(ptr); }
19 @Override @SuppressWarnings("deprecation")
20 protected void finalize() throws Throwable {
22 if (ptr != 0) { bindings.ChannelHandshakeConfig_free(ptr); }
26 * Confirmations we will wait for before considering the channel locked in.
27 * Applied only for inbound channels (see ChannelHandshakeLimits::max_minimum_depth for the
28 * equivalent limit applied to outbound channels).
30 * A lower-bound of 1 is applied, requiring all channels to have a confirmed commitment
31 * transaction before operation. If you wish to accept channels with zero confirmations, see
32 * [`UserConfig::manually_accept_inbound_channels`] and
33 * [`ChannelManager::accept_inbound_channel_from_trusted_peer_0conf`].
37 * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
38 * [`ChannelManager::accept_inbound_channel_from_trusted_peer_0conf`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel_from_trusted_peer_0conf
40 public int get_minimum_depth() {
41 int ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this.ptr);
42 Reference.reachabilityFence(this);
47 * Confirmations we will wait for before considering the channel locked in.
48 * Applied only for inbound channels (see ChannelHandshakeLimits::max_minimum_depth for the
49 * equivalent limit applied to outbound channels).
51 * A lower-bound of 1 is applied, requiring all channels to have a confirmed commitment
52 * transaction before operation. If you wish to accept channels with zero confirmations, see
53 * [`UserConfig::manually_accept_inbound_channels`] and
54 * [`ChannelManager::accept_inbound_channel_from_trusted_peer_0conf`].
58 * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
59 * [`ChannelManager::accept_inbound_channel_from_trusted_peer_0conf`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel_from_trusted_peer_0conf
61 public void set_minimum_depth(int val) {
62 bindings.ChannelHandshakeConfig_set_minimum_depth(this.ptr, val);
63 Reference.reachabilityFence(this);
64 Reference.reachabilityFence(val);
68 * Set to the number of blocks we require our counterparty to wait to claim their money (ie
69 * the number of blocks we have to punish our counterparty if they broadcast a revoked
72 * This is one of the main parameters of our security model. We (or one of our watchtowers) MUST
73 * be online to check for revoked transactions on-chain at least once every our_to_self_delay
74 * blocks (minus some margin to allow us enough time to broadcast and confirm a transaction,
75 * possibly with time in between to RBF the spending transaction).
77 * Meanwhile, asking for a too high delay, we bother peer to freeze funds for nothing in
78 * case of an honest unilateral channel close, which implicitly decrease the economic value of
81 * Default value: [`BREAKDOWN_TIMEOUT`], we enforce it as a minimum at channel opening so you
82 * can tweak config to ask for more security, not less.
84 public short get_our_to_self_delay() {
85 short ret = bindings.ChannelHandshakeConfig_get_our_to_self_delay(this.ptr);
86 Reference.reachabilityFence(this);
91 * Set to the number of blocks we require our counterparty to wait to claim their money (ie
92 * the number of blocks we have to punish our counterparty if they broadcast a revoked
95 * This is one of the main parameters of our security model. We (or one of our watchtowers) MUST
96 * be online to check for revoked transactions on-chain at least once every our_to_self_delay
97 * blocks (minus some margin to allow us enough time to broadcast and confirm a transaction,
98 * possibly with time in between to RBF the spending transaction).
100 * Meanwhile, asking for a too high delay, we bother peer to freeze funds for nothing in
101 * case of an honest unilateral channel close, which implicitly decrease the economic value of
104 * Default value: [`BREAKDOWN_TIMEOUT`], we enforce it as a minimum at channel opening so you
105 * can tweak config to ask for more security, not less.
107 public void set_our_to_self_delay(short val) {
108 bindings.ChannelHandshakeConfig_set_our_to_self_delay(this.ptr, val);
109 Reference.reachabilityFence(this);
110 Reference.reachabilityFence(val);
114 * Set to the smallest value HTLC we will accept to process.
116 * This value is sent to our counterparty on channel-open and we close the channel any time
117 * our counterparty misbehaves by sending us an HTLC with a value smaller than this.
119 * Default value: 1. If the value is less than 1, it is ignored and set to 1, as is required
122 public long get_our_htlc_minimum_msat() {
123 long ret = bindings.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this.ptr);
124 Reference.reachabilityFence(this);
129 * Set to the smallest value HTLC we will accept to process.
131 * This value is sent to our counterparty on channel-open and we close the channel any time
132 * our counterparty misbehaves by sending us an HTLC with a value smaller than this.
134 * Default value: 1. If the value is less than 1, it is ignored and set to 1, as is required
137 public void set_our_htlc_minimum_msat(long val) {
138 bindings.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this.ptr, val);
139 Reference.reachabilityFence(this);
140 Reference.reachabilityFence(val);
144 * Sets the percentage of the channel value we will cap the total value of outstanding inbound
147 * This can be set to a value between 1-100, where the value corresponds to the percent of the
148 * channel value in whole percentages.
151 * If configured to another value than the default value 10, any new channels created with
152 * the non default value will cause versions of LDK prior to 0.0.104 to refuse to read the
155 * This caps the total value for inbound HTLCs in-flight only, and there's currently
156 * no way to configure the cap for the total value of outbound HTLCs in-flight.
158 * The requirements for your node being online to ensure the safety of HTLC-encumbered funds
159 * are different from the non-HTLC-encumbered funds. This makes this an important knob to
160 * restrict exposure to loss due to being offline for too long.
161 * See [`ChannelHandshakeConfig::our_to_self_delay`] and [`ChannelConfig::cltv_expiry_delta`]
162 * for more information.
165 * Minimum value: 1, any values less than 1 will be treated as 1 instead.
166 * Maximum value: 100, any values larger than 100 will be treated as 100 instead.
168 public byte get_max_inbound_htlc_value_in_flight_percent_of_channel() {
169 byte ret = bindings.ChannelHandshakeConfig_get_max_inbound_htlc_value_in_flight_percent_of_channel(this.ptr);
170 Reference.reachabilityFence(this);
175 * Sets the percentage of the channel value we will cap the total value of outstanding inbound
178 * This can be set to a value between 1-100, where the value corresponds to the percent of the
179 * channel value in whole percentages.
182 * If configured to another value than the default value 10, any new channels created with
183 * the non default value will cause versions of LDK prior to 0.0.104 to refuse to read the
186 * This caps the total value for inbound HTLCs in-flight only, and there's currently
187 * no way to configure the cap for the total value of outbound HTLCs in-flight.
189 * The requirements for your node being online to ensure the safety of HTLC-encumbered funds
190 * are different from the non-HTLC-encumbered funds. This makes this an important knob to
191 * restrict exposure to loss due to being offline for too long.
192 * See [`ChannelHandshakeConfig::our_to_self_delay`] and [`ChannelConfig::cltv_expiry_delta`]
193 * for more information.
196 * Minimum value: 1, any values less than 1 will be treated as 1 instead.
197 * Maximum value: 100, any values larger than 100 will be treated as 100 instead.
199 public void set_max_inbound_htlc_value_in_flight_percent_of_channel(byte val) {
200 bindings.ChannelHandshakeConfig_set_max_inbound_htlc_value_in_flight_percent_of_channel(this.ptr, val);
201 Reference.reachabilityFence(this);
202 Reference.reachabilityFence(val);
206 * If set, we attempt to negotiate the `scid_privacy` (referred to as `scid_alias` in the
207 * BOLTs) option for outbound private channels. This provides better privacy by not including
208 * our real on-chain channel UTXO in each invoice and requiring that our counterparty only
209 * relay HTLCs to us using the channel's SCID alias.
211 * If this option is set, channels may be created that will not be readable by LDK versions
212 * prior to 0.0.106, causing [`ChannelManager`]'s read method to return a
213 * [`DecodeError::InvalidValue`].
215 * Note that setting this to true does *not* prevent us from opening channels with
216 * counterparties that do not support the `scid_alias` option; we will simply fall back to a
217 * private channel without that option.
219 * Ignored if the channel is negotiated to be announced, see
220 * [`ChannelHandshakeConfig::announced_channel`] and
221 * [`ChannelHandshakeLimits::force_announced_channel_preference`] for more.
223 * Default value: false. This value is likely to change to true in the future.
225 * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
226 * [`DecodeError::InvalidValue`]: crate::ln::msgs::DecodeError::InvalidValue
228 public boolean get_negotiate_scid_privacy() {
229 boolean ret = bindings.ChannelHandshakeConfig_get_negotiate_scid_privacy(this.ptr);
230 Reference.reachabilityFence(this);
235 * If set, we attempt to negotiate the `scid_privacy` (referred to as `scid_alias` in the
236 * BOLTs) option for outbound private channels. This provides better privacy by not including
237 * our real on-chain channel UTXO in each invoice and requiring that our counterparty only
238 * relay HTLCs to us using the channel's SCID alias.
240 * If this option is set, channels may be created that will not be readable by LDK versions
241 * prior to 0.0.106, causing [`ChannelManager`]'s read method to return a
242 * [`DecodeError::InvalidValue`].
244 * Note that setting this to true does *not* prevent us from opening channels with
245 * counterparties that do not support the `scid_alias` option; we will simply fall back to a
246 * private channel without that option.
248 * Ignored if the channel is negotiated to be announced, see
249 * [`ChannelHandshakeConfig::announced_channel`] and
250 * [`ChannelHandshakeLimits::force_announced_channel_preference`] for more.
252 * Default value: false. This value is likely to change to true in the future.
254 * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
255 * [`DecodeError::InvalidValue`]: crate::ln::msgs::DecodeError::InvalidValue
257 public void set_negotiate_scid_privacy(boolean val) {
258 bindings.ChannelHandshakeConfig_set_negotiate_scid_privacy(this.ptr, val);
259 Reference.reachabilityFence(this);
260 Reference.reachabilityFence(val);
264 * Set to announce the channel publicly and notify all nodes that they can route via this
267 * This should only be set to true for nodes which expect to be online reliably.
269 * As the node which funds a channel picks this value this will only apply for new outbound
270 * channels unless [`ChannelHandshakeLimits::force_announced_channel_preference`] is set.
272 * Default value: false.
274 public boolean get_announced_channel() {
275 boolean ret = bindings.ChannelHandshakeConfig_get_announced_channel(this.ptr);
276 Reference.reachabilityFence(this);
281 * Set to announce the channel publicly and notify all nodes that they can route via this
284 * This should only be set to true for nodes which expect to be online reliably.
286 * As the node which funds a channel picks this value this will only apply for new outbound
287 * channels unless [`ChannelHandshakeLimits::force_announced_channel_preference`] is set.
289 * Default value: false.
291 public void set_announced_channel(boolean val) {
292 bindings.ChannelHandshakeConfig_set_announced_channel(this.ptr, val);
293 Reference.reachabilityFence(this);
294 Reference.reachabilityFence(val);
298 * When set, we commit to an upfront shutdown_pubkey at channel open. If our counterparty
299 * supports it, they will then enforce the mutual-close output to us matches what we provided
300 * at intialization, preventing us from closing to an alternate pubkey.
302 * This is set to true by default to provide a slight increase in security, though ultimately
303 * any attacker who is able to take control of a channel can just as easily send the funds via
304 * lightning payments, so we never require that our counterparties support this option.
306 * The upfront key committed is provided from [`SignerProvider::get_shutdown_scriptpubkey`].
308 * Default value: true.
310 * [`SignerProvider::get_shutdown_scriptpubkey`]: crate::sign::SignerProvider::get_shutdown_scriptpubkey
312 public boolean get_commit_upfront_shutdown_pubkey() {
313 boolean ret = bindings.ChannelHandshakeConfig_get_commit_upfront_shutdown_pubkey(this.ptr);
314 Reference.reachabilityFence(this);
319 * When set, we commit to an upfront shutdown_pubkey at channel open. If our counterparty
320 * supports it, they will then enforce the mutual-close output to us matches what we provided
321 * at intialization, preventing us from closing to an alternate pubkey.
323 * This is set to true by default to provide a slight increase in security, though ultimately
324 * any attacker who is able to take control of a channel can just as easily send the funds via
325 * lightning payments, so we never require that our counterparties support this option.
327 * The upfront key committed is provided from [`SignerProvider::get_shutdown_scriptpubkey`].
329 * Default value: true.
331 * [`SignerProvider::get_shutdown_scriptpubkey`]: crate::sign::SignerProvider::get_shutdown_scriptpubkey
333 public void set_commit_upfront_shutdown_pubkey(boolean val) {
334 bindings.ChannelHandshakeConfig_set_commit_upfront_shutdown_pubkey(this.ptr, val);
335 Reference.reachabilityFence(this);
336 Reference.reachabilityFence(val);
340 * The Proportion of the channel value to configure as counterparty's channel reserve,
341 * i.e., `their_channel_reserve_satoshis` for both outbound and inbound channels.
343 * `their_channel_reserve_satoshis` is the minimum balance that the other node has to maintain
344 * on their side, at all times.
345 * This ensures that if our counterparty broadcasts a revoked state, we can punish them by
346 * claiming at least this value on chain.
348 * Channel reserve values greater than 30% could be considered highly unreasonable, since that
349 * amount can never be used for payments.
350 * Also, if our selected channel reserve for counterparty and counterparty's selected
351 * channel reserve for us sum up to equal or greater than channel value, channel negotiations
354 * Note: Versions of LDK earlier than v0.0.104 will fail to read channels with any channel reserve
355 * other than the default value.
357 * Default value: 1% of channel value, i.e., configured as 10,000 millionths.
358 * Minimum value: If the calculated proportional value is less than 1000 sats, it will be treated
359 * as 1000 sats instead, which is a safe implementation-specific lower bound.
360 * Maximum value: 1,000,000, any values larger than 1 Million will be treated as 1 Million (or 100%)
361 * instead, although channel negotiations will fail in that case.
363 public int get_their_channel_reserve_proportional_millionths() {
364 int ret = bindings.ChannelHandshakeConfig_get_their_channel_reserve_proportional_millionths(this.ptr);
365 Reference.reachabilityFence(this);
370 * The Proportion of the channel value to configure as counterparty's channel reserve,
371 * i.e., `their_channel_reserve_satoshis` for both outbound and inbound channels.
373 * `their_channel_reserve_satoshis` is the minimum balance that the other node has to maintain
374 * on their side, at all times.
375 * This ensures that if our counterparty broadcasts a revoked state, we can punish them by
376 * claiming at least this value on chain.
378 * Channel reserve values greater than 30% could be considered highly unreasonable, since that
379 * amount can never be used for payments.
380 * Also, if our selected channel reserve for counterparty and counterparty's selected
381 * channel reserve for us sum up to equal or greater than channel value, channel negotiations
384 * Note: Versions of LDK earlier than v0.0.104 will fail to read channels with any channel reserve
385 * other than the default value.
387 * Default value: 1% of channel value, i.e., configured as 10,000 millionths.
388 * Minimum value: If the calculated proportional value is less than 1000 sats, it will be treated
389 * as 1000 sats instead, which is a safe implementation-specific lower bound.
390 * Maximum value: 1,000,000, any values larger than 1 Million will be treated as 1 Million (or 100%)
391 * instead, although channel negotiations will fail in that case.
393 public void set_their_channel_reserve_proportional_millionths(int val) {
394 bindings.ChannelHandshakeConfig_set_their_channel_reserve_proportional_millionths(this.ptr, val);
395 Reference.reachabilityFence(this);
396 Reference.reachabilityFence(val);
400 * If set, we attempt to negotiate the `anchors_zero_fee_htlc_tx`option for all future
401 * channels. This feature requires having a reserve of onchain funds readily available to bump
402 * transactions in the event of a channel force close to avoid the possibility of losing funds.
404 * Note that if you wish accept inbound channels with anchor outputs, you must enable
405 * [`UserConfig::manually_accept_inbound_channels`] and manually accept them with
406 * [`ChannelManager::accept_inbound_channel`]. This is done to give you the chance to check
407 * whether your reserve of onchain funds is enough to cover the fees for all existing and new
408 * channels featuring anchor outputs in the event of a force close.
410 * If this option is set, channels may be created that will not be readable by LDK versions
411 * prior to 0.0.116, causing [`ChannelManager`]'s read method to return a
412 * [`DecodeError::InvalidValue`].
414 * Note that setting this to true does *not* prevent us from opening channels with
415 * counterparties that do not support the `anchors_zero_fee_htlc_tx` option; we will simply
416 * fall back to a `static_remote_key` channel.
418 * LDK will not support the legacy `option_anchors` commitment version due to a discovered
419 * vulnerability after its deployment. For more context, see the [`SIGHASH_SINGLE + update_fee
420 * Considered Harmful`] mailing list post.
422 * Default value: false. This value is likely to change to true in the future.
424 * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
425 * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
426 * [`DecodeError::InvalidValue`]: crate::ln::msgs::DecodeError::InvalidValue
427 * [`SIGHASH_SINGLE + update_fee Considered Harmful`]: https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-September/002796.html
429 public boolean get_negotiate_anchors_zero_fee_htlc_tx() {
430 boolean ret = bindings.ChannelHandshakeConfig_get_negotiate_anchors_zero_fee_htlc_tx(this.ptr);
431 Reference.reachabilityFence(this);
436 * If set, we attempt to negotiate the `anchors_zero_fee_htlc_tx`option for all future
437 * channels. This feature requires having a reserve of onchain funds readily available to bump
438 * transactions in the event of a channel force close to avoid the possibility of losing funds.
440 * Note that if you wish accept inbound channels with anchor outputs, you must enable
441 * [`UserConfig::manually_accept_inbound_channels`] and manually accept them with
442 * [`ChannelManager::accept_inbound_channel`]. This is done to give you the chance to check
443 * whether your reserve of onchain funds is enough to cover the fees for all existing and new
444 * channels featuring anchor outputs in the event of a force close.
446 * If this option is set, channels may be created that will not be readable by LDK versions
447 * prior to 0.0.116, causing [`ChannelManager`]'s read method to return a
448 * [`DecodeError::InvalidValue`].
450 * Note that setting this to true does *not* prevent us from opening channels with
451 * counterparties that do not support the `anchors_zero_fee_htlc_tx` option; we will simply
452 * fall back to a `static_remote_key` channel.
454 * LDK will not support the legacy `option_anchors` commitment version due to a discovered
455 * vulnerability after its deployment. For more context, see the [`SIGHASH_SINGLE + update_fee
456 * Considered Harmful`] mailing list post.
458 * Default value: false. This value is likely to change to true in the future.
460 * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
461 * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
462 * [`DecodeError::InvalidValue`]: crate::ln::msgs::DecodeError::InvalidValue
463 * [`SIGHASH_SINGLE + update_fee Considered Harmful`]: https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-September/002796.html
465 public void set_negotiate_anchors_zero_fee_htlc_tx(boolean val) {
466 bindings.ChannelHandshakeConfig_set_negotiate_anchors_zero_fee_htlc_tx(this.ptr, val);
467 Reference.reachabilityFence(this);
468 Reference.reachabilityFence(val);
472 * The maximum number of HTLCs in-flight from our counterparty towards us at the same time.
474 * Increasing the value can help improve liquidity and stability in
475 * routing at the cost of higher long term disk / DB usage.
477 * Note: Versions of LDK earlier than v0.0.115 will fail to read channels with a configuration
478 * other than the default value.
481 * Maximum value: 483, any values larger will be treated as 483.
482 * This is the BOLT #2 spec limit on `max_accepted_htlcs`.
484 public short get_our_max_accepted_htlcs() {
485 short ret = bindings.ChannelHandshakeConfig_get_our_max_accepted_htlcs(this.ptr);
486 Reference.reachabilityFence(this);
491 * The maximum number of HTLCs in-flight from our counterparty towards us at the same time.
493 * Increasing the value can help improve liquidity and stability in
494 * routing at the cost of higher long term disk / DB usage.
496 * Note: Versions of LDK earlier than v0.0.115 will fail to read channels with a configuration
497 * other than the default value.
500 * Maximum value: 483, any values larger will be treated as 483.
501 * This is the BOLT #2 spec limit on `max_accepted_htlcs`.
503 public void set_our_max_accepted_htlcs(short val) {
504 bindings.ChannelHandshakeConfig_set_our_max_accepted_htlcs(this.ptr, val);
505 Reference.reachabilityFence(this);
506 Reference.reachabilityFence(val);
510 * Constructs a new ChannelHandshakeConfig given each field
512 public static ChannelHandshakeConfig of(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg, byte max_inbound_htlc_value_in_flight_percent_of_channel_arg, boolean negotiate_scid_privacy_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg, int their_channel_reserve_proportional_millionths_arg, boolean negotiate_anchors_zero_fee_htlc_tx_arg, short our_max_accepted_htlcs_arg) {
513 long ret = bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg, max_inbound_htlc_value_in_flight_percent_of_channel_arg, negotiate_scid_privacy_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg, their_channel_reserve_proportional_millionths_arg, negotiate_anchors_zero_fee_htlc_tx_arg, our_max_accepted_htlcs_arg);
514 Reference.reachabilityFence(minimum_depth_arg);
515 Reference.reachabilityFence(our_to_self_delay_arg);
516 Reference.reachabilityFence(our_htlc_minimum_msat_arg);
517 Reference.reachabilityFence(max_inbound_htlc_value_in_flight_percent_of_channel_arg);
518 Reference.reachabilityFence(negotiate_scid_privacy_arg);
519 Reference.reachabilityFence(announced_channel_arg);
520 Reference.reachabilityFence(commit_upfront_shutdown_pubkey_arg);
521 Reference.reachabilityFence(their_channel_reserve_proportional_millionths_arg);
522 Reference.reachabilityFence(negotiate_anchors_zero_fee_htlc_tx_arg);
523 Reference.reachabilityFence(our_max_accepted_htlcs_arg);
524 if (ret >= 0 && ret <= 4096) { return null; }
525 org.ldk.structs.ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelHandshakeConfig(null, ret); }
526 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
531 long ret = bindings.ChannelHandshakeConfig_clone_ptr(this.ptr);
532 Reference.reachabilityFence(this);
537 * Creates a copy of the ChannelHandshakeConfig
539 public ChannelHandshakeConfig clone() {
540 long ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
541 Reference.reachabilityFence(this);
542 if (ret >= 0 && ret <= 4096) { return null; }
543 org.ldk.structs.ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelHandshakeConfig(null, ret); }
544 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
549 * Creates a "default" ChannelHandshakeConfig. See struct and individual field documentaiton for details on which values are used.
551 public static ChannelHandshakeConfig with_default() {
552 long ret = bindings.ChannelHandshakeConfig_default();
553 if (ret >= 0 && ret <= 4096) { return null; }
554 org.ldk.structs.ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelHandshakeConfig(null, ret); }
555 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };