add circuit relay as a supported transport

This commit is contained in:
danisharora099 2023-09-26 21:37:25 +05:30
parent 6fa106aa7f
commit 39add5e5d5
No known key found for this signature in database
GPG Key ID: FBD2BF500037F135
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import type {
import { wakuPeerExchangeDiscovery } from "@waku/peer-exchange";
import { RelayCreateOptions, wakuGossipSub, wakuRelay } from "@waku/relay";
import { createLibp2p, Libp2pOptions } from "libp2p";
import { circuitRelayTransport } from "libp2p/circuit-relay";
import { identifyService } from "libp2p/identify";
import { pingService } from "libp2p/ping";
@ -172,7 +173,7 @@ export async function defaultLibp2p(
connectionManager: {
minConnections: 1
},
transports: [webSockets({ filter: filterAll })],
transports: [webSockets({ filter: filterAll }), circuitRelayTransport()],
streamMuxers: [mplex()],
connectionEncryption: [noise()],
...options,