Skip to content

Commit 3099f2e

Browse files
neacsuoctol
authored andcommitted
Hide coconut runtime flags (#2990)
1 parent baf88ce commit 3099f2e

File tree

7 files changed

+21
-14
lines changed

7 files changed

+21
-14
lines changed

clients/native/src/commands/init.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub(crate) struct Init {
3131
force_register_gateway: bool,
3232

3333
/// Comma separated list of rest endpoints of the nyxd validators
34-
#[clap(long, alias = "nymd_validators", value_delimiter = ',')]
34+
#[clap(long, alias = "nymd_validators", value_delimiter = ',', hide = true)]
3535
nyxd_urls: Option<Vec<url::Url>>,
3636

3737
/// Comma separated list of rest endpoints of the API validators
@@ -62,7 +62,7 @@ pub(crate) struct Init {
6262

6363
/// Set this client to work in a enabled credentials mode that would attempt to use gateway
6464
/// with bandwidth credential requirement.
65-
#[clap(long)]
65+
#[clap(long, hide = true)]
6666
enabled_credentials_mode: Option<bool>,
6767

6868
/// Save a summary of the initialization to a json file

clients/native/src/commands/run.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub(crate) struct Run {
2323
id: String,
2424

2525
/// Comma separated list of rest endpoints of the nyxd validators
26-
#[clap(long, alias = "nymd_validators", value_delimiter = ',')]
26+
#[clap(long, alias = "nymd_validators", value_delimiter = ',', hide = true)]
2727
nyxd_urls: Option<Vec<url::Url>>,
2828

2929
/// Comma separated list of rest endpoints of the API validators
@@ -59,7 +59,7 @@ pub(crate) struct Run {
5959

6060
/// Set this client to work in a enabled credentials mode that would attempt to use gateway
6161
/// with bandwidth credential requirement.
62-
#[clap(long)]
62+
#[clap(long, hide = true)]
6363
enabled_credentials_mode: Option<bool>,
6464
}
6565

clients/socks5/src/commands/init.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub(crate) struct Init {
4343
force_register_gateway: bool,
4444

4545
/// Comma separated list of rest endpoints of the nyxd validators
46-
#[clap(long, alias = "nymd_validators", value_delimiter = ',')]
46+
#[clap(long, alias = "nymd_validators", value_delimiter = ',', hide = true)]
4747
nyxd_urls: Option<Vec<url::Url>>,
4848

4949
/// Comma separated list of rest endpoints of the API validators
@@ -66,7 +66,7 @@ pub(crate) struct Init {
6666

6767
/// Set this client to work in a enabled credentials mode that would attempt to use gateway
6868
/// with bandwidth credential requirement.
69-
#[clap(long)]
69+
#[clap(long, hide = true)]
7070
enabled_credentials_mode: Option<bool>,
7171

7272
/// Save a summary of the initialization to a json file

clients/socks5/src/commands/run.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub(crate) struct Run {
4343
gateway: Option<identity::PublicKey>,
4444

4545
/// Comma separated list of rest endpoints of the nyxd validators
46-
#[clap(long, alias = "nymd_validators", value_delimiter = ',')]
46+
#[clap(long, alias = "nymd_validators", value_delimiter = ',', hide = true)]
4747
nyxd_urls: Option<Vec<url::Url>>,
4848

4949
/// Comma separated list of rest endpoints of the Nym APIs
@@ -65,7 +65,7 @@ pub(crate) struct Run {
6565

6666
/// Set this client to work in a enabled credentials mode that would attempt to use gateway
6767
/// with bandwidth credential requirement.
68-
#[clap(long)]
68+
#[clap(long, hide = true)]
6969
enabled_credentials_mode: Option<bool>,
7070
}
7171

gateway/src/commands/init.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ pub struct Init {
5555
long,
5656
alias = "validators",
5757
alias = "nymd_validators",
58-
value_delimiter = ','
58+
value_delimiter = ',',
59+
hide = true
5960
)]
6061
// the alias here is included for backwards compatibility (1.1.4 and before)
6162
nyxd_urls: Option<Vec<url::Url>>,
@@ -66,7 +67,7 @@ pub struct Init {
6667

6768
/// Set this gateway to work only with coconut credentials; that would disallow clients to
6869
/// bypass bandwidth credential requirement
69-
#[clap(long)]
70+
#[clap(long, hide = true)]
7071
only_coconut_credentials: Option<bool>,
7172

7273
/// Enable/disable gateway anonymized statistics that get sent to a statistics aggregator server

gateway/src/commands/run.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ pub struct Run {
5353
long,
5454
alias = "validators",
5555
alias = "nymd_validators",
56-
value_delimiter = ','
56+
value_delimiter = ',',
57+
hide = true
5758
)]
5859
// the alias here is included for backwards compatibility (1.1.4 and before)
5960
nyxd_urls: Option<Vec<url::Url>>,
@@ -64,7 +65,7 @@ pub struct Run {
6465

6566
/// Set this gateway to work only with coconut credentials; that would disallow clients to
6667
/// bypass bandwidth credential requirement
67-
#[clap(long)]
68+
#[clap(long, hide = true)]
6869
only_coconut_credentials: Option<bool>,
6970

7071
/// Enable/disable gateway anonymized statistics that get sent to a statistics aggregator server

nym-api/src/support/cli/mod.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,16 @@ pub(crate) struct CliArgs {
9393
pub(crate) enabled_credentials_mode: Option<bool>,
9494

9595
/// Announced address where coconut clients will connect.
96-
#[clap(long)]
96+
#[clap(long, hide = true)]
9797
pub(crate) announce_address: Option<url::Url>,
9898

9999
/// Flag to indicate whether coconut signer authority is enabled on this API
100-
#[clap(long, requires = "mnemonic", requires = "announce_address")]
100+
#[clap(
101+
long,
102+
requires = "mnemonic",
103+
requires = "announce_address",
104+
hide = true
105+
)]
101106
pub(crate) enable_coconut: Option<bool>,
102107
}
103108

0 commit comments

Comments
 (0)