@blockcore/dns 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -7
- package/lib/Request.d.ts +0 -1
- package/lib/Request.js +0 -1
- package/package.json +2 -6
package/README.md
CHANGED
@@ -30,20 +30,18 @@ npm install @blockcore/dns
|
|
30
30
|
```ts
|
31
31
|
import { BlockcoreDns } from '@blockcore/dns';
|
32
32
|
|
33
|
-
let dns = new BlockcoreDns();
|
34
|
-
let
|
33
|
+
let dns = new BlockcoreDns('https://ns.blockcore.net');
|
34
|
+
let indexers = await dns.getServicesByType('Indexer');
|
35
35
|
```
|
36
36
|
|
37
|
-
|
37
|
+
You can retrieve the public known nameservers and use those instead of manually specifying server:
|
38
38
|
|
39
39
|
```ts
|
40
|
-
let
|
41
|
-
|
42
|
-
dns.setActiveServer(dnsServer.url);
|
40
|
+
let dnsServers = await BlockcoreDns.getDnsServers();
|
41
|
+
dns.setActiveServer(dnsServers[0].url);
|
43
42
|
|
44
43
|
await dns.getServicesByType('Indexer');
|
45
44
|
await dns.getServicesByNetwork('CITY');
|
46
45
|
await dns.getServicesByTypeAndNetwork('Indexer', 'CITY');
|
47
46
|
await dns.getExternalIP();
|
48
47
|
```
|
49
|
-
|
package/lib/Request.d.ts
CHANGED
package/lib/Request.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@blockcore/dns",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.6",
|
4
4
|
"type": "module",
|
5
5
|
"exports": "./lib/index.js",
|
6
6
|
"types": "./lib/index.d.ts",
|
@@ -8,7 +8,7 @@
|
|
8
8
|
"lib/**/*"
|
9
9
|
],
|
10
10
|
"engines": {
|
11
|
-
"node": ">=
|
11
|
+
"node": ">=18.*"
|
12
12
|
},
|
13
13
|
"scripts": {
|
14
14
|
"build": "tsc",
|
@@ -50,9 +50,5 @@
|
|
50
50
|
"nodeArguments": [
|
51
51
|
"--loader=ts-node/esm"
|
52
52
|
]
|
53
|
-
},
|
54
|
-
"dependencies": {
|
55
|
-
"@blockcore/identity": "^0.0.1",
|
56
|
-
"node-fetch": "^3.2.9"
|
57
53
|
}
|
58
54
|
}
|