@libp2p/webrtc 4.0.19 → 4.0.20-f71bc49bd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -8
- package/dist/index.min.js +5 -5
- package/dist/src/index.d.ts +21 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +21 -8
- package/dist/src/index.js.map +1 -1
- package/package.json +17 -16
- package/src/index.ts +21 -8
- package/dist/typedoc-urls.json +0 -8
package/dist/src/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
*
|
|
8
|
-
* ```
|
|
8
|
+
* ```TypeScript
|
|
9
9
|
* import { createLibp2p } from 'libp2p'
|
|
10
10
|
* import { noise } from '@chainsafe/libp2p-noise'
|
|
11
11
|
* import { multiaddr } from '@multiformats/multiaddr'
|
|
@@ -15,17 +15,30 @@
|
|
|
15
15
|
* import { webRTC } from '@libp2p/webrtc'
|
|
16
16
|
*
|
|
17
17
|
* const node = await createLibp2p({
|
|
18
|
-
* transports: [
|
|
19
|
-
*
|
|
18
|
+
* transports: [
|
|
19
|
+
* webRTC()
|
|
20
|
+
* ],
|
|
21
|
+
* connectionEncryption: [
|
|
22
|
+
* noise()
|
|
23
|
+
* ]
|
|
20
24
|
* })
|
|
21
25
|
*
|
|
22
26
|
* await node.start()
|
|
23
27
|
*
|
|
24
|
-
* const ma =
|
|
25
|
-
* const stream = await node.dialProtocol(ma,
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
28
|
+
* const ma = multiaddr('/ip4/0.0.0.0/udp/56093/webrtc/certhash/uEiByaEfNSLBexWBNFZy_QB1vAKEj7JAXDizRs4_SnTflsQ')
|
|
29
|
+
* const stream = await node.dialProtocol(ma, '/my-protocol/1.0.0', {
|
|
30
|
+
* signal: AbortSignal.timeout(10_000)
|
|
31
|
+
* })
|
|
32
|
+
*
|
|
33
|
+
* await pipe(
|
|
34
|
+
* [fromString(`Hello js-libp2p-webrtc\n`)],
|
|
35
|
+
* stream,
|
|
36
|
+
* async function (source) {
|
|
37
|
+
* for await (const buf of source) {
|
|
38
|
+
* console.info(toString(buf.subarray()))
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* )
|
|
29
42
|
* ```
|
|
30
43
|
*/
|
|
31
44
|
import { type WebRTCTransportDirectInit, type WebRTCDirectTransportComponents } from './private-to-public/transport.js';
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,EAAyB,KAAK,yBAAyB,EAAE,KAAK,+BAA+B,EAAE,MAAM,kCAAkC,CAAA;AAC9I,OAAO,KAAK,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AACvG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;;;OAIG;IACH,6BAA6B,CAAC,EAAE,MAAM,CAAA;IAEtC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,iBAAS,YAAY,CAAE,IAAI,CAAC,EAAE,yBAAyB,GAAG,CAAC,UAAU,EAAE,+BAA+B,KAAK,SAAS,CAEnH;AAED;;;;;;;;GAQG;AACH,iBAAS,MAAM,CAAE,IAAI,CAAC,EAAE,mBAAmB,GAAG,CAAC,UAAU,EAAE,yBAAyB,KAAK,SAAS,CAEjG;AAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
*
|
|
8
|
-
* ```
|
|
8
|
+
* ```TypeScript
|
|
9
9
|
* import { createLibp2p } from 'libp2p'
|
|
10
10
|
* import { noise } from '@chainsafe/libp2p-noise'
|
|
11
11
|
* import { multiaddr } from '@multiformats/multiaddr'
|
|
@@ -15,17 +15,30 @@
|
|
|
15
15
|
* import { webRTC } from '@libp2p/webrtc'
|
|
16
16
|
*
|
|
17
17
|
* const node = await createLibp2p({
|
|
18
|
-
* transports: [
|
|
19
|
-
*
|
|
18
|
+
* transports: [
|
|
19
|
+
* webRTC()
|
|
20
|
+
* ],
|
|
21
|
+
* connectionEncryption: [
|
|
22
|
+
* noise()
|
|
23
|
+
* ]
|
|
20
24
|
* })
|
|
21
25
|
*
|
|
22
26
|
* await node.start()
|
|
23
27
|
*
|
|
24
|
-
* const ma =
|
|
25
|
-
* const stream = await node.dialProtocol(ma,
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
28
|
+
* const ma = multiaddr('/ip4/0.0.0.0/udp/56093/webrtc/certhash/uEiByaEfNSLBexWBNFZy_QB1vAKEj7JAXDizRs4_SnTflsQ')
|
|
29
|
+
* const stream = await node.dialProtocol(ma, '/my-protocol/1.0.0', {
|
|
30
|
+
* signal: AbortSignal.timeout(10_000)
|
|
31
|
+
* })
|
|
32
|
+
*
|
|
33
|
+
* await pipe(
|
|
34
|
+
* [fromString(`Hello js-libp2p-webrtc\n`)],
|
|
35
|
+
* stream,
|
|
36
|
+
* async function (source) {
|
|
37
|
+
* for await (const buf of source) {
|
|
38
|
+
* console.info(toString(buf.subarray()))
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* )
|
|
29
42
|
* ```
|
|
30
43
|
*/
|
|
31
44
|
import { WebRTCTransport } from './private-to-private/transport.js';
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAwE,MAAM,kCAAkC,CAAA;AA4C9I;;;;;;;GAOG;AACH,SAAS,YAAY,CAAE,IAAgC;IACrD,OAAO,CAAC,UAA2C,EAAE,EAAE,CAAC,IAAI,qBAAqB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;AACrG,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,MAAM,CAAE,IAA0B;IACzC,OAAO,CAAC,UAAqC,EAAE,EAAE,CAAC,IAAI,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;AACzF,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/webrtc",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.20-f71bc49bd",
|
|
4
4
|
"description": "A libp2p transport using WebRTC connections",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-webrtc#readme",
|
|
@@ -46,14 +46,15 @@
|
|
|
46
46
|
"lint": "aegir lint",
|
|
47
47
|
"lint:fix": "aegir lint --fix",
|
|
48
48
|
"clean": "aegir clean",
|
|
49
|
-
"dep-check": "aegir dep-check"
|
|
49
|
+
"dep-check": "aegir dep-check",
|
|
50
|
+
"doc-check": "aegir doc-check"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
53
|
"@chainsafe/libp2p-noise": "^15.0.0",
|
|
53
|
-
"@libp2p/interface": "
|
|
54
|
-
"@libp2p/interface-internal": "
|
|
55
|
-
"@libp2p/peer-id": "
|
|
56
|
-
"@libp2p/utils": "
|
|
54
|
+
"@libp2p/interface": "1.1.4-f71bc49bd",
|
|
55
|
+
"@libp2p/interface-internal": "1.0.9-f71bc49bd",
|
|
56
|
+
"@libp2p/peer-id": "4.0.7-f71bc49bd",
|
|
57
|
+
"@libp2p/utils": "5.2.6-f71bc49bd",
|
|
57
58
|
"@multiformats/mafmt": "^12.1.6",
|
|
58
59
|
"@multiformats/multiaddr": "^12.1.14",
|
|
59
60
|
"@multiformats/multiaddr-matcher": "^1.1.2",
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
"it-protobuf-stream": "^1.1.2",
|
|
63
64
|
"it-pushable": "^3.2.3",
|
|
64
65
|
"it-stream-types": "^2.0.1",
|
|
65
|
-
"multiformats": "^13.0
|
|
66
|
+
"multiformats": "^13.1.0",
|
|
66
67
|
"multihashes": "^4.0.3",
|
|
67
68
|
"node-datachannel": "^0.5.3",
|
|
68
69
|
"p-defer": "^4.0.0",
|
|
@@ -72,17 +73,17 @@
|
|
|
72
73
|
"race-signal": "^1.0.2",
|
|
73
74
|
"react-native-webrtc": "^118.0.1",
|
|
74
75
|
"uint8arraylist": "^2.4.8",
|
|
75
|
-
"uint8arrays": "^5.0.
|
|
76
|
+
"uint8arrays": "^5.0.2"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
|
-
"@chainsafe/libp2p-yamux": "^6.0.
|
|
79
|
-
"@libp2p/circuit-relay-v2": "
|
|
80
|
-
"@libp2p/interface-compliance-tests": "
|
|
81
|
-
"@libp2p/logger": "
|
|
82
|
-
"@libp2p/peer-id-factory": "
|
|
83
|
-
"@libp2p/websockets": "
|
|
79
|
+
"@chainsafe/libp2p-yamux": "^6.0.2",
|
|
80
|
+
"@libp2p/circuit-relay-v2": "1.0.16-f71bc49bd",
|
|
81
|
+
"@libp2p/interface-compliance-tests": "5.3.2-f71bc49bd",
|
|
82
|
+
"@libp2p/logger": "4.0.7-f71bc49bd",
|
|
83
|
+
"@libp2p/peer-id-factory": "4.0.7-f71bc49bd",
|
|
84
|
+
"@libp2p/websockets": "8.0.16-f71bc49bd",
|
|
84
85
|
"@types/sinon": "^17.0.3",
|
|
85
|
-
"aegir": "^42.2.
|
|
86
|
+
"aegir": "^42.2.4",
|
|
86
87
|
"delay": "^6.0.0",
|
|
87
88
|
"it-drain": "^3.0.5",
|
|
88
89
|
"it-length": "^3.0.4",
|
|
@@ -90,7 +91,7 @@
|
|
|
90
91
|
"it-pair": "^2.0.6",
|
|
91
92
|
"it-pipe": "^3.0.1",
|
|
92
93
|
"it-to-buffer": "^4.0.5",
|
|
93
|
-
"libp2p": "
|
|
94
|
+
"libp2p": "1.2.4-f71bc49bd",
|
|
94
95
|
"p-retry": "^6.2.0",
|
|
95
96
|
"protons": "^7.5.0",
|
|
96
97
|
"sinon": "^17.0.1",
|
package/src/index.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
*
|
|
8
|
-
* ```
|
|
8
|
+
* ```TypeScript
|
|
9
9
|
* import { createLibp2p } from 'libp2p'
|
|
10
10
|
* import { noise } from '@chainsafe/libp2p-noise'
|
|
11
11
|
* import { multiaddr } from '@multiformats/multiaddr'
|
|
@@ -15,17 +15,30 @@
|
|
|
15
15
|
* import { webRTC } from '@libp2p/webrtc'
|
|
16
16
|
*
|
|
17
17
|
* const node = await createLibp2p({
|
|
18
|
-
* transports: [
|
|
19
|
-
*
|
|
18
|
+
* transports: [
|
|
19
|
+
* webRTC()
|
|
20
|
+
* ],
|
|
21
|
+
* connectionEncryption: [
|
|
22
|
+
* noise()
|
|
23
|
+
* ]
|
|
20
24
|
* })
|
|
21
25
|
*
|
|
22
26
|
* await node.start()
|
|
23
27
|
*
|
|
24
|
-
* const ma =
|
|
25
|
-
* const stream = await node.dialProtocol(ma,
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
28
|
+
* const ma = multiaddr('/ip4/0.0.0.0/udp/56093/webrtc/certhash/uEiByaEfNSLBexWBNFZy_QB1vAKEj7JAXDizRs4_SnTflsQ')
|
|
29
|
+
* const stream = await node.dialProtocol(ma, '/my-protocol/1.0.0', {
|
|
30
|
+
* signal: AbortSignal.timeout(10_000)
|
|
31
|
+
* })
|
|
32
|
+
*
|
|
33
|
+
* await pipe(
|
|
34
|
+
* [fromString(`Hello js-libp2p-webrtc\n`)],
|
|
35
|
+
* stream,
|
|
36
|
+
* async function (source) {
|
|
37
|
+
* for await (const buf of source) {
|
|
38
|
+
* console.info(toString(buf.subarray()))
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* )
|
|
29
42
|
* ```
|
|
30
43
|
*/
|
|
31
44
|
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"DataChannelOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.DataChannelOptions.html",
|
|
3
|
-
".:DataChannelOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.DataChannelOptions.html",
|
|
4
|
-
"webRTC": "https://libp2p.github.io/js-libp2p/functions/_libp2p_webrtc.webRTC.html",
|
|
5
|
-
".:webRTC": "https://libp2p.github.io/js-libp2p/functions/_libp2p_webrtc.webRTC.html",
|
|
6
|
-
"webRTCDirect": "https://libp2p.github.io/js-libp2p/functions/_libp2p_webrtc.webRTCDirect.html",
|
|
7
|
-
".:webRTCDirect": "https://libp2p.github.io/js-libp2p/functions/_libp2p_webrtc.webRTCDirect.html"
|
|
8
|
-
}
|