Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

docs: update README.md example #178

Merged
merged 3 commits into from
Jun 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Loading this module through a script tag will make it's exports available as `Li

```js
import { createLibp2p } from 'libp2p'
import { Noise } from '@chainsafe/libp2p-noise'
import { noise } from "@chainsafe/libp2p-noise";
maschad marked this conversation as resolved.
Show resolved Hide resolved
import { multiaddr } from '@multiformats/multiaddr'
import first from "it-first";
import { pipe } from "it-pipe";
Expand All @@ -53,7 +53,7 @@ import { webRTC } from '@libp2p/webrtc'

const node = await createLibp2p({
transports: [webRTC()],
connectionEncryption: [() => new Noise()],
connectionEncryption: [noise()],
});

await node.start()
Expand Down
Loading