Skip to content

Commit ffd6a8a

Browse files
committed
cli: document mina misc mina-key-pair --web-node-secrets
1 parent 35da7a1 commit ffd6a8a

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

cli/src/commands/misc.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ impl P2PKeyPair {
4747
}
4848
}
4949

50+
/// Generates an unencrypted Mina key pair.
51+
///
52+
/// Note: When `--web-node-secrets` is set we output a
53+
/// JSON file with the structure below. The webnode
54+
/// needs a key in this format to initialize, even if
55+
/// no block production is intended. This flag will be
56+
/// removed when the webnode no longer needs it, and exists
57+
/// mainly to simplify the setup process of a webnode.
58+
/// ```json
59+
/// {
60+
/// "publicKey": "{the public key derived from secret_key}",
61+
/// "privateKey": "{secret_key}",
62+
/// }
63+
/// ```
5064
#[derive(Debug, Clone, Default, clap::Args)]
5165
pub struct MinaKeyPair {
5266
#[arg(long, short = 's', env = "MINA_SEC_KEY")]
@@ -56,8 +70,6 @@ pub struct MinaKeyPair {
5670
web_node_secrets: bool,
5771
}
5872

59-
// TODO: This should really be the same type that the webnode
60-
// TODO: uses to parse web-node-secrets.json
6173
#[derive(serde::Serialize)]
6274
#[serde(rename_all = "camelCase")]
6375
struct GeneratedMinaKeyPair {

0 commit comments

Comments
 (0)