Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Tezos Vanity Address with Seed Phrase

After seeing the recently posted How To Generate A Tezos Vanity Address, I thought I'd share a method I've used to generate a vanity address that has the benefit of being able to easily be restored or transferred to another wallet from a seed phrase backup.

Most of the credit goes to Stephen Andrews. I've just slightly modified some of the code he wrote to get it to work the way I want.

Everything below assumes you are working from the Linux command line (tested in Debian/Ubuntu distributions):

First, clone Stephen Andrews' eztz repository from github:

git clone -b vanity

Then enter the newly created directory and the vanity subdirectory:

cd eztz/vanity

Next, install the needed dependencies with npm (use apt install npm if you don't have npm installed):

npm install

Grab my customized index.js which I called vanity.js here:


Finally you're ready to generate your vanity address. The below example will search for an address that starts with tz1TERM.

node vanity.js TERM

Example output:

node vanity.js Tz  
Searching for tz1Tz  
Checked 119 hashes  
Found match:  
giant grunt jewel suit scatter surface chaos tumble radar fortune rifle frost essence motion worry  

You can also optionally include a password. This adds a little more security because the seed words without the password will not import the same address.

node vanity.js TERM PASSWORD

Example output:

node vanity.js Tz secretPassword  
Searching for tz1Tz  
Checked 630 hashes  
Found match:  
ramp sea drama balance scale mixed chapter dream hundred sweet language chuckle reform alert clock  

The above seed phrase without the password generates the following address: tz1aBFAMsDGHqnmrhgGhjx9kowjFLJMXEbsC

Just make sure to backup your seed phrase and your password if you use one, or else any funds stored on the generated account could be lost forever.


#!/usr/bin/env node
const _sodium = require('libsodium-wrappers');
(async() => {
if (process.argv.length <= 2){
console.log("Please enter a term to find, with an optional password, e.g. node vanity.js test [password]");
var match = process.argv[2];
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
for(var i = 0; i < match.length; i++){
if (ALPHABET.indexOf(match[i]) < 0){
console.log("Your search term is not valid - please ensure search term only includes b58 valid characters: " + ALPHABET);
await _sodium.ready;
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
var ee = require("./main.js");
var eztz = ee.eztz;
eztz.library.sodium = _sodium;
var keys, fmatch = "tz1" + match;
console.log("Searching for " + fmatch);
var cc = 0;
function tick() {
m = eztz.crypto.generateMnemonic();
if (process.argv.length > 2) {
keys = eztz.crypto.generateKeys(m, process.argv[3]);
} else {
keys = eztz.crypto.generateKeys(m);
if (keys.pkh.substr(0, fmatch.length) == fmatch){
console.log("\nFound match:");
} else {
printProgress("Checked " + cc++ + " hashes");
function printProgress(progress){
Copy link

jsking216 commented Feb 26, 2022

would this be able to reverse-engineer my seed phrases given my tz address and password? i know those 2 things but managed to lose my seed phrases (well I assumed the set I had was for the wrong wallet 🤕

Copy link

baketzforme commented Mar 6, 2022

would this be able to reverse-engineer my seed phrases given my tz address and password?

No. That is not possible. That would make any address vulnerable to having its seed phrase revealed by brute-forcing the password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment