Generate a key profile and view the public/private keys for use by the Supra CLI.
1
Generate a new key/profile
Execute the following command to generate a new profile/set of keys.
The command accepts an optional parameter to name the profile. While it is optional, we highly recommend making use of such feature to better organize and manage your keys.
supra key generate-profile <PROFILE_NAME>
The command will output your account information upon completion.
Example Output:
Exported public profile file at "/home/supra/code/supra-keys/smr_public_key.json"
-------------------------- Profile List ---------------------------------
(*) <PROFILE_NAME>
SmrPublicKey { account_address: "0xdc3ae7d0d646689062ab7c714903783cebe3e5791c45acba1704ddc2d8947265", ed25519_public_key: 200d119748c94a2bde8e88d45f5d21697f168d1b07b1ef85b25f35ed8327f7eb }
-------------------------------------------------------------------------
2
Import existing key/profile
If you already have a private key on hand that you wish to use, you can opt to import it rather than generating a new one. To import an existing private key, use the following command:
supra key import-profile <PROFILE_NAME> <PRIVATE_KEY>
3
View local public keys
If you wish to view existing keys within your current directory, use the following command:
supra key -l
4
View local private keys
If you wish to view the private key of your profile(s), use the following command: