@helia/ipns 10.0.1 → 10.0.2-688bd9de
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 +3 -7
- package/dist/index.min.js +16 -5
- package/dist/index.min.js.map +4 -4
- package/dist/src/errors.d.ts +0 -8
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +0 -8
- package/dist/src/errors.js.map +1 -1
- package/dist/src/index.d.ts +58 -20
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -11
- package/dist/src/index.js.map +1 -1
- package/dist/src/ipns/publisher.d.ts.map +1 -1
- package/dist/src/ipns/publisher.js +27 -14
- package/dist/src/ipns/publisher.js.map +1 -1
- package/dist/src/ipns/republisher.d.ts.map +1 -1
- package/dist/src/ipns/republisher.js +22 -9
- package/dist/src/ipns/republisher.js.map +1 -1
- package/dist/src/ipns/resolver.d.ts.map +1 -1
- package/dist/src/ipns/resolver.js +39 -17
- package/dist/src/ipns/resolver.js.map +1 -1
- package/dist/src/ipns.d.ts.map +1 -1
- package/dist/src/ipns.js +8 -8
- package/dist/src/ipns.js.map +1 -1
- package/dist/src/local-store.d.ts +4 -4
- package/dist/src/local-store.d.ts.map +1 -1
- package/dist/src/local-store.js +2 -1
- package/dist/src/local-store.js.map +1 -1
- package/dist/src/pb/ipns.d.ts +29 -29
- package/dist/src/pb/ipns.d.ts.map +1 -1
- package/dist/src/pb/ipns.js +15 -15
- package/dist/src/records.d.ts +27 -142
- package/dist/src/records.d.ts.map +1 -1
- package/dist/src/records.js +39 -46
- package/dist/src/records.js.map +1 -1
- package/dist/src/routing/helia.d.ts +5 -5
- package/dist/src/routing/helia.d.ts.map +1 -1
- package/dist/src/routing/helia.js +3 -3
- package/dist/src/routing/helia.js.map +1 -1
- package/dist/src/routing/index.d.ts +7 -7
- package/dist/src/routing/index.d.ts.map +1 -1
- package/dist/src/routing/index.js +2 -2
- package/dist/src/routing/index.js.map +1 -1
- package/dist/src/routing/local-store.d.ts +1 -1
- package/dist/src/routing/local-store.d.ts.map +1 -1
- package/dist/src/routing/local-store.js +3 -3
- package/dist/src/routing/local-store.js.map +1 -1
- package/dist/src/routing/pubsub.d.ts +11 -11
- package/dist/src/routing/pubsub.d.ts.map +1 -1
- package/dist/src/routing/pubsub.js +11 -12
- package/dist/src/routing/pubsub.js.map +1 -1
- package/dist/src/selector.d.ts +2 -2
- package/dist/src/selector.d.ts.map +1 -1
- package/dist/src/selector.js +13 -9
- package/dist/src/selector.js.map +1 -1
- package/dist/src/utils.d.ts +9 -10
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +20 -128
- package/dist/src/utils.js.map +1 -1
- package/dist/src/validator.d.ts +9 -3
- package/dist/src/validator.d.ts.map +1 -1
- package/dist/src/validator.js +57 -14
- package/dist/src/validator.js.map +1 -1
- package/package.json +6 -31
- package/src/errors.ts +0 -10
- package/src/index.ts +75 -25
- package/src/ipns/publisher.ts +27 -14
- package/src/ipns/republisher.ts +31 -13
- package/src/ipns/resolver.ts +39 -21
- package/src/ipns.ts +8 -8
- package/src/local-store.ts +8 -7
- package/src/pb/ipns.proto +1 -1
- package/src/pb/ipns.ts +37 -37
- package/src/records.ts +57 -210
- package/src/routing/helia.ts +6 -6
- package/src/routing/index.ts +7 -7
- package/src/routing/local-store.ts +6 -6
- package/src/routing/pubsub.ts +24 -25
- package/src/selector.ts +14 -11
- package/src/utils.ts +25 -147
- package/src/validator.ts +73 -16
- package/dist/typedoc-urls.json +0 -50
package/README.md
CHANGED
|
@@ -66,7 +66,6 @@ value.
|
|
|
66
66
|
import { createHelia } from 'helia'
|
|
67
67
|
import { ipns } from '@helia/ipns'
|
|
68
68
|
import { unixfs } from '@helia/unixfs'
|
|
69
|
-
import { generateKeyPair } from '@libp2p/crypto/keys'
|
|
70
69
|
|
|
71
70
|
const helia = await createHelia()
|
|
72
71
|
const name = ipns(helia)
|
|
@@ -95,7 +94,6 @@ It is possible to publish CIDs with an associated path.
|
|
|
95
94
|
import { createHelia } from 'helia'
|
|
96
95
|
import { ipns } from '@helia/ipns'
|
|
97
96
|
import { unixfs } from '@helia/unixfs'
|
|
98
|
-
import { generateKeyPair } from '@libp2p/crypto/keys'
|
|
99
97
|
|
|
100
98
|
const helia = await createHelia()
|
|
101
99
|
const name = ipns(helia)
|
|
@@ -134,15 +132,13 @@ and multiple peers are listening on the topic(s), otherwise update messages
|
|
|
134
132
|
may fail to be published with "Insufficient peers" errors.
|
|
135
133
|
|
|
136
134
|
```TypeScript
|
|
137
|
-
import { ipns } from '@helia/ipns'
|
|
138
|
-
import { pubsub } from '@helia/ipns/routing'
|
|
135
|
+
import { ipns, pubSubIPNSRouting } from '@helia/ipns'
|
|
139
136
|
import { withLibp2p, libp2pDefaults } from '@helia/libp2p'
|
|
140
137
|
import { unixfs } from '@helia/unixfs'
|
|
141
|
-
import { generateKeyPair } from '@libp2p/crypto/keys'
|
|
142
138
|
import { floodsub } from '@libp2p/floodsub'
|
|
143
139
|
import { createHelia } from 'helia'
|
|
144
140
|
import type { Helia } from '@helia/interface'
|
|
145
|
-
import type { PubSub } from '@helia/ipns
|
|
141
|
+
import type { PubSub } from '@helia/ipns'
|
|
146
142
|
import type { DefaultLibp2pServices } from '@helia/libp2p'
|
|
147
143
|
import type { FloodSub } from '@libp2p/floodsub'
|
|
148
144
|
import type { Libp2p } from '@libp2p/interface'
|
|
@@ -154,7 +150,7 @@ const helia = await withLibp2p<Helia, { pubsub: FloodSub }>(createHelia(), libp2
|
|
|
154
150
|
|
|
155
151
|
const name = ipns(helia, {
|
|
156
152
|
routers: [
|
|
157
|
-
|
|
153
|
+
pubSubIPNSRouting(helia)
|
|
158
154
|
]
|
|
159
155
|
})
|
|
160
156
|
|