Skip to content

Commit

Permalink
docs: update js example for 2.x.x compatibility (#385)
Browse files Browse the repository at this point in the history
* docs: update js example for 2.x.x compatibility

The `connectionEncryption` config key was replaced with `connectionEncrypters`
  • Loading branch information
achingbrain authored Dec 15, 2024
1 parent 3a8898d commit 1144884
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/guides/getting-started/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ import { noise } from '@chainsafe/libp2p-noise'

const node = await createLibp2p({
transports: [tcp()],
connectionEncryption: [noise()]
connectionEncrypters: [noise()]
})

```
Expand All @@ -123,7 +123,7 @@ import { yamux } from '@chainsafe/libp2p-yamux'

const node = await createLibp2p({
transports: [tcp()],
connectionEncryption: [noise()],
connectionEncrypters: [noise()],
streamMuxers: [yamux()]
})

Expand All @@ -146,7 +146,7 @@ const main = async () => {
listen: ['/ip4/127.0.0.1/tcp/0']
},
transports: [tcp()],
connectionEncryption: [noise()],
connectionEncrypters: [noise()],
streamMuxers: [yamux()]
})

Expand Down Expand Up @@ -205,7 +205,7 @@ const node = await createLibp2p({
listen: ['/ip4/127.0.0.1/tcp/0']
},
transports: [tcp()],
connectionEncryption: [noise()],
connectionEncrypters: [noise()],
streamMuxers: [yamux()],
services: {
ping: ping({
Expand Down

0 comments on commit 1144884

Please sign in to comment.