From 5cdc0751355399b6f6936cd84af745fa796ce452 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Fri, 1 Sep 2023 10:05:36 +0100 Subject: [PATCH] docs: use noise factory function in readme Noise has exported this function as of v10 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dd77fce..7e9d2a5 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ It is recommended to use with the [WebTransport](https://github.com/libp2p/js-li ```ts import {createLibp2p} from "libp2p"; -import {Noise} from "@chainsafe/libp2p-noise"; +import {noise} from "@chainsafe/libp2p-noise"; import {webTransport} from "@libp2p/webtransport"; import {MemoryBlockstore} from "blockstore-core/memory"; import {GraphSync, unixfsPathSelector, getPeer} from "@dcdn/graphsync"; @@ -32,7 +32,7 @@ const blocks = new MemoryBlockstore(); const libp2p = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [() => new Noise()], + connectionEncryption: [noise()], }); await libp2p.start();