Skip to content

Commit

Permalink
docs: update dht readme (#2347)
Browse files Browse the repository at this point in the history
The `addressFilter` init option should be `peerInfoMapper`
  • Loading branch information
achingbrain authored Jan 7, 2024
1 parent 9002367 commit 821a38e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/kad-dht/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const node = await createLibp2p({
services: {
aminoDHT: kadDHT({
protocol: '/ipfs/kad/1.0.0',
addressFilter: removePrivateAddressesMapper
peerInfoMapper: removePrivateAddressesMapper
})
}
})
Expand All @@ -71,7 +71,7 @@ const node = await createLibp2p({
services: {
lanDHT: kadDHT({
protocol: '/ipfs/lan/kad/1.0.0',
addressFilter: removePublicAddressesMapper,
peerInfoMapper: removePublicAddressesMapper,
clientMode: false
})
}
Expand Down
4 changes: 2 additions & 2 deletions packages/kad-dht/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* services: {
* aminoDHT: kadDHT({
* protocol: '/ipfs/kad/1.0.0',
* addressFilter: removePrivateAddressesMapper
* peerInfoMapper: removePrivateAddressesMapper
* })
* }
* })
Expand All @@ -65,7 +65,7 @@
* services: {
* lanDHT: kadDHT({
* protocol: '/ipfs/lan/kad/1.0.0',
* addressFilter: removePublicAddressesMapper,
* peerInfoMapper: removePublicAddressesMapper,
* clientMode: false
* })
* }
Expand Down
2 changes: 1 addition & 1 deletion packages/transport-tcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A [libp2p transport](https://docs.libp2p.io/concepts/transports/overview/) based

## Example

```js
```TypeScript
import { tcp } from '@libp2p/tcp'
import { multiaddr } from '@multiformats/multiaddr'
import { pipe } from 'it-pipe'
Expand Down

0 comments on commit 821a38e

Please sign in to comment.