@libp2p/kad-dht 5.0.0 → 5.0.1
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 +2 -2
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -47,10 +47,10 @@ The libp2p-kad-dht module offers 3 APIs: Peer Routing, Content Routing and Peer
|
|
|
47
47
|
|
|
48
48
|
```js
|
|
49
49
|
import { createLibp2pNode } from 'libp2p'
|
|
50
|
-
import {
|
|
50
|
+
import { kadDHT } from '@libp2p/kad-dht'
|
|
51
51
|
|
|
52
52
|
const node = await createLibp2pNode({
|
|
53
|
-
dht:
|
|
53
|
+
dht: kadDHT()
|
|
54
54
|
//... other config
|
|
55
55
|
})
|
|
56
56
|
await node.start()
|
package/dist/src/index.d.ts
CHANGED
|
@@ -61,5 +61,5 @@ export interface KadDHTComponents {
|
|
|
61
61
|
connectionManager: ConnectionManager;
|
|
62
62
|
datastore: Datastore;
|
|
63
63
|
}
|
|
64
|
-
export declare function
|
|
64
|
+
export declare function kadDHT(init?: KadDHTInit): (components: KadDHTComponents) => DualKadDHT;
|
|
65
65
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.js
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -90,6 +90,6 @@ class KadDHT extends DualKadDHT {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
export function
|
|
93
|
+
export function kadDHT (init?: KadDHTInit): (components: KadDHTComponents) => DualKadDHT {
|
|
94
94
|
return (components: KadDHTComponents) => new KadDHT(components, init)
|
|
95
95
|
}
|