@libp2p/websockets 8.0.14 → 8.0.15-b1b77adb4

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 CHANGED
@@ -5,69 +5,6 @@
5
5
 
6
6
  > JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport spec
7
7
 
8
- # About
9
-
10
- A [libp2p transport](https://docs.libp2p.io/concepts/transports/overview/) based on [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API).
11
-
12
- ## Example
13
-
14
- ```js
15
- import { createLibp2pNode } from 'libp2p'
16
- import { webSockets } from '@libp2p/webrtc-direct'
17
-
18
- const node = await createLibp2p({
19
- transports: [
20
- webSockets()
21
- ]
22
- //... other config
23
- })
24
- await node.start()
25
- await node.dial('/ip4/127.0.0.1/tcp/9090/ws')
26
- ```
27
-
28
- ## Filters
29
-
30
- When run in a browser by default this module will only connect to secure web socket addresses.
31
-
32
- To change this you should pass a filter to the factory function.
33
-
34
- You can create your own address filters for this transports, or rely in the filters [provided](./src/filters.js).
35
-
36
- The available filters are:
37
-
38
- - `filters.all`
39
- - Returns all TCP and DNS based addresses, both with `ws` or `wss`.
40
- - `filters.dnsWss`
41
- - Returns all DNS based addresses with `wss`.
42
- - `filters.dnsWsOrWss`
43
- - Returns all DNS based addresses, both with `ws` or `wss`.
44
-
45
- ## Example
46
-
47
- ```js
48
- import { createLibp2pNode } from 'libp2p'
49
- import { websockets } from '@libp2p/websockets'
50
- import filters from '@libp2p/websockets/filters'
51
- import { mplex } from '@libp2p/mplex'
52
- import { noise } from '@libp2p/noise'
53
-
54
- const transportKey = Websockets.prototype[Symbol.toStringTag]
55
- const node = await Libp2p.create({
56
- transport: [
57
- websockets({
58
- // connect to all sockets, even insecure ones
59
- filter: filters.all
60
- })
61
- ],
62
- streamMuxers: [
63
- mplex()
64
- ],
65
- connectionEncryption: [
66
- noise()
67
- ]
68
- })
69
- ```
70
-
71
8
  # Install
72
9
 
73
10
  ```console
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/websockets",
3
- "version": "8.0.14",
3
+ "version": "8.0.15-b1b77adb4",
4
4
  "description": "JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport spec",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-websockets#readme",
@@ -73,8 +73,8 @@
73
73
  "test:electron-main": "aegir test -t electron-main -f ./dist/test/node.js --cov"
74
74
  },
75
75
  "dependencies": {
76
- "@libp2p/interface": "^1.1.3",
77
- "@libp2p/utils": "^5.2.4",
76
+ "@libp2p/interface": "1.1.3-b1b77adb4",
77
+ "@libp2p/utils": "5.2.5-b1b77adb4",
78
78
  "@multiformats/mafmt": "^12.1.6",
79
79
  "@multiformats/multiaddr": "^12.1.14",
80
80
  "@multiformats/multiaddr-to-uri": "^10.0.1",
@@ -85,8 +85,8 @@
85
85
  "ws": "^8.16.0"
86
86
  },
87
87
  "devDependencies": {
88
- "@libp2p/interface-compliance-tests": "^5.3.0",
89
- "@libp2p/logger": "^4.0.6",
88
+ "@libp2p/interface-compliance-tests": "5.3.1-b1b77adb4",
89
+ "@libp2p/logger": "4.0.6-b1b77adb4",
90
90
  "aegir": "^42.2.3",
91
91
  "is-loopback-addr": "^2.0.2",
92
92
  "it-all": "^3.0.4",
@@ -1,16 +0,0 @@
1
- {
2
- "all": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.filters.all.html",
3
- "./filters:all": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.filters.all.html",
4
- "dnsWsOrWss": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.filters.dnsWsOrWss.html",
5
- "./filters:dnsWsOrWss": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.filters.dnsWsOrWss.html",
6
- "dnsWss": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.filters.dnsWss.html",
7
- "./filters:dnsWss": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.filters.dnsWss.html",
8
- "wss": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.filters.wss.html",
9
- "./filters:wss": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.filters.wss.html",
10
- "WebSocketsComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_websockets.index.WebSocketsComponents.html",
11
- ".:WebSocketsComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_websockets.index.WebSocketsComponents.html",
12
- "WebSocketsInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_websockets.index.WebSocketsInit.html",
13
- ".:WebSocketsInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_websockets.index.WebSocketsInit.html",
14
- "webSockets": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.index.webSockets.html",
15
- ".:webSockets": "https://libp2p.github.io/js-libp2p/functions/_libp2p_websockets.index.webSockets.html"
16
- }