@libp2p/record 1.0.5 → 2.0.0
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 +28 -18
- package/dist/src/selectors.d.ts +1 -1
- package/dist/src/selectors.d.ts.map +1 -1
- package/dist/src/validators.d.ts +1 -1
- package/dist/src/validators.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/selectors.ts +1 -1
- package/src/validators.ts +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @libp2p/record <!-- omit in toc -->
|
|
2
2
|
|
|
3
|
-
[](https://coveralls.io/github/libp2p/js-libp2p-record?branch=master)
|
|
9
|
-
[](https://github.com/libp2p/js-libp2p-record/actions/workflows/js-test-and-release.yml)
|
|
10
|
-
[](https://david-dm.org/libp2p/js-libp2p-record) [](https://github.com/feross/standard)
|
|
11
|
-

|
|
12
|
-

|
|
3
|
+
[](http://libp2p.io/)
|
|
4
|
+
[](http://webchat.freenode.net/?channels=%23libp2p)
|
|
5
|
+
[](https://discuss.libp2p.io)
|
|
6
|
+
[](https://codecov.io/gh/libp2p/js-libp2p-record)
|
|
7
|
+
[](https://github.com/libp2p/js-libp2p-record/actions/workflows/js-test-and-release.yml)
|
|
13
8
|
|
|
14
|
-
>
|
|
9
|
+
> libp2p record implementation
|
|
10
|
+
|
|
11
|
+
## Table of contents <!-- omit in toc -->
|
|
12
|
+
|
|
13
|
+
- [Install](#install)
|
|
14
|
+
- [Description](#description)
|
|
15
|
+
- [Usage](#usage)
|
|
16
|
+
- [Contribute](#contribute)
|
|
17
|
+
- [License](#license)
|
|
18
|
+
- [Contribution](#contribution)
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```console
|
|
23
|
+
$ npm i @libp2p/record
|
|
24
|
+
```
|
|
15
25
|
|
|
16
26
|
## Description
|
|
17
27
|
|
|
@@ -19,22 +29,22 @@ Implementation of [go-libp2p-record](https://github.com/libp2p/go-libp2p-record)
|
|
|
19
29
|
|
|
20
30
|
## Usage
|
|
21
31
|
|
|
22
|
-
See https://libp2p.github.io/js-libp2p-record
|
|
32
|
+
See <https://libp2p.github.io/js-libp2p-record/>
|
|
23
33
|
|
|
24
34
|
## Contribute
|
|
25
35
|
|
|
26
36
|
The libp2p implementation in JavaScript is a work in progress. As such, there are a few things you can do right now to help out:
|
|
27
37
|
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
- Go through the modules and **check out existing issues**. This is especially useful for modules in active development. Some knowledge of IPFS/libp2p may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.
|
|
39
|
+
- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
|
|
30
40
|
|
|
31
41
|
## License
|
|
32
42
|
|
|
33
43
|
Licensed under either of
|
|
34
44
|
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
|
46
|
+
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
## Contribution
|
|
39
49
|
|
|
40
50
|
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.
|
package/dist/src/selectors.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/selectors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/selectors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEtD;;GAEG;AACH,wBAAgB,UAAU,CAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,UA6BrF;AAWD,eAAO,MAAM,SAAS,EAAE,SAEvB,CAAA"}
|
package/dist/src/validators.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/validators.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/validators.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAIvD;;;;GAIG;AACH,wBAAgB,YAAY,CAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,6BAmBzE;AAmCD,eAAO,MAAM,UAAU,EAAE,UAExB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/record",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "libp2p record implementation",
|
|
5
5
|
"author": "Friedel Ziegelmayer <dignifiedquire@gmail.com>",
|
|
6
6
|
"license": "Apache-2.0 OR MIT",
|
|
@@ -45,12 +45,15 @@
|
|
|
45
45
|
],
|
|
46
46
|
"exports": {
|
|
47
47
|
".": {
|
|
48
|
+
"types": "./src/index.d.ts",
|
|
48
49
|
"import": "./dist/src/index.js"
|
|
49
50
|
},
|
|
50
51
|
"./selectors": {
|
|
52
|
+
"types": "./dist/src/selectors.d.ts",
|
|
51
53
|
"import": "./dist/src/selectors.js"
|
|
52
54
|
},
|
|
53
55
|
"./validators": {
|
|
56
|
+
"types": "./dist/src/validators.d.ts",
|
|
54
57
|
"import": "./dist/src/validators.js"
|
|
55
58
|
}
|
|
56
59
|
},
|
|
@@ -159,7 +162,7 @@
|
|
|
159
162
|
"release": "aegir release"
|
|
160
163
|
},
|
|
161
164
|
"dependencies": {
|
|
162
|
-
"@libp2p/
|
|
165
|
+
"@libp2p/interface-dht": "^1.0.0",
|
|
163
166
|
"err-code": "^3.0.1",
|
|
164
167
|
"multiformats": "^9.4.5",
|
|
165
168
|
"protons-runtime": "^1.0.2",
|
package/src/selectors.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import errCode from 'err-code'
|
|
2
2
|
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
|
|
3
|
-
import type { Selectors } from '@libp2p/
|
|
3
|
+
import type { Selectors } from '@libp2p/interface-dht'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Select the best record out of the given records
|
package/src/validators.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import errCode from 'err-code'
|
|
2
2
|
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
|
|
3
3
|
import type { Libp2pRecord } from './index.js'
|
|
4
|
-
import type { Validators } from '@libp2p/
|
|
4
|
+
import type { Validators } from '@libp2p/interface-dht'
|
|
5
5
|
import { sha256 } from 'multiformats/hashes/sha2'
|
|
6
6
|
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
|
|
7
7
|
|