Commit 2662c50 1 parent f307695 commit 2662c50 Copy full SHA for 2662c50
File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -37,29 +37,29 @@ Requires access to `/api/v0/dht/findpeer` and `/api/v0/dht/query` HTTP API endpo
37
37
38
38
## Requirements
39
39
40
- ` libp2p-delegated-peer-routing ` leverages the ` ipfs-http -client` library and requires an instance of it as a constructor argument.
40
+ ` libp2p-delegated-peer-routing ` leverages the ` kubo-rpc -client` library and requires an instance of it as a constructor argument.
41
41
42
42
``` sh
43
- npm install ipfs-http -client libp2p-delegated-peer-routing
43
+ npm install kubo-rpc -client libp2p-delegated-peer-routing
44
44
```
45
45
46
46
## Example
47
47
48
48
``` js
49
49
import { createLibp2p } from ' libp2p'
50
- import { delegatedPeerRouting } from ' @libp2p/delegated-peer-routing' )
51
- import { create as createIpfsHttpClient } from ' ipfs-http -client' )
50
+ import { delegatedPeerRouting } from ' @libp2p/delegated-peer-routing'
51
+ import { create as kuboClient } from ' kubo-rpc -client'
52
52
53
53
// default is to use ipfs.io
54
- const client = createIpfsHttpClient ({
54
+ const client = kuboClient ({
55
55
// use default api settings
56
56
protocol: ' https' ,
57
57
port: 443 ,
58
58
host: ' node0.delegate.ipfs.io'
59
59
})
60
60
61
61
const node = await createLibp2p ({
62
- peerRouting : [
62
+ peerRouters : [
63
63
delegatedPeerRouting (client)
64
64
]
65
65
// .. other config
You can’t perform that action at this time.
0 commit comments