Module @libp2p/daemon-server

libp2p.io Discuss codecov CI

API server for libp2p-daemon instances

Install

$ npm i @libp2p/daemon-server

Specs

The specs for the daemon are currently housed in the go implementation. You can read them at libp2p/go-libp2p-daemon

Usage

import { createServer } from '@libp2p/daemon-server'
import { createLibp2p } from 'libp2p'
import { multiaddr } from '@multiformats/multiaddr'

const libp2p = await createLibp2p({
// ..config
})

const multiaddr = multiaddr('/ip4/0.0.0.0/tcp/0')

const server = await createServer(multiaddr, libp2p)
await server.start()

API Docs

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Index

Classes

Interfaces

Functions