@libp2p/daemon-client 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,4 @@
1
- libp2p-daemon client JavaScript implementation
2
- ======
1
+ # libp2p-daemon client JavaScript implementation <!-- omit in toc -->
3
2
 
4
3
  [![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai/)
5
4
  [![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
@@ -8,18 +7,16 @@ libp2p-daemon client JavaScript implementation
8
7
 
9
8
  > 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.
10
9
 
11
- ## Lead Maintainer
10
+ ## Table of Contents <!-- omit in toc -->
12
11
 
13
- [Vasco Santos](https://github.com/vasco-santos)
14
-
15
- ## Table of Contents
16
-
17
- * [Specs](#specs)
18
- * [Install](#install)
19
- * [Usage](#usage)
20
- * [API](#api)
21
- * [Contribute](#contribute)
22
- * [License](#license)
12
+ - [Specs](#specs)
13
+ - [Install](#install)
14
+ - [Usage](#usage)
15
+ - [Run a daemon process](#run-a-daemon-process)
16
+ - [Interact with the daemon process using the client](#interact-with-the-daemon-process-using-the-client)
17
+ - [API](#api)
18
+ - [Contribute](#contribute)
19
+ - [License](#license)
23
20
 
24
21
  ## Specs
25
22
 
@@ -27,7 +24,7 @@ The specs for the daemon are currently housed in the go implementation. You can
27
24
 
28
25
  ## Install
29
26
 
30
- `npm install libp2p-daemon-client`
27
+ `npm install @libp2p/daemon-client`
31
28
 
32
29
  ## Usage
33
30
 
@@ -41,10 +38,11 @@ There are currently two implementations of the `libp2p-daemon`:
41
38
  ### Interact with the daemon process using the client
42
39
 
43
40
  ```js
44
- const Client = require('libp2p-daemon-client')
41
+ import { createClient } from '@libp2p/daemon-client'
42
+ import { Multiaddr } from '@multiformats/multiaddr'
45
43
 
46
- const defaultSock = '/tmp/p2pd.sock'
47
- const client = new Client(defaultSock)
44
+ const serverAddr = new Multiaddr('/ip4/127.0.0.1/tcp/1234')
45
+ const client = createClient(serverAddr)
48
46
 
49
47
  // interact with the daemon
50
48
  let identify
@@ -81,4 +79,4 @@ This module is actively under development. Please check out the issues and submi
81
79
 
82
80
  ## License
83
81
 
84
- MIT © Protocol Labs
82
+ [Apache-2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT) © Protocol Labs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/daemon-client",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "libp2p-daemon client implementation",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p-daemon/tree/master/packages/libp2p-daemon-client#readme",