Class UserConfig


  • public class UserConfig
    extends Object
    Top-level config which holds ChannelHandshakeLimits and ChannelConfig. Default::default() provides sane defaults for most configurations (but currently with 0 relay fees!)
    • Method Detail

      • get_own_channel_config

        public ChannelHandshakeConfig get_own_channel_config()
        Channel config that we propose to our counterparty.
      • set_own_channel_config

        public void set_own_channel_config​(ChannelHandshakeConfig val)
        Channel config that we propose to our counterparty.
      • get_peer_channel_config_limits

        public ChannelHandshakeLimits get_peer_channel_config_limits()
        Limits applied to our counterparty's proposed channel config settings.
      • set_peer_channel_config_limits

        public void set_peer_channel_config_limits​(ChannelHandshakeLimits val)
        Limits applied to our counterparty's proposed channel config settings.
      • get_channel_options

        public ChannelConfig get_channel_options()
        Channel config which affects behavior during channel lifetime.
      • set_channel_options

        public void set_channel_options​(ChannelConfig val)
        Channel config which affects behavior during channel lifetime.
      • get_accept_forwards_to_priv_channels

        public boolean get_accept_forwards_to_priv_channels()
        If this is set to false, we will reject any HTLCs which were to be forwarded over private channels. This prevents us from taking on HTLC-forwarding risk when we intend to run as a node which is not online reliably. For nodes which are not online reliably, you should set all channels to *not* be announced (using [`ChannelConfig::announced_channel`] and [`ChannelHandshakeLimits::force_announced_channel_preference`]) and set this to false to ensure you are not exposed to any forwarding risk. Note that because you cannot change a channel's announced state after creation, there is no way to disable forwarding on public channels retroactively. Thus, in order to change a node from a publicly-announced forwarding node to a private non-forwarding node you must close all your channels and open new ones. For privacy, you should also change your node_id (swapping all private and public key material for new ones) at that time. Default value: false.
      • set_accept_forwards_to_priv_channels

        public void set_accept_forwards_to_priv_channels​(boolean val)
        If this is set to false, we will reject any HTLCs which were to be forwarded over private channels. This prevents us from taking on HTLC-forwarding risk when we intend to run as a node which is not online reliably. For nodes which are not online reliably, you should set all channels to *not* be announced (using [`ChannelConfig::announced_channel`] and [`ChannelHandshakeLimits::force_announced_channel_preference`]) and set this to false to ensure you are not exposed to any forwarding risk. Note that because you cannot change a channel's announced state after creation, there is no way to disable forwarding on public channels retroactively. Thus, in order to change a node from a publicly-announced forwarding node to a private non-forwarding node you must close all your channels and open new ones. For privacy, you should also change your node_id (swapping all private and public key material for new ones) at that time. Default value: false.
      • with_default

        public static UserConfig with_default()
        Creates a "default" UserConfig. See struct and individual field documentaiton for details on which values are used.