Example

import { createLibp2p } from 'libp2p'
import { webSockets } from '@libp2p/websockets'
import { multiaddr } from '@multiformats/multiaddr'

const node = await createLibp2p({
transports: [
webSockets()
]
//... other config
})
await node.start()

const ma = multiaddr('/dns4/example.com/tcp/9090/tls/ws')
await node.dial(ma)

Index

Interfaces

Type Aliases

Functions