Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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/trading

hlz 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...efgh

hlz keys default <NAME>

Set the default key used when no --key-name is specified.

hlz keys default trading

hlz keys export <NAME>

Export the decrypted private key (use with caution).

hlz keys export trading
# Enter password: ****
# 0xYOUR_PRIVATE_KEY

hlz keys rm <NAME>

Remove a stored key.

hlz keys rm backup

Security

  • Keys are encrypted with AES-128-CTR + scrypt KDF
  • Password is never stored
  • Use HL_PASSWORD env var for automation (be careful with shell history)
  • Consider hlz approve-agent <ADDR> for API wallets with limited permissions