Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including eosjs-account-name with all npm packages installed. Try it out:

var eosjsAccountName = require("eosjs-account-name")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

eosjs-account-name v1.1.1

eos name in string to uint64 and vice versa

Eosio name to uint64

NPM Build Status

npm i eosjs-account-name
yarn add eosjs-account-name

From name to uint64

Here is [how eosio account name is computed to uint64] (, I think node developer should have this function too :).

main.cpp show how sample values are created.


---- 6138663577826885632
---- 6138663587900751872
---- 6138663591592764928

From uint64 to name



Try on run-kit

const eosjsAccountName = require("eosjs-account-name")
const n = eosjsAccountName.nameToUint64('eosio');

console.log('eosio to uint64: ' + n);

console.log('uint64 to name: ' + eosjsAccountName.uint64ToName(n));


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free