const libp2p = await createLibp2p({
addresses: {
listen: ['/ip4/0.0.0.0/tcp/0', '/ip6/::/tcp/0', '/webrtc'],
swarm: ['/ip4/127.0.0.1/tcp/9090/ws']
},
transports: [
tcp(),
webRTC(),
webRTCDirect(),
webSockets()
],
peerDiscovery: [mdns()],
connectionEncryption: [noise()],
streamMuxers: [yamux()],
services: {
dht: kadDHT(),
pubsub: gossipsub()
}
})
const ipfs = await IPFS.create({
libp2p
})
this const ipfs = await IPFS.create({
errors with: TypeError: [object EventTarget]
is not an Option Object