A vanity wallet generator for Solana with built-in OpenPGP symmetric encryption.
Generate wallets whose public keys match an optional prefix and/or suffix, encrypt the output, and decrypt it later with the same binary.
- Generate N Solana keypairs (public/private) in parallel.
- Optional Base58 prefix and/or suffix filter for vanity addresses.
- Periodic progress stats per worker.
- AES-256 OpenPGP symmetric encryption of the JSON output file.
- Decryption command to recover the clear JSON.
When using -similar, characters are considered equivalent to these visually similar substitutions:
| Character | Similar Characters |
|---|---|
| a | 4 |
| b | 8, 6 |
| e | 3 |
| g | 6, 9 |
| i | 1, l |
| l | 1, i |
| o | 0 |
| s | 5, z |
| t | 7 |
| z | 2 |
- Go 1.24 or later
Dependencies are managed via go.mod:
github.com/blocto/solana-go-sdk(Solana keypair generation)github.com/mr-tron/base58(Base58 encoding)github.com/ProtonMail/go-crypto/openpgp(OpenPGP encryption)golang.org/x/term(password input)
git clone https://github.com/TokensHive/hive-wallets.git
cd hive-wallets
# Download modules
go mod download
## Build binary
go build -o hive-wallet cmd/walletgen/main.go./hive-wallet new [flags]Flags:
-n intNumber of wallets to generate (default 1)-prefix stringOptional Base58 prefix (case-sensitive)-suffix stringOptional Base58 suffix (case-sensitive)-workers intParallel goroutines (default = number of CPUs)-out stringOutput filename (encrypted, defaultwallets.json.gpg)-ignore-caseIgnore letter case when matching prefix/suffix-similarAccept visually similar chars (leet substitutions)-timeout durationMaximum search duration (e.g.,10s,1m,2h); cancels search and saves any found wallets before exit-pass stringPassphrase (unsafe on CLI; prefer settingHIVE_WALLET_PASSPHRASEenv var)
Examples:
# Generate 2 wallets with prefix "HIVE" and suffix "TIP", case-insensitive + similar, using 16 workers
./hive-wallet new -n 2 -prefix HIVE -suffix TIP -ignore-case -similar -out tips.json.gpg -workers 16
# Generate 5 random wallets (no filter), default workers
./hive-wallet new -n 5
# Generate wallets for up to 1 minute; saves any found wallets before timeout
./hive-wallet new -prefix HIVE -timeout 1m# Advanced Examples
# Multi-prefix list, match any of the three prefixes:
./hive-wallet new -n 3 -prefix HIVE,ETH,SOL
# Multi-suffix list, match any of the two suffixes:
./hive-wallet new -n 2 -suffix abc,xyz
# Combine multiple prefixes and suffixes:
./hive-wallet new -n 1 -prefix HIVE,ETH -suffix AAA,BBB
# Case-insensitive + leet similarity with lists:
./hive-wallet new -prefix h1v3,swap -ignore-case -similar
# Generate for up to 30 seconds, saving any found wallets before timeout:
./hive-wallet new -prefix HIVE -timeout 30sA passphrase is required before writing the encrypted file.
You may supply it non-interactively via -pass or the HIVE_WALLET_PASSPHRASE environment variable;
otherwise you will be prompted to set and confirm one (min 8 characters).
./hive-wallet decrypt [flags]Flags:
-in stringEncrypted input file (defaultwallets.json.gpg)-out stringDecrypted JSON output file (stdout if omitted)-pass stringPassphrase (or setHIVE_WALLET_PASSPHRASEto avoid prompt)
Examples:
# Decrypt and write to clear.json
./hive-wallet decrypt -in tips.json.gpg -out clear.json
# Decrypt and print JSON to stdout
./hive-wallet decrypt -in tips.json.gpgYou will be prompted for the passphrase used during encryption.
The encrypted output is a JSON object with fields:
{
"prefix": "HIVE",
"suffix": "TIP",
"createdAt": "2025-06-17T12:00:00Z",
"wallets": [
{
"index": 0,
"publicKey": "HIVE...TIP",
"secretKey": "<Base58-encoded private key>"
},
...
]
}prefix/suffixmirror the filters used (empty if none).createdAtis the UTC timestamp of generation.walletsis an array withindex,publicKey, andsecretKeyfields.
- Vanity search cost grows exponentially with pattern length.
- Consider using more workers or distributed execution for long patterns.
MIT License. See LICENSE file for details.
