hoprd/lib.rs
1//! HOPR daemon application providing a higher level interface for creating a HOPRd with or without
2//! a dedicated REST API.
3//!
4//! When the Rest API is enabled, the node serves a Swagger UI to inspect and test
5//! the Rest API v3 at: http://localhost:3001/scalar or http://localhost:3001/swagger-ui
6//!
7//! NOTE: Hostname and port can be different, since they depend on the settings `--apiHost` and `--apiPort`.
8//!
9//! ## Usage
10//! See `hoprd --help` for full list.
11
12//! ```shell
13//! $ hoprd --help
14//! Contains the main entry point of HOPR daemon applicatio
15//!
16//! Usage: hoprd [OPTIONS]
17//!
18//! Options:
19//! --network <NETWORK>
20//! ID of the network the node will attempt to connect to [env: HOPRD_NETWORK=]
21//! --identity <IDENTITY>
22//! The path to the identity file [env: HOPRD_IDENTITY=]
23//! --data <DATA>
24//! Specifies the directory to hold all the data [env: HOPRD_DATA=]
25//! --host <HOST>
26//! Host to listen on for P2P connections [env: HOPRD_HOST=]
27//! --announce
28//! Announce the node on chain with a public address [env: HOPRD_ANNOUNCE=]
29//! --api
30//! Expose the API on localhost:3001 [env: HOPRD_API=]
31//! --apiHost <HOST>
32//! Set host IP to which the API server will bind [env: HOPRD_API_HOST=]
33//! --apiPort <PORT>
34//! Set port to which the API server will bind [env: HOPRD_API_PORT=]
35//! --apiToken <TOKEN>
36//! A REST API token and for user authentication [env: HOPRD_API_TOKEN=]
37//! --password <PASSWORD>
38//! A password to encrypt your keys [env: HOPRD_PASSWORD=]
39//! --disableUnrealizedBalanceCheck
40//! Disables checking of unrealized balance before validating unacknowledged tickets. [env: HOPRD_DISABLE_UNREALIZED_BALANCE_CHECK=]
41//! --provider <PROVIDER>
42//! A custom RPC provider to be used for the node to connect to blockchain [env: HOPRD_PROVIDER=]
43//! --init
44//! initialize a database if it doesn't already exist [env: HOPRD_INIT=]
45//! --forceInit
46//! initialize a database, even if it already exists [env: HOPRD_FORCE_INIT=]
47//! --inbox-capacity <INBOX_CAPACITY>
48//! Set maximum capacity of the HOPRd inbox [env: HOPRD_INBOX_CAPACITY=]
49//! --testAnnounceLocalAddresses
50//! For testing local testnets. Announce local addresses [env: HOPRD_TEST_ANNOUNCE_LOCAL_ADDRESSES=]
51//! --heartbeatInterval <MILLISECONDS>
52//! Interval in milliseconds in which the availability of other nodes get measured [env: HOPRD_HEARTBEAT_INTERVAL=]
53//! --heartbeatThreshold <MILLISECONDS>
54//! Timeframe in milliseconds after which a heartbeat to another peer is performed, if it hasn't been seen since [env: HOPRD_HEARTBEAT_THRESHOLD=]
55//! --heartbeatVariance <MILLISECONDS>
56//! Upper bound for variance applied to heartbeat interval in milliseconds [env: HOPRD_HEARTBEAT_VARIANCE=]
57//! --networkQualityThreshold <THRESHOLD>
58//! Minimum quality of a peer connection to be considered usable [env: HOPRD_NETWORK_QUALITY_THRESHOLD=]
59//! --configurationFilePath <CONFIG_FILE_PATH>
60//! Path to a file containing the entire HOPRd configuration [env: HOPRD_CONFIGURATION_FILE_PATH=]
61//! --safeTransactionServiceProvider <HOPRD_SAFE_TX_SERVICE_PROVIDER>
62//! Base URL for safe transaction service [env: HOPRD_SAFE_TRANSACTION_SERVICE_PROVIDER=]
63//! --safeAddress <HOPRD_SAFE_ADDR>
64//! Address of Safe that safeguards tokens [env: HOPRD_SAFE_ADDRESS=]
65//! --moduleAddress <HOPRD_MODULE_ADDR>
66//! Address of the node management module [env: HOPRD_MODULE_ADDRESS=]
67//! --protocolConfig <HOPRD_PROTOCOL_CONFIG_PATH>
68//! Path to the protocol-config.json file [env: HOPRD_PROTOCOL_CONFIG_PATH=]
69//! -h, --help
70//! Print help
71//! -V, --version
72//! Print version
73//! ```
74
75pub mod cli;
76pub mod config;
77pub mod errors;
78pub mod exit;