Skip to content

Commit 1144884

Browse files
authored
docs: update js example for 2.x.x compatibility (#385)
* docs: update js example for 2.x.x compatibility The `connectionEncryption` config key was replaced with `connectionEncrypters`
1 parent 3a8898d commit 1144884

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/guides/getting-started/javascript.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ import { noise } from '@chainsafe/libp2p-noise'
100100

101101
const node = await createLibp2p({
102102
transports: [tcp()],
103-
connectionEncryption: [noise()]
103+
connectionEncrypters: [noise()]
104104
})
105105

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

124124
const node = await createLibp2p({
125125
transports: [tcp()],
126-
connectionEncryption: [noise()],
126+
connectionEncrypters: [noise()],
127127
streamMuxers: [yamux()]
128128
})
129129

@@ -146,7 +146,7 @@ const main = async () => {
146146
listen: ['/ip4/127.0.0.1/tcp/0']
147147
},
148148
transports: [tcp()],
149-
connectionEncryption: [noise()],
149+
connectionEncrypters: [noise()],
150150
streamMuxers: [yamux()]
151151
})
152152

@@ -205,7 +205,7 @@ const node = await createLibp2p({
205205
listen: ['/ip4/127.0.0.1/tcp/0']
206206
},
207207
transports: [tcp()],
208-
connectionEncryption: [noise()],
208+
connectionEncrypters: [noise()],
209209
streamMuxers: [yamux()],
210210
services: {
211211
ping: ping({

0 commit comments

Comments
 (0)