Skip to content

Commit 2662c50

Browse files
2colorachingbrain
andauthored
docs: Update README.md (#117)
Update API usage Co-authored-by: Alex Potsides <[email protected]>
1 parent f307695 commit 2662c50

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,29 @@ Requires access to `/api/v0/dht/findpeer` and `/api/v0/dht/query` HTTP API endpo
3737

3838
## Requirements
3939

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.
4141

4242
```sh
43-
npm install ipfs-http-client libp2p-delegated-peer-routing
43+
npm install kubo-rpc-client libp2p-delegated-peer-routing
4444
```
4545

4646
## Example
4747

4848
```js
4949
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'
5252

5353
// default is to use ipfs.io
54-
const client = createIpfsHttpClient({
54+
const client = kuboClient({
5555
// use default api settings
5656
protocol: 'https',
5757
port: 443,
5858
host: 'node0.delegate.ipfs.io'
5959
})
6060

6161
const node = await createLibp2p({
62-
peerRouting: [
62+
peerRouters: [
6363
delegatedPeerRouting(client)
6464
]
6565
//.. other config

0 commit comments

Comments
 (0)