Skip to content

Commit dd251c5

Browse files
authored
docs: repair broken links (#3411)
Links can be checked in the future by using https://lychee.cli.rs/ lychee -q '**/*.md' '**/*.ts'
1 parent 82c3c9e commit dd251c5

File tree

50 files changed

+131
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+131
-82
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ yarn.lock
1010
interop/*-image.json
1111
.tmp-compiled-docs
1212
tsconfig-doc-check.aegir.json
13+
.lycheecache

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ List of packages currently in existence for libp2p
187187
<a href="https://hoprnet.org/"><img width="150" src="https://github.com/hoprnet/hopr-assets/blob/master/v1/logo/hopr_logo_padded.png?raw=true" alt="HOPR Logo" /></a>
188188
<a href="https://helia.io/"><img src="https://raw.githubusercontent.com/ipfs/helia/main/assets/helia.png" alt="Helia (IPFS in JavaScript) logo" width="150" /></a>
189189
<a href="https://github.com/orbitdb/orbitdb"><img src="https://avatars.githubusercontent.com/u/25079463?s=200&v=4" alt="OrbitDB logo" width="150" /></a>
190-
<a href="https://peerbit.org/"><img src="https://peerbit.org/peerbit-logo.png" alt="Peerbit logo" width="150" /></a>
191-
<a href="https://blog.topology.gg/"><img src="https://avatars.githubusercontent.com/u/157637200" alt="Topology logo" width="150" /></a>
190+
<a href="https://peerbit.org/"><img src="https://www.peerbit.org/content/docs/peerbit-logo.png" alt="Peerbit logo" width="150" /></a>
192191
</p>
193192
</div>
194193

doc/CONFIGURATION.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ Some available transports are:
7676
- [@libp2p/websockets](https://github.com/libp2p/js-libp2p/tree/main/packages/transport-websockets)
7777
- [@libp2p/webtransport](https://github.com/libp2p/js-libp2p/tree/main/packages/transport-webtransport)
7878

79-
If none of the available transports fulfils your needs, you can create a libp2p compatible transport. A libp2p transport just needs to be compliant with the [Transport Interface](https://github.com/libp2p/js-libp2p/tree/main/packages/interface/src/transport).
79+
If none of the available transports fulfils your needs, you can create a libp2p compatible transport. A libp2p transport just needs to be compliant with the [Transport Interface](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/transport.ts).
8080

8181
If you want to know more about libp2p transports, you should read the following content:
8282

83-
- https://docs.libp2p.io/concepts/transports/overview
83+
- https://libp2p.io/docs/transports-overview/
8484
- https://github.com/libp2p/specs/tree/master/connections
8585

8686
### Stream Multiplexing
@@ -93,7 +93,7 @@ Some available stream multiplexers are:
9393

9494
Some transports such as WebRTC and WebTransport come with their own built-in stream multiplexing capabilities.
9595

96-
If none of the available stream multiplexers fulfills your needs, you can create a libp2p compatible stream multiplexer. A libp2p multiplexer just needs to be compliant with the [Stream Muxer Interface](https://github.com/libp2p/js-libp2p/tree/main/packages/interface/src/stream-muxer).
96+
If none of the available stream multiplexers fulfills your needs, you can create a libp2p compatible stream multiplexer. A libp2p multiplexer just needs to be compliant with the [Stream Muxer Interface](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/stream-muxer.ts).
9797

9898
If you want to know more about libp2p stream multiplexing, you should read the following content:
9999

@@ -112,13 +112,13 @@ If you configure multiple muxers for use in your application, js-libp2p will cho
112112
Some available connection encryption protocols:
113113

114114
- [@chainsafe/libp2p-noise](https://github.com/chainsafe/js-libp2p-noise)
115-
- [@libp2p/plaintext](https://github.com/libp2p/js-libp2p/blob/main/src/packages/connection-encrypter-plaintext/index.ts) (Not for production use)
115+
- [@libp2p/plaintext](https://github.com/libp2p/js-libp2p/blob/main/packages/connection-encrypter-plaintext/src/index.ts) (Not for production use)
116116

117-
If none of the available connection encryption mechanisms fulfills your needs, you can create a libp2p compatible one. A libp2p connection encryption protocol just needs to be compliant with the [Connection Encrypter Interface](https://github.com/libp2p/js-libp2p/tree/main/packages/interface/src/connection-encrypter).
117+
If none of the available connection encryption mechanisms fulfills your needs, you can create a libp2p compatible one. A libp2p connection encryption protocol just needs to be compliant with the [Connection Encrypter Interface](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/connection-encrypter.ts).
118118

119119
If you want to know more about libp2p connection encryption, you should read the following content:
120120

121-
- https://docs.libp2p.io/concepts/secure-comms
121+
- https://libp2p.io/docs/secure-channels-overview/
122122
- https://github.com/libp2p/specs/tree/master/connections
123123

124124
### Peer Discovery
@@ -132,7 +132,7 @@ Some available peer discovery modules are:
132132
- [@libp2p/bootstrap](https://github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap) (typically used together with @libp2p/kad-dht)
133133
- [@chainsafe/discv5](https://github.com/chainsafe/discv5) ([spec](https://github.com/ethereum/devp2p/blob/master/discv5/discv5.md))
134134

135-
If none of the available peer discovery protocols fulfills your needs, you can create a libp2p compatible one. A libp2p peer discovery protocol just needs to be compliant with the [Peer Discovery Interface](https://github.com/libp2p/js-libp2p/tree/main/packages/interface/src/peer-discovery).
135+
If none of the available peer discovery protocols fulfills your needs, you can create a libp2p compatible one. A libp2p peer discovery protocol just needs to be compliant with the [Peer Discovery Interface](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/peer-discovery.ts).
136136

137137
### Content Routing
138138

@@ -148,7 +148,7 @@ Some available content routing modules are:
148148
> The `@helia/delegated-routing-v1-http-api-client` module is a client for the [IPFS Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/). It is not a libp2p module, but it can be used in conjunction with libp2p to provide content and peer routing functionality.
149149
> For most purposes, `@helia/delegated-routing-v1-http-api-client` should be favoured over `@libp2p/delegated-content-routing` for delegated routing, as it is more broadly adopted by the ecosystem and doesn't rely on Kubo specific APIs.
150150
151-
If none of the available content routing protocols fulfil your needs, you can create a libp2p compatible one. A libp2p content routing protocol just needs to be compliant with the [Content Routing Interface](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/content-routing/index.ts).
151+
If none of the available content routing protocols fulfil your needs, you can create a libp2p compatible one. A libp2p content routing protocol just needs to be compliant with the [Content Routing Interface](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/content-routing.ts).
152152

153153

154154
### Peer Routing
@@ -160,7 +160,7 @@ Some available peer routing modules are:
160160
- [@libp2p/kad-dht](https://github.com/libp2p/js-libp2p/tree/main/packages/kad-dht)
161161
- [@helia/delegated-routing-v1-http-api-client](https://github.com/ipfs/helia-delegated-routing-v1-http-api)
162162
- [@libp2p/delegated-peer-routing](https://github.com/libp2p/js-libp2p-delegated-peer-routing)
163-
If none of the available peer routing protocols fulfills your needs, you can create a libp2p compatible one. A libp2p peer routing protocol just needs to be compliant with the [Peer Routing Interface](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/peer-routing/index.ts).
163+
If none of the available peer routing protocols fulfills your needs, you can create a libp2p compatible one. A libp2p peer routing protocol just needs to be compliant with the [Peer Routing Interface](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/peer-routing.ts).
164164

165165
> [!NOTE]
166166
> The `@helia/delegated-routing-v1-http-api-client` module is a client for the [IPFS Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/). It is not a libp2p module, but it can be used in conjunction with libp2p to provide content and peer routing functionality.
@@ -319,7 +319,7 @@ This means that pubsub requires the identify service to be configured in order t
319319
Potential methods for discovering peers include:
320320

321321
- [Distributed hash tables](#dht)
322-
- [Local network broadcasts](https://docs.libp2p.io/concepts/discovery-routing/mdns/)
322+
- [Local network broadcasts](https://libp2p.io/docs/mdns/)
323323
- [Centralized trackers or rendezvous points](https://docs.libp2p.io/concepts/discovery-routing/rendezvous/)
324324
- [Lists of bootstrap peers](https://github.com/ipfs/helia/blob/main/packages/helia/src/utils/bootstrappers.ts)
325325

@@ -579,7 +579,7 @@ const node = await createLibp2p({
579579

580580
The Connection Manager manages connections to peers in libp2p. It controls opening closing connections but also pruning connections when certain limits are exceeded. If Metrics are enabled, you can also configure the Connection Manager to monitor the bandwidth of libp2p and prune connections as needed. You can read more about what Connection Manager does at [./CONNECTION_MANAGER.md](https://libp2p.github.io/js-libp2p-interfaces/modules/_libp2p_interface_connection_manager.html). The configuration values below show the defaults for Connection Manager.
581581

582-
See the [API docs](https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html) for a full run list and discussion of all Connection Manager options.
582+
See the [API docs](https://libp2p.github.io/js-libp2p/modules/_libp2p_interface-internal.html) for a full run list and discussion of all Connection Manager options.
583583

584584

585585
```js

doc/GETTING_STARTED.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For more info on enabling ES modules in Node, see [this guide](https://nodejs.or
5555

5656
### Basic setup
5757

58-
Now that we have libp2p installed, let's configure the minimum needed to get your node running. The only modules libp2p requires are a [**Transport**][transport] and [**Crypto**][crypto] module. However, we recommend that a basic setup should also have a [**Stream Multiplexer**](streamMuxer) configured, which we will explain shortly. Let's start by setting up a Transport.
58+
Now that we have libp2p installed, let's configure the minimum needed to get your node running. The only modules libp2p requires are a [**Transport**][transport] and [**Crypto**][crypto] module. However, we recommend that a basic setup should also have a [**Stream Multiplexer**][streamMuxer] configured, which we will explain shortly. Let's start by setting up a Transport.
5959

6060
#### Transports
6161

@@ -115,7 +115,7 @@ const node = await createLibp2p({
115115
<details><summary>Read More</summary>
116116
If you want to know more about libp2p connection encryption, you should read the following content:
117117

118-
- https://docs.libp2p.io/concepts/secure-comms
118+
- https://libp2p.io/docs/secure-channels-overview/
119119
- https://github.com/libp2p/specs/tree/master/connections
120120
</details>
121121

@@ -154,7 +154,7 @@ If you want to know more about libp2p stream multiplexing, you should read the f
154154

155155
#### Running Libp2p
156156

157-
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.
157+
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.
158158

159159
```ts
160160
import { createLibp2p } from 'libp2p'
@@ -337,6 +337,6 @@ There are a lot of other concepts within `libp2p`, that are not covered in this
337337
- [libp2p Connectivity](https://connectivity.libp2p.io/) — Interoperability matrix across libp2p implementations
338338
- [Universal Connectivity](https://github.com/libp2p/universal-connectivity) — Demo application showcasing cross-implementation connectivity
339339

340-
[transport]: https://github.com/libp2p/js-libp2p/tree/main/packages/interface/src/transport
341-
[crypto]: https://github.com/libp2p/js-libp2p/tree/main/packages/interface/src/crypto
342-
[streamMuxer]: https://github.com/libp2p/js-libp2p/tree/main/packages/interface/src/stream-muxer
340+
[transport]: https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/transport.ts
341+
[crypto]: https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/keys.ts
342+
[streamMuxer]: https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/stream-muxer.ts

doc/METRICS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Although designed to primarily integrate with tools such as [Prometheus](https:/
2626

2727
### Enable metrics
2828

29-
First enable metrics tracking by supplying a [Metrics](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/metrics/index.ts#L150) implementation:
29+
First enable metrics tracking by supplying a [Metrics](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/metrics.ts) implementation:
3030

3131
```TypeScript
3232
import { createLibp2p } from 'libp2p'
@@ -182,7 +182,7 @@ stopTimer()
182182

183183
## Extracting metrics
184184

185-
Metrics implementations will allow extracting the values for presentation in an external system. For example here is how to use the metrics implementation from `@libp2p/prometheus-metrics` to enable scraping stats to display in [Prometheus](https://prometheus.io/) or a [Graphana](https://grafana.com/) dashboard. For more information, you can view our [Prometheus Metrics Docs](https://libp2p.github.io/js-libp2p/modules/_libp2p_prometheus_metrics.html)
185+
Metrics implementations will allow extracting the values for presentation in an external system. For example here is how to use the metrics implementation from `@libp2p/prometheus-metrics` to enable scraping stats to display in [Prometheus](https://prometheus.io/) or a [Graphana](https://grafana.com/) dashboard. For more information, you can view our [Prometheus Metrics Docs](https://libp2p.github.io/js-libp2p/modules/_libp2p_prometheus-metrics.html)
186186

187187

188188
```TypeScript

doc/SERVICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ Adding these strings to your service dependencies will cause starting libp2p to
337337

338338
| Dependency | Implementations | Notes |
339339
| -------- | ------- | ------- |
340-
| `@libp2p/identify` | `@libp2p/identify` | You should declare this a as a dependency if your service uses the [Registrar](https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.Registrar.html) to register a network topology. |
340+
| `@libp2p/identify` | `@libp2p/identify` | You should declare this a as a dependency if your service uses the [Registrar](https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface-internal.Registrar.html) to register a network topology. |
341341
| `@libp2p/identify-push` | `@libp2p/identify` | |
342342
| `@libp2p/connection-encryption` | `@chainsafe/libp2p-noise`, `@libp2p/tls`, `@libp2p/plaintext` | |
343343
| `@libp2p/stream-multiplexing` | `@chainsafe/libp2p-yamux` | |

doc/production/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Aiming to support these type of nodes to find other peers and content in the net
4646

4747
Currently, delegate nodes must be IPFS nodes as the IPFS HTTP API is leveraged by them to make routing queries.
4848

49-
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).
49+
You can read on how to setup your own set of delegated nodes in [DELEGATE_NODES.md](https://github.com/libp2p/js-libp2p/blob/main/doc/production/DELEGATE_NODES.md).
5050

5151
## Others
5252

lychee.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# https://lychee.cli.rs/
2+
# Lychee link checker configuration
3+
# Run with: lychee -q '**/*.md' '**/*.ts'
4+
5+
# Accept 429 (Too Many Requests) - GitHub rate-limits crawlers, it doesn't
6+
# mean the link is broken
7+
# 429 = GitHub rate-limits crawlers
8+
# 403 = npm returns 403 to automated clients
9+
# 406 = some servers (e.g. bugzilla.mozilla.org) reject crawlers via content negotiation
10+
accept = [200, 429, 403, 406]
11+
12+
cache = true
13+
max_cache_age = "1d"
14+
15+
format = "compact"
16+
17+
# URL patterns to skip (regex)
18+
exclude = [
19+
# Protocol-relative URLs like //npmjs.com/package/... in markdown tables
20+
# //github.com/... badge URLs cannot be resolved by lychee
21+
"^//",
22+
23+
"mailto://",
24+
25+
# Localhost and LAN addresses used in test fixtures and example code
26+
"^http://localhost",
27+
"^http://127\\.0\\.0\\.1",
28+
"^https?://192\\.168\\.",
29+
30+
# Specific example IPs used in test code
31+
"^https?://154\\.38\\.162\\.255",
32+
33+
# pubsub package moved out of this repo
34+
"github\\.com/libp2p/js-libp2p/tree/main/packages/pubsub",
35+
]
36+
37+
# File paths/globs to exclude from scanning
38+
exclude_path = [
39+
# CHANGELOG files are auto-generated and contain GitHub comparison URLs
40+
# (e.g. .../compare/libp2p-v3.1.3...libp2p-v3.1.4) that frequently 404
41+
# as old tags get cleaned up - not worth maintaining
42+
"CHANGELOG\\.md",
43+
44+
# Migration guides document historical API changes and intentionally
45+
# reference archived/superseded repositories (js-libp2p-interfaces etc.)
46+
"doc/migrations",
47+
48+
"node_modules",
49+
]

packages/crypto/src/pbkdf2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { base64 } from 'multiformats/bases/base64'
77
/**
88
* Maps an IPFS hash name to its @noble/hashes equivalent.
99
*
10-
* See https://github.com/multiformats/multihash/blob/master/hashtable.csv
10+
* See https://github.com/multiformats/multicodec/blob/master/table.csv
1111
*
1212
* @private
1313
*/

packages/gossipsub/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# js-libp2p-gossipsub
22

33
[![](https://img.shields.io/badge/made%20by-ChainSafe-blue.svg?style=flat-square)](https://chainsafe.io/)
4-
[![Travis CI](https://flat.badgen.net/travis/ChainSafe/gossipsub-js)](https://travis-ci.com/ChainSafe/gossipsub-js)
54
![ES Version](https://img.shields.io/badge/ES-2017-yellow)
65
![Node Version](https://img.shields.io/badge/node-10.x-green)
76

0 commit comments

Comments
 (0)