From 1144884822e77919369854ec5c47e52e680eff27 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Sun, 15 Dec 2024 23:13:45 +0000 Subject: [PATCH] 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` --- content/guides/getting-started/javascript.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/guides/getting-started/javascript.md b/content/guides/getting-started/javascript.md index 78cfd284..533618d5 100644 --- a/content/guides/getting-started/javascript.md +++ b/content/guides/getting-started/javascript.md @@ -100,7 +100,7 @@ import { noise } from '@chainsafe/libp2p-noise' const node = await createLibp2p({ transports: [tcp()], - connectionEncryption: [noise()] + connectionEncrypters: [noise()] }) ``` @@ -123,7 +123,7 @@ import { yamux } from '@chainsafe/libp2p-yamux' const node = await createLibp2p({ transports: [tcp()], - connectionEncryption: [noise()], + connectionEncrypters: [noise()], streamMuxers: [yamux()] }) @@ -146,7 +146,7 @@ const main = async () => { listen: ['/ip4/127.0.0.1/tcp/0'] }, transports: [tcp()], - connectionEncryption: [noise()], + connectionEncrypters: [noise()], streamMuxers: [yamux()] }) @@ -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({