🦚 Vanity addresses generator for [EVM](https://ethereum.org/en/developers/docs/evm/)-based blockchains. Vanity addresses are [crypto public keys](https://ethereum.org/en/developers/docs/accounts/#externally-owned-accounts-and-key-pairs), personalized and created respecting a series of parameters given by the users of said addresses. This with the aim of making them more personal and easily identifiable, but without giving up the security they provide. [Vanify](https://crates.io/crates/vanify) is a complete implementation of the vanity address generator for EVM-based blockchains, such as [Ethereum](https://ethereum.org/en/), [Binance Smart Chain](https://www.binance.com/en/support/announcement/854415cf3d214371a7b60cf01ead0918), [Polygon](https://polygon.technology/), etc, written in [Rust](https://www.rust-lang.org/). It supports prefix, suffix, and multiple infixes and [disfixes](https://en.wikipedia.org/wiki/Disfix) validation, [JSON](https://en.wikipedia.org/wiki/JSON), [CSV](https://en.wikipedia.org/wiki/Comma-separated_values), [TSV](https://en.wikipedia.org/wiki/Tab-separated_values), [XML](https://en.wikipedia.org/wiki/XML), and [XLSX](https://en.wikipedia.org/wiki/Microsoft_Excel) export, optional benchmarking, [hex](https://en.wikipedia.org/wiki/Hexadecimal) strings formatting, multiple search algorithms, and more. This user manual documents how to use all the features of [Vanify](https://crates.io/crates/vanify), used as a standalone application. For more information about [Vanify](https://github.com/vidalpaul/vanify) as a library, please refer to the [library documentation](https://docs.rs/vanify). # Table of contents - [Installation](#installation) - [Usage](#usage) - [Basic usage](#basic-usage) - [Advanced usage](#advanced-usage) - [Number of addresses to generate](#number-match) - [Prefixes and suffixes](#prefixes-and-suffixes) - [Infixes and disfixes](#infixes-and-disfixes) - [Search algorithms](#search-algorithms) - [Export formats](#export-formats) - [Hex strings formatting](#hex-strings-formatting) - [Verbose mode](#verbose-mode) - [Benchmarking](#benchmarking) - [Help](#help) # Installation Vanify is available on [crates.io](https://crates.io/crates/vanify), so you can install it with [Cargo](https://doc.rust-lang.org/cargo/), the Rust package manager: ```bash cargo install vanify ``` # Usage ## Basic usage To use Vanify as a CLI standalone application, you can run the following command: ```bash $ vanify -p 1234 -s 5678 -n 10 ``` This will generate 10 addresses starting with `0x1234` and ending with `5678`. It supports the following parameters: ``` USAGE: vanify [OPTIONS] OPTIONS: -b, --benchmark Benchmark mode -c, --csv Export to CSV file -e, --excludes-all ... Excludes all substring(s) -E, --excludes-any ... Excludes any substring(s) -f, --filename Filename for exports -h, --help Print help information -i, --includes-all ... Includes all substring(s) -I, --includes-any ... Includes any substring(s) -j, --json Export to JSON file -n, --number Number of addresses to search for -p, --prefix Prefix to search for -r, --random Randomize private key generation -R, --random-unique Randomize private key generation and ensure uniqueness -s, --suffix Suffix to search for -t, --tsv Export to TSV file -T, --trim-hex Trim 0x from output keys -v, --verbose Verbose output -V, --version Print version information -x, --xml Export to XML file -X, --xlsx Export to XLSX file ``` If a file export option is provided, the results will be exported to relative path /results. ## Advanced usage ### Number-match The number of addresses to generate can be specified with the `-n` or `--number-match` parameter. If not specified, it will default to 1. ```bash $ vanify -p 1234 -s 5678 -n 10 ``` ### Prefixes and suffixes You can search for addresses starting with a prefix and/or ending with a suffix. For example, to search for addresses starting with `0x1234` and ending with `5678`, you can run the following command: ```bash $ vanify -p 1234 -s 5678 -n 10 ``` ### Infixes and disfixes You can search for addresses containing a series of infixes and/or disfixes. For example, to search for addresses containing `1234` and `5678`, you can run the following command: ```bash $ vanify -i 1234 -i 5678 -n 10 ``` You can also search for addresses not containing a series of infixes and/or disfixes. For example, to search for addresses not containing `1234` and `5678`, you can run the following command: ```bash $ vanify -e 1234 -e 5678 -n 10 ``` You can also search for addresses containing any of the provided infixes. For example, to search for addresses containing `1234` or `5678`, you can run the following command: ```bash $ vanify -I 1234 -I 5678 -n 10 ``` You can also search for addresses not containing at least one of the provided disfixes. For example, to search for addresses not containing `1234` or `5678`, you can run the following command: ```bash $ vanify -E 1234 -E 5678 -n 10 ``` You can compose all these options to search for addresses containing all the provided infixes and not containing any of the provided disfixes. For example, to search for addresses containing `1234` and `5678` and not containing `abcd` and `efgh`, you can run the following command: ```bash $ vanify -i 1234 -i 5678 -e abcd -e efgh -n 10 ``` ### Search algorithms Vanify supports the following search algorithms: #### Random The random search algorithm generates random private keys and checks if they match the provided prefixes and suffixes. It provides non deterministic results, and it may produce duplicates. ```bash $ vanify -p 1234 -s 5678 -n 10 -r ``` #### Random unique The random unique search algorithm generates random private keys and checks if they match the provided prefixes and suffixes. It also ensures that the generated private keys are unique. ```bash $ vanify -p 1234 -s 5678 -n 10 -R ``` #### Sequential The sequential search algorithm sequentially generates U256 and converts them to private keys and checks if the keypairs derived from the private keys produced match the provided prefixes and suffixes. It is the default search algorithm, and it provides deterministic results. ```bash $ vanify -p 1234 -s 5678 -n 10 ``` ### Export formats Vanify supports the following export formats: - [JSON](https://en.wikipedia.org/wiki/JSON) - [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) - [TSV](https://en.wikipedia.org/wiki/Tab-separated_values) - [XML](https://en.wikipedia.org/wiki/XML) - [XLSX](https://en.wikipedia.org/wiki/Microsoft_Excel) You can choose the export format to use with the `-j`, `-c`, `-t`, `-x`, or `-X` parameter. For example, to export the results to a JSON file, you can run the following command: ```bash $ vanify -p 1234 -s 5678 -n 10 -j -f results.json ``` Note that the `-f` parameter is obligatory if any export option is selected. If not provided, an application error will be thrown. ### Hex strings formatting Vanify supports the following hex strings formatting: - [Trim 0x](https://en.wikipedia.org/wiki/Hexadecimal#Prefix) You can choose the hex strings formatting to use with the `-T` parameter. For example, to trim 0x from the output keys, you can run the following command: ```bash $ vanify -p 1 -n 10 -T -v ``` The output will look like this: ```bash 🔍 Searching for 2 public keys with the following constraints: Prefix: 1 Suffix: Includes all: Excludes all: Includes any: Excludes any: 🔑 Found 2 public keys with the given constraints: Public key: 1fd088730d169f0c503e75896bab7cd7db50669e Private Key: b4657fcc142be3416925cf669ba778bf68fee917add783225bc38eb84ee46a3d Public key: 16140f656301add38e4713d03be5654779d78ddb Private Key: 0f328a982f7ba0011667b69fc13faafc5d09ac9819ed33ce540261d999d8eb3f ``` The default behavior is to keep the 0x prefix. ### Verbose mode Vanify supports the verbose mode. You can enable it with the `-v` parameter. For example, to enable the verbose mode, you can run the following command: ```bash $ vanify -p 1234 -s 5678 -n 10 -v ``` When the verbose mode is enabled, the following information will be displayed: - The number of addresses to search for - The search affixes (prefix, infixes, suffix, disfixes) constraints - The number of addresses found And, if benchmarking is enabled, the following information will also be displayed: - The time taken to generate the keypairs ### Benchmarking Vanify supports benchmarking. You can enable it with the `-b` or `--benchmark` parameter. For example, to benchmark the search algorithm, you can run the following command: ```bash $ vanify -p 1234 -s 5678 -n 10 -b ``` When benchmarking is enabled, if verbose mode is also enabled, the following information will be displayed: - The time taken to generate the keypairs ### Help You can get help with the `-h` or `--help` parameter. For example, to get help, you can run the following command: ```bash $ vanify -h ```