@libp2p/peer-store 4.0.0 → 5.0.1

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-store <!-- 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-store.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-peer-store)
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-store/actions/workflows/js-test-and-release.yml)
6
+ [![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-peer-store/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-peer-store/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
8
7
 
9
8
  > Stores information about peers libp2p knows on 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
  - [Submitting records to the PeerStore](#submitting-records-to-the-peerstore)
16
16
  - [Identify](#identify)
@@ -31,8 +31,9 @@
31
31
  - [Events](#events)
32
32
  - [Data Persistence](#data-persistence)
33
33
  - [Future Considerations](#future-considerations)
34
+ - [API Docs](#api-docs)
34
35
  - [License](#license)
35
- - [Contribute](#contribute)
36
+ - [Contribution](#contribution)
36
37
 
37
38
  ## Install
38
39
 
@@ -40,6 +41,14 @@
40
41
  $ npm i @libp2p/peer-store
41
42
  ```
42
43
 
44
+ ### Browser `<script>` tag
45
+
46
+ Loading this module through a script tag will make it's exports available as `Libp2pPeerStore` in the global namespace.
47
+
48
+ ```html
49
+ <script src="https://unpkg.com/@libp2p/peer-store/dist/index.min.js"></script>
50
+ ```
51
+
43
52
  ## Description
44
53
 
45
54
  Libp2p's PeerStore is responsible for keeping an updated register with the relevant information of the known peers. It should be the single source of truth for all peer data, where a subsystem can learn about peers' data and where someone can listen for updates. The PeerStore comprises four main components: `addressBook`, `keyBook`, `protocolBook` and `metadataBook`.
@@ -190,6 +199,10 @@ Metadata is stored under the following key pattern:
190
199
  - When improving libp2p configuration for specific runtimes, we should take into account the PeerStore recommended datastore.
191
200
  - When improving libp2p configuration, we should think about a possible way of allowing the configuration of Bootstrap to be influenced by the persisted peers, as a way to decrease the load on Bootstrap nodes.
192
201
 
202
+ ## API Docs
203
+
204
+ - <https://libp2p.github.io/js-libp2p-peer-store>
205
+
193
206
  ## License
194
207
 
195
208
  Licensed under either of
@@ -197,7 +210,7 @@ Licensed under either of
197
210
  - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
198
211
  - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
199
212
 
200
- ## Contribute
213
+ ## Contribution
201
214
 
202
215
  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.
203
216