@helia/dnslink 1.2.1-070b7528 → 1.2.1-17530ed8
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 +7 -13
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +4 -4
- package/dist/src/index.d.ts +7 -13
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -13
- package/dist/src/index.js.map +1 -1
- package/package.json +6 -6
- package/src/index.ts +7 -13
package/README.md
CHANGED
|
@@ -41,16 +41,14 @@ import { createHelia } from 'helia'
|
|
|
41
41
|
import { dnsLink } from '@helia/dnslink'
|
|
42
42
|
import { dns } from '@multiformats/dns'
|
|
43
43
|
import { dnsOverHttps } from '@multiformats/dns/resolvers'
|
|
44
|
-
import type { DefaultLibp2pServices } from 'helia'
|
|
45
|
-
import type { Libp2p } from '@libp2p/interface'
|
|
46
44
|
|
|
47
|
-
const node = await createHelia
|
|
45
|
+
const node = await createHelia({
|
|
48
46
|
dns: dns({
|
|
49
47
|
resolvers: {
|
|
50
48
|
'.': dnsOverHttps('https://private-dns-server.me/dns-query')
|
|
51
49
|
}
|
|
52
50
|
})
|
|
53
|
-
})
|
|
51
|
+
}).start()
|
|
54
52
|
const name = dnsLink(node)
|
|
55
53
|
|
|
56
54
|
const result = name.resolve('some-domain-with-dnslink-entry.com')
|
|
@@ -71,7 +69,7 @@ Calling `resolve` with the `@helia/dnslink` instance:
|
|
|
71
69
|
import { createHelia } from 'helia'
|
|
72
70
|
import { dnsLink } from '@helia/dnslink'
|
|
73
71
|
|
|
74
|
-
const node = await createHelia()
|
|
72
|
+
const node = await createHelia().start()
|
|
75
73
|
const name = dnsLink(node)
|
|
76
74
|
|
|
77
75
|
const [{ answer }] = await name.resolve('blog.ipfs.tech')
|
|
@@ -93,16 +91,14 @@ import { createHelia } from 'helia'
|
|
|
93
91
|
import { dnsLink } from '@helia/dnslink'
|
|
94
92
|
import { dns } from '@multiformats/dns'
|
|
95
93
|
import { dnsOverHttps } from '@multiformats/dns/resolvers'
|
|
96
|
-
import type { DefaultLibp2pServices } from 'helia'
|
|
97
|
-
import type { Libp2p } from '@libp2p/interface'
|
|
98
94
|
|
|
99
|
-
const node = await createHelia
|
|
95
|
+
const node = await createHelia({
|
|
100
96
|
dns: dns({
|
|
101
97
|
resolvers: {
|
|
102
98
|
'.': dnsOverHttps('https://mozilla.cloudflare-dns.com/dns-query')
|
|
103
99
|
}
|
|
104
100
|
})
|
|
105
|
-
})
|
|
101
|
+
}).start()
|
|
106
102
|
const name = dnsLink(node)
|
|
107
103
|
|
|
108
104
|
const result = await name.resolve('blog.ipfs.tech')
|
|
@@ -118,16 +114,14 @@ import { createHelia } from 'helia'
|
|
|
118
114
|
import { dnsLink } from '@helia/dnslink'
|
|
119
115
|
import { dns } from '@multiformats/dns'
|
|
120
116
|
import { dnsJsonOverHttps } from '@multiformats/dns/resolvers'
|
|
121
|
-
import type { DefaultLibp2pServices } from 'helia'
|
|
122
|
-
import type { Libp2p } from '@libp2p/interface'
|
|
123
117
|
|
|
124
|
-
const node = await createHelia
|
|
118
|
+
const node = await createHelia({
|
|
125
119
|
dns: dns({
|
|
126
120
|
resolvers: {
|
|
127
121
|
'.': dnsJsonOverHttps('https://mozilla.cloudflare-dns.com/dns-query')
|
|
128
122
|
}
|
|
129
123
|
})
|
|
130
|
-
})
|
|
124
|
+
}).start()
|
|
131
125
|
const name = dnsLink(node)
|
|
132
126
|
|
|
133
127
|
const result = await name.resolve('blog.ipfs.tech')
|