Hello,
I am using your package with Ethereum addresses as a seed (with the 0x prefix removed) and the dictionaries adjectives and animals. It appears that some adjectives and animals will never (or extremely rarely?) be used when calling uniqueNamesGenerator with the address as a seed but others will be very often.
For instance, if I want to generate a vanity name (i.e. I want my name generated from the ETH address to contains whale, see script below)
- I generate an ETH address and generate the unique name from it
- I check if the name contains whale
- If yes I return the keypair, else I continue
The expected outcome is that every time I run the vanity name generator, I get an {adjective} + Whale nickname, where {adjective} is one of the many adjectives in the dictionary.
But in reality, it will very often be the same adjective, here is a sample of 100 generated names that includes Whale (each one was generated using a different ETH address):
InternalWhale
RemarkableWhale
InternalWhale
InternalWhale
InternalWhale
InternalWhale
InternalWhale
RemarkableWhale
InternalWhale
RemarkableWhale
DigitalWhale
RemarkableWhale
InternalWhale
RemarkableWhale
InternalWhale
DigitalWhale
InternalWhale
RemarkableWhale
InternalWhale
InternalWhale
RemarkableWhale
RemarkableWhale
InternalWhale
RemarkableWhale
DigitalWhale
InternalWhale
InternalWhale
InternalWhale
InternalWhale
RemarkableWhale
RemarkableWhale
InternalWhale
RemarkableWhale
DigitalWhale
RemarkableWhale
RemarkableWhale
DigitalWhale
DigitalWhale
RemarkableWhale
InternalWhale
InternalWhale
RemarkableWhale
InternalWhale
RemarkableWhale
RemarkableWhale
InternalWhale
RemarkableWhale
InternalWhale
RemarkableWhale
InternalWhale
InternalWhale
InternalWhale
RemarkableWhale
DigitalWhale
InternalWhale
InternalWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
InternalWhale
InternalWhale
RemarkableWhale
RemarkableWhale
InternalWhale
InternalWhale
InternalWhale
RemarkableWhale
RemarkableWhale
InternalWhale
InternalWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
InternalWhale
DigitalWhale
DigitalWhale
RemarkableWhale
RemarkableWhale
InternalWhale
InternalWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
DigitalWhale
RemarkableWhale
RemarkableWhale
InternalWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
RemarkableWhale
InternalWhale
InternalWhale
RemarkableWhale
InternalWhale
I think there is an issue in how the seed is generated from a string, perhaps it is too big? Also, if tou try using a VERY big number as a seed, you will always end up with the same name, so I think there is an issue with the seed.
Script to generate vanity names:
const { uniqueNamesGenerator, adjectives, colors, animals } = require('unique-names-generator');
var Web3 = require('web3');
const arg = process.argv[2];
const web3 = new Web3();
if (!arg) {
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout,
});
readline.question('Vanity name should include: ', (contains) => {
console.log(`Searching name with ${contains}!`);
readline.close();
generateVanityName(contains);
});
} else {
console.log(`Searching name with ${arg}!`);
generateVanityName(arg);
}
function generateNameFromAddress(address) {
const customConfig = {
dictionaries: [adjectives, animals],
separator: '',
length: 2,
seed: address,
style: 'capital',
};
return uniqueNamesGenerator(customConfig);
}
function generateVanityName(contains) {
let account;
let name;
do {
account = web3.eth.accounts.create();
name = generateNameFromAddress(account.address.replace('0x', ''));
} while (!name || !name.toLowerCase().includes(contains.toLowerCase()));
console.log(account);
console.log(name);
return;
}
Hello,
I am using your package with Ethereum addresses as a seed (with the
0xprefix removed) and the dictionariesadjectivesandanimals. It appears that some adjectives and animals will never (or extremely rarely?) be used when callinguniqueNamesGeneratorwith the address as a seed but others will be very often.For instance, if I want to generate a vanity name (i.e. I want my name generated from the ETH address to contains
whale, see script below)The expected outcome is that every time I run the vanity name generator, I get an
{adjective}+ Whale nickname, where {adjective} is one of the many adjectives in the dictionary.But in reality, it will very often be the same adjective, here is a sample of 100 generated names that includes
Whale(each one was generated using a different ETH address):I think there is an issue in how the seed is generated from a string, perhaps it is too big? Also, if tou try using a VERY big number as a seed, you will always end up with the same name, so I think there is an issue with the seed.
Script to generate vanity names: