Keys
Last updated
Last updated
Keys allows you to manage your local tendermint keystore (wallets) for StaFiHub.
Name | Description |
---|---|
Derive a new private key and encrypt to disk.
Flags:
Name, shorthand | Default | Description | Required |
---|---|---|---|
Enter and repeat the password, at least 8 characters, then you will get a new key.
:::warning Important
write the seed phrase in a safe place! It is the only way to recover your account if you ever forget your password. :::
If you forget your password or lose your key, or you wanna use your key in another place, you can recover your key by your seed phrase.
You'll be asked to enter and repeat the new password for your key, and enter the seed phrase. Then you get your key back.
The following example creates a multisig key with 3 sub-keys, and specify the minimum number of signatures as 2. The tx could be broadcast only when the number of signatures is greater than or equal to 2.
:::tip <signer-keyname>
can be the type of "local/offline/ledger", but not "multi" type.
If you don't have all the permission of sub-keys, you can ask for the pubkeys to create the offline keys first, then you will be able to create the multisig key.
Offline key can be created by "stafihubd keys add --pubkey". :::
How to use multisig key to sign and broadcast a transaction, please refer to multisign
Delete a local key by the given name.
Flags:
Export the keystore of a key to a json file
Import a ASCII armored private key into the local keybase.
List all the keys stored by this key manager along with their associated name, type, address and pubkey.
Flags:
Migrate key information from the legacy (db-based) Keybase to the new keyring-based Keybase.
Flags:
Create a bip39 mnemonic, sometimes called a seed phrase, by reading from the system entropy. To pass your own entropy, use unsafe-entropy
mode.
Flags:
You'll get a bip39 mnemonic with 24 words, e.g.:
Convert and print to stdout key addresses and fingerprints from hexadecimal into bech32 cosmos prefixed format and vice versa.
Get details of a local key.
Flags:
The following infos will be shown:
If an address has been bonded to be a validator operator (which the address you used to create a validator), then you can use --bech val
to get the operator's address prefixed by iva
and the pubkey prefixed by ivp
:
Example Output:
Name, shorthand | Default | Description | Required |
---|---|---|---|
Name, shorthand | Default | Description | Required |
---|---|---|---|
Name, shorthand | Default | Description | Required |
---|---|---|---|
Name, shorthand | Default | Description | Required |
---|---|---|---|
Name, shorthand | Default | Description | Required |
---|---|---|---|
add
Add an encrypted private key (either newly generated or recovered), encrypt it, and save to disk
delete
Delete the given key
export
Export private keys
import
Import private keys into the local keybase
list
List all keys
migrate
Migrate keys from the legacy (db-based) Keybase
mnemonic
Compute the bip39 mnemonic for some input entropy
parse
Parse address from hex to bech32 and vice versa
show
Retrieve key information by name or address
--multisig
Construct and store a multisig public key
--multisig-threshold
1
K out of N required signatures
--nosort
false
Keys passed to --multisig are taken in the order they're supplied
--pubkey
Parse a public key in bech32 format and save it to disk
--interactive
false
Interactively prompt user for BIP39 passphrase and mnemonic
--ledger
false
Store a local reference to a private key on a Ledger device
--recover
false
Provide seed phrase to recover existing key instead of creating
--no-backup
false
Don't print out seed phrase (if others are watching the terminal)
--dry-run
false
Perform action, but don't add key to local keystore
--hd-path
Manual HD Path derivation (overrides BIP44 config)
--coin-type
118
coin type number for HD derivation
--account
0
Account number for HD derivation
--index
0
Address index number for HD derivation
--algo
secp256k
Key signing algorithm to generate keys for
--force, -f
false
Remove the key unconditionally without asking for the passphrase
--yes, -y
false
Skip confirmation prompt when deleting offline or ledger key references
--list-name
List names only
--dry-run
Run migration without actually persisting any changes to the new Keybase
--unsafe-entropy
Prompt the user to supply their own entropy, instead of relying on the system
--address
false
Output the address only (overrides --output)
--bech
acc
The Bech32 prefix encoding for a key (acc/val/cons)
--device
false
Output the address in a ledger device
--multisig-threshold
1
K out of N required signatures
--pubkey
false
Output the public key only (overrides --output)