| Crates.io | vanity-miner |
| lib.rs | vanity-miner |
| version | 0.1.0 |
| created_at | 2025-06-15 20:48:19.478778+00 |
| updated_at | 2025-06-15 20:48:19.478778+00 |
| description | A blazing-fast, minimalistic vanity address miner for smart contract deployment, optimized for portability, perfect for client-side just-in-time (JIT) address mining. |
| homepage | https://github.com/lumosimmo/vanity-miner |
| repository | https://github.com/lumosimmo/vanity-miner |
| max_upload_size | |
| id | 1713644 |
| size | 113,979 |
A blazing-fast, minimalistic vanity address miner for common smart contract deployment patterns. Written in Rust and optimized for portability, perfect for just-in-time (JIT) address mining directly on the client-side in environments like WebAssembly (WASM).
This project was born out of the need for a client-side JIT vanity address miner for contract deployments from a web app.
Instead of pre-mining salts and securing them behind APIs and captchas, Vanity Miner offers a simpler, more decentralized alternative: a miner optimized for the client-side which can run directly in the user's browser. One bonus point to this approach is that the mining process itself serves as a lightweight Proof-of-Work (POW), effectively acting as its own captcha while providing a seamless user experience.
The following use-cases are supported:
Finding a 4-character hex prefix typically takes less than a second, even in a browser.
Vanity Miner prioritizes broad portability and ease of integration, especially in WebAssembly environments. For this reason, it is CPU-based and written in pure Rust.
If your only goal is to find the absolute most complex vanity address with maximum efficiency, a GPU-accelerated tool like createXcrunch may be a better fit.
[dependencies]
vanity-miner = "0.1.0"
# Install wasm-pack if you haven't already
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# Build the WASM package
wasm-pack build --target web
# The generated `pkg/` directory contains the WASM module and JS bindings
All CreateX mining functions support three pattern matching modes:
mine_*_salt_with_prefix(config, prefix) - Match addresses starting with the given prefix in a u8 arraymine_*_salt_with_suffix(config, suffix) - Match addresses ending with the given suffix in a u8 arraymine_*_salt_with_contains(config, contains) - Match addresses containing the given sequence in a u8 arrayAvailable for:
mine_create2_salt_*mine_create3_salt_*The Uniswap V4 hook mining function is a wrapper around the mine_create2_salt_with_suffix function, with the suffix defined by the permission flags.
The EulerSwap mining function is a wrapper around the Uniswap V4 hook mining function.
All public functions are also available in WASM as wasm_mine_*.
Create2Config - Configuration for CREATE2 miningCreate3Config - Configuration for CREATE3 mining (via CreateX)V4HookConfig - Configuration for Uniswap V4 hook address miningEulerSwapConfig - Configuration for EulerSwap address miningAll configurations support:
max_iterations - Maximum mining iterations before stoppingmax_results - Maximum number of matching results to findseed - Optional seed for deterministic miningContributions are welcome! Please feel free to open an issue or submit a pull request.
The project currently uses the keccak256 implementation from Alloy. A significant performance improvement could be achieved by implementing a custom version that supports partial hash computation for more efficient prefix matching.