@libp2p/circuit-relay-v2 1.0.15-bedfd0aa2 → 1.0.15-f0d2b52d0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ # @libp2p/circuit-relay-v2
2
+
1
3
  [![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
2
4
  [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
3
5
  [![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)
@@ -7,10 +9,27 @@
7
9
 
8
10
  # About
9
11
 
12
+ <!--
13
+
14
+ !IMPORTANT!
15
+
16
+ Everything in this README between "# About" and "# Install" is automatically
17
+ generated and will be overwritten the next time the doc generator is run.
18
+
19
+ To make changes to this section, please update the @packageDocumentation section
20
+ of src/index.js or src/index.ts
21
+
22
+ To experiment with formatting, please run "npm run docs" from the root of this
23
+ repo and examine the changes made.
24
+
25
+ -->
26
+
10
27
  The `circuitRelayTransport` allows libp2p to dial and listen on [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
11
28
  addresses.
12
29
 
13
- ## Example
30
+ ## Example - Use as a transport
31
+
32
+ Configuring a transport will let you dial other circuit relay addresses.
14
33
 
15
34
  ```typescript
16
35
  import { createLibp2p } from 'libp2p'
@@ -26,16 +45,19 @@ const node = await createLibp2p({
26
45
  The `circuitRelayServer` function allows libp2p to function as a [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
27
46
  server. This will not work in browsers.
28
47
 
29
- ## Example
48
+ ## Example - Use as a server
49
+
50
+ Configuring a server will let you function as a network relay for other
51
+ nodes.
30
52
 
31
53
  ```typescript
32
54
  import { createLibp2p } from 'libp2p'
33
55
  import { circuitRelayServer } from '@libp2p/circuit-relay-v2'
34
56
 
35
57
  const node = await createLibp2p({
36
- services: [
58
+ services: {
37
59
  circuitRelay: circuitRelayServer()
38
- ]
60
+ }
39
61
  })
40
62
  ```
41
63
 
@@ -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,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,m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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-bedfd0aa2",
3
+ "version": "1.0.15-f0d2b52d0",
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-bedfd0aa2",
55
- "@libp2p/interface-internal": "1.0.8-bedfd0aa2",
56
- "@libp2p/peer-collections": "5.1.6-bedfd0aa2",
57
- "@libp2p/peer-id": "4.0.6-bedfd0aa2",
58
- "@libp2p/peer-record": "7.0.9-bedfd0aa2",
59
- "@libp2p/utils": "5.2.5-bedfd0aa2",
55
+ "@libp2p/interface": "1.1.3-f0d2b52d0",
56
+ "@libp2p/interface-internal": "1.0.8-f0d2b52d0",
57
+ "@libp2p/peer-collections": "5.1.6-f0d2b52d0",
58
+ "@libp2p/peer-id": "4.0.6-f0d2b52d0",
59
+ "@libp2p/peer-record": "7.0.9-f0d2b52d0",
60
+ "@libp2p/utils": "5.2.5-f0d2b52d0",
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-bedfd0aa2",
74
- "@libp2p/logger": "4.0.6-bedfd0aa2",
75
- "@libp2p/peer-id-factory": "4.0.6-bedfd0aa2",
76
- "aegir": "^42.2.3",
74
+ "@libp2p/interface-compliance-tests": "5.3.1-f0d2b52d0",
75
+ "@libp2p/logger": "4.0.6-f0d2b52d0",
76
+ "@libp2p/peer-id-factory": "4.0.6-f0d2b52d0",
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
  */