REPL
Stronghold features a simple read-evaluate print loop (REPL) to showcase basic operations from an interaction command shell-like environment. The REPL maintains a state of a running Stronghold instance to store secrets or configuration data.
You can start REPL from a terminal inside the root folder of Stronghold by running the following command:
cargo run --example repl
Available Commands
Help Messages
Each command will show a short help message, if the entered command or parameters are incorrect.
You can use the following commands:
Command | Parameters | Description |
---|---|---|
help | - | Display a help message. |
init | client_path | Initializes the underlying Stronghold system. |
keygen | key_type vault_path record_path | Generates a "ed25510" or "x25519" key at a location composed of "vault_path" and "record_path". |
backup | path_to_snapshot_location passphrase | Writes the current Stronghold state to "path_to_snapshot_location" (a path) with "passphrase". |
restore | path_to_snapshot_location passphrase | Loads the current Stronghold state from "path_to_snapshot_location" (a path) with "passphrase". |
slip10gen | vault_path record_path | |
slip10derive | chain vault_path_origin record_path_origin vault_path_derive record_path_derive | Derives a new key from old location and stores it into the new location. The key will be derived from the provided chain code. |
mnemonic | - | Creates a BIP39 mnemonic and generates a seed. |
bip39restore | - | |
quit | - | Exits the REPL. |
checkrecord | vault_path record_path | Checks a record inside the vault. The command will return yes if the record exists or no if it doesn't. |
checkvault | vault_path | Checks for the presence of a vault. |