zeta-crypto is a lightweight Rust-based command-line tool for experimenting with wallet functionality, mnemonic generation, signing, and WalletConnect sessions.
zeta-cli gen-mnemonicGenerates a new BIP39 mnemonic phrase.
zeta-cli derive-wallet --phrase "<mnemonic>" --pass "<optional password>"Derives a wallet address from a mnemonic phrase.
zeta-cli sign --phrase "<mnemonic>" --msg "hello world"Signs a message using the wallet’s private key.
zeta-cli verify --pubhex <public_key_hex> --msg "hello world" --sig <signature>Verifies a previously signed message.
zeta-cli walletconnect --peer <peer_url> --action connectEstablish or disconnect a WalletConnect session with a peer.
These commands provide quick access to key Zeta Crypto file locations.
zeta-cli log-pathDisplays the full path to the log file: ~/.zeta_crypto/logs.txt.
zeta-cli config-pathDisplays the path to the configuration file: ~/.zeta_crypto/config.toml.
zeta-cli session-pathDisplays the path to the session file: ~/.zeta_crypto/session.json.
Check if a WalletConnect peer is active and reachable.
zeta-cli walletconnect-status --peer "wc:example@2?relay-protocol=irn&symKey=..."Output:
✅ WalletConnect peer is active and reachable
or
⚠️ Unable to reach peer or session inactive
Display detailed information about a WalletConnect peer, including its status and last update timestamp.
zeta-cli walletconnect-info --peer "wc:example@2?relay-protocol=irn&symKey=..."Output:
Peer: wc:example@2?relay-protocol=irn&symKey=...
Status: connected (updated at 1730573102)
This command helps monitor the current state of a WalletConnect session and can be used together with walletconnect-status to perform basic connection health checks.
You can restore the last saved WalletConnect session from local storage.
zeta-cli walletconnect-restoreExample output:
Restored session:
Peer: wc:example@2?relay-protocol=irn&symKey=...
Status: connected (updated at 1730580445)
If no saved session is found, the CLI will display:
No saved WalletConnect session found
You can define a default peer and optional auto-connect setting in ~/.zeta_crypto/config.toml.
Example:
default_peer = "wc:example@2?relay-protocol=irn&symKey=..."
auto_connect = trueUse this configuration to simplify WalletConnect usage:
# Use the default peer from config to connect or disconnect
zeta-cli walletconnect-default connect
zeta-cli walletconnect-default disconnect
# Display current configuration
zeta-cli config-showExample output:
ZetaConfig { default_peer: Some("wc:example@2?relay-protocol=irn&symKey=..."), auto_connect: Some(true) }
You can derive a secure key from a passphrase using PBKDF2 and HKDF functions implemented in the project.
zeta-cli derive-key --pass "mysecretpassword"This will generate a deterministic key derived from the given passphrase. The derivation process uses PBKDF2 with HMAC-SHA256 and HKDF for additional entropy expansion.
Example output:
Derived key (hex): 4f3a12c6b7a9c1e3f6d8...
This can be useful for generating session secrets, encryption keys, or other secure materials in crypto-related workflows.
Show CLI version (from Cargo), Rust compiler version, and platform.
zeta-cli version-infoExample output:
Zeta Crypto CLI 0.1.0
Rust compiler: rustc 1.82.0 (000000 2024-10-10)
Platform: macos aarch64
Verify presence of local state files.
zeta-cli healthcheckChecks:
- Config exists:
~/.zeta_crypto/config.toml - Session file exists:
~/.zeta_crypto/session.json - Log file exists:
~/.zeta_crypto/logs.txt
Remove local logs and saved sessions (asks for confirmation).
zeta-cli cleanupPrompt:
This will remove all logs and saved sessions from ~/.zeta_crypto
Type 'yes' to confirm:
WalletConnect connect/disconnect events are logged to ~/.zeta_crypto/logs.txt with automatic rotation (~256 KB cap).
MIT