diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb64ac2671..e7423281bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -138,6 +138,10 @@ jobs: with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master + # https://github.com/actions/runner-images/issues/9733#issuecomment-2074590278 + - run: | + sudo rm /etc/apt/sources.list.d/microsoft-prod.list + sudo apt-get update - run: npx playwright install-deps - run: npm run --if-present test:webkit - uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0f878e0910..7f5d8f1940 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{"interop":"2.0.27","packages/connection-encrypter-plaintext":"1.0.20","packages/connection-encrypter-tls":"1.0.7","packages/crypto":"4.0.6","packages/interface":"1.2.0","packages/interface-compliance-tests":"5.4.1","packages/interface-internal":"1.1.0","packages/kad-dht":"12.0.13","packages/keychain":"4.0.12","packages/libp2p":"1.4.1","packages/logger":"4.0.10","packages/metrics-prometheus":"3.0.20","packages/multistream-select":"5.1.7","packages/peer-collections":"5.1.10","packages/peer-discovery-bootstrap":"10.0.20","packages/peer-discovery-mdns":"10.0.20","packages/peer-id":"4.0.10","packages/peer-id-factory":"4.0.10","packages/peer-record":"7.0.14","packages/peer-store":"10.0.15","packages/protocol-autonat":"1.0.17","packages/protocol-dcutr":"1.0.17","packages/protocol-echo":"1.0.3","packages/protocol-fetch":"1.0.14","packages/protocol-identify":"1.0.19","packages/protocol-perf":"3.0.20","packages/protocol-ping":"1.0.15","packages/pubsub":"9.0.15","packages/pubsub-floodsub":"9.0.16","packages/record":"4.0.0","packages/stream-multiplexer-mplex":"10.0.20","packages/transport-circuit-relay-v2":"1.0.20","packages/transport-tcp":"9.0.21","packages/transport-webrtc":"4.0.27","packages/transport-websockets":"8.0.20","packages/transport-webtransport":"4.0.26","packages/upnp-nat":"1.0.18","packages/utils":"5.3.1"} \ No newline at end of file +{"interop":"2.0.29","packages/connection-encrypter-plaintext":"1.0.21","packages/connection-encrypter-tls":"1.0.8","packages/crypto":"4.1.0","packages/interface":"1.3.0","packages/interface-compliance-tests":"5.4.2","packages/interface-internal":"1.1.1","packages/kad-dht":"12.0.14","packages/keychain":"4.0.13","packages/libp2p":"1.4.3","packages/logger":"4.0.11","packages/metrics-prometheus":"3.0.21","packages/multistream-select":"5.1.8","packages/peer-collections":"5.1.11","packages/peer-discovery-bootstrap":"10.0.21","packages/peer-discovery-mdns":"10.0.21","packages/peer-id":"4.1.0","packages/peer-id-factory":"4.1.0","packages/peer-record":"7.0.15","packages/peer-store":"10.0.16","packages/protocol-autonat":"1.0.18","packages/protocol-dcutr":"1.0.18","packages/protocol-echo":"1.0.4","packages/protocol-fetch":"1.0.15","packages/protocol-identify":"1.0.20","packages/protocol-perf":"3.0.21","packages/protocol-ping":"1.0.16","packages/pubsub":"9.0.16","packages/pubsub-floodsub":"9.0.17","packages/record":"4.0.1","packages/stream-multiplexer-mplex":"10.0.21","packages/transport-circuit-relay-v2":"1.0.21","packages/transport-tcp":"9.0.23","packages/transport-webrtc":"4.0.29","packages/transport-websockets":"8.0.21","packages/transport-webtransport":"4.0.28","packages/upnp-nat":"1.0.19","packages/utils":"5.3.2"} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0951365da9..d72a10c300 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,12 +1,12 @@ # Contributing guidelines -👋 Contributions are welcome! +👋 Contributions are welcome! 👉 Please see the [IPFS JavaScript Community contributing guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for how to collaborate and contribute to js-libp2p. -💪 The [core maintainers](./CODEOWNERS) hang out in #libp2p-implementers in ipfs.io Matrix, FIL Slack, and IPFS Discord. They perform weekly triage of issues and PRs per https://lu.ma/js-libp2p +💪 The [core maintainers](https://github.com/libp2p/js-libp2p/blob/main/CODEOWNERS) hang out in #libp2p-implementers in ipfs.io Matrix, FIL Slack, and IPFS Discord. They perform weekly triage of issues and PRs per https://lu.ma/js-libp2p -🤲 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 in [README.md](./README.md), without any additional terms or conditions. +🤲 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 in [README.md](https://github.com/libp2p/js-libp2p/blob/main/README.md), without any additional terms or conditions. 🔒 For security related issues please file a [private security vulnerability report](https://github.com/libp2p/js-libp2p/security/advisories/new). Please do not file a public issue on GitHub. diff --git a/README.md b/README.md index 4c0754f1ea..52d5718282 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,9 @@ The documentation in the main branch may contain changes from a pre-release. If you are looking for the documentation of the latest release, you can view the latest release on [**npm**](https://www.npmjs.com/package/libp2p), or select the tag in github that matches the version you are looking for. -**Want to get started?** Check our [GETTING\_STARTED.md](./doc/GETTING_STARTED.md) guide and [examples](https://github.com/libp2p/js-libp2p-examples). +**Want to get started?** Check our [GETTING\_STARTED.md](https://github.com/libp2p/js-libp2p/blob/main/doc/GETTING_STARTED.md) guide and [examples](https://github.com/libp2p/js-libp2p-examples). -**Want to update libp2p in your project?** Check our [migrations folder](./doc/migrations). +**Want to update libp2p in your project?** Check our [migrations folder](https://github.com/libp2p/js-libp2p/tree/main/doc/migrations). ## Table of contents @@ -102,15 +102,15 @@ npm install libp2p ### Configuration -For all the information on how you can configure libp2p see [CONFIGURATION.md](./doc/CONFIGURATION.md). +For all the information on how you can configure libp2p see [CONFIGURATION.md](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md). ### Limits -For help configuring your node to resist malicious network peers, see [LIMITS.md](./doc/LIMITS.md) +For help configuring your node to resist malicious network peers, see [LIMITS.md](https://github.com/libp2p/js-libp2p/blob/main/doc/LIMITS.md) ### Getting started -If you are starting your journey with `js-libp2p`, read the [GETTING\_STARTED.md](./doc/GETTING_STARTED.md) guide. +If you are starting your journey with `js-libp2p`, read the [GETTING\_STARTED.md](https://github.com/libp2p/js-libp2p/blob/main/doc/GETTING_STARTED.md) guide. ### Tutorials and Examples @@ -118,36 +118,36 @@ You can find multiple examples on the [examples repo](https://github.com/libp2p/ ## Structure -- [`/doc`](./doc) Docs for libp2p -- [`/interop`](./interop) Multidimension Interop Test -- [`/packages/crypto`](./packages/crypto) Crypto primitives for libp2p -- [`/packages/interface`](./packages/interface) The interface implemented by a libp2p node -- [`/packages/interface-compliance-tests`](./packages/interface-compliance-tests) Compliance tests for JS libp2p interfaces -- [`/packages/interface-internal`](./packages/interface-internal) Interfaces implemented by internal libp2p components -- [`/packages/kad-dht`](./packages/kad-dht) JavaScript implementation of the Kad-DHT for libp2p -- [`/packages/keychain`](./packages/keychain) Key management and cryptographically protected messages -- [`/packages/libp2p`](./packages/libp2p) JavaScript implementation of libp2p, a modular peer to peer network stack -- [`/packages/logger`](./packages/logger) A logging component for use in js-libp2p modules -- [`/packages/metrics-prometheus`](./packages/metrics-prometheus) Collect libp2p metrics for scraping by Prometheus or Graphana -- [`/packages/multistream-select`](./packages/multistream-select) JavaScript implementation of multistream-select -- [`/packages/peer-collections`](./packages/peer-collections) Stores values against a peer id -- [`/packages/peer-discovery-bootstrap`](./packages/peer-discovery-bootstrap) Peer discovery via a list of bootstrap peers -- [`/packages/peer-discovery-mdns`](./packages/peer-discovery-mdns) Node.js libp2p mDNS discovery implementation for peer discovery -- [`/packages/peer-id`](./packages/peer-id) Implementation of @libp2p/interface-peer-id -- [`/packages/peer-id-factory`](./packages/peer-id-factory) Create PeerId instances -- [`/packages/peer-record`](./packages/peer-record) Used to transfer signed peer data across the network -- [`/packages/peer-store`](./packages/peer-store) Stores information about peers libp2p knows on the network -- [`/packages/protocol-echo`](./packages/protocol-echo) Implementation of an Echo protocol -- [`/packages/protocol-perf`](./packages/protocol-perf) Implementation of the Perf protocol -- [`/packages/pubsub`](./packages/pubsub) libp2p pubsub base class -- [`/packages/pubsub-floodsub`](./packages/pubsub-floodsub) libp2p-floodsub, also known as pubsub-flood or just dumbsub, this implementation of pubsub focused on delivering an API for Publish/Subscribe, but with no CastTree Forming (it just floods the network). -- [`/packages/record`](./packages/record) libp2p record implementation -- [`/packages/stream-multiplexer-mplex`](./packages/stream-multiplexer-mplex) JavaScript implementation of -- [`/packages/transport-tcp`](./packages/transport-tcp) A TCP transport for libp2p -- [`/packages/transport-webrtc`](./packages/transport-webrtc) A libp2p transport using WebRTC connections -- [`/packages/transport-websockets`](./packages/transport-websockets) JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport spec -- [`/packages/transport-webtransport`](./packages/transport-webtransport) JavaScript implementation of the WebTransport module that libp2p uses and that implements the interface-transport spec -- [`/packages/utils`](./packages/utils) Package to aggregate shared logic and dependencies for the libp2p ecosystem +- [`/doc`](https://github.com/libp2p/js-libp2p/blob/main/doc) Docs for libp2p +- [`/interop`](https://github.com/libp2p/js-libp2p/tree/main/interop) Multidimension Interop Test +- [`/packages/crypto`](https://github.com/libp2p/js-libp2p/tree/main/packages/crypto) Crypto primitives for libp2p +- [`/packages/interface`](https://github.com/libp2p/js-libp2p/tree/main/packages/interface) The interface implemented by a libp2p node +- [`/packages/interface-compliance-tests`](https://github.com/libp2p/js-libp2p/tree/main/packages/interface-compliance-tests) Compliance tests for JS libp2p interfaces +- [`/packages/interface-internal`](https://github.com/libp2p/js-libp2p/tree/main/packages/interface-internal) Interfaces implemented by internal libp2p components +- [`/packages/kad-dht`](https://github.com/libp2p/js-libp2p/tree/main/packages/kad-dht) JavaScript implementation of the Kad-DHT for libp2p +- [`/packages/keychain`](https://github.com/libp2p/js-libp2p/tree/main/packages/keychain) Key management and cryptographically protected messages +- [`/packages/libp2p`](https://github.com/libp2p/js-libp2p/tree/main/packages/libp2p) JavaScript implementation of libp2p, a modular peer to peer network stack +- [`/packages/logger`](https://github.com/libp2p/js-libp2p/tree/main/packages/logger) A logging component for use in js-libp2p modules +- [`/packages/metrics-prometheus`](https://github.com/libp2p/js-libp2p/tree/main/packages/metrics-prometheus) Collect libp2p metrics for scraping by Prometheus or Graphana +- [`/packages/multistream-select`](https://github.com/libp2p/js-libp2p/tree/main/packages/multistream-select) JavaScript implementation of multistream-select +- [`/packages/peer-collections`](https://github.com/libp2p/js-libp2p/tree/main/packages/peer-collections) Stores values against a peer id +- [`/packages/peer-discovery-bootstrap`](https://github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap) Peer discovery via a list of bootstrap peers +- [`/packages/peer-discovery-mdns`](https://github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-mdns) Node.js libp2p mDNS discovery implementation for peer discovery +- [`/packages/peer-id`](https://github.com/libp2p/js-libp2p/tree/main/packages/peer-id) Implementation of @libp2p/interface-peer-id +- [`/packages/peer-id-factory`](https://github.com/libp2p/js-libp2p/tree/main/packages/peer-id-factory) Create PeerId instances +- [`/packages/peer-record`](https://github.com/libp2p/js-libp2p/tree/main/packages/peer-record) Used to transfer signed peer data across the network +- [`/packages/peer-store`](https://github.com/libp2p/js-libp2p/tree/main/packages/peer-store) Stores information about peers libp2p knows on the network +- [`/packages/protocol-echo`](https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-echo) Implementation of an Echo protocol +- [`/packages/protocol-perf`](https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-perf) Implementation of the Perf protocol +- [`/packages/pubsub`](https://github.com/libp2p/js-libp2p/tree/main/packages/pubsub) libp2p pubsub base class +- [`/packages/pubsub-floodsub`](https://github.com/libp2p/js-libp2p/tree/main/packages/pubsub-floodsub) libp2p-floodsub, also known as pubsub-flood or just dumbsub, this implementation of pubsub focused on delivering an API for Publish/Subscribe, but with no CastTree Forming (it just floods the network). +- [`/packages/record`](https://github.com/libp2p/js-libp2p/tree/main/packages/record) libp2p record implementation +- [`/packages/stream-multiplexer-mplex`](https://github.com/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex) JavaScript implementation of +- [`/packages/transport-tcp`](https://github.com/libp2p/js-libp2p/tree/main/packages/transport-tcp) A TCP transport for libp2p +- [`/packages/transport-webrtc`](https://github.com/libp2p/js-libp2p/tree/main/packages/transport-webrtc) A libp2p transport using WebRTC connections +- [`/packages/transport-websockets`](https://github.com/libp2p/js-libp2p/tree/main/packages/transport-websockets) JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport spec +- [`/packages/transport-webtransport`](https://github.com/libp2p/js-libp2p/tree/main/packages/transport-webtransport) JavaScript implementation of the WebTransport module that libp2p uses and that implements the interface-transport spec +- [`/packages/utils`](https://github.com/libp2p/js-libp2p/tree/main/packages/utils) Package to aggregate shared logic and dependencies for the libp2p ecosystem ## Development @@ -233,7 +233,7 @@ And [many others...](https://github.com/libp2p/js-libp2p/network/dependents) ## Contribute -See [CONTRIBUTING.md](./CONTRIBUTING.md). +See [CONTRIBUTING.md](https://github.com/libp2p/js-libp2p/tree/main/CONTRIBUTING.md). ## API Docs @@ -243,5 +243,5 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md). Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/LICENSE-MIT) / ) diff --git a/doc/CONFIGURATION.md b/doc/CONFIGURATION.md index b6959668ea..2d923fe2e2 100644 --- a/doc/CONFIGURATION.md +++ b/doc/CONFIGURATION.md @@ -42,9 +42,9 @@ libp2p is a modular networking stack. It's designed to be able to suit a variety of project needs. The configuration of libp2p is a key part of its structure. It enables you to bring exactly what you need, and only what you need. This document is a guide on how to configure libp2p for your particular project. Check out the [Configuration examples](#configuration-examples) section if you're just looking to leverage an existing configuration. -Regardless of how you configure libp2p, the top level [API](./API.md) will always remain the same. **Note**: if some modules are not configured, like Content Routing, using those methods will throw errors. +Regardless of how you configure libp2p, the top level [API](https://github.com/libp2p/js-libp2p/blob/main/doc/API.md) will always remain the same. **Note**: if some modules are not configured, like Content Routing, using those methods will throw errors. -To get a high-level overview of the js-libp2p architecture, please read the [Architecture](./ARCHITECTURE.md) document. +To get a high-level overview of the js-libp2p architecture, please read the [Architecture](https://github.com/libp2p/js-libp2p/blob/main/doc/ARCHITECTURE.md) document. ## Modules @@ -201,7 +201,7 @@ If you want to know more about libp2p pubsub, you should read the following cont ## Customizing libp2p -When [creating a libp2p node](./API.md#create), there are a number of services which are optional but will probably be needed for your use case such as the [kademlia](#dht), [peer discovery](#peer-discovery) and [pubsub](#pubsub) services for example. These are passed into the `services` object upon creating a node. You can also pass in custom services that will be used to create the node. This is done by providing your custom implementation to the `services` object, which should have the following structure: +When [creating a libp2p node](https://github.com/libp2p/js-libp2p/blob/main/doc/API.md#create), there are a number of services which are optional but will probably be needed for your use case such as the [kademlia](#dht), [peer discovery](#peer-discovery) and [pubsub](#pubsub) services for example. These are passed into the `services` object upon creating a node. You can also pass in custom services that will be used to create the node. This is done by providing your custom implementation to the `services` object, which should have the following structure: ```js const modules = { @@ -1021,4 +1021,4 @@ The [examples repo](https://github.com/libp2p/js-libp2p-examples) is also a good ## Limits -Configuring the various limits of your node is important to protect it when it is part of hostile of adversarial networks. See [LIMITS.md](./LIMITS.md) for a full breakdown of the various built in protections and safeguards. +Configuring the various limits of your node is important to protect it when it is part of hostile of adversarial networks. See [LIMITS.md](https://github.com/libp2p/js-libp2p/tree/main/doc/LIMITS.md) for a full breakdown of the various built in protections and safeguards. diff --git a/doc/GETTING_STARTED.md b/doc/GETTING_STARTED.md index 52403ac79e..fa6d15ecf5 100644 --- a/doc/GETTING_STARTED.md +++ b/doc/GETTING_STARTED.md @@ -28,7 +28,7 @@ npm install libp2p ## Configuring libp2p -If you're new to libp2p, we recommend configuring your node in stages, as this can make troubleshooting configuration issues much easier. In this guide, we'll do just that. If you're more experienced with libp2p, you may wish to jump to the [Configuration readme](./CONFIGURATION.md). +If you're new to libp2p, we recommend configuring your node in stages, as this can make troubleshooting configuration issues much easier. In this guide, we'll do just that. If you're more experienced with libp2p, you may wish to jump to the [Configuration readme](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md). ### ESM @@ -59,7 +59,7 @@ Now that we have libp2p installed, let's configure the minimum needed to get you Libp2p uses Transports to establish connections between peers over the network. Transports are the components responsible for performing the actual exchange of data between libp2p nodes. You can configure any number of Transports, but you only need 1 to start with. Supporting more Transports will improve the ability of your node to speak to a larger number of nodes on the network, as matching Transports are required for two nodes to communicate with one another. -You should select Transports according to the runtime of your application; Node.js or the browser. You can see a list of some of the available Transports in the [configuration readme](./CONFIGURATION.md#transport). For this guide let's install `@libp2p/websockets`, as it can be used in both Node.js and the browser. +You should select Transports according to the runtime of your application; Node.js or the browser. You can see a list of some of the available Transports in the [configuration readme](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md#transport). For this guide let's install `@libp2p/websockets`, as it can be used in both Node.js and the browser. Start by installing `@libp2p/websockets`: @@ -67,7 +67,7 @@ Start by installing `@libp2p/websockets`: npm install @libp2p/websockets ``` -Now that we have the module installed, let's configure libp2p to use the Transport. We'll use the [`Libp2p.create`](./API.md#create) method, which takes a single configuration object as its only parameter. We can add the Transport by passing it into the `modules.transport` array: +Now that we have the module installed, let's configure libp2p to use the Transport. We'll use the [`Libp2p.create`](https://github.com/libp2p/js-libp2p/blob/main/doc/API.md#create) method, which takes a single configuration object as its only parameter. We can add the Transport by passing it into the `modules.transport` array: ```js import { createLibp2p } from 'libp2p' @@ -91,7 +91,7 @@ If you want to know more about libp2p transports, you should read the following Encryption is an important part of communicating on the libp2p network. Every connection must be encrypted to help ensure security for everyone. As such, Connection Encryption (Crypto) is a required component of libp2p. -There are a growing number of Crypto modules being developed for libp2p. As those are released they will be tracked in the [Connection Encryption section of the configuration readme](./CONFIGURATION.md#connection-encryption). For now, we are going to configure our node to use the `@chainsafe/libp2p-noise` module. +There are a growing number of Crypto modules being developed for libp2p. As those are released they will be tracked in the [Connection Encryption section of the configuration readme](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md#connection-encryption). For now, we are going to configure our node to use the `@chainsafe/libp2p-noise` module. ```sh npm install @chainsafe/libp2p-noise @@ -121,7 +121,7 @@ If you want to know more about libp2p connection encryption, you should read the While multiplexers are not strictly required, they are highly recommended as they improve the effectiveness and efficiency of connections for the various protocols libp2p runs. Adding a multiplexer to your configuration will allow libp2p to run several of its internal protocols, like Identify, as well as allow your application to easily run any number of protocols over a single connection. -Looking at the [available stream multiplexing](./CONFIGURATION.md#stream-multiplexing) modules. Bear in mind that future libp2p Transports might have `multiplexing` capabilities already built-in (such as `QUIC`). +Looking at the [available stream multiplexing](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md#stream-multiplexing) modules. Bear in mind that future libp2p Transports might have `multiplexing` capabilities already built-in (such as `QUIC`). You can install `@chainsafe/libp2p-yamux` and add it to your libp2p node as follows in the next example. @@ -152,7 +152,7 @@ If you want to know more about libp2p stream multiplexing, you should read the f #### Running Libp2p -Now that you have configured a [**Transport**][transport], [**Crypto**][crypto] and [**Stream Multiplexer**](streamMuxer) module, you can start your libp2p node. We can start and stop libp2p using the [`libp2p.start()`](./API.md#start) and [`libp2p.stop()`](./API.md#stop) methods. +Now that you have configured a [**Transport**][transport], [**Crypto**][crypto] and [**Stream Multiplexer**](streamMuxer) module, you can start your libp2p node. We can start and stop libp2p using the [`libp2p.start()`](https://github.com/libp2p/js-libp2p/blob/main/doc/API.md#start) and [`libp2p.stop()`](https://github.com/libp2p/js-libp2p/blob/main/doc/API.md#stop) methods. ```ts import { createLibp2p } from 'libp2p' @@ -191,9 +191,9 @@ Once your libp2p node is running, it is time to get it connected to the public n Peer discovery is an important part of creating a well connected libp2p node. A static list of peers will often be used to join the network, but it's useful to couple other discovery mechanisms to ensure you're able to discover other peers that are important to your application. -For each discovered peer libp2p will emit a `peer:discovery` event which includes metadata about that peer. You can read the [Events](./API.md#events) in the API doc to learn more. +For each discovered peer libp2p will emit a `peer:discovery` event which includes metadata about that peer. You can read the [Events](https://github.com/libp2p/js-libp2p/tree/main/doc/API.md#events) in the API doc to learn more. -Looking at the [available peer discovery](./CONFIGURATION.md#peer-discovery) protocols, there are several options to be considered: +Looking at the [available peer discovery](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md#peer-discovery) protocols, there are several options to be considered: - If you already know the addresses of some other network peers, you should consider using `@libp2p/bootstrap` as this is the easiest way of getting your peer into the network. - If it is likely that you will have other peers on your local network, `@libp2p/mdns` is a must if you're node is not running in the browser. It allows peers to discover each other when on the same local network. - A random walk approach can be used via `@libp2p/kad-dht`, to crawl the network and find new peers along the way. @@ -273,7 +273,7 @@ localStorage.setItem('debug', 'libp2p:websockets,libp2p:webtransport,libp2p:kad- ## What is next -There are a lot of other concepts within `libp2p`, that are not covered in this guide. For additional configuration options we recommend checking out the [Configuration Readme](./CONFIGURATION.md) and the [examples repo](https://github.com/libp2p/js-libp2p-examples). If you have any problems getting started, or if anything isn't clear, please let us know by submitting an issue! +There are a lot of other concepts within `libp2p`, that are not covered in this guide. For additional configuration options we recommend checking out the [Configuration Readme](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md) and the [examples repo](https://github.com/libp2p/js-libp2p-examples). If you have any problems getting started, or if anything isn't clear, please let us know by submitting an issue! [transport]: https://github.com/libp2p/js-libp2p/tree/main/packages/interface/src/transport diff --git a/doc/METRICS.md b/doc/METRICS.md index d8fde01c5b..4b9f1293b4 100644 --- a/doc/METRICS.md +++ b/doc/METRICS.md @@ -13,7 +13,7 @@ Metrics allow you to gather run time statistics on your libp2p node. ## Overview - Metrics gathering is optional, as there is a performance hit to using it -- See the [API](./API.md) for Metrics usage. Metrics in libp2p do not emit events, as such applications wishing to read Metrics will need to do so actively. This ensures that the system is not unnecessarily firing update notifications. +- See the [API](https://github.com/libp2p/js-libp2p/blob/main/doc/API.md) for Metrics usage. Metrics in libp2p do not emit events, as such applications wishing to read Metrics will need to do so actively. This ensures that the system is not unnecessarily firing update notifications. - For large installations you may wish to combine the statistics with a visualizer such as [Graphana](https://grafana.com/) Although designed to primarily integrate with tools such as [Prometheus](https://prometheus.io/) it does not introduce any dependencies that require you to use any particular tool to store or graph metrics. diff --git a/doc/PEER_DISCOVERY.md b/doc/PEER_DISCOVERY.md index 2f03a3fdb1..ee0ddbb716 100644 --- a/doc/PEER_DISCOVERY.md +++ b/doc/PEER_DISCOVERY.md @@ -21,7 +21,7 @@ * All peers discovered are emitted via the `peer:discovery` event so applications can take any desired action * To ensure reasonable resource usage, discovered peers are not connected to automatically * Applications should lisen for the `peer:connect` event if they wish to take a specific action when new connections are established -* Libp2p functions best with a good number of network connections to a diverse set of peers. When the number of connected peers a node has falls under the [ConnectionManager](./CONFIGURATION.md#configuring-connection-manager) `minConnections` setting, randomly selected peers from the peer store will be dialed until the node's number of connections rises above this number. +* Libp2p functions best with a good number of network connections to a diverse set of peers. When the number of connected peers a node has falls under the [ConnectionManager](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md#configuring-connection-manager) `minConnections` setting, randomly selected peers from the peer store will be dialed until the node's number of connections rises above this number. * Applications can disable this behaviour by setting the `connectionManager.minConnections` config property to `0`, but they will have to manage increasing the current number of connections themselves. ## Scenarios @@ -44,7 +44,7 @@ Connect to more peers. ### 2. Connected to some -The node is connected to other nodes. The current number of connections is fewer than the desired amount, expressed as the [ConnectionManager](./CONFIGURATION.md#configuring-connection-manager) `minConnections` setting, also referred to as the low watermark. +The node is connected to other nodes. The current number of connections is fewer than the desired amount, expressed as the [ConnectionManager](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md#configuring-connection-manager) `minConnections` setting, also referred to as the low watermark. #### Action to take @@ -68,7 +68,7 @@ Avoiding dials above the `minConnections` also allows for a pool of connections ### 4. Connected to too many -The node has more connections than it wants. The current number of connections is greater than the desired amount, expressed as the [ConnectionManager](./CONFIGURATION.md#configuring-connection-manager) `maxOutgoingConnections` setting, also referred to as the high watermark. +The node has more connections than it wants. The current number of connections is greater than the desired amount, expressed as the [ConnectionManager](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md#configuring-connection-manager) `maxOutgoingConnections` setting, also referred to as the high watermark. #### Action to take diff --git a/doc/production/README.md b/doc/production/README.md index a8fa3d786e..ea706c7eaf 100644 --- a/doc/production/README.md +++ b/doc/production/README.md @@ -46,7 +46,7 @@ Aiming to support these type of nodes to find other peers and content in the net Currently, delegate nodes must be IPFS nodes as the IPFS HTTP API is leveraged by them to make routing queries. -You can read on how to setup your own set of delegated nodes in [DELEGATE_NODES.md](./DELEGATE_NODES.md). +You can read on how to setup your own set of delegated nodes in [DELEGATE_NODES.md](https://github.com/libp2p/js-libp2p/tree/main/doc/DELEGATE_NODES.md). ## Others diff --git a/interop/CHANGELOG.md b/interop/CHANGELOG.md index 6e69a01ba1..1a4adf3e14 100644 --- a/interop/CHANGELOG.md +++ b/interop/CHANGELOG.md @@ -168,6 +168,40 @@ * @libp2p/webtransport bumped from ^4.0.18 to ^4.0.19 * libp2p bumped from ^1.2.2 to ^1.2.3 +## [2.0.29](https://github.com/libp2p/js-libp2p/compare/multidim-interop-v2.0.28...multidim-interop-v2.0.29) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/circuit-relay-v2 bumped from ^1.0.20 to ^1.0.21 + * @libp2p/identify bumped from ^1.0.19 to ^1.0.20 + * @libp2p/mplex bumped from ^10.0.20 to ^10.0.21 + * @libp2p/ping bumped from ^1.0.15 to ^1.0.16 + * @libp2p/tcp bumped from ^9.0.22 to ^9.0.23 + * @libp2p/webrtc bumped from ^4.0.28 to ^4.0.29 + * @libp2p/websockets bumped from ^8.0.20 to ^8.0.21 + * @libp2p/webtransport bumped from ^4.0.27 to ^4.0.28 + * libp2p bumped from ^1.4.2 to ^1.4.3 + +## [2.0.28](https://github.com/libp2p/js-libp2p/compare/multidim-interop-v2.0.27...multidim-interop-v2.0.28) (2024-04-16) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/tcp bumped from ^9.0.21 to ^9.0.22 + * @libp2p/webrtc bumped from ^4.0.27 to ^4.0.28 + * @libp2p/webtransport bumped from ^4.0.26 to ^4.0.27 + * libp2p bumped from ^1.4.1 to ^1.4.2 + ## [2.0.27](https://github.com/libp2p/js-libp2p/compare/multidim-interop-v2.0.26...multidim-interop-v2.0.27) (2024-04-15) diff --git a/interop/README.md b/interop/README.md index 54c683b889..f10057aa9e 100644 --- a/interop/README.md +++ b/interop/README.md @@ -116,8 +116,8 @@ $ docker run -e transport=tcp -e muxer=yamux -e security=noise -e is_dialer=fals Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/interop/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/interop/LICENSE-MIT) / ) # Contribution diff --git a/interop/package.json b/interop/package.json index e4eaa8ea32..d86a8a8fa9 100644 --- a/interop/package.json +++ b/interop/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/multidim-interop", - "version": "2.0.27", + "version": "2.0.29", "description": "Multidimensional interop tests", "author": "Glen De Cauwsemaecker / @marcopolo", "license": "Apache-2.0 OR MIT", @@ -57,18 +57,18 @@ "dependencies": { "@chainsafe/libp2p-noise": "^15.0.0", "@chainsafe/libp2p-yamux": "^6.0.2", - "@libp2p/circuit-relay-v2": "^1.0.20", - "@libp2p/identify": "^1.0.19", - "@libp2p/mplex": "^10.0.20", - "@libp2p/ping": "^1.0.15", - "@libp2p/tcp": "^9.0.21", - "@libp2p/webrtc": "^4.0.27", - "@libp2p/websockets": "^8.0.20", - "@libp2p/webtransport": "^4.0.26", + "@libp2p/circuit-relay-v2": "^1.0.21", + "@libp2p/identify": "^1.0.20", + "@libp2p/mplex": "^10.0.21", + "@libp2p/ping": "^1.0.16", + "@libp2p/tcp": "^9.0.23", + "@libp2p/webrtc": "^4.0.29", + "@libp2p/websockets": "^8.0.21", + "@libp2p/webtransport": "^4.0.28", "@multiformats/mafmt": "^12.1.6", "@multiformats/multiaddr": "^12.2.1", "aegir": "^42.2.5", - "libp2p": "^1.4.1", + "libp2p": "^1.4.3", "redis": "^4.6.13" }, "browser": { diff --git a/packages/connection-encrypter-plaintext/CHANGELOG.md b/packages/connection-encrypter-plaintext/CHANGELOG.md index b630e9ceff..5ca0c14b2a 100644 --- a/packages/connection-encrypter-plaintext/CHANGELOG.md +++ b/packages/connection-encrypter-plaintext/CHANGELOG.md @@ -72,6 +72,25 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [1.0.21](https://github.com/libp2p/js-libp2p/compare/plaintext-v1.0.20...plaintext-v1.0.21) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [1.0.20](https://github.com/libp2p/js-libp2p/compare/plaintext-v1.0.19...plaintext-v1.0.20) (2024-04-15) diff --git a/packages/connection-encrypter-plaintext/README.md b/packages/connection-encrypter-plaintext/README.md index 77fcd9ba52..ac9bf7191a 100644 --- a/packages/connection-encrypter-plaintext/README.md +++ b/packages/connection-encrypter-plaintext/README.md @@ -64,8 +64,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/connection-encrypter-plaintext/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/connection-encrypter-plaintext/LICENSE-MIT) / ) # Contribution diff --git a/packages/connection-encrypter-plaintext/package.json b/packages/connection-encrypter-plaintext/package.json index 3d6947d8ac..4541de3117 100644 --- a/packages/connection-encrypter-plaintext/package.json +++ b/packages/connection-encrypter-plaintext/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/plaintext", - "version": "1.0.20", + "version": "1.0.21", "description": "An insecure connection encrypter", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext#readme", @@ -52,17 +52,17 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-id": "^4.0.10", + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-id": "^4.1.0", "it-protobuf-stream": "^1.1.2", "it-stream-types": "^2.0.1", "protons-runtime": "^5.4.0", "uint8arraylist": "^2.4.8" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "@multiformats/multiaddr": "^12.2.1", "aegir": "^42.2.5", "protons": "^7.5.0", diff --git a/packages/connection-encrypter-tls/CHANGELOG.md b/packages/connection-encrypter-tls/CHANGELOG.md index 08a8207425..b3a4014178 100644 --- a/packages/connection-encrypter-tls/CHANGELOG.md +++ b/packages/connection-encrypter-tls/CHANGELOG.md @@ -6,6 +6,26 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [1.0.8](https://github.com/libp2p/js-libp2p/compare/tls-v1.0.7...tls-v1.0.8) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/crypto bumped from ^4.0.6 to ^4.1.0 + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [1.0.7](https://github.com/libp2p/js-libp2p/compare/tls-v1.0.6...tls-v1.0.7) (2024-04-15) diff --git a/packages/connection-encrypter-tls/README.md b/packages/connection-encrypter-tls/README.md index 70a1b1a95c..0ffa4c7db2 100644 --- a/packages/connection-encrypter-tls/README.md +++ b/packages/connection-encrypter-tls/README.md @@ -54,8 +54,8 @@ $ npm i @libp2p/tls Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/connection-encrypter-tls/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/connection-encrypter-tls/LICENSE-MIT) / ) # Contribution diff --git a/packages/connection-encrypter-tls/package.json b/packages/connection-encrypter-tls/package.json index dce51a3f86..58bfec9eee 100644 --- a/packages/connection-encrypter-tls/package.json +++ b/packages/connection-encrypter-tls/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/tls", - "version": "1.0.7", + "version": "1.0.8", "description": "A connection encrypter that uses TLS 1.3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/connection-encrypter-tls#readme", @@ -48,9 +48,9 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/crypto": "^4.0.6", - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-id": "^4.0.10", + "@libp2p/crypto": "^4.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-id": "^4.1.0", "@peculiar/asn1-schema": "^2.3.8", "@peculiar/asn1-x509": "^2.3.8", "@peculiar/webcrypto": "^1.4.6", @@ -63,9 +63,9 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "@multiformats/multiaddr": "^12.2.1", "aegir": "^42.2.5", "protons": "^7.5.0", diff --git a/packages/crypto/CHANGELOG.md b/packages/crypto/CHANGELOG.md index a363971c59..e123df5120 100644 --- a/packages/crypto/CHANGELOG.md +++ b/packages/crypto/CHANGELOG.md @@ -17,6 +17,25 @@ * dependencies * @libp2p/interface bumped from ^1.0.2 to ^1.1.0 +## [4.1.0](https://github.com/libp2p/js-libp2p/compare/crypto-v4.0.6...crypto-v4.1.0) (2024-04-24) + + +### Features + +* extensible peer ids ([#2496](https://github.com/libp2p/js-libp2p/issues/2496)) ([0d5d966](https://github.com/libp2p/js-libp2p/commit/0d5d966d134fab726c95fbe8fb8e21719d930ef2)) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + ## [4.0.6](https://github.com/libp2p/js-libp2p/compare/crypto-v4.0.5...crypto-v4.0.6) (2024-04-12) diff --git a/packages/crypto/README.md b/packages/crypto/README.md index 1ec49ec943..06adbe6f16 100644 --- a/packages/crypto/README.md +++ b/packages/crypto/README.md @@ -52,8 +52,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/crypto/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/crypto/LICENSE-MIT) / ) # Contribution diff --git a/packages/crypto/package.json b/packages/crypto/package.json index ddde050b22..5eaa533165 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/crypto", - "version": "4.0.6", + "version": "4.1.0", "description": "Crypto primitives for libp2p", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/crypto#readme", @@ -84,7 +84,7 @@ "generate": "protons ./src/keys/keys.proto" }, "dependencies": { - "@libp2p/interface": "^1.2.0", + "@libp2p/interface": "^1.3.0", "@noble/curves": "^1.4.0", "@noble/hashes": "^1.4.0", "asn1js": "^3.0.5", diff --git a/packages/crypto/src/keys/ed25519-class.ts b/packages/crypto/src/keys/ed25519-class.ts index 3591f0d11d..c4449b7af2 100644 --- a/packages/crypto/src/keys/ed25519-class.ts +++ b/packages/crypto/src/keys/ed25519-class.ts @@ -7,10 +7,11 @@ import { isPromise } from '../util.js' import * as crypto from './ed25519.js' import { exporter } from './exporter.js' import * as pbm from './keys.js' +import type { PublicKey, PrivateKey } from '@libp2p/interface' import type { Multibase } from 'multiformats' import type { Uint8ArrayList } from 'uint8arraylist' -export class Ed25519PublicKey { +export class Ed25519PublicKey implements PublicKey<'Ed25519'> { private readonly _key: Uint8Array constructor (key: Uint8Array) { @@ -47,7 +48,7 @@ export class Ed25519PublicKey { } } -export class Ed25519PrivateKey { +export class Ed25519PrivateKey implements PrivateKey<'Ed25519'> { private readonly _key: Uint8Array private readonly _publicKey: Uint8Array diff --git a/packages/crypto/src/keys/index.ts b/packages/crypto/src/keys/index.ts index b49956ca67..aaa5122a96 100644 --- a/packages/crypto/src/keys/index.ts +++ b/packages/crypto/src/keys/index.ts @@ -19,13 +19,13 @@ import * as keysPBM from './keys.js' import * as RSA from './rsa-class.js' import { importFromPem } from './rsa-utils.js' import * as Secp256k1 from './secp256k1-class.js' -import type { PrivateKey, PublicKey } from '@libp2p/interface' +import type { PrivateKey, PublicKey, KeyType as KeyTypes } from '@libp2p/interface' export { keyStretcher } export { generateEphemeralKeyPair } export { keysPBM } -export type KeyTypes = 'RSA' | 'Ed25519' | 'secp256k1' +export type { KeyTypes } export { RsaPrivateKey, RsaPublicKey, MAX_RSA_KEY_SIZE } from './rsa-class.js' export { Ed25519PrivateKey, Ed25519PublicKey } from './ed25519-class.js' @@ -55,11 +55,8 @@ function typeToKey (type: string): typeof RSA | typeof Ed25519 | typeof Secp256k /** * Generates a keypair of the given type and bitsize - * - * @param type - * @param bits - Minimum of 1024 */ -export async function generateKeyPair (type: KeyTypes, bits?: number): Promise { +export async function generateKeyPair (type: T, bits?: number): Promise> { return typeToKey(type).generateKeyPair(bits ?? 2048) } @@ -68,7 +65,7 @@ export async function generateKeyPair (type: KeyTypes, bits?: number): Promise

{ +export async function generateKeyPairFromSeed (type: T, seed: Uint8Array, bits?: number): Promise> { if (type.toLowerCase() !== 'ed25519') { throw new CodeError('Seed key derivation is unimplemented for RSA or secp256k1', 'ERR_UNSUPPORTED_KEY_DERIVATION_TYPE') } @@ -79,7 +76,7 @@ export async function generateKeyPairFromSeed (type: KeyTypes, seed: Uint8Array, /** * Converts a protobuf serialized public key into its representative object */ -export function unmarshalPublicKey (buf: Uint8Array): PublicKey { +export function unmarshalPublicKey (buf: Uint8Array): PublicKey { const decoded = keysPBM.PublicKey.decode(buf) const data = decoded.Data ?? new Uint8Array() @@ -107,7 +104,7 @@ export function marshalPublicKey (key: { bytes: Uint8Array }, type?: string): Ui /** * Converts a protobuf serialized private key into its representative object */ -export async function unmarshalPrivateKey (buf: Uint8Array): Promise { +export async function unmarshalPrivateKey (buf: Uint8Array): Promise> { const decoded = keysPBM.PrivateKey.decode(buf) const data = decoded.Data ?? new Uint8Array() @@ -137,7 +134,7 @@ export function marshalPrivateKey (key: { bytes: Uint8Array }, type?: string): U * * Supported formats are 'pem' (RSA only) and 'libp2p-key'. */ -export async function importKey (encryptedKey: string, password: string): Promise { +export async function importKey (encryptedKey: string, password: string): Promise> { try { const key = await importer(encryptedKey, password) return await unmarshalPrivateKey(key) diff --git a/packages/crypto/src/keys/rsa-class.ts b/packages/crypto/src/keys/rsa-class.ts index ec3c77fe59..eae38a95b4 100644 --- a/packages/crypto/src/keys/rsa-class.ts +++ b/packages/crypto/src/keys/rsa-class.ts @@ -6,12 +6,13 @@ import { isPromise } from '../util.js' import { exporter } from './exporter.js' import * as pbm from './keys.js' import * as crypto from './rsa.js' +import type { PublicKey, PrivateKey } from '@libp2p/interface' import type { Multibase } from 'multiformats' import type { Uint8ArrayList } from 'uint8arraylist' export const MAX_RSA_KEY_SIZE = 8192 -export class RsaPublicKey { +export class RsaPublicKey implements PublicKey<'RSA'> { private readonly _key: JsonWebKey constructor (key: JsonWebKey) { @@ -48,7 +49,7 @@ export class RsaPublicKey { } } -export class RsaPrivateKey { +export class RsaPrivateKey implements PrivateKey<'RSA'> { private readonly _key: JsonWebKey private readonly _publicKey: JsonWebKey diff --git a/packages/crypto/src/keys/secp256k1-class.ts b/packages/crypto/src/keys/secp256k1-class.ts index 2b05ee1cbf..98dcd0b935 100644 --- a/packages/crypto/src/keys/secp256k1-class.ts +++ b/packages/crypto/src/keys/secp256k1-class.ts @@ -6,10 +6,11 @@ import { isPromise } from '../util.js' import { exporter } from './exporter.js' import * as keysProtobuf from './keys.js' import * as crypto from './secp256k1.js' +import type { PublicKey, PrivateKey } from '@libp2p/interface' import type { Multibase } from 'multiformats' import type { Uint8ArrayList } from 'uint8arraylist' -export class Secp256k1PublicKey { +export class Secp256k1PublicKey implements PublicKey<'secp256k1'> { private readonly _key: Uint8Array constructor (key: Uint8Array) { @@ -50,7 +51,7 @@ export class Secp256k1PublicKey { } } -export class Secp256k1PrivateKey { +export class Secp256k1PrivateKey implements PrivateKey<'secp256k1'> { private readonly _key: Uint8Array private readonly _publicKey: Uint8Array diff --git a/packages/interface-compliance-tests/CHANGELOG.md b/packages/interface-compliance-tests/CHANGELOG.md index c2b3e99944..8f4746f5a9 100644 --- a/packages/interface-compliance-tests/CHANGELOG.md +++ b/packages/interface-compliance-tests/CHANGELOG.md @@ -75,6 +75,27 @@ * dependencies * @libp2p/utils bumped from ^5.2.4 to ^5.2.5 +## [5.4.2](https://github.com/libp2p/js-libp2p/compare/interface-compliance-tests-v5.4.1...interface-compliance-tests-v5.4.2) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/multistream-select bumped from ^5.1.7 to ^5.1.8 + * @libp2p/peer-collections bumped from ^5.1.10 to ^5.1.11 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + ## [5.4.1](https://github.com/libp2p/js-libp2p/compare/interface-compliance-tests-v5.4.0...interface-compliance-tests-v5.4.1) (2024-04-15) diff --git a/packages/interface-compliance-tests/README.md b/packages/interface-compliance-tests/README.md index 9967afe3eb..3b1fdfa076 100644 --- a/packages/interface-compliance-tests/README.md +++ b/packages/interface-compliance-tests/README.md @@ -33,8 +33,8 @@ Each [interface](https://npmjs.org/packages/@libp2p/interfaces) has its document Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/interface-compliance-tests/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/interface-compliance-tests/LICENSE-MIT) / ) # Contribution diff --git a/packages/interface-compliance-tests/package.json b/packages/interface-compliance-tests/package.json index b9500e08eb..b6cd619d24 100644 --- a/packages/interface-compliance-tests/package.json +++ b/packages/interface-compliance-tests/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/interface-compliance-tests", - "version": "5.4.1", + "version": "5.4.2", "description": "Compliance tests for JS libp2p interfaces", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/interface-compliance-tests#readme", @@ -112,14 +112,14 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/logger": "^4.0.10", - "@libp2p/multistream-select": "^5.1.7", - "@libp2p/peer-collections": "^5.1.10", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/logger": "^4.0.11", + "@libp2p/multistream-select": "^5.1.8", + "@libp2p/peer-collections": "^5.1.11", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/peer-id-factory": "^4.1.0", + "@libp2p/utils": "^5.3.2", "@multiformats/multiaddr": "^12.2.1", "abortable-iterator": "^5.0.1", "aegir": "^42.2.5", diff --git a/packages/interface-internal/CHANGELOG.md b/packages/interface-internal/CHANGELOG.md index c56642e676..cd3734558b 100644 --- a/packages/interface-internal/CHANGELOG.md +++ b/packages/interface-internal/CHANGELOG.md @@ -32,6 +32,21 @@ * dependencies * @libp2p/peer-collections bumped from ^5.1.3 to ^5.1.4 +## [1.1.1](https://github.com/libp2p/js-libp2p/compare/interface-internal-v1.1.0...interface-internal-v1.1.1) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-collections bumped from ^5.1.10 to ^5.1.11 + ## [1.1.0](https://github.com/libp2p/js-libp2p/compare/interface-internal-v1.0.11...interface-internal-v1.1.0) (2024-04-12) diff --git a/packages/interface-internal/README.md b/packages/interface-internal/README.md index b3d0933474..0f48ed3d52 100644 --- a/packages/interface-internal/README.md +++ b/packages/interface-internal/README.md @@ -21,8 +21,8 @@ $ npm i @libp2p/interface-internal Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/interface-internal/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/interface-internal/LICENSE-MIT) / ) # Contribution diff --git a/packages/interface-internal/package.json b/packages/interface-internal/package.json index 456c0713cc..7f2b450a0d 100644 --- a/packages/interface-internal/package.json +++ b/packages/interface-internal/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/interface-internal", - "version": "1.1.0", + "version": "1.1.1", "description": "Interfaces implemented by internal libp2p components", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/interface-internal#readme", @@ -48,8 +48,8 @@ "build": "aegir build" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-collections": "^5.1.10", + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-collections": "^5.1.11", "@multiformats/multiaddr": "^12.2.1", "uint8arraylist": "^2.4.8" }, diff --git a/packages/interface/CHANGELOG.md b/packages/interface/CHANGELOG.md index 35c1c6b1d5..897049187d 100644 --- a/packages/interface/CHANGELOG.md +++ b/packages/interface/CHANGELOG.md @@ -5,6 +5,18 @@ * add start/stop events to libp2p interface ([#407](https://github.com/libp2p/js-libp2p-interfaces/issues/407)) ([016c1e8](https://github.com/libp2p/js-libp2p-interfaces/commit/016c1e82b060c93c80546cd8c493ec6e6c97cbec)) +## [1.3.0](https://github.com/libp2p/js-libp2p/compare/interface-v1.2.0...interface-v1.3.0) (2024-04-24) + + +### Features + +* extensible peer ids ([#2496](https://github.com/libp2p/js-libp2p/issues/2496)) ([0d5d966](https://github.com/libp2p/js-libp2p/commit/0d5d966d134fab726c95fbe8fb8e21719d930ef2)) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + ## [1.2.0](https://github.com/libp2p/js-libp2p/compare/interface-v1.1.6...interface-v1.2.0) (2024-04-12) diff --git a/packages/interface/README.md b/packages/interface/README.md index 2b99c5c558..4a940d394f 100644 --- a/packages/interface/README.md +++ b/packages/interface/README.md @@ -50,8 +50,8 @@ $ npm i @libp2p/interface Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/LICENSE-MIT) / ) # Contribution diff --git a/packages/interface/package.json b/packages/interface/package.json index b4cc432687..203d295411 100644 --- a/packages/interface/package.json +++ b/packages/interface/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/interface", - "version": "1.2.0", + "version": "1.3.0", "description": "The interface implemented by a libp2p node", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/interface#readme", diff --git a/packages/interface/src/keys/index.ts b/packages/interface/src/keys/index.ts index b7ade54f57..648a1211b1 100644 --- a/packages/interface/src/keys/index.ts +++ b/packages/interface/src/keys/index.ts @@ -1,22 +1,22 @@ import type { Uint8ArrayList } from 'uint8arraylist' -export interface PublicKey { +export interface PublicKey { readonly bytes: Uint8Array verify(data: Uint8Array | Uint8ArrayList, sig: Uint8Array): boolean | Promise marshal(): Uint8Array - equals(key: PublicKey): boolean + equals(key: PublicKey): boolean hash(): Uint8Array | Promise } /** * Generic private key interface */ -export interface PrivateKey { - readonly public: PublicKey +export interface PrivateKey { + readonly public: PublicKey readonly bytes: Uint8Array sign(data: Uint8Array | Uint8ArrayList): Uint8Array | Promise marshal(): Uint8Array - equals(key: PrivateKey): boolean + equals(key: PrivateKey): boolean hash(): Uint8Array | Promise /** * Gets the ID of the key. diff --git a/packages/interface/src/peer-id/index.ts b/packages/interface/src/peer-id/index.ts index 13d0b77c82..7841f199bb 100644 --- a/packages/interface/src/peer-id/index.ts +++ b/packages/interface/src/peer-id/index.ts @@ -1,36 +1,35 @@ +import type { KeyType } from '../keys/index.js' import type { CID } from 'multiformats/cid' import type { MultihashDigest } from 'multiformats/hashes/interface' -export type PeerIdType = 'RSA' | 'Ed25519' | 'secp256k1' +export type PeerIdType = KeyType | string -interface BasePeerId { - readonly type: PeerIdType - readonly multihash: MultihashDigest - readonly privateKey?: Uint8Array - readonly publicKey?: Uint8Array - - toString(): string - toCID(): CID - toBytes(): Uint8Array - equals(other?: PeerId | Uint8Array | string): boolean -} - -export interface RSAPeerId extends BasePeerId { +export interface RSAPeerId extends PeerId { readonly type: 'RSA' readonly publicKey?: Uint8Array } -export interface Ed25519PeerId extends BasePeerId { +export interface Ed25519PeerId extends PeerId { readonly type: 'Ed25519' readonly publicKey: Uint8Array } -export interface Secp256k1PeerId extends BasePeerId { +export interface Secp256k1PeerId extends PeerId { readonly type: 'secp256k1' readonly publicKey: Uint8Array } -export type PeerId = RSAPeerId | Ed25519PeerId | Secp256k1PeerId +export interface PeerId { + type: PeerIdType + multihash: MultihashDigest + privateKey?: Uint8Array + publicKey?: Uint8Array + + toString(): string + toCID(): CID + toBytes(): Uint8Array + equals(other?: PeerId | Uint8Array | string): boolean +} export const peerIdSymbol = Symbol.for('@libp2p/peer-id') diff --git a/packages/kad-dht/CHANGELOG.md b/packages/kad-dht/CHANGELOG.md index 8d4723adf1..dbc1dbc72d 100644 --- a/packages/kad-dht/CHANGELOG.md +++ b/packages/kad-dht/CHANGELOG.md @@ -106,6 +106,36 @@ * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 * @libp2p/peer-store bumped from ^10.0.9 to ^10.0.10 +## [12.0.14](https://github.com/libp2p/js-libp2p/compare/kad-dht-v12.0.13...kad-dht-v12.0.14) (2024-04-24) + + +### Bug Fixes + +* return closest peers from FIND_NODE ([#2499](https://github.com/libp2p/js-libp2p/issues/2499)) ([0d55966](https://github.com/libp2p/js-libp2p/commit/0d55966f1aa57ec9491d7e17ce3af58e6dd3ae1a)) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/crypto bumped from ^4.0.6 to ^4.1.0 + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/peer-collections bumped from ^5.1.10 to ^5.1.11 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/record bumped from ^4.0.0 to ^4.0.1 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + * @libp2p/peer-store bumped from ^10.0.15 to ^10.0.16 + ## [12.0.13](https://github.com/libp2p/js-libp2p/compare/kad-dht-v12.0.12...kad-dht-v12.0.13) (2024-04-15) diff --git a/packages/kad-dht/README.md b/packages/kad-dht/README.md index cb540d7d7c..7d5c50f9c8 100644 --- a/packages/kad-dht/README.md +++ b/packages/kad-dht/README.md @@ -124,8 +124,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/kad-dht/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/kad-dht/LICENSE-MIT) / ) # Contribution diff --git a/packages/kad-dht/package.json b/packages/kad-dht/package.json index 1f9ae94914..37e8d42a40 100644 --- a/packages/kad-dht/package.json +++ b/packages/kad-dht/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/kad-dht", - "version": "12.0.13", + "version": "12.0.14", "description": "JavaScript implementation of the Kad-DHT for libp2p", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/kad-dht#readme", @@ -57,13 +57,13 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/crypto": "^4.0.6", - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/peer-collections": "^5.1.10", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/record": "^4.0.0", - "@libp2p/utils": "^5.3.1", + "@libp2p/crypto": "^4.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/peer-collections": "^5.1.11", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/record": "^4.0.1", + "@libp2p/utils": "^5.3.2", "@multiformats/multiaddr": "^12.2.1", "any-signal": "^4.1.1", "hashlru": "^2.3.0", @@ -90,10 +90,10 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", - "@libp2p/peer-store": "^10.0.15", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", + "@libp2p/peer-store": "^10.0.16", "@types/lodash.random": "^3.2.9", "@types/lodash.range": "^3.2.9", "@types/sinon": "^17.0.3", diff --git a/packages/kad-dht/src/rpc/handlers/find-node.ts b/packages/kad-dht/src/rpc/handlers/find-node.ts index 162a8ce775..8ad6bf8c08 100644 --- a/packages/kad-dht/src/rpc/handlers/find-node.ts +++ b/packages/kad-dht/src/rpc/handlers/find-node.ts @@ -1,13 +1,10 @@ import { CodeError } from '@libp2p/interface' -import { protocols } from '@multiformats/multiaddr' -import { equals as uint8ArrayEquals } from 'uint8arrays' import { MessageType } from '../../message/dht.js' import type { PeerInfoMapper } from '../../index.js' import type { Message } from '../../message/dht.js' import type { PeerRouting } from '../../peer-routing/index.js' import type { DHTMessageHandler } from '../index.js' import type { ComponentLogger, Logger, PeerId, PeerInfo } from '@libp2p/interface' -import type { AddressManager } from '@libp2p/interface-internal' export interface FindNodeHandlerInit { peerRouting: PeerRouting @@ -17,7 +14,6 @@ export interface FindNodeHandlerInit { export interface FindNodeHandlerComponents { peerId: PeerId - addressManager: AddressManager logger: ComponentLogger } @@ -25,7 +21,6 @@ export class FindNodeHandler implements DHTMessageHandler { private readonly peerRouting: PeerRouting private readonly peerInfoMapper: PeerInfoMapper private readonly peerId: PeerId - private readonly addressManager: AddressManager private readonly log: Logger constructor (components: FindNodeHandlerComponents, init: FindNodeHandlerInit) { @@ -33,7 +28,6 @@ export class FindNodeHandler implements DHTMessageHandler { this.log = components.logger.forComponent(`${logPrefix}:rpc:handlers:find-node`) this.peerId = components.peerId - this.addressManager = components.addressManager this.peerRouting = peerRouting this.peerInfoMapper = init.peerInfoMapper } @@ -44,20 +38,11 @@ export class FindNodeHandler implements DHTMessageHandler { async handle (peerId: PeerId, msg: Message): Promise { this.log('incoming request from %p for peers closer to %b', peerId, msg.key) - let closer: PeerInfo[] = [] - if (msg.key == null) { throw new CodeError('Invalid FIND_NODE message received - key was missing', 'ERR_INVALID_MESSAGE') } - if (uint8ArrayEquals(this.peerId.toBytes(), msg.key)) { - closer = [{ - id: this.peerId, - multiaddrs: this.addressManager.getAddresses().map(ma => ma.decapsulateCode(protocols('p2p').code)) - }] - } else { - closer = await this.peerRouting.getCloserPeersOffline(msg.key, peerId) - } + const closer: PeerInfo[] = await this.peerRouting.getCloserPeersOffline(msg.key, peerId) const response: Message = { type: MessageType.FIND_NODE, @@ -65,6 +50,7 @@ export class FindNodeHandler implements DHTMessageHandler { closer: closer .map(this.peerInfoMapper) .filter(({ multiaddrs }) => multiaddrs.length) + .filter(({ id }) => !id.equals(this.peerId)) .map(peerInfo => ({ id: peerInfo.id.toBytes(), multiaddrs: peerInfo.multiaddrs.map(ma => ma.bytes) diff --git a/packages/kad-dht/src/rpc/handlers/get-providers.ts b/packages/kad-dht/src/rpc/handlers/get-providers.ts index ef13fa5353..f8bb968626 100644 --- a/packages/kad-dht/src/rpc/handlers/get-providers.ts +++ b/packages/kad-dht/src/rpc/handlers/get-providers.ts @@ -40,7 +40,7 @@ export class GetProvidersHandler implements DHTMessageHandler { async handle (peerId: PeerId, msg: Message): Promise { if (msg.key == null) { - throw new CodeError('Invalid FIND_NODE message received - key was missing', 'ERR_INVALID_MESSAGE') + throw new CodeError('Invalid GET_PROVIDERS message received - key was missing', 'ERR_INVALID_MESSAGE') } let cid diff --git a/packages/kad-dht/test/kad-dht.spec.ts b/packages/kad-dht/test/kad-dht.spec.ts index 70d331212c..73df181518 100644 --- a/packages/kad-dht/test/kad-dht.spec.ts +++ b/packages/kad-dht/test/kad-dht.spec.ts @@ -799,6 +799,37 @@ describe('KadDHT', () => { expect(res).to.not.be.empty() }) + + it('should not include itself in getClosestPeers PEER_RESPONSE', async function () { + this.timeout(240 * 1000) + + const nDHTs = 30 + const dhts = await Promise.all( + new Array(nDHTs).fill(0).map(async () => tdht.spawn()) + ) + + const connected: Array> = [] + + for (let i = 0; i < dhts.length - 1; i++) { + connected.push(tdht.connect(dhts[i], dhts[(i + 1) % dhts.length])) + } + + await Promise.all(connected) + + const res = await all(dhts[1].getClosestPeers(dhts[2].components.peerId.toBytes())) + expect(res).to.not.be.empty() + + // no peer should include itself in the response, only other peers that it + // knows who are closer + for (const event of res) { + if (event.name !== 'PEER_RESPONSE') { + continue + } + + expect(event.closer.map(peer => peer.id.toString())) + .to.not.include(event.from.toString()) + } + }) }) describe('errors', () => { diff --git a/packages/kad-dht/test/rpc/handlers/find-node.spec.ts b/packages/kad-dht/test/rpc/handlers/find-node.spec.ts index 8ca6535470..e4ed94d6be 100644 --- a/packages/kad-dht/test/rpc/handlers/find-node.spec.ts +++ b/packages/kad-dht/test/rpc/handlers/find-node.spec.ts @@ -5,7 +5,6 @@ import { peerIdFromBytes } from '@libp2p/peer-id' import { multiaddr } from '@multiformats/multiaddr' import { expect } from 'aegir/chai' import Sinon, { type SinonStubbedInstance } from 'sinon' -import { stubInterface } from 'sinon-ts' import { type Message, MessageType } from '../../../src/message/dht.js' import { PeerRouting } from '../../../src/peer-routing/index.js' import { FindNodeHandler } from '../../../src/rpc/handlers/find-node.js' @@ -13,8 +12,6 @@ import { passthroughMapper, removePrivateAddressesMapper, removePublicAddressesM import { createPeerId } from '../../utils/create-peer-id.js' import type { DHTMessageHandler } from '../../../src/rpc/index.js' import type { PeerId } from '@libp2p/interface' -import type { AddressManager } from '@libp2p/interface-internal' -import type { StubbedInstance } from 'sinon-ts' const T = MessageType.FIND_NODE @@ -24,18 +21,15 @@ describe('rpc - handlers - FindNode', () => { let targetPeer: PeerId let handler: DHTMessageHandler let peerRouting: SinonStubbedInstance - let addressManager: StubbedInstance beforeEach(async () => { peerId = await createPeerId() sourcePeer = await createPeerId() targetPeer = await createPeerId() peerRouting = Sinon.createStubInstance(PeerRouting) - addressManager = stubInterface() handler = new FindNodeHandler({ peerId, - addressManager, logger: defaultLogger() }, { peerRouting, @@ -44,7 +38,7 @@ describe('rpc - handlers - FindNode', () => { }) }) - it('returns self, if asked for self', async () => { + it('returns nodes close to self but excludes self, if asked for self', async () => { const msg: Message = { type: T, key: peerId.multihash.bytes, @@ -52,13 +46,25 @@ describe('rpc - handlers - FindNode', () => { providers: [] } - addressManager.getAddresses.returns([ - multiaddr(`/ip4/127.0.0.1/tcp/4002/p2p/${peerId.toString()}`), - multiaddr(`/ip4/192.168.1.5/tcp/4002/p2p/${peerId.toString()}`), - multiaddr(`/ip4/221.4.67.0/tcp/4002/p2p/${peerId.toString()}`) - ]) + peerRouting.getCloserPeersOffline + .withArgs(peerId.multihash.bytes, peerId) + .resolves([{ + id: targetPeer, // closer peer + multiaddrs: [ + multiaddr('/ip4/127.0.0.1/tcp/4002'), + multiaddr('/ip4/192.168.1.5/tcp/4002'), + multiaddr('/ip4/221.4.67.0/tcp/4002') + ] + }, { + id: peerId, // self peer + multiaddrs: [ + multiaddr('/ip4/127.0.0.1/tcp/4002'), + multiaddr('/ip4/192.168.1.5/tcp/4002'), + multiaddr('/ip4/221.4.67.0/tcp/4002') + ] + }]) - const response = await handler.handle(sourcePeer, msg) + const response = await handler.handle(peerId, msg) if (response == null) { throw new Error('No response received from handler') @@ -67,7 +73,8 @@ describe('rpc - handlers - FindNode', () => { expect(response.closer).to.have.length(1) const peer = response.closer[0] - expect(peerIdFromBytes(peer.id).toString()).to.equal(peerId.toString()) + expect(peerIdFromBytes(peer.id).toString()).to.equal(targetPeer.toString()) + expect(peer.multiaddrs).to.not.be.empty() }) it('returns closer peers', async () => { @@ -138,7 +145,6 @@ describe('rpc - handlers - FindNode', () => { handler = new FindNodeHandler({ peerId, - addressManager, logger: defaultLogger() }, { peerRouting, @@ -181,7 +187,6 @@ describe('rpc - handlers - FindNode', () => { handler = new FindNodeHandler({ peerId, - addressManager, logger: defaultLogger() }, { peerRouting, diff --git a/packages/kad-dht/test/rpc/index.node.ts b/packages/kad-dht/test/rpc/index.node.ts index c4886d22dc..8233b04f22 100644 --- a/packages/kad-dht/test/rpc/index.node.ts +++ b/packages/kad-dht/test/rpc/index.node.ts @@ -24,7 +24,6 @@ import { passthroughMapper } from '../../src/utils.js' import { createPeerId } from '../utils/create-peer-id.js' import type { Validators } from '../../src/index.js' import type { Libp2pEvents, Connection, PeerId, PeerStore } from '@libp2p/interface' -import type { AddressManager } from '@libp2p/interface-internal' import type { Datastore } from 'interface-datastore' import type { Duplex, Source } from 'it-stream-types' @@ -45,7 +44,6 @@ describe('rpc', () => { peerId, datastore, peerStore: stubInterface(), - addressManager: stubInterface(), logger: defaultLogger() } components.peerStore = new PersistentPeerStore({ diff --git a/packages/keychain/CHANGELOG.md b/packages/keychain/CHANGELOG.md index c149882580..cd3048cc4c 100644 --- a/packages/keychain/CHANGELOG.md +++ b/packages/keychain/CHANGELOG.md @@ -47,6 +47,25 @@ * devDependencies * @libp2p/peer-id-factory bumped from ^4.0.3 to ^4.0.4 +## [4.0.13](https://github.com/libp2p/js-libp2p/compare/keychain-v4.0.12...keychain-v4.0.13) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/crypto bumped from ^4.0.6 to ^4.1.0 + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [4.0.12](https://github.com/libp2p/js-libp2p/compare/keychain-v4.0.11...keychain-v4.0.12) (2024-04-12) diff --git a/packages/keychain/README.md b/packages/keychain/README.md index e611fb6522..108521bcf8 100644 --- a/packages/keychain/README.md +++ b/packages/keychain/README.md @@ -65,7 +65,7 @@ const defaultOptions = { } ``` -![key storage](./doc/private-key.png?raw=true) +![key storage](https://github.com/libp2p/js-libp2p/blob/main/doc/private-key.png?raw=true) ## Physical storage @@ -95,8 +95,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/keychain/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/keychain/LICENSE-MIT) / ) # Contribution diff --git a/packages/keychain/package.json b/packages/keychain/package.json index ab358d89f7..abb61d0bc7 100644 --- a/packages/keychain/package.json +++ b/packages/keychain/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/keychain", - "version": "4.0.12", + "version": "4.0.13", "description": "Key management and cryptographically protected messages", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/keychain#readme", @@ -59,9 +59,9 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/crypto": "^4.0.6", - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-id": "^4.0.10", + "@libp2p/crypto": "^4.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-id": "^4.1.0", "interface-datastore": "^8.2.11", "merge-options": "^3.0.4", "multiformats": "^13.1.0", @@ -69,8 +69,8 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "aegir": "^42.2.5", "datastore-core": "^9.2.9" }, diff --git a/packages/keychain/src/index.ts b/packages/keychain/src/index.ts index fa606d46d3..03fdfd8702 100644 --- a/packages/keychain/src/index.ts +++ b/packages/keychain/src/index.ts @@ -42,7 +42,7 @@ * } * ``` * - * ![key storage](./doc/private-key.png?raw=true) + * ![key storage](https://github.com/libp2p/js-libp2p/blob/main/doc/private-key.png?raw=true) * * ## Physical storage * diff --git a/packages/libp2p/CHANGELOG.md b/packages/libp2p/CHANGELOG.md index 9c06afdcf5..b92e9849f8 100644 --- a/packages/libp2p/CHANGELOG.md +++ b/packages/libp2p/CHANGELOG.md @@ -110,6 +110,51 @@ * @libp2p/tcp bumped from ^9.0.14 to ^9.0.15 * @libp2p/websockets bumped from ^8.0.14 to ^8.0.15 +## [1.4.3](https://github.com/libp2p/js-libp2p/compare/libp2p-v1.4.2...libp2p-v1.4.3) (2024-04-24) + + +### Bug Fixes + +* upgrader error msg to show current/max ([#2491](https://github.com/libp2p/js-libp2p/issues/2491)) ([eaf8ac7](https://github.com/libp2p/js-libp2p/commit/eaf8ac7cfb8a8ee00283de304dc4ec5280a41f1b)) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/crypto bumped from ^4.0.6 to ^4.1.0 + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/multistream-select bumped from ^5.1.7 to ^5.1.8 + * @libp2p/peer-collections bumped from ^5.1.10 to ^5.1.11 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + * @libp2p/peer-store bumped from ^10.0.15 to ^10.0.16 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/circuit-relay-v2 bumped from ^1.0.20 to ^1.0.21 + * @libp2p/identify bumped from ^1.0.19 to ^1.0.20 + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/mplex bumped from ^10.0.20 to ^10.0.21 + * @libp2p/plaintext bumped from ^1.0.20 to ^1.0.21 + * @libp2p/tcp bumped from ^9.0.22 to ^9.0.23 + * @libp2p/websockets bumped from ^8.0.20 to ^8.0.21 + +## [1.4.2](https://github.com/libp2p/js-libp2p/compare/libp2p-v1.4.1...libp2p-v1.4.2) (2024-04-16) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @libp2p/tcp bumped from ^9.0.21 to ^9.0.22 + ## [1.4.1](https://github.com/libp2p/js-libp2p/compare/libp2p-v1.4.0...libp2p-v1.4.1) (2024-04-15) diff --git a/packages/libp2p/README.md b/packages/libp2p/README.md index c7c6977bee..e4f41b4779 100644 --- a/packages/libp2p/README.md +++ b/packages/libp2p/README.md @@ -86,15 +86,15 @@ It is complementary to the overarching libp2p project roadmap: ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/libp2p/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/libp2p/LICENSE-MIT) / ) # Contribution diff --git a/packages/libp2p/package.json b/packages/libp2p/package.json index b1a1f814db..f6615b4b49 100644 --- a/packages/libp2p/package.json +++ b/packages/libp2p/package.json @@ -1,6 +1,6 @@ { "name": "libp2p", - "version": "1.4.1", + "version": "1.4.3", "description": "JavaScript implementation of libp2p, a modular peer to peer network stack", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/libp2p#readme", @@ -85,16 +85,16 @@ "test:webkit": "aegir test -t browser -f \"./dist/test/**/*.spec.js\" -- --browser webkit" }, "dependencies": { - "@libp2p/crypto": "^4.0.6", - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/logger": "^4.0.10", - "@libp2p/multistream-select": "^5.1.7", - "@libp2p/peer-collections": "^5.1.10", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", - "@libp2p/peer-store": "^10.0.15", - "@libp2p/utils": "^5.3.1", + "@libp2p/crypto": "^4.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/logger": "^4.0.11", + "@libp2p/multistream-select": "^5.1.8", + "@libp2p/peer-collections": "^5.1.11", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/peer-id-factory": "^4.1.0", + "@libp2p/peer-store": "^10.0.16", + "@libp2p/utils": "^5.3.2", "@multiformats/dns": "^1.0.5", "@multiformats/multiaddr": "^12.2.1", "@multiformats/multiaddr-matcher": "^1.2.0", @@ -109,13 +109,13 @@ }, "devDependencies": { "@chainsafe/libp2p-yamux": "^6.0.2", - "@libp2p/circuit-relay-v2": "^1.0.20", - "@libp2p/identify": "^1.0.19", - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/mplex": "^10.0.20", - "@libp2p/plaintext": "^1.0.20", - "@libp2p/tcp": "^9.0.21", - "@libp2p/websockets": "^8.0.20", + "@libp2p/circuit-relay-v2": "^1.0.21", + "@libp2p/identify": "^1.0.20", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/mplex": "^10.0.21", + "@libp2p/plaintext": "^1.0.21", + "@libp2p/tcp": "^9.0.23", + "@libp2p/websockets": "^8.0.21", "@multiformats/mafmt": "^12.1.6", "aegir": "^42.2.5", "delay": "^6.0.0", diff --git a/packages/libp2p/src/index.ts b/packages/libp2p/src/index.ts index aeb24cd382..82542aa6f7 100644 --- a/packages/libp2p/src/index.ts +++ b/packages/libp2p/src/index.ts @@ -29,7 +29,7 @@ export type ServiceFactoryMap = Record }> { /** diff --git a/packages/libp2p/src/upgrader.ts b/packages/libp2p/src/upgrader.ts index 96aa8ea138..8ae4b566e6 100644 --- a/packages/libp2p/src/upgrader.ts +++ b/packages/libp2p/src/upgrader.ts @@ -471,7 +471,7 @@ export class DefaultUpgrader implements Upgrader { const streamCount = countStreams(protocol, 'outbound', connection) if (streamCount >= outgoingLimit) { - const err = new CodeError(`Too many outbound protocol streams for protocol "${protocol}" - limit ${outgoingLimit}`, codes.ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS) + const err = new CodeError(`Too many outbound protocol streams for protocol "${protocol}" - ${streamCount}/${outgoingLimit}`, codes.ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS) muxedStream.abort(err) throw err diff --git a/packages/logger/CHANGELOG.md b/packages/logger/CHANGELOG.md index 5acdda3c35..4a8b2f5eb3 100644 --- a/packages/logger/CHANGELOG.md +++ b/packages/logger/CHANGELOG.md @@ -21,6 +21,22 @@ * devDependencies * @libp2p/peer-id bumped from ^4.0.2 to ^4.0.3 +## [4.0.11](https://github.com/libp2p/js-libp2p/compare/logger-v4.0.10...logger-v4.0.11) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * devDependencies + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + ## [4.0.10](https://github.com/libp2p/js-libp2p/compare/logger-v4.0.9...logger-v4.0.10) (2024-04-12) diff --git a/packages/logger/README.md b/packages/logger/README.md index 16ed4e4c99..a0dd0cfc89 100644 --- a/packages/logger/README.md +++ b/packages/logger/README.md @@ -76,8 +76,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/logger/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/logger/LICENSE-MIT) / ) # Contribution diff --git a/packages/logger/package.json b/packages/logger/package.json index ab829cafd9..a271021021 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/logger", - "version": "4.0.10", + "version": "4.0.11", "description": "A logging component for use in js-libp2p modules", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/logger#readme", @@ -54,14 +54,14 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", + "@libp2p/interface": "^1.3.0", "@multiformats/multiaddr": "^12.2.1", "debug": "^4.3.4", "interface-datastore": "^8.2.11", "multiformats": "^13.1.0" }, "devDependencies": { - "@libp2p/peer-id": "^4.0.10", + "@libp2p/peer-id": "^4.1.0", "@types/debug": "^4.1.12", "aegir": "^42.2.5", "sinon": "^17.0.1", diff --git a/packages/metrics-prometheus/CHANGELOG.md b/packages/metrics-prometheus/CHANGELOG.md index e5fde5a041..8950c6ce06 100644 --- a/packages/metrics-prometheus/CHANGELOG.md +++ b/packages/metrics-prometheus/CHANGELOG.md @@ -81,6 +81,24 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [3.0.21](https://github.com/libp2p/js-libp2p/compare/prometheus-metrics-v3.0.20...prometheus-metrics-v3.0.21) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [3.0.20](https://github.com/libp2p/js-libp2p/compare/prometheus-metrics-v3.0.19...prometheus-metrics-v3.0.20) (2024-04-15) diff --git a/packages/metrics-prometheus/README.md b/packages/metrics-prometheus/README.md index 51a7b349c6..35cc0aaee4 100644 --- a/packages/metrics-prometheus/README.md +++ b/packages/metrics-prometheus/README.md @@ -102,8 +102,8 @@ $ npm i @libp2p/prometheus-metrics Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/metrics-prometheus/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/metrics-prometheus/LICENSE-MIT) / ) # Contribution diff --git a/packages/metrics-prometheus/package.json b/packages/metrics-prometheus/package.json index ab8423f897..40aaab1ff2 100644 --- a/packages/metrics-prometheus/package.json +++ b/packages/metrics-prometheus/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/prometheus-metrics", - "version": "3.0.20", + "version": "3.0.21", "description": "Collect libp2p metrics for scraping by Prometheus or Graphana", "author": "", "license": "Apache-2.0 OR MIT", @@ -48,16 +48,16 @@ "test:electron-main": "aegir test -t electron-main --cov" }, "dependencies": { - "@libp2p/interface": "^1.2.0", + "@libp2p/interface": "^1.3.0", "it-foreach": "^2.0.6", "it-stream-types": "^2.0.1", "prom-client": "^15.1.1", "uint8arraylist": "^2.4.8" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "@multiformats/multiaddr": "^12.2.1", "aegir": "^42.2.5", "it-drain": "^3.0.5", diff --git a/packages/multistream-select/CHANGELOG.md b/packages/multistream-select/CHANGELOG.md index 077b07936a..99bfbaa57c 100644 --- a/packages/multistream-select/CHANGELOG.md +++ b/packages/multistream-select/CHANGELOG.md @@ -19,6 +19,22 @@ * devDependencies * @libp2p/logger bumped from ^4.0.1 to ^4.0.2 +## [5.1.8](https://github.com/libp2p/js-libp2p/compare/multistream-select-v5.1.7...multistream-select-v5.1.8) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + ## [5.1.7](https://github.com/libp2p/js-libp2p/compare/multistream-select-v5.1.6...multistream-select-v5.1.7) (2024-04-12) diff --git a/packages/multistream-select/README.md b/packages/multistream-select/README.md index 023a257266..6352f0b8d8 100644 --- a/packages/multistream-select/README.md +++ b/packages/multistream-select/README.md @@ -64,8 +64,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/multistream-select/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/multistream-select/LICENSE-MIT) / ) # Contribution diff --git a/packages/multistream-select/package.json b/packages/multistream-select/package.json index 344df5bd86..e83bad14cc 100644 --- a/packages/multistream-select/package.json +++ b/packages/multistream-select/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/multistream-select", - "version": "5.1.7", + "version": "5.1.8", "description": "JavaScript implementation of multistream-select", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/multistream-select#readme", @@ -58,7 +58,7 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", + "@libp2p/interface": "^1.3.0", "it-length-prefixed": "^9.0.4", "it-length-prefixed-stream": "^1.1.6", "it-stream-types": "^2.0.1", @@ -69,7 +69,7 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", + "@libp2p/logger": "^4.0.11", "aegir": "^42.2.5", "iso-random-stream": "^2.0.2", "it-all": "^3.0.4", diff --git a/packages/peer-collections/CHANGELOG.md b/packages/peer-collections/CHANGELOG.md index 62917cf042..b0c28269eb 100644 --- a/packages/peer-collections/CHANGELOG.md +++ b/packages/peer-collections/CHANGELOG.md @@ -35,6 +35,23 @@ * devDependencies * @libp2p/peer-id-factory bumped from ^4.0.3 to ^4.0.4 +## [5.1.11](https://github.com/libp2p/js-libp2p/compare/peer-collections-v5.1.10...peer-collections-v5.1.11) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * devDependencies + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [5.1.10](https://github.com/libp2p/js-libp2p/compare/peer-collections-v5.1.9...peer-collections-v5.1.10) (2024-04-12) diff --git a/packages/peer-collections/README.md b/packages/peer-collections/README.md index 2e9d293e36..24a8cd4501 100644 --- a/packages/peer-collections/README.md +++ b/packages/peer-collections/README.md @@ -130,8 +130,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-collections/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-collections/LICENSE-MIT) / ) # Contribution diff --git a/packages/peer-collections/package.json b/packages/peer-collections/package.json index c11fe75414..e59b13129b 100644 --- a/packages/peer-collections/package.json +++ b/packages/peer-collections/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/peer-collections", - "version": "5.1.10", + "version": "5.1.11", "description": "Stores values against a peer id", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/peer-collections#readme", @@ -54,11 +54,11 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-id": "^4.0.10" + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-id": "^4.1.0" }, "devDependencies": { - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/peer-id-factory": "^4.1.0", "@types/sinon": "^17.0.3", "aegir": "^42.2.5", "sinon": "^17.0.1", diff --git a/packages/peer-discovery-bootstrap/CHANGELOG.md b/packages/peer-discovery-bootstrap/CHANGELOG.md index 3fbf0e88e3..df25ecaf79 100644 --- a/packages/peer-discovery-bootstrap/CHANGELOG.md +++ b/packages/peer-discovery-bootstrap/CHANGELOG.md @@ -83,6 +83,24 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [10.0.21](https://github.com/libp2p/js-libp2p/compare/bootstrap-v10.0.20...bootstrap-v10.0.21) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + ## [10.0.20](https://github.com/libp2p/js-libp2p/compare/bootstrap-v10.0.19...bootstrap-v10.0.20) (2024-04-15) diff --git a/packages/peer-discovery-bootstrap/README.md b/packages/peer-discovery-bootstrap/README.md index bd7cc041df..d7b521e0bc 100644 --- a/packages/peer-discovery-bootstrap/README.md +++ b/packages/peer-discovery-bootstrap/README.md @@ -76,8 +76,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-discovery-bootstrap/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-discovery-bootstrap/LICENSE-MIT) / ) # Contribution diff --git a/packages/peer-discovery-bootstrap/package.json b/packages/peer-discovery-bootstrap/package.json index e498959a5c..1f7ee96915 100644 --- a/packages/peer-discovery-bootstrap/package.json +++ b/packages/peer-discovery-bootstrap/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/bootstrap", - "version": "10.0.20", + "version": "10.0.21", "description": "Peer discovery via a list of bootstrap peers", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap#readme", @@ -54,14 +54,14 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-id": "^4.0.10", + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-id": "^4.1.0", "@multiformats/mafmt": "^12.1.6", "@multiformats/multiaddr": "^12.2.1" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", "aegir": "^42.2.5", "sinon-ts": "^2.0.0" }, diff --git a/packages/peer-discovery-mdns/CHANGELOG.md b/packages/peer-discovery-mdns/CHANGELOG.md index 3b4f899d1b..f1fe571773 100644 --- a/packages/peer-discovery-mdns/CHANGELOG.md +++ b/packages/peer-discovery-mdns/CHANGELOG.md @@ -105,6 +105,27 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [10.0.21](https://github.com/libp2p/js-libp2p/compare/mdns-v10.0.20...mdns-v10.0.21) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [10.0.20](https://github.com/libp2p/js-libp2p/compare/mdns-v10.0.19...mdns-v10.0.20) (2024-04-15) diff --git a/packages/peer-discovery-mdns/README.md b/packages/peer-discovery-mdns/README.md index 9014f79b5c..34e14cde6b 100644 --- a/packages/peer-discovery-mdns/README.md +++ b/packages/peer-discovery-mdns/README.md @@ -112,8 +112,8 @@ $ npm i @libp2p/mdns Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-discovery-mdns/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-discovery-mdns/LICENSE-MIT) / ) # Contribution diff --git a/packages/peer-discovery-mdns/package.json b/packages/peer-discovery-mdns/package.json index 69508d57c0..a8121c1c26 100644 --- a/packages/peer-discovery-mdns/package.json +++ b/packages/peer-discovery-mdns/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/mdns", - "version": "10.0.20", + "version": "10.0.21", "description": "Node.js libp2p mDNS discovery implementation for peer discovery", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-mdns#readme", @@ -50,19 +50,19 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/utils": "^5.3.2", "@multiformats/multiaddr": "^12.2.1", "@types/multicast-dns": "^7.2.4", "dns-packet": "^5.6.1", "multicast-dns": "^7.2.5" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "aegir": "^42.2.5", "p-wait-for": "^5.0.2", "sinon-ts": "^2.0.0" diff --git a/packages/peer-id-factory/CHANGELOG.md b/packages/peer-id-factory/CHANGELOG.md index 1dc0577a80..bc61d84fe7 100644 --- a/packages/peer-id-factory/CHANGELOG.md +++ b/packages/peer-id-factory/CHANGELOG.md @@ -27,6 +27,27 @@ * dependencies * @libp2p/crypto bumped from ^3.0.4 to ^4.0.0 +## [4.1.0](https://github.com/libp2p/js-libp2p/compare/peer-id-factory-v4.0.10...peer-id-factory-v4.1.0) (2024-04-24) + + +### Features + +* extensible peer ids ([#2496](https://github.com/libp2p/js-libp2p/issues/2496)) ([0d5d966](https://github.com/libp2p/js-libp2p/commit/0d5d966d134fab726c95fbe8fb8e21719d930ef2)) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/crypto bumped from ^4.0.6 to ^4.1.0 + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + ## [4.0.10](https://github.com/libp2p/js-libp2p/compare/peer-id-factory-v4.0.9...peer-id-factory-v4.0.10) (2024-04-12) diff --git a/packages/peer-id-factory/README.md b/packages/peer-id-factory/README.md index 41f8c43892..3771083132 100644 --- a/packages/peer-id-factory/README.md +++ b/packages/peer-id-factory/README.md @@ -65,8 +65,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-id-factory/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-id-factory/LICENSE-MIT) / ) # Contribution diff --git a/packages/peer-id-factory/package.json b/packages/peer-id-factory/package.json index fa152351b1..23f64eb973 100644 --- a/packages/peer-id-factory/package.json +++ b/packages/peer-id-factory/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/peer-id-factory", - "version": "4.0.10", + "version": "4.1.0", "description": "Create PeerId instances", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/peer-id-factory#readme", @@ -58,9 +58,9 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/crypto": "^4.0.6", - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-id": "^4.0.10", + "@libp2p/crypto": "^4.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-id": "^4.1.0", "protons-runtime": "^5.4.0", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.0.3" diff --git a/packages/peer-id-factory/src/index.ts b/packages/peer-id-factory/src/index.ts index b6183f83be..9905cfc790 100644 --- a/packages/peer-id-factory/src/index.ts +++ b/packages/peer-id-factory/src/index.ts @@ -25,7 +25,7 @@ import { generateKeyPair, marshalPrivateKey, unmarshalPrivateKey, marshalPublicK import { peerIdFromKeys, peerIdFromBytes } from '@libp2p/peer-id' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { PeerIdProto } from './proto.js' -import type { PublicKey, PrivateKey, RSAPeerId, Ed25519PeerId, Secp256k1PeerId, PeerId } from '@libp2p/interface' +import type { PublicKey, PrivateKey, RSAPeerId, Ed25519PeerId, Secp256k1PeerId, KeyType } from '@libp2p/interface' export const createEd25519PeerId = async (): Promise => { const key = await generateKeyPair('Ed25519') @@ -60,11 +60,11 @@ export const createRSAPeerId = async (opts?: { bits: number }): Promise { +export async function createFromPubKey (publicKey: PublicKey): Promise { return peerIdFromKeys(marshalPublicKey(publicKey)) } -export async function createFromPrivKey (privateKey: PrivateKey): Promise { +export async function createFromPrivKey (privateKey: PrivateKey): Promise { return peerIdFromKeys(marshalPublicKey(privateKey.public), marshalPrivateKey(privateKey)) } @@ -76,7 +76,7 @@ export function exportToProtobuf (peerId: RSAPeerId | Ed25519PeerId | Secp256k1P }) } -export async function createFromProtobuf (buf: Uint8Array): Promise { +export async function createFromProtobuf (buf: Uint8Array): Promise { const { id, privKey, @@ -90,7 +90,7 @@ export async function createFromProtobuf (buf: Uint8Array): Promise { ) } -export async function createFromJSON (obj: { id: string, privKey?: string, pubKey?: string }): Promise { +export async function createFromJSON (obj: { id: string, privKey?: string, pubKey?: string }): Promise { return createFromParts( uint8ArrayFromString(obj.id, 'base58btc'), obj.privKey != null ? uint8ArrayFromString(obj.privKey, 'base64pad') : undefined, @@ -98,7 +98,7 @@ export async function createFromJSON (obj: { id: string, privKey?: string, pubKe ) } -async function createFromParts (multihash: Uint8Array, privKey?: Uint8Array, pubKey?: Uint8Array): Promise { +async function createFromParts (multihash: Uint8Array, privKey?: Uint8Array, pubKey?: Uint8Array): Promise { if (privKey != null) { const key = await unmarshalPrivateKey(privKey) diff --git a/packages/peer-id/CHANGELOG.md b/packages/peer-id/CHANGELOG.md index b537d50a93..1909d8512e 100644 --- a/packages/peer-id/CHANGELOG.md +++ b/packages/peer-id/CHANGELOG.md @@ -11,6 +11,25 @@ * dependencies * @libp2p/interface bumped from ^1.0.1 to ^1.0.2 +## [4.1.0](https://github.com/libp2p/js-libp2p/compare/peer-id-v4.0.10...peer-id-v4.1.0) (2024-04-24) + + +### Features + +* extensible peer ids ([#2496](https://github.com/libp2p/js-libp2p/issues/2496)) ([0d5d966](https://github.com/libp2p/js-libp2p/commit/0d5d966d134fab726c95fbe8fb8e21719d930ef2)) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + ## [4.0.10](https://github.com/libp2p/js-libp2p/compare/peer-id-v4.0.9...peer-id-v4.0.10) (2024-04-12) diff --git a/packages/peer-id/README.md b/packages/peer-id/README.md index d75a9708db..4a6584a3ab 100644 --- a/packages/peer-id/README.md +++ b/packages/peer-id/README.md @@ -58,8 +58,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-id/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-id/LICENSE-MIT) / ) # Contribution diff --git a/packages/peer-id/package.json b/packages/peer-id/package.json index 49ae36e313..ebc3679bf0 100644 --- a/packages/peer-id/package.json +++ b/packages/peer-id/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/peer-id", - "version": "4.0.10", + "version": "4.1.0", "description": "Implementation of @libp2p/interface-peer-id", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/peer-id#readme", @@ -54,7 +54,7 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", + "@libp2p/interface": "^1.3.0", "multiformats": "^13.1.0", "uint8arrays": "^5.0.3" }, diff --git a/packages/peer-id/src/index.ts b/packages/peer-id/src/index.ts index fcda52e02e..da9557a7f1 100644 --- a/packages/peer-id/src/index.ts +++ b/packages/peer-id/src/index.ts @@ -181,7 +181,7 @@ class Secp256k1PeerIdImpl extends PeerIdImpl implements Secp256k1PeerId { } } -export function createPeerId (init: PeerIdInit): PeerId { +export function createPeerId (init: PeerIdInit): Ed25519PeerId | Secp256k1PeerId | RSAPeerId { if (init.type === 'RSA') { return new RSAPeerIdImpl(init) } @@ -197,7 +197,7 @@ export function createPeerId (init: PeerIdInit): PeerId { throw new CodeError('Type must be "RSA", "Ed25519" or "secp256k1"', 'ERR_INVALID_PARAMETERS') } -export function peerIdFromPeerId (other: any): PeerId { +export function peerIdFromPeerId (other: any): Ed25519PeerId | Secp256k1PeerId | RSAPeerId { if (other.type === 'RSA') { return new RSAPeerIdImpl(other) } @@ -213,7 +213,7 @@ export function peerIdFromPeerId (other: any): PeerId { throw new CodeError('Not a PeerId', 'ERR_INVALID_PARAMETERS') } -export function peerIdFromString (str: string, decoder?: MultibaseDecoder): PeerId { +export function peerIdFromString (str: string, decoder?: MultibaseDecoder): Ed25519PeerId | Secp256k1PeerId | RSAPeerId { decoder = decoder ?? baseDecoder if (str.charAt(0) === '1' || str.charAt(0) === 'Q') { @@ -233,7 +233,7 @@ export function peerIdFromString (str: string, decoder?: MultibaseDecoder): return peerIdFromBytes(baseDecoder.decode(str)) } -export function peerIdFromBytes (buf: Uint8Array): PeerId { +export function peerIdFromBytes (buf: Uint8Array): Ed25519PeerId | Secp256k1PeerId | RSAPeerId { try { const multihash = Digest.decode(buf) @@ -255,7 +255,7 @@ export function peerIdFromBytes (buf: Uint8Array): PeerId { throw new Error('Supplied PeerID CID is invalid') } -export function peerIdFromCID (cid: CID): PeerId { +export function peerIdFromCID (cid: CID): Ed25519PeerId | Secp256k1PeerId | RSAPeerId { if (cid == null || cid.multihash == null || cid.version == null || (cid.version === 1 && cid.code !== LIBP2P_KEY_CODE)) { throw new Error('Supplied PeerID CID is invalid') } @@ -279,7 +279,7 @@ export function peerIdFromCID (cid: CID): PeerId { * @param publicKey - A marshalled public key * @param privateKey - A marshalled private key */ -export async function peerIdFromKeys (publicKey: Uint8Array, privateKey?: Uint8Array): Promise { +export async function peerIdFromKeys (publicKey: Uint8Array, privateKey?: Uint8Array): Promise { if (publicKey.length === MARSHALLED_ED225519_PUBLIC_KEY_LENGTH) { return new Ed25519PeerIdImpl({ multihash: Digest.create(identity.code, publicKey), privateKey }) } diff --git a/packages/peer-record/CHANGELOG.md b/packages/peer-record/CHANGELOG.md index 2d4e708e11..58f6e1c702 100644 --- a/packages/peer-record/CHANGELOG.md +++ b/packages/peer-record/CHANGELOG.md @@ -60,6 +60,25 @@ * dependencies * @libp2p/utils bumped from ^5.2.4 to ^5.2.5 +## [7.0.15](https://github.com/libp2p/js-libp2p/compare/peer-record-v7.0.14...peer-record-v7.0.15) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/crypto bumped from ^4.0.6 to ^4.1.0 + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [7.0.14](https://github.com/libp2p/js-libp2p/compare/peer-record-v7.0.13...peer-record-v7.0.14) (2024-04-15) diff --git a/packages/peer-record/README.md b/packages/peer-record/README.md index 39b309cb2d..f9a447af66 100644 --- a/packages/peer-record/README.md +++ b/packages/peer-record/README.md @@ -168,8 +168,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-record/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-record/LICENSE-MIT) / ) # Contribution diff --git a/packages/peer-record/package.json b/packages/peer-record/package.json index 20de94368b..56b12bb209 100644 --- a/packages/peer-record/package.json +++ b/packages/peer-record/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/peer-record", - "version": "7.0.14", + "version": "7.0.15", "description": "Used to transfer signed peer data across the network", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/peer-record#readme", @@ -61,10 +61,10 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/crypto": "^4.0.6", - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/utils": "^5.3.1", + "@libp2p/crypto": "^4.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/utils": "^5.3.2", "@multiformats/multiaddr": "^12.2.1", "protons-runtime": "^5.4.0", "uint8-varint": "^2.0.4", @@ -72,7 +72,7 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/peer-id-factory": "^4.1.0", "aegir": "^42.2.5", "protons": "^7.5.0" }, diff --git a/packages/peer-store/CHANGELOG.md b/packages/peer-store/CHANGELOG.md index 3e4ff23956..432a6954cc 100644 --- a/packages/peer-store/CHANGELOG.md +++ b/packages/peer-store/CHANGELOG.md @@ -68,6 +68,26 @@ * dependencies * @libp2p/peer-record bumped from ^7.0.8 to ^7.0.9 +## [10.0.16](https://github.com/libp2p/js-libp2p/compare/peer-store-v10.0.15...peer-store-v10.0.16) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-collections bumped from ^5.1.10 to ^5.1.11 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/peer-record bumped from ^7.0.14 to ^7.0.15 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [10.0.15](https://github.com/libp2p/js-libp2p/compare/peer-store-v10.0.14...peer-store-v10.0.15) (2024-04-15) diff --git a/packages/peer-store/README.md b/packages/peer-store/README.md index 36da486788..22062f3541 100644 --- a/packages/peer-store/README.md +++ b/packages/peer-store/README.md @@ -48,8 +48,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-store/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/peer-store/LICENSE-MIT) / ) # Contribution diff --git a/packages/peer-store/package.json b/packages/peer-store/package.json index 25b7a239ce..3d9bca049a 100644 --- a/packages/peer-store/package.json +++ b/packages/peer-store/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/peer-store", - "version": "10.0.15", + "version": "10.0.16", "description": "Stores information about peers libp2p knows on the network", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/peer-store#readme", @@ -59,10 +59,10 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-collections": "^5.1.10", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/peer-record": "^7.0.14", + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-collections": "^5.1.11", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/peer-record": "^7.0.15", "@multiformats/multiaddr": "^12.2.1", "interface-datastore": "^8.2.11", "it-all": "^3.0.4", @@ -73,8 +73,8 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "@types/sinon": "^17.0.3", "aegir": "^42.2.5", "datastore-core": "^9.2.9", diff --git a/packages/pnet/README.md b/packages/pnet/README.md index 746c9b13e1..2b352a4f3d 100644 --- a/packages/pnet/README.md +++ b/packages/pnet/README.md @@ -100,8 +100,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/pnet/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/pnet/LICENSE-MIT) / ) # Contribution diff --git a/packages/protocol-autonat/CHANGELOG.md b/packages/protocol-autonat/CHANGELOG.md index aa2fde8bdd..365622ccca 100644 --- a/packages/protocol-autonat/CHANGELOG.md +++ b/packages/protocol-autonat/CHANGELOG.md @@ -55,6 +55,26 @@ * dependencies * @libp2p/utils bumped from ^5.2.4 to ^5.2.5 +## [1.0.18](https://github.com/libp2p/js-libp2p/compare/autonat-v1.0.17...autonat-v1.0.18) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + ## [1.0.17](https://github.com/libp2p/js-libp2p/compare/autonat-v1.0.16...autonat-v1.0.17) (2024-04-15) diff --git a/packages/protocol-autonat/README.md b/packages/protocol-autonat/README.md index c52d6a9d09..0b64e00252 100644 --- a/packages/protocol-autonat/README.md +++ b/packages/protocol-autonat/README.md @@ -75,8 +75,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-autonat/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-autonat/LICENSE-MIT) / ) # Contribution diff --git a/packages/protocol-autonat/package.json b/packages/protocol-autonat/package.json index db574508f6..5ec68bfa40 100644 --- a/packages/protocol-autonat/package.json +++ b/packages/protocol-autonat/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/autonat", - "version": "1.0.17", + "version": "1.0.18", "description": "Implementation of Autonat Protocol", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-autonat#readme", @@ -52,11 +52,11 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/peer-id-factory": "^4.1.0", + "@libp2p/utils": "^5.3.2", "@multiformats/multiaddr": "^12.2.1", "it-first": "^3.0.4", "it-length-prefixed": "^9.0.4", @@ -67,7 +67,7 @@ "uint8arraylist": "^2.4.8" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", + "@libp2p/logger": "^4.0.11", "aegir": "^42.2.5", "it-all": "^3.0.4", "it-pushable": "^3.2.3", diff --git a/packages/protocol-dcutr/CHANGELOG.md b/packages/protocol-dcutr/CHANGELOG.md index b3fe271ebb..598e7f6332 100644 --- a/packages/protocol-dcutr/CHANGELOG.md +++ b/packages/protocol-dcutr/CHANGELOG.md @@ -44,6 +44,22 @@ * dependencies * @libp2p/utils bumped from ^5.2.4 to ^5.2.5 +## [1.0.18](https://github.com/libp2p/js-libp2p/compare/dcutr-v1.0.17...dcutr-v1.0.18) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + ## [1.0.17](https://github.com/libp2p/js-libp2p/compare/dcutr-v1.0.16...dcutr-v1.0.17) (2024-04-15) diff --git a/packages/protocol-dcutr/README.md b/packages/protocol-dcutr/README.md index 7483d05ce1..674e4842aa 100644 --- a/packages/protocol-dcutr/README.md +++ b/packages/protocol-dcutr/README.md @@ -99,8 +99,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-dcutr/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-dcutr/LICENSE-MIT) / ) # Contribution diff --git a/packages/protocol-dcutr/package.json b/packages/protocol-dcutr/package.json index a8f05ab395..d534ebd458 100644 --- a/packages/protocol-dcutr/package.json +++ b/packages/protocol-dcutr/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/dcutr", - "version": "1.0.17", + "version": "1.0.18", "description": "Implementation of the DCUtR Protocol", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-dcutr#readme", @@ -52,9 +52,9 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/utils": "^5.3.2", "@multiformats/multiaddr": "^12.2.1", "@multiformats/multiaddr-matcher": "^1.2.0", "delay": "^6.0.0", diff --git a/packages/protocol-echo/CHANGELOG.md b/packages/protocol-echo/CHANGELOG.md index 9a14f0f890..7538b1a0a1 100644 --- a/packages/protocol-echo/CHANGELOG.md +++ b/packages/protocol-echo/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [1.0.4](https://github.com/libp2p/js-libp2p/compare/echo-v1.0.3...echo-v1.0.4) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + ## [1.0.3](https://github.com/libp2p/js-libp2p/compare/echo-v1.0.2...echo-v1.0.3) (2024-04-12) diff --git a/packages/protocol-echo/README.md b/packages/protocol-echo/README.md index 20355b09a9..acfc220eeb 100644 --- a/packages/protocol-echo/README.md +++ b/packages/protocol-echo/README.md @@ -86,8 +86,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-echo/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-echo/LICENSE-MIT) / ) # Contribution diff --git a/packages/protocol-echo/package.json b/packages/protocol-echo/package.json index bf91d3c54c..0285ff8dc6 100644 --- a/packages/protocol-echo/package.json +++ b/packages/protocol-echo/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/echo", - "version": "1.0.3", + "version": "1.0.4", "description": "Implementation of an Echo protocol", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-echo#readme", @@ -52,12 +52,12 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", "it-pipe": "^3.0.1" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", + "@libp2p/logger": "^4.0.11", "aegir": "^42.2.5", "it-all": "^3.0.4", "it-pair": "^2.0.6", diff --git a/packages/protocol-fetch/CHANGELOG.md b/packages/protocol-fetch/CHANGELOG.md index b5cde70bdb..a4312cb3e2 100644 --- a/packages/protocol-fetch/CHANGELOG.md +++ b/packages/protocol-fetch/CHANGELOG.md @@ -48,6 +48,24 @@ * devDependencies * @libp2p/peer-id-factory bumped from ^4.0.3 to ^4.0.4 +## [1.0.15](https://github.com/libp2p/js-libp2p/compare/fetch-v1.0.14...fetch-v1.0.15) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [1.0.14](https://github.com/libp2p/js-libp2p/compare/fetch-v1.0.13...fetch-v1.0.14) (2024-04-12) diff --git a/packages/protocol-fetch/README.md b/packages/protocol-fetch/README.md index 70a96ba41b..c31e893db1 100644 --- a/packages/protocol-fetch/README.md +++ b/packages/protocol-fetch/README.md @@ -85,8 +85,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-fetch/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-fetch/LICENSE-MIT) / ) # Contribution diff --git a/packages/protocol-fetch/package.json b/packages/protocol-fetch/package.json index 1b99f21ff3..6bc242c56a 100644 --- a/packages/protocol-fetch/package.json +++ b/packages/protocol-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/fetch", - "version": "1.0.14", + "version": "1.0.15", "description": "Implementation of the Fetch Protocol", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-fetch#readme", @@ -52,16 +52,16 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", "it-protobuf-stream": "^1.1.2", "protons-runtime": "^5.4.0", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "aegir": "^42.2.5", "it-pair": "^2.0.6", "protons": "^7.5.0", diff --git a/packages/protocol-identify/CHANGELOG.md b/packages/protocol-identify/CHANGELOG.md index 261a20f834..3fc95ea277 100644 --- a/packages/protocol-identify/CHANGELOG.md +++ b/packages/protocol-identify/CHANGELOG.md @@ -76,6 +76,27 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [1.0.20](https://github.com/libp2p/js-libp2p/compare/identify-v1.0.19...identify-v1.0.20) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/peer-record bumped from ^7.0.14 to ^7.0.15 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [1.0.19](https://github.com/libp2p/js-libp2p/compare/identify-v1.0.18...identify-v1.0.19) (2024-04-15) diff --git a/packages/protocol-identify/README.md b/packages/protocol-identify/README.md index 351a9c53f8..35891e5966 100644 --- a/packages/protocol-identify/README.md +++ b/packages/protocol-identify/README.md @@ -62,8 +62,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-identify/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-identify/LICENSE-MIT) / ) # Contribution diff --git a/packages/protocol-identify/package.json b/packages/protocol-identify/package.json index 10df3c8416..7cc7999dbb 100644 --- a/packages/protocol-identify/package.json +++ b/packages/protocol-identify/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/identify", - "version": "1.0.19", + "version": "1.0.20", "description": "Implementation of the Identify Protocol", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-identify#readme", @@ -52,10 +52,10 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/peer-record": "^7.0.14", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/peer-record": "^7.0.15", "@multiformats/multiaddr": "^12.2.1", "@multiformats/multiaddr-matcher": "^1.2.0", "it-protobuf-stream": "^1.1.2", @@ -65,9 +65,9 @@ "wherearewe": "^2.0.1" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "aegir": "^42.2.5", "delay": "^6.0.0", "it-drain": "^3.0.5", diff --git a/packages/protocol-perf/CHANGELOG.md b/packages/protocol-perf/CHANGELOG.md index e55b3fe178..757579e732 100644 --- a/packages/protocol-perf/CHANGELOG.md +++ b/packages/protocol-perf/CHANGELOG.md @@ -82,6 +82,24 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [3.0.21](https://github.com/libp2p/js-libp2p/compare/perf-v3.0.20...perf-v3.0.21) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + ## [3.0.20](https://github.com/libp2p/js-libp2p/compare/perf-v3.0.19...perf-v3.0.20) (2024-04-15) diff --git a/packages/protocol-perf/README.md b/packages/protocol-perf/README.md index 738fef4ce3..09b8829e79 100644 --- a/packages/protocol-perf/README.md +++ b/packages/protocol-perf/README.md @@ -96,8 +96,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-perf/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-perf/LICENSE-MIT) / ) # Contribution diff --git a/packages/protocol-perf/package.json b/packages/protocol-perf/package.json index e1e95acac3..618c21a7a9 100644 --- a/packages/protocol-perf/package.json +++ b/packages/protocol-perf/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/perf", - "version": "3.0.20", + "version": "3.0.21", "description": "Implementation of Perf Protocol", "author": "@maschad / @marcopolo", "license": "Apache-2.0 OR MIT", @@ -52,14 +52,14 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", "@multiformats/multiaddr": "^12.2.1", "it-pushable": "^3.2.3" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", "aegir": "^42.2.5", "it-last": "^3.0.4", "it-pair": "^2.0.6", diff --git a/packages/protocol-ping/CHANGELOG.md b/packages/protocol-ping/CHANGELOG.md index 4316a4e16f..ceaaf5cc0d 100644 --- a/packages/protocol-ping/CHANGELOG.md +++ b/packages/protocol-ping/CHANGELOG.md @@ -50,6 +50,25 @@ * devDependencies * @libp2p/peer-id-factory bumped from ^4.0.3 to ^4.0.4 +## [1.0.16](https://github.com/libp2p/js-libp2p/compare/ping-v1.0.15...ping-v1.0.16) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/crypto bumped from ^4.0.6 to ^4.1.0 + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [1.0.15](https://github.com/libp2p/js-libp2p/compare/ping-v1.0.14...ping-v1.0.15) (2024-04-12) diff --git a/packages/protocol-ping/README.md b/packages/protocol-ping/README.md index b75d834209..4b45020294 100644 --- a/packages/protocol-ping/README.md +++ b/packages/protocol-ping/README.md @@ -66,8 +66,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-ping/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/protocol-ping/LICENSE-MIT) / ) # Contribution diff --git a/packages/protocol-ping/package.json b/packages/protocol-ping/package.json index 6368388c7c..902176ebd4 100644 --- a/packages/protocol-ping/package.json +++ b/packages/protocol-ping/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/ping", - "version": "1.0.15", + "version": "1.0.16", "description": "Implementation of Ping Protocol", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-ping#readme", @@ -50,17 +50,17 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/crypto": "^4.0.6", - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", + "@libp2p/crypto": "^4.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", "@multiformats/multiaddr": "^12.2.1", "it-first": "^3.0.4", "it-pipe": "^3.0.1", "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "aegir": "^42.2.5", "it-byte-stream": "^1.0.8", "it-pair": "^2.0.6", diff --git a/packages/pubsub-floodsub/CHANGELOG.md b/packages/pubsub-floodsub/CHANGELOG.md index 4cba360c3a..d1c7e2f00d 100644 --- a/packages/pubsub-floodsub/CHANGELOG.md +++ b/packages/pubsub-floodsub/CHANGELOG.md @@ -98,6 +98,26 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [9.0.17](https://github.com/libp2p/js-libp2p/compare/floodsub-v9.0.16...floodsub-v9.0.17) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/pubsub bumped from ^9.0.15 to ^9.0.16 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-collections bumped from ^5.1.10 to ^5.1.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [9.0.16](https://github.com/libp2p/js-libp2p/compare/floodsub-v9.0.15...floodsub-v9.0.16) (2024-04-15) diff --git a/packages/pubsub-floodsub/README.md b/packages/pubsub-floodsub/README.md index 9e32f793ac..3b3292a122 100644 --- a/packages/pubsub-floodsub/README.md +++ b/packages/pubsub-floodsub/README.md @@ -76,8 +76,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/pubsub-floodsub/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/pubsub-floodsub/LICENSE-MIT) / ) # Contribution diff --git a/packages/pubsub-floodsub/package.json b/packages/pubsub-floodsub/package.json index 80309c8058..569a3b121f 100644 --- a/packages/pubsub-floodsub/package.json +++ b/packages/pubsub-floodsub/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/floodsub", - "version": "9.0.16", + "version": "9.0.17", "description": "libp2p-floodsub, also known as pubsub-flood or just dumbsub, this implementation of pubsub focused on delivering an API for Publish/Subscribe, but with no CastTree Forming (it just floods the network).", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/pubsub-floodsub#readme", @@ -60,17 +60,17 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/pubsub": "^9.0.15", + "@libp2p/interface": "^1.3.0", + "@libp2p/pubsub": "^9.0.16", "protons-runtime": "^5.4.0", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-collections": "^5.1.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-collections": "^5.1.11", + "@libp2p/peer-id-factory": "^4.1.0", "@multiformats/multiaddr": "^12.2.1", "@types/sinon": "^17.0.3", "aegir": "^42.2.5", diff --git a/packages/pubsub/CHANGELOG.md b/packages/pubsub/CHANGELOG.md index aa02f037a5..158b8e00e8 100644 --- a/packages/pubsub/CHANGELOG.md +++ b/packages/pubsub/CHANGELOG.md @@ -75,6 +75,28 @@ * dependencies * @libp2p/utils bumped from ^5.2.4 to ^5.2.5 +## [9.0.16](https://github.com/libp2p/js-libp2p/compare/pubsub-v9.0.15...pubsub-v9.0.16) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/crypto bumped from ^4.0.6 to ^4.1.0 + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/peer-collections bumped from ^5.1.10 to ^5.1.11 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [9.0.15](https://github.com/libp2p/js-libp2p/compare/pubsub-v9.0.14...pubsub-v9.0.15) (2024-04-15) diff --git a/packages/pubsub/README.md b/packages/pubsub/README.md index d33765739f..b8678e4f58 100644 --- a/packages/pubsub/README.md +++ b/packages/pubsub/README.md @@ -74,8 +74,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/pubsub/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/pubsub/LICENSE-MIT) / ) # Contribution diff --git a/packages/pubsub/package.json b/packages/pubsub/package.json index 504c4d1e51..496ee8aaca 100644 --- a/packages/pubsub/package.json +++ b/packages/pubsub/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/pubsub", - "version": "9.0.15", + "version": "9.0.16", "description": "libp2p pubsub base class", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/pubsub#readme", @@ -84,12 +84,12 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/crypto": "^4.0.6", - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/peer-collections": "^5.1.10", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/utils": "^5.3.1", + "@libp2p/crypto": "^4.1.0", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/peer-collections": "^5.1.11", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/utils": "^5.3.2", "it-length-prefixed": "^9.0.4", "it-pipe": "^3.0.1", "it-pushable": "^3.2.3", @@ -99,8 +99,8 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "@types/sinon": "^17.0.3", "aegir": "^42.2.5", "delay": "^6.0.0", diff --git a/packages/record/CHANGELOG.md b/packages/record/CHANGELOG.md index f6a75c4a9b..fa79a9f8e3 100644 --- a/packages/record/CHANGELOG.md +++ b/packages/record/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/libp2p/js-libp2p/compare/record-v4.0.0...record-v4.0.1) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + ## [4.0.0](https://github.com/libp2p/js-libp2p/compare/record-v3.0.4...record-v4.0.0) (2024-04-05) diff --git a/packages/record/README.md b/packages/record/README.md index 944df06e8f..213e37eebd 100644 --- a/packages/record/README.md +++ b/packages/record/README.md @@ -70,8 +70,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/record/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/record/LICENSE-MIT) / ) # Contribution diff --git a/packages/record/package.json b/packages/record/package.json index d9adb31570..55c22f8ea8 100644 --- a/packages/record/package.json +++ b/packages/record/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/record", - "version": "4.0.0", + "version": "4.0.1", "description": "libp2p record implementation", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/record#readme", diff --git a/packages/stream-multiplexer-mplex/CHANGELOG.md b/packages/stream-multiplexer-mplex/CHANGELOG.md index eaa77d4bab..b7f8dfa8dd 100644 --- a/packages/stream-multiplexer-mplex/CHANGELOG.md +++ b/packages/stream-multiplexer-mplex/CHANGELOG.md @@ -78,6 +78,24 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [10.0.21](https://github.com/libp2p/js-libp2p/compare/mplex-v10.0.20...mplex-v10.0.21) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + ## [10.0.20](https://github.com/libp2p/js-libp2p/compare/mplex-v10.0.19...mplex-v10.0.20) (2024-04-15) diff --git a/packages/stream-multiplexer-mplex/README.md b/packages/stream-multiplexer-mplex/README.md index 3e21955a9a..b1c317e5f4 100644 --- a/packages/stream-multiplexer-mplex/README.md +++ b/packages/stream-multiplexer-mplex/README.md @@ -31,8 +31,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/stream-multiplexer-mplex/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/stream-multiplexer-mplex/LICENSE-MIT) / ) # Contribution diff --git a/packages/stream-multiplexer-mplex/package.json b/packages/stream-multiplexer-mplex/package.json index f12a164dd6..af4eb59014 100644 --- a/packages/stream-multiplexer-mplex/package.json +++ b/packages/stream-multiplexer-mplex/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/mplex", - "version": "10.0.20", + "version": "10.0.21", "description": "JavaScript implementation of https://github.com/libp2p/mplex", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex#readme", @@ -62,8 +62,8 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/utils": "^5.3.2", "it-pipe": "^3.0.1", "it-pushable": "^3.2.3", "it-stream-types": "^2.0.1", @@ -72,8 +72,8 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", "aegir": "^42.2.5", "benchmark": "^2.1.4", "cborg": "^4.1.4", diff --git a/packages/transport-circuit-relay-v2/CHANGELOG.md b/packages/transport-circuit-relay-v2/CHANGELOG.md index f8ead61550..8c420ae8d1 100644 --- a/packages/transport-circuit-relay-v2/CHANGELOG.md +++ b/packages/transport-circuit-relay-v2/CHANGELOG.md @@ -101,6 +101,29 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [1.0.21](https://github.com/libp2p/js-libp2p/compare/circuit-relay-v2-v1.0.20...circuit-relay-v2-v1.0.21) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/peer-collections bumped from ^5.1.10 to ^5.1.11 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/peer-record bumped from ^7.0.14 to ^7.0.15 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [1.0.20](https://github.com/libp2p/js-libp2p/compare/circuit-relay-v2-v1.0.19...circuit-relay-v2-v1.0.20) (2024-04-15) diff --git a/packages/transport-circuit-relay-v2/README.md b/packages/transport-circuit-relay-v2/README.md index c2a41f7156..d1a0ef5b62 100644 --- a/packages/transport-circuit-relay-v2/README.md +++ b/packages/transport-circuit-relay-v2/README.md @@ -83,8 +83,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-circuit-relay-v2/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-circuit-relay-v2/LICENSE-MIT) / ) # Contribution diff --git a/packages/transport-circuit-relay-v2/package.json b/packages/transport-circuit-relay-v2/package.json index 6fb8844f28..997fc5a38b 100644 --- a/packages/transport-circuit-relay-v2/package.json +++ b/packages/transport-circuit-relay-v2/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/circuit-relay-v2", - "version": "1.0.20", + "version": "1.0.21", "description": "Implementation of Circuit Relay v2", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-circuit-relay-v2#readme", @@ -52,12 +52,12 @@ "doc-check": "aegir doc-check" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/peer-collections": "^5.1.10", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/peer-record": "^7.0.14", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/peer-collections": "^5.1.11", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/peer-record": "^7.0.15", + "@libp2p/utils": "^5.3.2", "@multiformats/mafmt": "^12.1.6", "@multiformats/multiaddr": "^12.2.1", "any-signal": "^4.1.1", @@ -71,9 +71,9 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "aegir": "^42.2.5", "delay": "^6.0.0", "it-drain": "^3.0.5", diff --git a/packages/transport-tcp/CHANGELOG.md b/packages/transport-tcp/CHANGELOG.md index da4fa775a3..faf44af994 100644 --- a/packages/transport-tcp/CHANGELOG.md +++ b/packages/transport-tcp/CHANGELOG.md @@ -89,6 +89,31 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [9.0.23](https://github.com/libp2p/js-libp2p/compare/tcp-v9.0.22...tcp-v9.0.23) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + +## [9.0.22](https://github.com/libp2p/js-libp2p/compare/tcp-v9.0.21...tcp-v9.0.22) (2024-04-16) + + +### Bug Fixes + +* use same promise when closing maconn multiple times ([#2487](https://github.com/libp2p/js-libp2p/issues/2487)) ([ea4f262](https://github.com/libp2p/js-libp2p/commit/ea4f26285ecf7babc361799a172dd4acbcca2a10)) + ## [9.0.21](https://github.com/libp2p/js-libp2p/compare/tcp-v9.0.20...tcp-v9.0.21) (2024-04-15) diff --git a/packages/transport-tcp/README.md b/packages/transport-tcp/README.md index b9069e7990..8a23e887b5 100644 --- a/packages/transport-tcp/README.md +++ b/packages/transport-tcp/README.md @@ -63,8 +63,8 @@ $ npm i @libp2p/tcp Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-tcp/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-tcp/LICENSE-MIT) / ) # Contribution diff --git a/packages/transport-tcp/package.json b/packages/transport-tcp/package.json index bed837251d..9ab1654439 100644 --- a/packages/transport-tcp/package.json +++ b/packages/transport-tcp/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/tcp", - "version": "9.0.21", + "version": "9.0.23", "description": "A TCP transport for libp2p", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-tcp#readme", @@ -56,16 +56,16 @@ "test:electron-main": "aegir test -t electron-main" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/utils": "^5.3.2", "@multiformats/mafmt": "^12.1.6", "@multiformats/multiaddr": "^12.2.1", "@types/sinon": "^17.0.3", "stream-to-it": "^1.0.0" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", "aegir": "^42.2.5", "it-all": "^3.0.4", "it-pipe": "^3.0.1", diff --git a/packages/transport-tcp/src/socket-to-conn.ts b/packages/transport-tcp/src/socket-to-conn.ts index 2e4365697d..9221c6698c 100644 --- a/packages/transport-tcp/src/socket-to-conn.ts +++ b/packages/transport-tcp/src/socket-to-conn.ts @@ -23,7 +23,7 @@ interface ToConnectionOptions { * https://github.com/libp2p/interface-transport#multiaddrconnection */ export const toMultiaddrConnection = (socket: Socket, options: ToConnectionOptions): MultiaddrConnection => { - let status: 'open' | 'closing' | 'closed' = 'open' + let closePromise: Promise | null = null const log = options.logger.forComponent('libp2p:tcp:socket') const metrics = options.metrics const metricPrefix = options.metricPrefix ?? '' @@ -127,11 +127,15 @@ export const toMultiaddrConnection = (socket: Socket, options: ToConnectionOptio timeline: { open: Date.now() }, async close (options: AbortOptions = {}) { - if (status === 'closed' || status === 'closing' || socket.destroyed) { - log('The %s socket is either closed, closing, or already destroyed', lOptsStr) + if (socket.destroyed) { + log('The %s socket is destroyed', lOptsStr) return } - status = 'closing' + + if (closePromise != null) { + log('The %s socket is closed or closing', lOptsStr) + return closePromise + } if (options.signal == null) { const signal = AbortSignal.timeout(closeTimeout) @@ -150,12 +154,11 @@ export const toMultiaddrConnection = (socket: Socket, options: ToConnectionOptio try { log('%s closing socket', lOptsStr) - await new Promise((resolve, reject) => { + closePromise = new Promise((resolve, reject) => { socket.once('close', () => { // socket completely closed log('%s socket closed', lOptsStr) - status = 'closed' resolve() }) socket.once('error', (err: Error) => { @@ -165,9 +168,10 @@ export const toMultiaddrConnection = (socket: Socket, options: ToConnectionOptio if (maConn.timeline.close == null) { maConn.timeline.close = Date.now() } - - status = 'closed' - reject(err) + if (!socket.destroyed) { + reject(err) + } + // if socket is destroyed, 'closed' event will be emitted later to resolve the promise }) // shorten inactivity timeout @@ -189,6 +193,8 @@ export const toMultiaddrConnection = (socket: Socket, options: ToConnectionOptio socket.destroy() } }) + + await closePromise } catch (err: any) { this.abort(err) } finally { diff --git a/packages/transport-webrtc/CHANGELOG.md b/packages/transport-webrtc/CHANGELOG.md index d296d065a9..57cd527a4b 100644 --- a/packages/transport-webrtc/CHANGELOG.md +++ b/packages/transport-webrtc/CHANGELOG.md @@ -111,6 +111,45 @@ * @libp2p/websockets bumped from ^8.0.14 to ^8.0.15 * libp2p bumped from ^1.2.2 to ^1.2.3 +## [4.0.29](https://github.com/libp2p/js-libp2p/compare/webrtc-v4.0.28...webrtc-v4.0.29) (2024-04-24) + + +### Bug Fixes + +* do not run webrtc cleanup on transport close ([#2498](https://github.com/libp2p/js-libp2p/issues/2498)) ([2281f80](https://github.com/libp2p/js-libp2p/commit/2281f802bac80a4ffd3f7e099a6ff02f3db62b11)) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/circuit-relay-v2 bumped from ^1.0.20 to ^1.0.21 + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + * @libp2p/websockets bumped from ^8.0.20 to ^8.0.21 + * libp2p bumped from ^1.4.2 to ^1.4.3 + +## [4.0.28](https://github.com/libp2p/js-libp2p/compare/webrtc-v4.0.27...webrtc-v4.0.28) (2024-04-16) + + +### Dependencies + +* bump node-datachannel from 0.6.0 to 0.7.0 ([#2488](https://github.com/libp2p/js-libp2p/issues/2488)) ([1c086c9](https://github.com/libp2p/js-libp2p/commit/1c086c94bb594ba0e68b2e0e290afd0093d6820c)) +* The following workspace dependencies were updated + * devDependencies + * libp2p bumped from ^1.4.1 to ^1.4.2 + ## [4.0.27](https://github.com/libp2p/js-libp2p/compare/webrtc-v4.0.26...webrtc-v4.0.27) (2024-04-15) diff --git a/packages/transport-webrtc/README.md b/packages/transport-webrtc/README.md index 655ff3ccf7..24c7f89ac3 100644 --- a/packages/transport-webrtc/README.md +++ b/packages/transport-webrtc/README.md @@ -235,8 +235,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-webrtc/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-webrtc/LICENSE-MIT) / ) # Contribution diff --git a/packages/transport-webrtc/package.json b/packages/transport-webrtc/package.json index beead6aaaf..42bf7414db 100644 --- a/packages/transport-webrtc/package.json +++ b/packages/transport-webrtc/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/webrtc", - "version": "4.0.27", + "version": "4.0.29", "description": "A libp2p transport using WebRTC connections", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-webrtc#readme", @@ -43,7 +43,6 @@ "test:node": "aegir test -t node --cov", "test:chrome": "aegir test -t browser --cov", "test:firefox": "aegir test -t browser -- --browser firefox", - "test:electron-main": "aegir test -t electron-main", "lint": "aegir lint", "lint:fix": "aegir lint --fix", "clean": "aegir clean", @@ -52,10 +51,10 @@ }, "dependencies": { "@chainsafe/libp2p-noise": "^15.0.0", - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/peer-id": "^4.0.10", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/peer-id": "^4.1.0", + "@libp2p/utils": "^5.3.2", "@multiformats/mafmt": "^12.1.6", "@multiformats/multiaddr": "^12.2.1", "@multiformats/multiaddr-matcher": "^1.2.0", @@ -66,7 +65,7 @@ "it-stream-types": "^2.0.1", "multiformats": "^13.1.0", "multihashes": "^4.0.3", - "node-datachannel": "^0.6.0", + "node-datachannel": "^0.7.0", "p-defer": "^4.0.1", "p-event": "^6.0.1", "p-timeout": "^6.1.2", @@ -78,11 +77,11 @@ }, "devDependencies": { "@chainsafe/libp2p-yamux": "^6.0.2", - "@libp2p/circuit-relay-v2": "^1.0.20", - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", - "@libp2p/websockets": "^8.0.20", + "@libp2p/circuit-relay-v2": "^1.0.21", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", + "@libp2p/websockets": "^8.0.21", "@types/sinon": "^17.0.3", "aegir": "^42.2.5", "delay": "^6.0.0", @@ -92,7 +91,7 @@ "it-pair": "^2.0.6", "it-pipe": "^3.0.1", "it-to-buffer": "^4.0.5", - "libp2p": "^1.4.1", + "libp2p": "^1.4.3", "p-retry": "^6.2.0", "protons": "^7.5.0", "sinon": "^17.0.1", diff --git a/packages/transport-webrtc/src/private-to-private/transport.ts b/packages/transport-webrtc/src/private-to-private/transport.ts index 7b10bae2a1..dccb746bc8 100644 --- a/packages/transport-webrtc/src/private-to-private/transport.ts +++ b/packages/transport-webrtc/src/private-to-private/transport.ts @@ -6,7 +6,7 @@ import { WebRTC } from '@multiformats/multiaddr-matcher' import { codes } from '../error.js' import { WebRTCMultiaddrConnection } from '../maconn.js' import { DataChannelMuxerFactory } from '../muxer.js' -import { cleanup, RTCPeerConnection } from '../webrtc/index.js' +import { RTCPeerConnection } from '../webrtc/index.js' import { initiateConnection } from './initiate-connection.js' import { WebRTCPeerListener } from './listener.js' import { handleIncomingStream } from './signaling-stream-handler.js' @@ -87,7 +87,6 @@ export class WebRTCTransport implements Transport, Startable { async stop (): Promise { await this.components.registrar.unhandle(SIGNALING_PROTO_ID) - cleanup() this._started = false } diff --git a/packages/transport-webrtc/src/webrtc/index.browser.ts b/packages/transport-webrtc/src/webrtc/index.browser.ts index 4e746e6f9a..76e9ee21cc 100644 --- a/packages/transport-webrtc/src/webrtc/index.browser.ts +++ b/packages/transport-webrtc/src/webrtc/index.browser.ts @@ -1,4 +1,3 @@ export const RTCPeerConnection = globalThis.RTCPeerConnection export const RTCSessionDescription = globalThis.RTCSessionDescription export const RTCIceCandidate = globalThis.RTCIceCandidate -export function cleanup (): void {} diff --git a/packages/transport-webrtc/src/webrtc/index.ts b/packages/transport-webrtc/src/webrtc/index.ts index 2487a68022..3f1bd1580e 100644 --- a/packages/transport-webrtc/src/webrtc/index.ts +++ b/packages/transport-webrtc/src/webrtc/index.ts @@ -1,7 +1 @@ -import node from 'node-datachannel' - export { RTCSessionDescription, RTCIceCandidate, RTCPeerConnection } from 'node-datachannel/polyfill' - -export function cleanup (): void { - node.cleanup() -} diff --git a/packages/transport-websockets/CHANGELOG.md b/packages/transport-websockets/CHANGELOG.md index c8e070d9a9..438b3733ec 100644 --- a/packages/transport-websockets/CHANGELOG.md +++ b/packages/transport-websockets/CHANGELOG.md @@ -70,6 +70,24 @@ * devDependencies * @libp2p/interface-compliance-tests bumped from ^5.3.0 to ^5.3.1 +## [8.0.21](https://github.com/libp2p/js-libp2p/compare/websockets-v8.0.20...websockets-v8.0.21) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/interface-compliance-tests bumped from ^5.4.1 to ^5.4.2 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + ## [8.0.20](https://github.com/libp2p/js-libp2p/compare/websockets-v8.0.19...websockets-v8.0.20) (2024-04-15) diff --git a/packages/transport-websockets/README.md b/packages/transport-websockets/README.md index 326fe971cc..0bee4634cd 100644 --- a/packages/transport-websockets/README.md +++ b/packages/transport-websockets/README.md @@ -101,8 +101,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-websockets/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-websockets/LICENSE-MIT) / ) # Contribution diff --git a/packages/transport-websockets/package.json b/packages/transport-websockets/package.json index 7af37b84f0..6ea6c119dc 100644 --- a/packages/transport-websockets/package.json +++ b/packages/transport-websockets/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/websockets", - "version": "8.0.20", + "version": "8.0.21", "description": "JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport spec", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-websockets#readme", @@ -74,8 +74,8 @@ "test:electron-main": "aegir test -t electron-main -f ./dist/test/node.js --cov" }, "dependencies": { - "@libp2p/interface": "^1.2.0", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/utils": "^5.3.2", "@multiformats/mafmt": "^12.1.6", "@multiformats/multiaddr": "^12.2.1", "@multiformats/multiaddr-to-uri": "^10.0.1", @@ -86,8 +86,8 @@ "ws": "^8.16.0" }, "devDependencies": { - "@libp2p/interface-compliance-tests": "^5.4.1", - "@libp2p/logger": "^4.0.10", + "@libp2p/interface-compliance-tests": "^5.4.2", + "@libp2p/logger": "^4.0.11", "aegir": "^42.2.5", "is-loopback-addr": "^2.0.2", "it-all": "^3.0.4", diff --git a/packages/transport-webtransport/CHANGELOG.md b/packages/transport-webtransport/CHANGELOG.md index 8d3138be3e..c859cc62e5 100644 --- a/packages/transport-webtransport/CHANGELOG.md +++ b/packages/transport-webtransport/CHANGELOG.md @@ -96,6 +96,34 @@ * devDependencies * libp2p bumped from ^1.2.2 to ^1.2.3 +## [4.0.28](https://github.com/libp2p/js-libp2p/compare/webtransport-v4.0.27...webtransport-v4.0.28) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/peer-id bumped from ^4.0.10 to ^4.1.0 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + * libp2p bumped from ^1.4.2 to ^1.4.3 + +## [4.0.27](https://github.com/libp2p/js-libp2p/compare/webtransport-v4.0.26...webtransport-v4.0.27) (2024-04-16) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * libp2p bumped from ^1.4.1 to ^1.4.2 + ## [4.0.26](https://github.com/libp2p/js-libp2p/compare/webtransport-v4.0.25...webtransport-v4.0.26) (2024-04-15) diff --git a/packages/transport-webtransport/README.md b/packages/transport-webtransport/README.md index 91c6678e22..80122f6ea5 100644 --- a/packages/transport-webtransport/README.md +++ b/packages/transport-webtransport/README.md @@ -71,8 +71,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-webtransport/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/transport-webtransport/LICENSE-MIT) / ) # Contribution diff --git a/packages/transport-webtransport/go-libp2p-webtransport-server/go.mod b/packages/transport-webtransport/go-libp2p-webtransport-server/go.mod index 331b59d0d2..c27896ab74 100644 --- a/packages/transport-webtransport/go-libp2p-webtransport-server/go.mod +++ b/packages/transport-webtransport/go-libp2p-webtransport-server/go.mod @@ -81,12 +81,12 @@ require ( go.uber.org/fx v1.19.2 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.17.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.7.0 // indirect google.golang.org/protobuf v1.33.0 // indirect diff --git a/packages/transport-webtransport/go-libp2p-webtransport-server/go.sum b/packages/transport-webtransport/go-libp2p-webtransport-server/go.sum index 17a6ff4547..03d5d7fa49 100644 --- a/packages/transport-webtransport/go-libp2p-webtransport-server/go.sum +++ b/packages/transport-webtransport/go-libp2p-webtransport-server/go.sum @@ -355,8 +355,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= @@ -388,8 +388,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -426,8 +426,8 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/packages/transport-webtransport/package.json b/packages/transport-webtransport/package.json index deb1455ad0..7fa64c517c 100644 --- a/packages/transport-webtransport/package.json +++ b/packages/transport-webtransport/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/webtransport", - "version": "4.0.26", + "version": "4.0.28", "description": "JavaScript implementation of the WebTransport module that libp2p uses and that implements the interface-transport spec", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-webtransport#readme", @@ -51,8 +51,8 @@ }, "dependencies": { "@chainsafe/libp2p-noise": "^15.0.0", - "@libp2p/interface": "^1.2.0", - "@libp2p/peer-id": "^4.0.10", + "@libp2p/interface": "^1.3.0", + "@libp2p/peer-id": "^4.1.0", "@multiformats/multiaddr": "^12.2.1", "@multiformats/multiaddr-matcher": "^1.2.0", "it-stream-types": "^2.0.1", @@ -61,10 +61,10 @@ "uint8arrays": "^5.0.3" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "aegir": "^42.2.5", - "libp2p": "^1.4.1", + "libp2p": "^1.4.3", "p-defer": "^4.0.1" }, "browser": { diff --git a/packages/upnp-nat/CHANGELOG.md b/packages/upnp-nat/CHANGELOG.md index 843fb3b492..8551d8f256 100644 --- a/packages/upnp-nat/CHANGELOG.md +++ b/packages/upnp-nat/CHANGELOG.md @@ -64,6 +64,25 @@ * dependencies * @libp2p/utils bumped from ^5.2.4 to ^5.2.5 +## [1.0.19](https://github.com/libp2p/js-libp2p/compare/upnp-nat-v1.0.18...upnp-nat-v1.0.19) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/interface-internal bumped from ^1.1.0 to ^1.1.1 + * @libp2p/utils bumped from ^5.3.1 to ^5.3.2 + * devDependencies + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [1.0.18](https://github.com/libp2p/js-libp2p/compare/upnp-nat-v1.0.17...upnp-nat-v1.0.18) (2024-04-15) diff --git a/packages/upnp-nat/README.md b/packages/upnp-nat/README.md index 4f021f6de8..fa368ce826 100644 --- a/packages/upnp-nat/README.md +++ b/packages/upnp-nat/README.md @@ -71,8 +71,8 @@ $ npm i @libp2p/upnp-nat Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/upnp-nat/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/upnp-nat/LICENSE-MIT) / ) # Contribution diff --git a/packages/upnp-nat/package.json b/packages/upnp-nat/package.json index 7f69c7d2f6..36033b0c47 100644 --- a/packages/upnp-nat/package.json +++ b/packages/upnp-nat/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/upnp-nat", - "version": "1.0.18", + "version": "1.0.19", "description": "UPnP NAT hole punching", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/upnp-nat#readme", @@ -51,15 +51,15 @@ }, "dependencies": { "@achingbrain/nat-port-mapper": "^1.0.13", - "@libp2p/interface": "^1.2.0", - "@libp2p/interface-internal": "^1.1.0", - "@libp2p/utils": "^5.3.1", + "@libp2p/interface": "^1.3.0", + "@libp2p/interface-internal": "^1.1.1", + "@libp2p/utils": "^5.3.2", "@multiformats/multiaddr": "^12.2.1", "wherearewe": "^2.0.1" }, "devDependencies": { - "@libp2p/logger": "^4.0.10", - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/logger": "^4.0.11", + "@libp2p/peer-id-factory": "^4.1.0", "aegir": "^42.2.5", "sinon-ts": "^2.0.0" }, diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index b1aac064be..8e410af8ad 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -36,6 +36,23 @@ * @libp2p/logger bumped from ^4.0.2 to ^4.0.3 * @libp2p/peer-id-factory bumped from ^4.0.1 to ^4.0.2 +## [5.3.2](https://github.com/libp2p/js-libp2p/compare/utils-v5.3.1...utils-v5.3.2) (2024-04-24) + + +### Documentation + +* fix broken links in docs site ([#2497](https://github.com/libp2p/js-libp2p/issues/2497)) ([fd1f834](https://github.com/libp2p/js-libp2p/commit/fd1f8343db030d74cd08bca6a0cffda93532765f)), closes [#2423](https://github.com/libp2p/js-libp2p/issues/2423) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @libp2p/interface bumped from ^1.2.0 to ^1.3.0 + * @libp2p/logger bumped from ^4.0.10 to ^4.0.11 + * devDependencies + * @libp2p/peer-id-factory bumped from ^4.0.10 to ^4.1.0 + ## [5.3.1](https://github.com/libp2p/js-libp2p/compare/utils-v5.3.0...utils-v5.3.1) (2024-04-15) diff --git a/packages/utils/README.md b/packages/utils/README.md index adfbef4404..90bceb44b6 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -63,8 +63,8 @@ Loading this module through a script tag will make it's exports available as `Li Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/utils/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/utils/LICENSE-MIT) / ) # Contribution diff --git a/packages/utils/package.json b/packages/utils/package.json index 4764f13aad..370c157b2c 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@libp2p/utils", - "version": "5.3.1", + "version": "5.3.2", "description": "Package to aggregate shared logic and dependencies for the libp2p ecosystem", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/utils#readme", @@ -128,8 +128,8 @@ }, "dependencies": { "@chainsafe/is-ip": "^2.0.2", - "@libp2p/interface": "^1.2.0", - "@libp2p/logger": "^4.0.10", + "@libp2p/interface": "^1.3.0", + "@libp2p/logger": "^4.0.11", "@multiformats/multiaddr": "^12.2.1", "@multiformats/multiaddr-matcher": "^1.2.0", "delay": "^6.0.0", @@ -144,7 +144,7 @@ "uint8arraylist": "^2.4.8" }, "devDependencies": { - "@libp2p/peer-id-factory": "^4.0.10", + "@libp2p/peer-id-factory": "^4.1.0", "@types/netmask": "^2.0.5", "aegir": "^42.2.5", "delay": "^6.0.0",