{"id":13651933,"url":"https://github.com/manh-vv/eosjs-name","last_synced_at":"2026-01-19T02:37:36.302Z","repository":{"id":35138183,"uuid":"211686894","full_name":"manh-vv/eosjs-name","owner":"manh-vv","description":"eos name in string to uint64 and vice versa","archived":false,"fork":false,"pushed_at":"2025-07-21T23:10:35.000Z","size":1893,"stargazers_count":10,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-24T05:52:05.114Z","etag":null,"topics":["eosio","name","symbol"],"latest_commit_sha":null,"homepage":"https://manh-vv.github.io/eosjs-name","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manh-vv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-09-29T15:50:13.000Z","updated_at":"2025-04-04T16:07:31.000Z","dependencies_parsed_at":"2024-01-03T05:13:56.011Z","dependency_job_id":"178a3694-6df3-4fcb-98db-9eccbf9bace9","html_url":"https://github.com/manh-vv/eosjs-name","commit_stats":{"total_commits":59,"total_committers":3,"mean_commits":"19.666666666666668","dds":0.6101694915254237,"last_synced_commit":"29371b74d8b9391cd5f44d47527feeba4ffd8d89"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/manh-vv/eosjs-name","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manh-vv%2Feosjs-name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manh-vv%2Feosjs-name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manh-vv%2Feosjs-name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manh-vv%2Feosjs-name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manh-vv","download_url":"https://codeload.github.com/manh-vv/eosjs-name/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manh-vv%2Feosjs-name/sbom","scorecard":{"id":615021,"data":{"date":"2025-08-11","repo":{"name":"github.com/manh-vv/eosjs-name","commit":"1a8de00d50fcf451328c5e7de2658382aa164f94"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T03:41:08.060Z","repository_id":35138183,"created_at":"2025-08-21T03:41:08.060Z","updated_at":"2025-08-21T03:41:08.060Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28558279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eosio","name","symbol"],"created_at":"2024-08-02T02:00:53.547Z","updated_at":"2026-01-19T02:37:36.284Z","avatar_url":"https://github.com/manh-vv.png","language":"JavaScript","funding_links":[],"categories":["Developers"],"sub_categories":["Developer Tools"],"readme":"# Eosio name to uint64\n\n[![NPM](https://img.shields.io/npm/v/eosjs-account-name.svg)](https://www.npmjs.org/package/eosjs-account-name)\n[![Build Status](https://travis-ci.org/manh-vv/eosjs-name.svg?branch=master)](https://travis-ci.org/manh-vv/eosjs-name)\n[![codecov](https://codecov.io/gh/manh-vv/eosjs-name/branch/master/graph/badge.svg?token=WLVN5CZT6Q)](https://codecov.io/gh/manh-vv/eosjs-name)\n\n[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/manh-vv/eosjs-name)\n\n```sh\nnpm i eosjs-account-name\n```\n\n```sh\nyarn add eosjs-account-name\n```\n\n```html\n\u003c!-- lib name is: eosjsName --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/eosjs-account-name@2.3.0/lib/index.js\"\u003e\u003c/script\u003e\n```\n\nExample of browser is in [index.html](./docs/index.html).\n\n## From name to uint64\n\nHere is [how eosio account name is computed to uint64](https://github.com/EOSIO/eos/blob/master/libraries/chain/include/eosio/chain/name.hpp#L21).\n\n```text\n\"eosio\",\n\"eosio.msig\",\n\"eosio.token\",\n\n---- 6138663577826885632\n---- 6138663587900751872\n---- 6138663591592764928\n```\n\n## From uint64 to name\n\nSource https://github.com/EOSIO/eos/blob/master/libraries/chain/name.cpp#L19\n\n## Example\n\nTry on run-kit https://npm.runkit.com/eosjs-account-name\n\n```javascript\nconst eosjsAccountName = require('eosjs-account-name');\nconst n = eosjsAccountName.nameToUint64('eosio');\n\nconsole.log('eosio to uint64: ' + n);\n\nconsole.log('uint64 to name: ' + eosjsAccountName.uint64ToName(n));\n```\n\n### Parse symbol name\n\n[symbol.test.js](./__tests__/symbol.test.js)\n\n```javascript\nconst { symbol, nameToUint64 } = require('eosjs-account-name');\n\n/**\n * cleos -u https://eos.greymass.com get scope eosio.token -t stat\n */\nconst name = '........ehbo5';\nconst uint64 = nameToUint64(name);\nconst symbolName = symbol.toName(uint64);\n\n// expect(symbolName).toEqual('EOS');\n```\n\n## Note on random eosio name\n\nIn case you want to generate a random name, I suggest you use [`nanoid`](https://zelark.github.io/nano-id-cc/).\n\n```javascript\nconst generate = require('nanoid/generate');\nconst alphabet = '.12345abcdefghijklmnopqrstuvwxyz';\ngenerate(alphabet, 12); //=\u003e \"nc4zs1yyg.jx\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanh-vv%2Feosjs-name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanh-vv%2Feosjs-name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanh-vv%2Feosjs-name/lists"}