2

Can we create a mnemonic seed BIP 39 HD wallet with vanity address for LITECOIN, if yes, how?

1

Yes, this is possible. You will need to create a random BIP39 seed and derive keys/addresses, and check if the address has the pattern you desire. Repeat the process until you find a seed that produces your vanity address.

Here's a solution using Node. Being javascript, this will run slowly, but it's what I know, and it will eventually get the job done. The script finds an address that has the search term either in all lowercase or all uppercase.

var bip39 = require( 'bip39' );
var bitcoin = require( 'bitcoinjs-lib' );

var searchTerm = 'newb';
var searchTermLower = searchTerm.toLowerCase();
var searchTermUpper = searchTerm.toUpperCase();

// Use a BIP44 derivation path for coin #2 (Litecoin)
var path = "m/44'/2'/0'/0/0";

var words, address, seed, root, i = 0;
do {
    // A value of 128 gives a 12-word phrase, and a value of
    // 256 gives a 24-word phrase
    words = bip39.generateMnemonic( 128 );
    seed = bip39.mnemonicToSeed( words ).toString( 'hex' );

    root = bitcoin.HDNode.fromSeedHex( seed );
    address = root.derivePath( path ).getAddress();

    if ( ++i % 100 === 0 ) console.log( 'Tried ' + i + ' seeds...' );

} while (
    address.indexOf( searchTermLower ) === -1 &&
    address.indexOf( searchTermUpper ) === -1
);

console.log( words + '\n' + address );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.