@libp2p/peer-record 4.0.3 → 4.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 CHANGED
@@ -1,16 +1,16 @@
1
1
  # @libp2p/peer-record <!-- omit in toc -->
2
2
 
3
3
  [![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
4
- [![IRC](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
5
4
  [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
6
5
  [![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-peer-record.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-peer-record)
7
- [![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-interfaces/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/js-libp2p-peer-record/actions/workflows/js-test-and-release.yml)
6
+ [![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-peer-record/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-peer-record/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
8
7
 
9
8
  > Used to transfer signed peer data across the network
10
9
 
11
10
  ## Table of contents <!-- omit in toc -->
12
11
 
13
12
  - [Install](#install)
13
+ - [Browser `<script>` tag](#browser-script-tag)
14
14
  - [Description](#description)
15
15
  - [Envelope](#envelope)
16
16
  - [Usage](#usage)
@@ -22,9 +22,9 @@
22
22
  - [Subsystem receiving a record](#subsystem-receiving-a-record)
23
23
  - [Subsystem providing a record](#subsystem-providing-a-record)
24
24
  - [Future Work](#future-work)
25
- - [Example](#example)
25
+ - [API Docs](#api-docs)
26
26
  - [License](#license)
27
- - [Contribute](#contribute)
27
+ - [Contribution](#contribution)
28
28
 
29
29
  ## Install
30
30
 
@@ -32,6 +32,14 @@
32
32
  $ npm i @libp2p/peer-record
33
33
  ```
34
34
 
35
+ ### Browser `<script>` tag
36
+
37
+ Loading this module through a script tag will make it's exports available as `Libp2pPeerRecord` in the global namespace.
38
+
39
+ ```html
40
+ <script src="https://unpkg.com/@libp2p/peer-record/dist/index.min.js"></script>
41
+ ```
42
+
35
43
  ## Description
36
44
 
37
45
  Libp2p nodes need to store data in a public location (e.g. a DHT), or rely on potentially untrustworthy intermediaries to relay information over its lifetime. Accordingly, libp2p nodes need to be able to verify that the data came from a specific peer and that it hasn't been tampered with.
@@ -163,15 +171,9 @@ When a subsystem wants to provide a record, it will get it from the AddressBook,
163
171
  - With the modular dialer, users should easily be able to configure precedence. With dialer v1, anything we do to prioritise dials is gonna be spaghetti and adhoc. With the modular dialer, you’d be able to specify the order of dials when instantiating the pipeline.
164
172
  - Multiple parallel dials. We already have the issue where new addresses aren't added to existing dials.
165
173
 
166
- ## Example
174
+ ## API Docs
167
175
 
168
- ```JavaScript
169
- import { trackedMap } from '@libp2p/tracked-map'
170
-
171
- const map = trackedMap<string, string>({ metrics })
172
-
173
- map.set('key', 'value')
174
- ```
176
+ - <https://libp2p.github.io/js-libp2p-peer-record>
175
177
 
176
178
  ## License
177
179
 
@@ -180,6 +182,6 @@ Licensed under either of
180
182
  - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
181
183
  - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
182
184
 
183
- ## Contribute
185
+ ## Contribution
184
186
 
185
187
  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.