pub struct Builder { /* private fields */ }Expand description
A builder for an Node instance, allowing to set some configuration and module choices from
the getgo.
Implementations§
source§impl Builder
impl Builder
sourcepub fn from_config(config: Config) -> Self
pub fn from_config(config: Config) -> Self
Creates a new builder instance from an Config.
sourcepub fn set_entropy_seed_path(&mut self, seed_path: String) -> &mut Self
pub fn set_entropy_seed_path(&mut self, seed_path: String) -> &mut Self
Configures the Node instance to source its wallet entropy from a seed file on disk.
If the given file does not exist a new random seed file will be generated and stored at the given location.
sourcepub fn set_entropy_seed_bytes(&mut self, seed_bytes: [u8; 64]) -> &mut Self
pub fn set_entropy_seed_bytes(&mut self, seed_bytes: [u8; 64]) -> &mut Self
Configures the Node instance to source its wallet entropy from the given seed bytes.
sourcepub fn set_entropy_bip39_mnemonic(
&mut self,
mnemonic: Mnemonic,
passphrase: Option<String>
) -> &mut Self
pub fn set_entropy_bip39_mnemonic( &mut self, mnemonic: Mnemonic, passphrase: Option<String> ) -> &mut Self
sourcepub fn set_storage_dir_path(&mut self, storage_dir_path: String) -> &mut Self
pub fn set_storage_dir_path(&mut self, storage_dir_path: String) -> &mut Self
Sets the used storage directory path.
Default: /tmp/ldk_node/
sourcepub fn set_esplora_server_url(
&mut self,
esplora_server_url: String
) -> &mut Self
pub fn set_esplora_server_url( &mut self, esplora_server_url: String ) -> &mut Self
Sets the Esplora server URL.
Default: https://blockstream.info/api
sourcepub fn set_network(&mut self, network: &str) -> &mut Self
pub fn set_network(&mut self, network: &str) -> &mut Self
Sets the Bitcoin network used.
Options: mainnet/bitcoin, testnet, regtest, signet
Default: testnet
sourcepub fn set_listening_address(
&mut self,
listening_address: SocketAddr
) -> &mut Self
pub fn set_listening_address( &mut self, listening_address: SocketAddr ) -> &mut Self
Sets the IP address and TCP port on which Node will listen for incoming network connections.
Default: 0.0.0.0:9735