Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Env config names and defaults, merge Chain and Network args #230

Merged
merged 22 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 70 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ bech32 = { version = "0.7", optional = true }
bitcoin = "0.27"
bitcoincore-rpc = "0.14.0"
chrono = "0.4"
config = "0.11"
clap = { version = "3.0.0-beta.4", optional = true }
colored = { version = "2", optional = true }
configure_me = { version = "0.4", optional = true }
Expand Down Expand Up @@ -127,6 +128,9 @@ version = "0.5.0-alpha.1"
default-features = false
features = ['peer']

[dev-dependencies]
ntest = "0.7.3"

[build-dependencies.microservices]
# path = '../ext/rust-internet2'
version = "0.5.0-alpha.1"
Expand Down
14 changes: 14 additions & 0 deletions farcasterd.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[syncers.mainnet]
electrum_server = "ssl://blockstream.info:700"
monero_daemon = "http://node.monerooutreach.org:18081"
monero_rpc_wallet = "http://localhost:18083"

[syncers.testnet]
electrum_server = "ssl://blockstream.info:993"
monero_daemon = "http://stagenet.melo.tools:38081"
monero_rpc_wallet = "http://localhost:38083"

[syncers.local]
electrum_server = "tcp://localhost:50001"
monero_daemon = "http://localhost:18081"
monero_rpc_wallet = "http://localhost:18083"
13 changes: 4 additions & 9 deletions shell/_farcasterd
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,14 @@ _farcasterd() {
_arguments "${_arguments_options[@]}" \
'-d+[Data directory path]: :_files -/' \
'--data-dir=[Data directory path]: :_files -/' \
'-c+[Path to the configuration file]: :_files' \
'--config=[Path to the configuration file]: :_files' \
'-T+[Use Tor]: :_hosts' \
'--tor-proxy=[Use Tor]: :_hosts' \
'-m+[ZMQ socket name/address to forward all incoming lightning messages]: :_files' \
'--msg-socket=[ZMQ socket name/address to forward all incoming lightning messages]: :_files' \
'-m+[ZMQ socket name/address to forward all incoming protocol messages]: :_files' \
'--msg-socket=[ZMQ socket name/address to forward all incoming protocol messages]: :_files' \
'-x+[ZMQ socket name/address for daemon control interface]: :_files' \
'--ctl-socket=[ZMQ socket name/address for daemon control interface]: :_files' \
'-n+[Blockchain to use]' \
'--chain=[Blockchain to use]' \
'--electrum-server=[Electrum server to use]' \
'--monero-daemon=[Monero daemon to use]' \
'--monero-rpc-wallet=[Monero rpc wallet to use]' \
'-c+[Path to the configuration file]: :_files' \
'--config=[Path to the configuration file]: :_files' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
Expand Down
13 changes: 4 additions & 9 deletions shell/_farcasterd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,14 @@ Register-ArgumentCompleter -Native -CommandName 'farcasterd' -ScriptBlock {
'farcasterd' {
[CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Data directory path')
[CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'Data directory path')
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Path to the configuration file')
[CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'Path to the configuration file')
[CompletionResult]::new('-T', 'T', [CompletionResultType]::ParameterName, 'Use Tor')
[CompletionResult]::new('--tor-proxy', 'tor-proxy', [CompletionResultType]::ParameterName, 'Use Tor')
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming lightning messages')
[CompletionResult]::new('--msg-socket', 'msg-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming lightning messages')
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming protocol messages')
[CompletionResult]::new('--msg-socket', 'msg-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming protocol messages')
[CompletionResult]::new('-x', 'x', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for daemon control interface')
[CompletionResult]::new('--ctl-socket', 'ctl-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for daemon control interface')
[CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Blockchain to use')
[CompletionResult]::new('--chain', 'chain', [CompletionResultType]::ParameterName, 'Blockchain to use')
[CompletionResult]::new('--electrum-server', 'electrum-server', [CompletionResultType]::ParameterName, 'Electrum server to use')
[CompletionResult]::new('--monero-daemon', 'monero-daemon', [CompletionResultType]::ParameterName, 'Monero daemon to use')
[CompletionResult]::new('--monero-rpc-wallet', 'monero-rpc-wallet', [CompletionResultType]::ParameterName, 'Monero rpc wallet to use')
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Path to the configuration file')
[CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'Path to the configuration file')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
Expand Down
13 changes: 3 additions & 10 deletions shell/_peerd
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,15 @@ _peerd() {
'-o+[Overlay peer communications through different transport protocol]: :(tcp zmq http websocket smtp)' \
'--overlay=[Overlay peer communications through different transport protocol]: :(tcp zmq http websocket smtp)' \
'--peer-secret-key=[]' \
'--wallet-token=[]' \
'--token=[Token used to authentify calls]' \
'-d+[Data directory path]: :_files -/' \
'--data-dir=[Data directory path]: :_files -/' \
'-c+[Path to the configuration file]: :_files' \
'--config=[Path to the configuration file]: :_files' \
'-T+[Use Tor]: :_hosts' \
'--tor-proxy=[Use Tor]: :_hosts' \
'-m+[ZMQ socket name/address to forward all incoming lightning messages]: :_files' \
'--msg-socket=[ZMQ socket name/address to forward all incoming lightning messages]: :_files' \
'-m+[ZMQ socket name/address to forward all incoming protocol messages]: :_files' \
'--msg-socket=[ZMQ socket name/address to forward all incoming protocol messages]: :_files' \
'-x+[ZMQ socket name/address for daemon control interface]: :_files' \
'--ctl-socket=[ZMQ socket name/address for daemon control interface]: :_files' \
'-n+[Blockchain to use]' \
'--chain=[Blockchain to use]' \
'--electrum-server=[Electrum server to use]' \
'--monero-daemon=[Monero daemon to use]' \
'--monero-rpc-wallet=[Monero rpc wallet to use]' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
Expand Down
13 changes: 3 additions & 10 deletions shell/_peerd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,15 @@ Register-ArgumentCompleter -Native -CommandName 'peerd' -ScriptBlock {
[CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'Overlay peer communications through different transport protocol')
[CompletionResult]::new('--overlay', 'overlay', [CompletionResultType]::ParameterName, 'Overlay peer communications through different transport protocol')
[CompletionResult]::new('--peer-secret-key', 'peer-secret-key', [CompletionResultType]::ParameterName, 'peer-secret-key')
[CompletionResult]::new('--wallet-token', 'wallet-token', [CompletionResultType]::ParameterName, 'wallet-token')
[CompletionResult]::new('--token', 'token', [CompletionResultType]::ParameterName, 'Token used to authentify calls')
[CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Data directory path')
[CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'Data directory path')
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Path to the configuration file')
[CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'Path to the configuration file')
[CompletionResult]::new('-T', 'T', [CompletionResultType]::ParameterName, 'Use Tor')
[CompletionResult]::new('--tor-proxy', 'tor-proxy', [CompletionResultType]::ParameterName, 'Use Tor')
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming lightning messages')
[CompletionResult]::new('--msg-socket', 'msg-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming lightning messages')
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming protocol messages')
[CompletionResult]::new('--msg-socket', 'msg-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming protocol messages')
[CompletionResult]::new('-x', 'x', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for daemon control interface')
[CompletionResult]::new('--ctl-socket', 'ctl-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for daemon control interface')
[CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Blockchain to use')
[CompletionResult]::new('--chain', 'chain', [CompletionResultType]::ParameterName, 'Blockchain to use')
[CompletionResult]::new('--electrum-server', 'electrum-server', [CompletionResultType]::ParameterName, 'Electrum server to use')
[CompletionResult]::new('--monero-daemon', 'monero-daemon', [CompletionResultType]::ParameterName, 'Monero daemon to use')
[CompletionResult]::new('--monero-rpc-wallet', 'monero-rpc-wallet', [CompletionResultType]::ParameterName, 'Monero rpc wallet to use')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
Expand Down
Loading