A Rust CLI tool for interacting with GPG-based TEA wallets. This tool allows you to manage TEA tokens using your GPG key identity, providing a secure way to handle cryptocurrency transactions without traditional private key management.
- 🔐 GPG-based authentication - Use your existing GPG keys for wallet operations
- 🚀 Automatic wallet deployment - Wallets are deployed on-demand when needed
- 💰 TEA token support - Send and receive TEA tokens on the Sepolia testnet
- 🔄 Sweep functionality - Transfer all funds from a wallet to another address
- 🎨 Beautiful CLI interface - Colored output and progress indicators
- 🔧 Multiple key sources - Support for direct key IDs, BPB integration, and GPG email lookup
- Rust (1.89 or later)
- BPB (from teaBASE for secure enclave operations, or for simpler gpg operations), or
- GPG (for GPG-based operations)
git clone https://github.com/jhheider/tea-gpg-wallet
cd tea-gpg-wallet
cargo install --path cli
pkgx install tea-gpg-wallet
# or
pkgx tea-gpg-wallet --help
- Set your private key (for sending transactions):
export PRIVATE_KEY="your_ethereum_private_key_here"
Warning
You should use a wallet with limited funds in this way. Wallets with substantial value should not have their keys exported.
- Check configuration:
tea-gpg-wallet config
- Find your wallet address:
# Using a GPG key ID directly
tea-gpg-wallet find 95469C7E3DFC90B1
# Using BPB (if available)
tea-gpg-wallet find --bpb
# Using GPG email lookup
tea-gpg-wallet find --gpg user@example.com
Display the current configuration including RPC URL and deployer contract address.
tea-gpg-wallet config
Find the predicted wallet address for a GPG key ID and check if it's deployed.
# Using direct key ID
tea-gpg-wallet find 95469C7E3DFC90B1
# Using BPB
tea-gpg-wallet find --bpb
# Using GPG email
tea-gpg-wallet find --gpg user@example.com
Deploy a wallet contract for a GPG key ID (requires private key).
tea-gpg-wallet deploy 95469C7E3DFC90B1
Send TEA tokens to a GPG wallet (deploys wallet if needed).
# Send 1.5 TEA
tea-gpg-wallet send 95469C7E3DFC90B1 1.5
# Send 0.001 TEA using BPB
tea-gpg-wallet send --bpb 0.001
Transfer all funds from a GPG wallet to another address.
# Sweep to address (requires BPB or GPG for signing)
tea-gpg-wallet sweep --bpb 0x1234567890123456789012345678901234567890
The tool supports three ways to specify GPG key IDs:
- Direct key ID:
95469C7E3DFC90B1
- BPB integration:
--bpb
(uses secure enclave with teaBASE) - GPG email lookup:
--gpg user@example.com
PRIVATE_KEY
: Your TEA private key (required for send/deploy operations)
- Private Key Management: Your
PRIVATE_KEY
environment variable contains sensitive data. Never commit it to version control or share it. - GPG Key Security: Ensure your GPG keys are properly secured, especially when using them for cryptocurrency operations.
- Testnet Only: This tool currently operates on the Sepolia testnet. Real funds are not at risk. Mainnet version will launch with TEA's mainnet.
- Sweep Operations: Sweeping requires either BPB or GPG for signing. Direct key ID mode cannot be used for sweeps.
- GPG Integration: GPG operations require the
gpg
command to be available and properly configured. - BPB Requirements: BPB integration requires the
bpb
tool to be installed and configured. [pkgxdev/teaBASE] is recommended.
- Amount Formatting: Amounts are specified in TEA (not wei). Use decimal notation:
1.5
,0.001
, etc. - Address Formatting: Ethereum addresses can be specified with or without the
0x
prefix. - Key ID Format: GPG key IDs should be 16-character hex strings (e.g.,
95469C7E3DFC90B1
).
- "No GPG key found for email": Ensure the email address is associated with a GPG key in your keyring.
- "PRIVATE_KEY environment variable not set": Set the environment variable before running commands that require it.
- "GPG command failed": Verify that GPG is installed and your keyring is accessible.
# 1. Set your private key
export PRIVATE_KEY="0x1234567890abcdef..."
# 2. Check configuration
tea-gpg-wallet config
# 3. Find your wallet address
tea-gpg-wallet find --gpg alice@example.com
# 4. Send some TEA
tea-gpg-wallet send --gpg alice@example.com 2.5
# 5. Check balance (via find command)
tea-gpg-wallet find --gpg alice@example.com
# 6. Sweep funds to another address
tea-gpg-wallet sweep --gpg alice@example.com 0x9876543210fedcba...
# Find wallet using BPB
tea-gpg-wallet find --bpb
# Send funds using BPB
tea-gpg-wallet send --bpb 1.0
# Sweep using BPB (most secure)
tea-gpg-wallet sweep --bpb 0x1234567890123456789012345678901234567890
git clone https://github.com/jhheider/tea-gpg-wallet
cd tea-gpg-wallet
cargo build --release
cargo test
tea-gpg-wallet/
├── cli/ # Command-line interface
├── lib/ # Core library functionality
├── abi/ # Ethereum contract ABIs
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.
- Built with Alloy for Ethereum interactions
- Inspired by the teaxyz/gpg-wallet project
- Uses BPB for secure enclave operations