@libp2p/circuit-relay-v2 1.0.15 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,9 @@
4
4
  * The `circuitRelayTransport` allows libp2p to dial and listen on [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
5
5
  * addresses.
6
6
  *
7
- * @example
7
+ * @example Use as a transport
8
+ *
9
+ * Configuring a transport will let you dial other circuit relay addresses.
8
10
  *
9
11
  * ```typescript
10
12
  * import { createLibp2p } from 'libp2p'
@@ -20,16 +22,19 @@
20
22
  * The `circuitRelayServer` function allows libp2p to function as a [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
21
23
  * server. This will not work in browsers.
22
24
  *
23
- * @example
25
+ * @example Use as a server
26
+ *
27
+ * Configuring a server will let you function as a network relay for other
28
+ * nodes.
24
29
  *
25
30
  * ```typescript
26
31
  * import { createLibp2p } from 'libp2p'
27
32
  * import { circuitRelayServer } from '@libp2p/circuit-relay-v2'
28
33
  *
29
34
  * const node = await createLibp2p({
30
- * services: [
35
+ * services: {
31
36
  * circuitRelay: circuitRelayServer()
32
- * ]
37
+ * }
33
38
  * })
34
39
  * ```
35
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,IAAI,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,K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yB,CAAC;IACvF,YAAY,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACxC;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,gBAAgB,CAAA"}
package/dist/src/index.js CHANGED
@@ -4,7 +4,9 @@
4
4
  * The `circuitRelayTransport` allows libp2p to dial and listen on [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
5
5
  * addresses.
6
6
  *
7
- * @example
7
+ * @example Use as a transport
8
+ *
9
+ * Configuring a transport will let you dial other circuit relay addresses.
8
10
  *
9
11
  * ```typescript
10
12
  * import { createLibp2p } from 'libp2p'
@@ -20,16 +22,19 @@
20
22
  * The `circuitRelayServer` function allows libp2p to function as a [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
21
23
  * server. This will not work in browsers.
22
24
  *
23
- * @example
25
+ * @example Use as a server
26
+ *
27
+ * Configuring a server will let you function as a network relay for other
28
+ * nodes.
24
29
  *
25
30
  * ```typescript
26
31
  * import { createLibp2p } from 'libp2p'
27
32
  * import { circuitRelayServer } from '@libp2p/circuit-relay-v2'
28
33
  *
29
34
  * const node = await createLibp2p({
30
- * services: [
35
+ * services: {
31
36
  * circuitRelay: circuitRelayServer()
32
- * ]
37
+ * }
33
38
  * })
34
39
  * ```
35
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAuBH,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAuBH,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,gBAAgB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/circuit-relay-v2",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Implementation of Circuit Relay v2",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-circuit-relay-v2#readme",
@@ -48,32 +48,33 @@
48
48
  "test:firefox": "aegir test -t browser -- --browser firefox",
49
49
  "test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
50
50
  "test:node": "aegir test -t node --cov",
51
- "dep-check": "aegir dep-check"
51
+ "dep-check": "aegir dep-check",
52
+ "doc-check": "aegir doc-check"
52
53
  },
53
54
  "dependencies": {
54
- "@libp2p/interface": "^1.1.3",
55
- "@libp2p/interface-internal": "^1.0.8",
56
- "@libp2p/peer-collections": "^5.1.6",
57
- "@libp2p/peer-id": "^4.0.6",
58
- "@libp2p/peer-record": "^7.0.9",
59
- "@libp2p/utils": "^5.2.5",
55
+ "@libp2p/interface": "^1.1.4",
56
+ "@libp2p/interface-internal": "^1.0.9",
57
+ "@libp2p/peer-collections": "^5.1.7",
58
+ "@libp2p/peer-id": "^4.0.7",
59
+ "@libp2p/peer-record": "^7.0.10",
60
+ "@libp2p/utils": "^5.2.6",
60
61
  "@multiformats/mafmt": "^12.1.6",
61
62
  "@multiformats/multiaddr": "^12.1.14",
62
63
  "any-signal": "^4.1.1",
63
64
  "it-protobuf-stream": "^1.1.2",
64
65
  "it-stream-types": "^2.0.1",
65
- "multiformats": "^13.0.1",
66
+ "multiformats": "^13.1.0",
66
67
  "p-defer": "^4.0.0",
67
68
  "p-retry": "^6.2.0",
68
69
  "protons-runtime": "^5.4.0",
69
70
  "uint8arraylist": "^2.4.8",
70
- "uint8arrays": "^5.0.1"
71
+ "uint8arrays": "^5.0.2"
71
72
  },
72
73
  "devDependencies": {
73
- "@libp2p/interface-compliance-tests": "^5.3.1",
74
- "@libp2p/logger": "^4.0.6",
75
- "@libp2p/peer-id-factory": "^4.0.6",
76
- "aegir": "^42.2.3",
74
+ "@libp2p/interface-compliance-tests": "^5.3.2",
75
+ "@libp2p/logger": "^4.0.7",
76
+ "@libp2p/peer-id-factory": "^4.0.7",
77
+ "aegir": "^42.2.4",
77
78
  "delay": "^6.0.0",
78
79
  "it-drain": "^3.0.5",
79
80
  "it-pair": "^2.0.6",
package/src/index.ts CHANGED
@@ -4,7 +4,9 @@
4
4
  * The `circuitRelayTransport` allows libp2p to dial and listen on [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
5
5
  * addresses.
6
6
  *
7
- * @example
7
+ * @example Use as a transport
8
+ *
9
+ * Configuring a transport will let you dial other circuit relay addresses.
8
10
  *
9
11
  * ```typescript
10
12
  * import { createLibp2p } from 'libp2p'
@@ -20,16 +22,19 @@
20
22
  * The `circuitRelayServer` function allows libp2p to function as a [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
21
23
  * server. This will not work in browsers.
22
24
  *
23
- * @example
25
+ * @example Use as a server
26
+ *
27
+ * Configuring a server will let you function as a network relay for other
28
+ * nodes.
24
29
  *
25
30
  * ```typescript
26
31
  * import { createLibp2p } from 'libp2p'
27
32
  * import { circuitRelayServer } from '@libp2p/circuit-relay-v2'
28
33
  *
29
34
  * const node = await createLibp2p({
30
- * services: [
35
+ * services: {
31
36
  * circuitRelay: circuitRelayServer()
32
- * ]
37
+ * }
33
38
  * })
34
39
  * ```
35
40
  */