@arve.knudsen/libp2p-daemon-client

0.1.11 • Public • Published

libp2p-daemon client JavaScript implementation

Discourse posts

A Javascript client to interact with a standalone deployment of a libp2p host, running in its own OS process. Essentially, this client allows to communicate with other peers, interact with the DHT, participate in pubsub, etc. no matter the language they are implemented with.

Lead Maintainer

Vasco Santos

Table of Contents

Specs

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

Install

npm install libp2p-daemon-client

Usage

Run a daemon process

There are currently two implementations of the libp2p-daemon:

Interact with the daemon process using the client

const Client = require('libp2p-daemon-client')

const defaultSock = '/tmp/p2pd.sock'
const client = new Client(defaultSock)

// connect to a daemon
await client.attach()

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

// close the socket
await client.close()

API

Contribute

This module is actively under development. Please check out the issues and submit PRs!

License

MIT © Protocol Labs

Readme

Keywords

Package Sidebar

Install

npm i @arve.knudsen/libp2p-daemon-client

Weekly Downloads

0

Version

0.1.11

License

MIT

Unpacked Size

22 kB

Total Files

7

Last publish

Collaborators

  • arve.knudsen