Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit be025c8

Browse files
d-r-wachingbrain
andauthored
Updates findProvs example (#4114)
findProvs (as mentioned on lines 87-89) is expecting a CID, not a string Co-authored-by: Alex Potsides <[email protected]>
1 parent 764b4ad commit be025c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/core-api/DHT.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ Note that if `options.numProviders` are not found an error will be thrown.
109109
### Example
110110

111111
```JavaScript
112-
const providers = ipfs.dht.findProvs('QmdPAhQRxrDKqkGPvQzBvjYe3kU8kiEEAd2J6ETEamKAD9')
112+
import { CID } from 'multiformats/cid'
113+
114+
const providers = ipfs.dht.findProvs(CID.parse('QmdPAhQRxrDKqkGPvQzBvjYe3kU8kiEEAd2J6ETEamKAD9'))
113115

114116
for await (const provider of providers) {
115117
console.log(provider.id.toString())

0 commit comments

Comments
 (0)