generate
Generate a new encrypted key pair for use with Mina.
Basic usage
mina wallet generate --output /path/to/key
Arguments
Required:
--output <PATH>- Path where the encrypted key file will be saved
Optional:
[PASSWORD]- Password to encrypt the key. Can be provided as an argument or via theMINA_PRIVKEY_PASSenvironment variable (recommended for security)
Example
# Generate new key with environment variable for password
export MINA_PRIVKEY_PASS="my-secret-password"
mina wallet generate --output ./keys/my-new-wallet
This command generates a new random keypair, encrypts the private key with the
provided password, and saves it to the specified path. It also creates a .pub
file containing the public key.