pub struct Config {
pub storage_dir_path: String,
pub network: Network,
pub listening_addresses: Option<Vec<SocketAddress>>,
pub announcement_addresses: Option<Vec<SocketAddress>>,
pub node_alias: Option<NodeAlias>,
pub trusted_peers_0conf: Vec<PublicKey>,
pub probing_liquidity_limit_multiplier: u64,
pub anchor_channels_config: Option<AnchorChannelsConfig>,
pub route_parameters: Option<RouteParametersConfig>,
}Expand description
Represents the configuration of an Node instance.
§Defaults
| Parameter | Value |
|---|---|
storage_dir_path | /tmp/ldk_node/ |
log_dir_path | None |
network | Bitcoin |
listening_addresses | None |
node_alias | None |
default_cltv_expiry_delta | 144 |
onchain_wallet_sync_interval_secs | 80 |
wallet_sync_interval_secs | 30 |
fee_rate_cache_update_interval_secs | 600 |
trusted_peers_0conf | [] |
probing_liquidity_limit_multiplier | 3 |
log_level | Debug |
anchor_channels_config | Some(..) |
route_parameters | None |
See AnchorChannelsConfig and RouteParametersConfig for more information regarding their
respective default values.
Fields§
§storage_dir_path: StringThe path where the underlying LDK and BDK persist their data.
network: NetworkThe used Bitcoin network.
listening_addresses: Option<Vec<SocketAddress>>The addresses on which the node will listen for incoming connections.
Note: We will only allow opening and accepting public channels if the node_alias and the
listening_addresses are set.
announcement_addresses: Option<Vec<SocketAddress>>The addresses which the node will announce to the gossip network that it accepts connections on.
Note: If unset, the listening_addresses will be used as the list of addresses to announce.
node_alias: Option<NodeAlias>The node alias that will be used when broadcasting announcements to the gossip network.
The provided alias must be a valid UTF-8 string and no longer than 32 bytes in total.
Note: We will only allow opening and accepting public channels if the node_alias and the
listening_addresses are set.
trusted_peers_0conf: Vec<PublicKey>A list of peers that we allow to establish zero confirmation channels to us.
Note: Allowing payments via zero-confirmation channels is potentially insecure if the funding transaction ends up never being confirmed on-chain. Zero-confirmation channels should therefore only be accepted from trusted peers.
probing_liquidity_limit_multiplier: u64The liquidity factor by which we filter the outgoing channels used for sending probes.
Channels with available liquidity less than the required amount times this value won’t be used to send pre-flight probes.
anchor_channels_config: Option<AnchorChannelsConfig>Configuration options pertaining to Anchor channels, i.e., channels for which the
option_anchors_zero_fee_htlc_tx channel type is negotiated.
Please refer to AnchorChannelsConfig for further information on Anchor channels.
If set to Some, we’ll try to open new channels with Anchors enabled, i.e., new channels
will be negotiated with the option_anchors_zero_fee_htlc_tx channel type if supported by
the counterparty. Note that this won’t prevent us from opening non-Anchor channels if the
counterparty doesn’t support option_anchors_zero_fee_htlc_tx. If set to None, new
channels will be negotiated with the legacy option_static_remotekey channel type only.
Note: If set to None after some Anchor channels have already been
opened, no dedicated emergency on-chain reserve will be maintained for these channels,
which can be dangerous if only insufficient funds are available at the time of channel
closure. We will however still try to get the Anchor spending transactions confirmed
on-chain with the funds available.
route_parameters: Option<RouteParametersConfig>Configuration options for payment routing and pathfinding.
Setting the RouteParametersConfig provides flexibility to customize how payments are routed,
including setting limits on routing fees, CLTV expiry, and channel utilization.
Note: If unset, default parameters will be used, and you will be able to override the parameters on a per-payment basis in the corresponding method calls.