#
keys
#
Available Commands
#
rebusd keys add
Derive a new private key and encrypt to disk.
rebusd keys add <key-name> [flags]
Flags:
#
Create a new key
The following example will create a key in the local keystore named MyKey
:
rebusd keys add MyKey
Enter and repeat the password, at least 8 characters, then you will get a new key.
WARNING
write the seed phrase in a safe place! It is the only way to recover your account if you ever forget your password, and/or something happens to your local keystore.
#
Recover an existing key from seed phrase
If you forget your password or lose your key, or you would like to use your key in another place, you can recover your key by using the --recover
flag.
The following example will recover a key with the seed phrase and store it in the local keystore with the name MyKey
:
rebusd keys add MyKey --recover
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.
Enter a passphrase for your key:
Repeat the passphrase:
Enter your recovery seed phrase:
#
Create a multisig key
The following example creates a multisig key with 3 sub-keys, and specify the minimum number of signatures as 2. The transaction could be broadcast only when the number of signatures is greater than or equal to 2.
rebusd keys add <multisig-keyname> --multisig-threshold=2 --multisig=<signer-keyname-1>,<signer-keyname-2>,<signer-keyname-3>
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 pubkey
's to create the offline keys first, then you will be able to create the multisig key.
Offline key can be created by rebusd keys add --pubkey
.
How to use multisig key to sign and broadcast a transaction, please refer to multisign.
#
rebusd keys delete
Delete a local key by the given name.
rebusd keys delete <key-name> [flags]
Flags:
#
Delete a local key
The following example will delete the key named MyKey
from the local keystore:
rebusd keys delete MyKey
#
rebusd keys export
Export the keystore of a key to stdout:
rebusd keys export <key-name> [flags]
#
Export keystore
The following example will export the key named MyKey
to stdout:
rebusd keys export Mykey
#
rebusd keys import
Import a ASCII armored private key into the local keybase.
rebusd keys import <name> <keyfile> [flags]
#
Import a ASCII armored private key
The following example will import the private keys from key-to-import.json
and store it in the local keystore with the name MyKey
rebusd keys import MyKey key-to-import.json [flags]
#
rebusd keys list
List all the keys from the local keystore that have been stored by this key manager, along with their associated name, type, address and pubkey.
Flags:
#
List all keys
The following example will list all keys in the local keystore managed by the rebusd key manager:
rebusd keys list
#
rebusd keys mnemonic
Create a bip39
mnemonic, sometimes called a seed phrase, by reading from the system entropy. To pass your own entropy, use unsafe-entropy
mode.
rebusd keys mnemonic [flags]
Flags:
#
Create a bip39 mnemonic
The following example will create a new bip39
seed phrase:
rebusd keys mnemonic
You'll get a bip39
mnemonic with 24 words, e.g.:
saddle lunch prefer aspect domain woman relief swarm exist behind cliff shadow meadow joke tower inherit upon tragic glow air march envelope joke estate
#
rebusd keys parse
Convert and print to stdout key addresses and fingerprints from hexadecimal into bech32
rebus prefixed format and vice versa.
rebusd keys parse <hex-or-bech32-address> [flags]
#
Convert and print to stdout key addresses from hex fingerprint
The following example will convert a given hex fingerprint to a range of bep32 human readable address formats:
rebusd keys parse 313EDF382E938D41E787B3C6366719009640C6F1
Returns:
formats:
- rebus1xyld7wpwjwx5reu8k0rrveceqztyp3h3z25gdr
- rebuspub1xyld7wpwjwx5reu8k0rrveceqztyp3h3v345x5
- rebusvaloper1xyld7wpwjwx5reu8k0rrveceqztyp3h3ahz8k6
- rebusvaloperpub1xyld7wpwjwx5reu8k0rrveceqztyp3h3jcymy9
- rebusvalcons1xyld7wpwjwx5reu8k0rrveceqztyp3h3fy3m6m
- rebusvalconspub1xyld7wpwjwx5reu8k0rrveceqztyp3h3rulnw5
Convert and print to stdout hex fingerprint from bep32 address:
rebusd keys parse rebus1xyld7wpwjwx5reu8k0rrveceqztyp3h3z25gdr
Returns:
human: rebus
bytes: 313EDF382E938D41E787B3C6366719009640C6F1
#
rebusd keys show
Get details of a local key.
rebusd keys show <key-name> [flags]
Flags:
#
Get details of a local key
The following example will return the details for the key named MyKey
:
rebusd keys show MyKey
The following infos will be shown:
- name: MyKey
type: local
address: rebus1njgpy0g450wh02z8m7yce7r08fmflflkgv367j
pubkey: rebuspub1addwnpepqvcfcuf84pu08cpqthv8qe2qkyrwu8p9za0c9d8fp5pl4sllwhejx66rxyu
mnemonic: ""
threshold: 0
pubkeys: []
#
#Get validator operator address
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
:
rebusd keys show MyKey --bech val
Example Output:
- name: Mykey
type: local
address: iva1tulwx2hwz4dv8te6cflhda64dn0984hakwgk4f
pubkey: ivp1addwnpepq24rufap6u0sysqcpgsfzqhw3x8nfkhqhtmpgqt0369rlyqcg0vkgd8e6zy
mnemonic: ""
threshold: 0
pubkeys: []