A simple CLI tool to generate Stellar vanity addresses.
Vanity Address: similar to a vanity license plate, a vanity cryptocurrency address is an address where either the beginning (prefix) or end (postfix) is a special or meaningful phrase. Generating such an address requires work. Below is the expected time and difficulty of finding different length words in a vanity address (based on a more optimized algorthim/codebase).
``` use stellarvanity::vanitykey::AddressGenerator;
let mut generator: AddressGenerator = Default::default();
let (publickey, privatekey) = generator.find(|public, private| { // any conditions go here public.asstr().endswith("RUST") // e.g. find address with the "RUST" suffix }); ```
This will continuously loop until a key with the desired properties is found. Once the vanity address is found, a tuple (publickey, privatekey) will be returned. Note, this is a synchronous function.
```
cargo run -- [--postfix=
Either --postfix
or --prefix
option is required, while thread count is optional.
```
As an example, the following looks for an address ending in pizza with 8 threads:
cargo run -- -c=8 --postfix=pizza