🔑Private Key Management
Othentic CLI supports numerous operations requiring ECDSA signatures.
Intro
The CLI is compatible with both JSON wallets (recommended) and raw private keys, and provides multiple methods for each format.
Supplying In Runtime [default]
In the absence of a user-provided ECDSA signature to run an operation, a prompt will appear requesting the private key in raw format.
This prompt appears in cases when no private key is provided using command flags or env variables.
note that "operator register" and "operator deposit" commands support only this method
Using JSON wallets [recommended]
JSON wallets are stored in an encrypted JSON file protected by a password. If you do not have a JSON wallet, our CLI supports creating one using either an existing private key or a random private key.
Generate JSON wallet [optional]
The following command generates a JSON wallet:
For this command, both --private-key
and --keystore
are optional. The CLI randomly generates a new private key if a private key is not provided.
By default --keystore-dir
directs the path .keystore
Run Commands with JSON wallet
or using env variables
If --keystore
path is chosen without a password, a prompt will ask the user for the password:
Using Raw Private Key
For example:
Or by using env variables:
Last updated