@libp2p/daemon-client 1.0.2 → 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.
- package/README.md +16 -18
- package/package.json +4 -4
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://protocol.ai/)
|
|
5
4
|
[](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
|
-
##
|
|
10
|
+
## Table of Contents <!-- omit in toc -->
|
|
12
11
|
|
|
13
|
-
[
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
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
|
-
|
|
41
|
+
import { createClient } from '@libp2p/daemon-client'
|
|
42
|
+
import { Multiaddr } from '@multiformats/multiaddr'
|
|
45
43
|
|
|
46
|
-
const
|
|
47
|
-
const client =
|
|
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.
|
|
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",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
},
|
|
131
131
|
"dependencies": {
|
|
132
132
|
"@libp2p/daemon-protocol": "^1.0.0",
|
|
133
|
-
"@libp2p/interfaces": "^
|
|
133
|
+
"@libp2p/interfaces": "^2.0.1",
|
|
134
134
|
"@libp2p/logger": "^1.1.4",
|
|
135
135
|
"@libp2p/peer-id": "^1.1.10",
|
|
136
136
|
"@libp2p/tcp": "^1.0.8",
|
|
@@ -141,12 +141,12 @@
|
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
143
|
"@libp2p/daemon-server": "^1.0.0",
|
|
144
|
-
"@libp2p/interface-compliance-tests": "^
|
|
144
|
+
"@libp2p/interface-compliance-tests": "^2.0.1",
|
|
145
145
|
"@libp2p/peer-id-factory": "^1.0.9",
|
|
146
146
|
"aegir": "^37.0.5",
|
|
147
147
|
"it-all": "^1.0.6",
|
|
148
148
|
"it-pipe": "^2.0.3",
|
|
149
|
-
"sinon": "^
|
|
149
|
+
"sinon": "^14.0.0",
|
|
150
150
|
"ts-sinon": "^2.0.2",
|
|
151
151
|
"uint8arrays": "^3.0.0"
|
|
152
152
|
}
|