Package detail

@libp2p/daemon-client

libp2p3.2kApache-2.0 OR MIT9.0.6

libp2p-daemon client implementation

libp2p

readme

@libp2p/daemon-client

libp2p.io Discuss codecov CI

libp2p-daemon client implementation

Install

$ npm i @libp2p/daemon-client

Specs

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

Usage

Run a daemon process

There are currently two implementations of the libp2p-daemon:

Interact with the daemon process using the client

import { createClient } from '@libp2p/daemon-client'
import { multiaddr } from '@multiformats/multiaddr'

const serverAddr = multiaddr('/ip4/127.0.0.1/tcp/1234')
const client = createClient(serverAddr)

// interact with the daemon
let identify
try {
  identify = await client.identify()
} catch (err) {
  // ...
}

// close the socket
await client.close()

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.

changelog

1.0.0 (2024-08-01)

⚠ BREAKING CHANGES

  • updates js-libp2p to v1
  • stream close methods are now asyc, requires libp2p@0.46.x or later
  • the type of the source/sink properties have changed
  • update pubsub subscribe method to return subscription (#186)
  • Update multiformats and related dependencies (#170)
  • the stream type returned by client.openStream has changed
  • uses new single-issue libp2p interface modules
  • This module is now ESM only

Features

Bug Fixes

Trivial Changes

Documentation

Dependencies

  • bump @chainsafe/libp2p-gossipsub from 10.1.1 to 11.0.0 (#244) (6cc8c3c)
  • bump @chainsafe/libp2p-gossipsub from 11.2.1 to 13.0.0 (#265) (bcd5041)
  • bump @chainsafe/libp2p-gossipsub from 9.1.0 to 10.0.0 (#214) (0308811)
  • bump @libp2p/interface-connection from 3.1.1 to 4.0.0 (#195) (798ecc5)
  • bump @libp2p/interface-peer-store from 1.2.9 to 2.0.0 (#201) (9b146a8)
  • bump @libp2p/interface-transport from 1.0.4 to 2.0.0 (#132) (1a7b2cc)
  • bump @libp2p/kad-dht from 11.0.8 to 12.0.5 (#261) (1cbaa23)
  • bump @libp2p/tcp from 3.0.0 to 4.0.1 (4e64dce)
  • bump @libp2p/tcp from 5.0.2 to 6.0.8 (#165) (fb676ab)
  • bump @multiformats/multiaddr from 11.6.1 to 12.0.0 (#189) (aaf7e2e)
  • bump aegir from 37.12.1 to 38.1.6 (#183) (6725a0a)
  • bump aegir from 38.1.8 to 39.0.1 (#202) (3bf4027)
  • bump aegir from 40.0.13 to 41.1.6 (#232) (653c74b)
  • bump aegir from 41.3.5 to 42.2.3 (#262) (2bb9733)
  • bump aegir from 42.2.11 to 44.1.0 (#271) (d7f85cc)
  • bump it-drain from 1.0.5 to 2.0.0 (#147) (56663f8)
  • bump it-drain from 2.0.1 to 3.0.1 (#190) (306bdc4)
  • bump multiformats from 12.1.3 to 13.0.1 (#253) (aebd43a)
  • bump uint8arrays from 4.0.10 to 5.0.1 (#248) (290bb2a)
  • bump uint8arrays from 4.0.10 to 5.0.1 (#263) (b5eb311)
  • dev: bump @libp2p/components from 2.1.1 to 3.0.1 (#133) (6d75a57)
  • dev: bump @libp2p/interface-mocks from 10.0.3 to 11.0.0 (#199) (76f7b6f)
  • dev: bump @libp2p/interface-mocks from 4.0.3 to 6.0.0 (#130) (3807d1d)
  • dev: bump it-all from 1.0.6 to 2.0.0 (#148) (1caa500)
  • dev: bump protons from 6.1.3 to 7.0.2 (#179) (07d5872)
  • dev: bump sinon from 14.0.2 to 15.0.1 (#166) (1702efb)
  • dev: bump sinon from 15.2.0 to 17.0.1 (#231) (591b464)
  • dev: bump sinon from 17.0.2 to 18.0.0 (#267) (e9fb07a)
  • dev: bump sinon-ts from 0.0.2 to 1.0.0 (#144) (cfc8755)
  • dev: bump sinon-ts from 1.0.2 to 2.0.0 (#233) (de13473)
  • update @multiformats/multiaddr to 11.0.0 (#128) (885d901)
  • update all it-* deps to the latest versions (#193) (cb0aa85)
  • update it-stream-types to 2.x.x (#196) (a09f6d5)
  • update libp2p to v1 (#235) (6f2917b)
  • Update multiformats and related dependencies (#170) (06744a7)
  • update sibling dependencies (fdfca91)
  • update sibling dependencies (ba4dd19)
  • update sibling dependencies (db50405)
  • update sibling dependencies (e0ec5ec)
  • update sibling dependencies (775bd83)
  • update sibling dependencies (56711c4)
  • update sibling dependencies (c3ebd58)
  • update uint8arraylist and protons deps (#115) (34a8334)
  • update uint8arrays, protons and multiformats (#143) (661139c)