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 sending_parameters: Option<SendingParameters>,
}
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(..) |
sending_parameters | None |
See AnchorChannelsConfig
and SendingParameters
for more information regarding their
respective default values.
Fields§
§storage_dir_path: String
The path where the underlying LDK and BDK persist their data.
network: Network
The 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: u64
The 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.
sending_parameters: Option<SendingParameters>
Configuration options for payment routing and pathfinding.
Setting the SendingParameters
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more