🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@libp2p/daemon-client

Package Overview
Dependencies
Maintainers
6
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/daemon-client

libp2p-daemon client implementation

3.0.6
Source
npm
Version published
Weekly downloads
278
-62.02%
Maintainers
6
Weekly downloads
 
Created
Source

@libp2p/daemon-client

libp2p.io Discuss codecov CI

libp2p-daemon client implementation

Table of contents

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

License

Licensed under either of

Contribute

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.

Keywords

libp2p

FAQs

Package last updated on 17 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts