Key Management
hlz stores keys in encrypted keystores, compatible with Foundry's format.
Commands
hlz keys new <NAME>
Generate a new secp256k1 private key and store it encrypted.
hlz keys new trading
# Enter password: ****
# Address: 0x1234...abcd
# Stored in: ~/.hlz/keys/tradinghlz keys import <NAME>
Import an existing private key.
hlz keys import trading --private-key 0xYOUR_KEY
# Enter password: ****hlz keys ls
List all stored keys.
hlz keys ls
# NAME ADDRESS DEFAULT
# trading 0x1234...abcd ✓
# backup 0x5678...efghhlz keys default <NAME>
Set the default key used when no --key-name is specified.
hlz keys default tradinghlz keys export <NAME>
Export the decrypted private key (use with caution).
hlz keys export trading
# Enter password: ****
# 0xYOUR_PRIVATE_KEYhlz keys rm <NAME>
Remove a stored key.
hlz keys rm backupSecurity
- Keys are encrypted with AES-128-CTR + scrypt KDF
- Password is never stored
- Use
HL_PASSWORDenv var for automation (be careful with shell history) - Consider
hlz approve-agent <ADDR>for API wallets with limited permissions