{"id":31745001,"url":"https://github.com/dotbithq/alldid","last_synced_at":"2025-10-09T12:28:42.557Z","repository":{"id":47685165,"uuid":"386488768","full_name":"dotbitHQ/AllDID","owner":"dotbitHQ","description":"Denames is a library to interact with Web3 accounts and domains","archived":false,"fork":false,"pushed_at":"2023-02-20T15:42:28.000Z","size":3074,"stargazers_count":10,"open_issues_count":3,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-10-09T03:44:52.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotbitHQ.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-16T02:49:25.000Z","updated_at":"2024-02-21T06:02:47.000Z","dependencies_parsed_at":"2022-09-03T08:12:37.282Z","dependency_job_id":null,"html_url":"https://github.com/dotbitHQ/AllDID","commit_stats":null,"previous_names":["dotbithq/denames"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dotbitHQ/AllDID","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotbitHQ%2FAllDID","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotbitHQ%2FAllDID/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotbitHQ%2FAllDID/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotbitHQ%2FAllDID/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotbitHQ","download_url":"https://codeload.github.com/dotbitHQ/AllDID/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotbitHQ%2FAllDID/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001445,"owners_count":26083078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2025-10-09T12:28:20.978Z","updated_at":"2025-10-09T12:28:42.549Z","avatar_url":"https://github.com/dotbitHQ.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eAllDID.js\u003c/h2\u003e\n\u003cp align=\"center\"\u003eThe all-in-one DID SDK, resolving all decentralized name(Web3 Name).\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![NPM](https://img.shields.io/npm/l/alldid)](https://github.com/dotbitHQ/AllDID/blob/main/LICENSE) [![npm](https://img.shields.io/npm/v/alldid)](https://www.npmjs.com/package/alldid)\n\u003c/div\u003e\n\n\u003e This is a whole new version of denames. If you are looking for the source code of npm package [denames](https://www.npmjs.com/package/denames)(Deprecated), please check out the branch [denames](https://github.com/dotbitHQ/denames/tree/denames).\n\n## Table of Contents\n- [Features](#features)\n- [Getting Started](#getting-started)\n- [API Documentation](#api-documentation)\n- [CHANGELOG](#changelog)\n- [Plugins](#plugins)\n- [FAQ](#faq)\n- [Get Help](#get-help)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Features\n- Check if the given name is a valid DID name.(e.g. **isSupported, isRegistered, isAvailable**.)\n- Query DID name info (e.g. **owner, manager**.)\n- Query DID name records (e.g. **tokenId, records, addresses, dwebs, reverse and registryAddress**.)\n- Supported decentralized name suffix:\n  - Ethereum Name Service - ENS\n    - .eth\n  - .bit - DOTBIT\n    - .bit\n  - Solana Name Service - SNS\n    - .sol\n  - Unstoppable Domains Name Service - UNS. Please, refer to the [Top Level Domains List](https://resolve.unstoppabledomains.com/supported_tlds).\n    - .crypto\n    - .bitcoin\n    - .blockchain\n    - .dao\n    - .nft\n    - .888\n    - .wallet\n    - .x\n    - .klever\n    - .zil\n    - .hi\n  - Space ID - SID\n    - .bnb\n  - Starknet.id (TBD)\n    - .stark\n  - Lens Protocal (TBD)\n    - .lens\n\n## Getting Started\n\nFirst, you need to install `alldid` using [`npm`](https://www.npmjs.com/package/alldid)\n```bash\nnpm install alldid --save\n```\nor [`yarn`](https://yarnpkg.com/package/alldid).\n```bash\nyarn add alldid\n```\n\nThen, you need to import AllDID.js SDK in your code and create an instance before interacting with it:\n```javascript\n// For CommonJS\nconst { createInstance } = require('alldid')\nconst alldid = createInstance()\n```\n\n```javascript\n// For ES Module\nimport { createInstance } from 'alldid'\nconst alldid = createInstance()\n```\n\nNow you could perform various operations using AllDID.js SDK. Here is a simple example:\n```javascript\n// Get DID name address\nalldid.addrs('leonx.bit', ['eth']).then(console.log)\nalldid.addrs('leon.wallet', ['eth']).then(console.log)\nalldid.addrs('🍍.sol', ['eth']).then(console.log)\n```\nA sample result would be like:\n```javascript\n// leonx.bit\n[\n  {\n    \"key\": \"address.eth\",\n    \"label\": \"\",\n    \"subtype\": \"eth\",\n    \"symbol\":\"ETH\",\n    \"ttl\": 300,\n    \"type\": \"address\",\n    \"value\": \"0xC72B6f66017246d6A7f159F5C2BF358188AD9ECa\"\n  }\n]\n\n// leon.wallet\n[\n  {\n    \"key\": \"address.eth\",\n    \"label\": \"\",\n    \"subtype\": \"eth\",\n    \"symbol\":\"ETH\",\n    \"ttl\": 0,\n    \"type\": \"address\",\n    \"value\": \"0x98e32b218bd1d8f3c267466b8d7635501dbdd1c1\"\n  }\n]\n\n// 🍍.sol\n[\n  {\n    \"key\": \"address.eth\",\n    \"label\": \"\",\n    \"subtype\": \"eth\",\n    \"symbol\":\"ETH\",\n    \"ttl\": 0,\n    \"type\": \"address\",\n    \"value\": \"0x570eDC13f9D406a2b4E6477Ddf75D5E9cCF51cd6\"\n  }\n]\n```\n\n## CHANGELOG\nTBD\n\n## API Documentation\n### Table of Contents\n- [installService(service)](#installserviceservice)\n- [isSupported(name)](#issupportedname)\n- [isRegistered(name)](#isregisteredname)\n- [isAvailable(name)](#isavailablename)\n- [owner(name)](#ownername)\n- [manager(name)](#managername)\n- [tokenId(name)](#tokenidname)\n- [records(name, keys?)](#recordsname-keys)\n- [addrs(name, currencyTicker?)](#addrsname-currencyticker)\n- dwebs(name)(todo)\n- reverse(address)(todo)\n- [registryAddress(name)](#registryaddressname)\n\n#### installService(service)\nUsed to install a NamingService and add it to the services array.\n\u003e Note: For a better development experience, we suggest you using createInstance to initialize AllDID, since it has already set a bunch of default services.\n##### Parameter\nservice: NamingService\n\nNamingService is a concrete implementation compatible with a specific Domain Name System.\n##### Return Value\nN/A\n##### Example\n```javascript\nconst { AllDID } = require('alldid');\n\n// To create a new AllDID instance.\nconst alldid = new AllDID()\n\nalldid.installService(new DotbitService(defaultCreateInstanceOptions.dotbit))\n```\n\n#### isSupported(name)\nUsed to check if a DID name is supported by install's NamingService. Returns true if any NamingService supports the DID name, false otherwise.\n##### Parameter\nname: string\n\n##### Return Value\nboolean\n##### Example\n```javascript\n// Check if the given name is a valid DID name.\nalldid.isSupported('abc.bit').then(console.log)\n\n// The printed result would be like:\ntrue\n```\n\n#### isRegistered(name)\nIt is used to query whether the DID name has been registered, if it has been registered, it returns true, otherwise it returns false.\n##### Parameter\nname: string\n\n##### Return Value\nboolean\n##### Example\n```javascript\n// Check if the given name is registered\nalldid.isRegistered('jeffx.bit').then(console.log)\n\n// The printed result would be like:\ntrue\n```\n#### isAvailable(name)\nUsed to query whether the DID name is available, return true if available, otherwise return false.\n##### Parameter\nname: string\n\n##### Return Value\nboolean\n##### Example\n```javascript\n// Check if it is available to register\nalldid.isAvailable('jeffx.bit').then(console.log)\n\n// The printed result would be like:\ntrue\n```\n\n#### owner(name)\nThe address used to query the owner of the DID name, the format of the address varies according to different domain name systems.\n##### Parameter\nname: string\n\n##### Return Value\naddress string\n##### Example\n```javascript\n// Query the address of the owner of the name\nalldid.owner('leon.bit').then(console.log)\nalldid.owner('leon.sol').then(console.log)\n\n// The printed result would be like:\n// leon.bit\n\"0x0403d6d288db8908b5ff21b60d347c6e450eb828\"\n// leon.sol\n\"FvfD9ziv4CuPj5BSD278jy6sX8Q2GTZeQZNfQ89eE4P9\"\n```\n\n#### manager(name)\nQuery the address of the manager of the DID name. The address format is different according to different domain name systems.\n\n\u003e Note: If this method is not supported, an \"Unsupported Method\" exception will be thrown\n##### Parameter\nname: string\n\n##### Return Value\naddress string\n##### Example\n```javascript\n// Query the address of the manager of the name\nalldid.manager('leon.bit').then(console.log)\nalldid.manager('leon.eth').then(console.log)\n\n// The printed result would be like:\n// leon.bit\n\"0x0403d6d288db8908b5ff21b60d347c6e450eb828\"\n// leon.eth\n\"0xfA45C6991a2C3d74ada3A279E21135133CE3Da8A\"\n```\n\n#### tokenId(name)\nQuery the TokenID of the DID name.\n\nThe TokenID format is different according to different domain name systems.\n\n##### Parameter\nname: string\n\n##### Return Value\nhex string\n##### Example\n```javascript\n// Query the tokenId of the name\nalldid.tokenId('leon.bit').then(console.log)\nalldid.tokenId('leon.sol').then(console.log)\n\n// The printed result would be like:\n// leon.bit\n\"0x38ae79fc97c608c6a9707d5df4bf44d1a4d8d6ab\"\n// leon.sol\n\"3iV8KnUZkM78tUAwWb9V9c7FWaFxCrqpC3tFzywrEayg\"\n```\n\n#### records(name, keys?)\nQuery all records of DID name, return an array.\n\n##### Parameter\nname: string\nkeys?: string | string[]\n\nkeys are string or string[] type, a set of labels separated by `.` support the following formats:\n```ts\nenum KeyPrefix {\n  Address= 'address',\n  Profile= 'profile',\n  Dweb = 'dweb',\n  Text = 'text'\n} \n\n// eth adress\n'address.eth'\n// uns dweb\n'dweb.ipfs.hash'\n// uns profile\n'profile.social'\n```\n\n##### Return Value\nRecordItem[]\n##### Example\n```javascript\n// Query the records of the name\nalldid.records('leon.bit', 'address.eth').then(console.log)\nalldid.records('leont.eth', ['address.eth']).then(console.log)\nalldid.records('Brad.crypto').then(console.log)\n\n// The printed result would be like:\n// leon.bit\n[\n  {\n    \"key\": \"address.eth\",\n    \"label\": \"\",\n    \"subtype\": \"eth\",\n    \"ttl\": 300,\n    \"type\": \"address\",\n    \"value\": \"0xC72B6f66017246d6A7f159F5C2BF358188AD9ECa\"\n  }\n]\n\n// leon.eth\n[\n  {\n    \"key\": \"address.eth\",\n    \"label\": \"\",\n    \"subtype\": \"eth\",\n    \"ttl\": 0,\n    \"type\": \"address\",\n    \"value\": \"0xC72B6f66017246d6A7f159F5C2BF358188AD9ECa\"\n  }\n]\n\n// Brad.crypto\n[\n  {\n    key: \"address.btc\", \n    label: \"\", \n    subtype: \"btc\", \n    ttl: 0, \n    type: \"address\", \n    value: \"bc1q359khn0phg58xgezyqsuuaha28zkwx047c0c3y\"\n  },\n  {\n    key: \"profile.picture\", \n    label: \"\", \n    subtype: \"picture\", \n    ttl: 0, \n    type: \"profile\", \n    value: \"1/erc1155:0xc7e5e9434f4a71e6db978bd65b4d61d3593e5f27/14317\"\n  },\n  {\n    key: \"profile.username\", \n    label: \"\", \n    subtype: \"username\", \n    ttl: 0, \n    type: \"profile\", \n    value: \"0x8912623832e174f2eb1f59cc3b587444d619376ad5bf10070e937e0dc22b9ffb2e3ae059e6ebf729f87746b2f71e5d88ec99c1fb3c7c49b8617e2520d474c48e1c\"\n  },\n  {\n    key: \"dweb.html_value\", \n    label: \"\", \n    subtype: \"html_value\", \n    ttl: 0, \n    type: \"dweb\", \n    value: \"QmTiqc12wo2pBsGa9XsbpavkhrjFiyuSWsKyffvZqVGtut\"\n  }\n]\n```\n#### addrs(name, currencyTicker?)\nQuery the addresses of DID name.\n\n##### Parameter\nname: string\ncurrencyTicker?: string | string[]\n\n##### Return Value\nRecordItemAddr[]\n\n##### Example\n```javascript\n// Query the addresses of the name\nalldid.addrs('leonx.bit', ['eth']).then(console.log)\nalldid.addrs('Brad.crypto', ['eth',  'btc']).then(console.log)\n\n// The printed result would be like:\n// leonx.bit\n[{\n  \"key\": \"address.eth\",\n  \"label\": \"\",\n  \"subtype\": \"eth\",\n  \"ttl\": 300,\n  \"type\": \"address\",\n  \"symbol\": \"ETH\",\n  \"value\": \"0xC72B6f66017246d6A7f159F5C2BF358188AD9ECa\"\n}]\n\n// Brad.crypto\n[\n  {\n    key: \"address.eth\", \n    label: \"\", \n    subtype: \"eth\", \n    ttl: 0, \n    type: \"address\", \n    value: \"0x8aaD44321A86b170879d7A244c1e8d360c99DdA8\",\n    symbol: 'ETH'\n  },\n  {\n    key: \"address.btc\", \n    label: \"\", \n    subtype: \"btc\", \n    ttl: 0, \n    type: \"address\", \n    value: \"bc1q359khn0phg58xgezyqsuuaha28zkwx047c0c3y\",\n    symbol: 'BTC'\n  }\n]\n```\n\n#### registryAddress(name)\nQuery the registry address of DID name.\n\n\u003e Note: If this method is not supported, an \"Unsupported Method\" exception will be thrown\n##### Parameter\nname: string\n\n##### Return Value\naddress string\n##### Example\n```javascript\n// Query the registry address of the name\nalldid.registryAddress('leon.wallet').then(console.log)\nalldid.registryAddress('🍍.sol').then(console.log)\n\n// The printed result would be like:\n// leon.wallet\n\"0xa9a6A3626993D487d2Dbda3173cf58cA1a9D9e9f\"\n// 🍍.sol\n\"58PwtjSDuFHuUkYjH9BYnnQKHfwo9reZhC2zMJv9JPkx\"\n```\n\n## Plugins\nTBD\n## FAQ\nTBA\n\n## Get Help\nIf you have questions or need help with AllDID.js, there are several ways to get assistance:\n- Join the .bit community on [Discord channel](https://discord.gg/fVppR7z4ht).\n- File [issues](https://github.com/dotbitHQ/AllDID/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) on the GitHub repository for AllDID.js.\n\n## Contribute\nWe welcome contributions to AllDID.js! If you are interested in helping to improve the project, there are several ways you can contribute:\n- Report bugs or suggest improvements by opening an [issue](https://github.com/dotbitHQ/AllDID/issues) on the GitHub repository.\n- Submit a pull request with your changes to the code.\n\nPlease note that AllDID.js SDK is still under development, so any contribution (including pull requests) is welcome.\n\n## License\nAllDID.js (including **all** dependencies) is protected under the [MIT License](LICENSE). This means that you are free to use, modify, and distribute the software as long as you include the original copyright and license notice. Please refer to the license for the full terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotbithq%2Falldid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotbithq%2Falldid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotbithq%2Falldid/lists"}