Rename cli and config options signer->ui (#3232)
* rename options signer->ui * rename config signer->ui
This commit is contained in:
@@ -12,7 +12,7 @@ unlock = ["0xdeadbeefcafe0000000000000000000000000000"]
|
||||
password = ["~/.safe/password.file"]
|
||||
keys_iterations = 10240
|
||||
|
||||
[signer]
|
||||
[ui]
|
||||
force = false
|
||||
disable = false
|
||||
port = 8180
|
||||
|
||||
@@ -8,7 +8,7 @@ chain = "./chain.json"
|
||||
unlock = ["0x1", "0x2", "0x3"]
|
||||
password = ["passwdfile path"]
|
||||
|
||||
[signer]
|
||||
[ui]
|
||||
disable = true
|
||||
|
||||
[network]
|
||||
|
||||
@@ -90,18 +90,18 @@ usage! {
|
||||
flag_keys_iterations: u32 = 10240u32,
|
||||
or |c: &Config| otry!(c.account).keys_iterations.clone(),
|
||||
|
||||
flag_force_signer: bool = false,
|
||||
or |c: &Config| otry!(c.signer).force.clone(),
|
||||
flag_no_signer: bool = false,
|
||||
or |c: &Config| otry!(c.signer).disable.clone(),
|
||||
flag_signer_port: u16 = 8180u16,
|
||||
or |c: &Config| otry!(c.signer).port.clone(),
|
||||
flag_signer_interface: String = "local",
|
||||
or |c: &Config| otry!(c.signer).interface.clone(),
|
||||
flag_signer_path: String = "$HOME/.parity/signer",
|
||||
or |c: &Config| otry!(c.signer).path.clone(),
|
||||
flag_force_ui: bool = false,
|
||||
or |c: &Config| otry!(c.ui).force.clone(),
|
||||
flag_no_ui: bool = false,
|
||||
or |c: &Config| otry!(c.ui).disable.clone(),
|
||||
flag_ui_port: u16 = 8180u16,
|
||||
or |c: &Config| otry!(c.ui).port.clone(),
|
||||
flag_ui_interface: String = "local",
|
||||
or |c: &Config| otry!(c.ui).interface.clone(),
|
||||
flag_ui_path: String = "$HOME/.parity/signer",
|
||||
or |c: &Config| otry!(c.ui).path.clone(),
|
||||
// NOTE [todr] For security reasons don't put this to config files
|
||||
flag_signer_no_validation: bool = false, or |_| None,
|
||||
flag_ui_no_validation: bool = false, or |_| None,
|
||||
|
||||
// -- Networking Options
|
||||
flag_warp: bool = false,
|
||||
@@ -271,7 +271,7 @@ usage! {
|
||||
struct Config {
|
||||
parity: Option<Operating>,
|
||||
account: Option<Account>,
|
||||
signer: Option<Signer>,
|
||||
ui: Option<Ui>,
|
||||
network: Option<Network>,
|
||||
rpc: Option<Rpc>,
|
||||
ipc: Option<Ipc>,
|
||||
@@ -302,7 +302,7 @@ struct Account {
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, PartialEq, RustcDecodable)]
|
||||
struct Signer {
|
||||
struct Ui {
|
||||
force: Option<bool>,
|
||||
disable: Option<bool>,
|
||||
port: Option<u16>,
|
||||
@@ -418,7 +418,7 @@ struct Misc {
|
||||
mod tests {
|
||||
use super::{
|
||||
Args, ArgsError,
|
||||
Config, Operating, Account, Signer, Network, Rpc, Ipc, Dapps, Mining, Footprint, Snapshots, VM, Misc
|
||||
Config, Operating, Account, Ui, Network, Rpc, Ipc, Dapps, Mining, Footprint, Snapshots, VM, Misc
|
||||
};
|
||||
use toml;
|
||||
|
||||
@@ -511,12 +511,12 @@ mod tests {
|
||||
flag_password: vec!["~/.safe/password.file".into()],
|
||||
flag_keys_iterations: 10240u32,
|
||||
|
||||
flag_force_signer: false,
|
||||
flag_no_signer: false,
|
||||
flag_signer_port: 8180u16,
|
||||
flag_signer_interface: "127.0.0.1".into(),
|
||||
flag_signer_path: "$HOME/.parity/signer".into(),
|
||||
flag_signer_no_validation: false,
|
||||
flag_force_ui: false,
|
||||
flag_no_ui: false,
|
||||
flag_ui_port: 8180u16,
|
||||
flag_ui_interface: "127.0.0.1".into(),
|
||||
flag_ui_path: "$HOME/.parity/signer".into(),
|
||||
flag_ui_no_validation: false,
|
||||
|
||||
// -- Networking Options
|
||||
flag_warp: true,
|
||||
@@ -675,7 +675,7 @@ mod tests {
|
||||
password: Some(vec!["passwdfile path".into()]),
|
||||
keys_iterations: None,
|
||||
}),
|
||||
signer: Some(Signer {
|
||||
ui: Some(Ui {
|
||||
force: None,
|
||||
disable: Some(true),
|
||||
port: None,
|
||||
|
||||
@@ -43,28 +43,29 @@ Operating Options:
|
||||
Account Options:
|
||||
--unlock ACCOUNTS Unlock ACCOUNTS for the duration of the execution.
|
||||
ACCOUNTS is a comma-delimited list of addresses.
|
||||
Implies --no-signer. (default: {flag_unlock:?})
|
||||
Implies --no-ui. (default: {flag_unlock:?})
|
||||
--password FILE Provide a file containing a password for unlocking
|
||||
an account. Leading and trailing whitespace is trimmed.
|
||||
(default: {flag_password:?})
|
||||
--keys-iterations NUM Specify the number of iterations to use when
|
||||
deriving key from the password (bigger is more
|
||||
secure) (default: {flag_keys_iterations}).
|
||||
--force-signer Enable Trusted Signer WebSocket endpoint used by
|
||||
Signer UIs, even when --unlock is in use.
|
||||
(default: ${flag_force_signer})
|
||||
--no-signer Disable Trusted Signer WebSocket endpoint used by
|
||||
Signer UIs. (default: ${flag_no_signer})
|
||||
--signer-port PORT Specify the port of Trusted Signer server
|
||||
(default: {flag_signer_port}).
|
||||
--signer-interface IP Specify the hostname portion of the Trusted Signer
|
||||
|
||||
UI Options:
|
||||
--force-ui Enable Trusted UI WebSocket endpoint,
|
||||
even when --unlock is in use. (default: ${flag_force_ui})
|
||||
--no-ui Disable Trusted UI WebSocket endpoint.
|
||||
(default: ${flag_no_ui})
|
||||
--ui-port PORT Specify the port of Trusted UI server
|
||||
(default: {flag_ui_port}).
|
||||
--ui-interface IP Specify the hostname portion of the Trusted UI
|
||||
server, IP should be an interface's IP address,
|
||||
or local (default: {flag_signer_interface}).
|
||||
--signer-path PATH Specify directory where Signer UIs tokens should
|
||||
be stored. (default: {flag_signer_path})
|
||||
--signer-no-validation Disable Origin and Host headers validation for
|
||||
Trusted Signer. WARNING: INSECURE. Used only for
|
||||
development. (default: {flag_signer_no_validation})
|
||||
or local (default: {flag_ui_interface}).
|
||||
--ui-path PATH Specify directory where Trusted UIs tokens should
|
||||
be stored. (default: {flag_ui_path})
|
||||
--ui-no-validation Disable Origin and Host headers validation for
|
||||
Trusted UI. WARNING: INSECURE. Used only for
|
||||
development. (default: {flag_ui_no_validation})
|
||||
|
||||
Networking Options:
|
||||
--warp Enable syncing from the snapshot over the network. (default: {flag_warp})
|
||||
|
||||
Reference in New Issue
Block a user