{"id":19571581,"url":"https://github.com/block-core/blockcore-dns-js","last_synced_at":"2025-04-27T03:32:22.760Z","repository":{"id":47345436,"uuid":"516053200","full_name":"block-core/blockcore-dns-js","owner":"block-core","description":"JavaScript package to query and resolve dynamic and decentralized DNS entries","archived":false,"fork":false,"pushed_at":"2024-04-22T19:20:01.000Z","size":59,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T03:23:00.109Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/block-core.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-20T16:18:50.000Z","updated_at":"2024-04-22T19:19:02.000Z","dependencies_parsed_at":"2024-04-27T23:31:15.289Z","dependency_job_id":"4626b1ca-8e72-454a-9109-0aab81f27d5e","html_url":"https://github.com/block-core/blockcore-dns-js","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"6707f6fc79298aafd338ea4d7462e1a134ba29e3"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fblockcore-dns-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fblockcore-dns-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fblockcore-dns-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fblockcore-dns-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/block-core","download_url":"https://codeload.github.com/block-core/blockcore-dns-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251085145,"owners_count":21533821,"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","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":"2024-11-11T06:19:23.480Z","updated_at":"2025-04-27T03:32:22.463Z","avatar_url":"https://github.com/block-core.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://avatars3.githubusercontent.com/u/53176002?s=200\u0026v=4\" height=\"100\" alt=\"Blockcore\" /\u003e\n  \u003c/p\u003e\n  \u003ch3 align=\"center\"\u003e\n    Blockcore DNS Provider\n  \u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    DNS Provider package to query and resolve dynamic and decentralized DNS entries\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n      \u003ca href=\"https://github.com/block-core/blockcore-dns-js/actions/workflows/build.yml\"\u003e\u003cimg src=\"https://github.com/block-core/blockcore-dns-js/actions/workflows/build.yml/badge.svg\" /\u003e\u003c/a\u003e   \u003ca href=\"https://github.com/block-core/blockcore-dns-js/actions/workflows/release.yml\"\u003e\u003cimg src=\"https://github.com/block-core/blockcore-dns-js/actions/workflows/release.yml/badge.svg\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\u003cem\u003eWork-in-Progress - use with caution!\u003c/em\u003e\u003c/p\u003e\n\u003c/p\u003e\n\n# Blockcore DNS Provider\n\n## Install\n\n```sh\nnpm install @blockcore/dns\n```\n\n**Warning:** This package is native [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and does not provide a CommonJS export. If your project uses CommonJS, you'll have to [convert to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) or use the [dynamic `import()`](https://v8.dev/features/dynamic-import) function.\n\n\n## Usage\n\n```ts\nimport { BlockcoreDns } from '@blockcore/dns';\n\nlet dns = new BlockcoreDns();\n\n// This relies on a central nameserver registry:\nawait dns.load();\nlet indexers = await dns.getServicesByType('Indexer');\n```\n\nGet servers from known nameservers:\n\n```ts\nimport { BlockcoreDns } from '@blockcore/dns';\n\nlet dns = new BlockcoreDns();\n\n// This relies on fixed set of nameservers:\nawait dns.load({ url: 'https://ns.blockcore.net', contact: 'post@blockcore.net' });\nlet indexers = await dns.getServicesByType('Indexer');\n```\n\nYou can create an load the nameservers using this static function:\n\n```ts\nlet dnsServers = await BlockcoreDns.getDnsServers();\ndns.setActiveServer(dnsServers[0].url);\n\nawait dns.api.getServicesByType('Indexer');\nawait dns.api.getServicesByNetwork('CITY');\nawait dns.api.getServicesByTypeAndNetwork('Indexer', 'CITY');\nawait dns.api.getExternalIP();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-core%2Fblockcore-dns-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblock-core%2Fblockcore-dns-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-core%2Fblockcore-dns-js/lists"}