eosjs icon indicating copy to clipboard operation
eosjs copied to clipboard

Available username characters

Open Aluman opened this issue 8 years ago • 5 comments

Why only this '.12345abcdefghijklmnopqrstuvwxyz' characters available for user name? In result I can't use names like 'user6', 'user7' etc. https://github.com/EOSIO/eosjs/blob/master/src/format.js#L47

Aluman avatar May 29 '18 23:05 Aluman

This is what is used on the back end.. Names get compressed into a uint64 for efficiency. So limiting the character set like that gives you more total characters..

jcalfee avatar May 30 '18 12:05 jcalfee

hm, is it 13 or 12?

https://github.com/EOSIO/eosjs/blob/301654d85ca6ec028739a142f37850e7aad2f835/src/format.js#L66-L75

robertkowalski avatar May 30 '18 17:05 robertkowalski

is this the configuration for the main net launch?

i thought it was exactly 12 chars and excluding the dot. the current code includes dot and has no minimum char limit. also it allows 13 chars.

Example: right now fo.o is a valid account name.

robertkowalski avatar May 30 '18 17:05 robertkowalski

13 but the last letter can't be over j .. so limiting to 12 is probably going to be the way to go.. https://github.com/EOSIO/eosjs/blob/v13.0.0/src/format.test.js#L13-L14

jcalfee avatar May 30 '18 17:05 jcalfee

The exactly 12 chars is enforced in the eosio.system contract: https://github.com/EOSIO/eos/blob/master/contracts/eosio.system/eosio.system.cpp#L130

It was added along with name bidding to prevent name squatting.

heifner avatar May 30 '18 18:05 heifner