@waku/core 0.0.27 → 0.0.28-070b625.0
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/bundle/{base_protocol-LhsIWF3-.js → base_protocol-D0Zdzb-v.js} +2 -5
- package/bundle/{browser-BQyFvtq6.js → browser-DoQRY-an.js} +18 -13
- package/bundle/{index-8YyfzF9R.js → index-BJwgMx4y.js} +35 -62
- package/bundle/index.js +258 -342
- package/bundle/lib/base_protocol.js +3 -3
- package/bundle/lib/message/version_0.js +3 -3
- package/bundle/lib/predefined_bootstrap_nodes.js +17 -17
- package/bundle/{version_0-FXfzO8Km.js → version_0-C6o0DvNW.js} +566 -321
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/base_protocol.d.ts +4 -5
- package/dist/lib/base_protocol.js +0 -3
- package/dist/lib/base_protocol.js.map +1 -1
- package/dist/lib/filter/index.js +4 -0
- package/dist/lib/filter/index.js.map +1 -1
- package/dist/lib/light_push/index.d.ts +12 -2
- package/dist/lib/light_push/index.js +79 -76
- package/dist/lib/light_push/index.js.map +1 -1
- package/dist/lib/message/version_0.js +1 -1
- package/dist/lib/message/version_0.js.map +1 -1
- package/dist/lib/metadata/index.d.ts +1 -1
- package/dist/lib/metadata/index.js +42 -14
- package/dist/lib/metadata/index.js.map +1 -1
- package/dist/lib/predefined_bootstrap_nodes.d.ts +11 -11
- package/dist/lib/predefined_bootstrap_nodes.js +16 -16
- package/dist/lib/predefined_bootstrap_nodes.js.map +1 -1
- package/dist/lib/store/history_rpc.js +1 -1
- package/dist/lib/store/history_rpc.js.map +1 -1
- package/dist/lib/store/index.d.ts +14 -6
- package/dist/lib/store/index.js +50 -232
- package/dist/lib/store/index.js.map +1 -1
- package/dist/lib/wait_for_remote_peer.js +4 -2
- package/dist/lib/wait_for_remote_peer.js.map +1 -1
- package/package.json +1 -129
- package/src/index.ts +3 -2
- package/src/lib/base_protocol.ts +4 -9
- package/src/lib/filter/index.ts +7 -0
- package/src/lib/light_push/index.ts +97 -118
- package/src/lib/metadata/index.ts +56 -26
- package/src/lib/predefined_bootstrap_nodes.ts +22 -22
- package/src/lib/store/index.ts +77 -339
- package/src/lib/wait_for_remote_peer.ts +14 -4
@@ -1,3 +1,3 @@
|
|
1
|
-
import '../index-
|
2
|
-
import '../browser-
|
3
|
-
export { B as BaseProtocol } from '../base_protocol-
|
1
|
+
import '../index-BJwgMx4y.js';
|
2
|
+
import '../browser-DoQRY-an.js';
|
3
|
+
export { B as BaseProtocol } from '../base_protocol-D0Zdzb-v.js';
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export { D as DecodedMessage, k as Decoder, E as Encoder, V as Version, j as createDecoder, h as createEncoder, m as proto } from '../../version_0-
|
2
|
-
import '../../index-
|
3
|
-
import '../../browser-
|
1
|
+
export { D as DecodedMessage, k as Decoder, E as Encoder, V as Version, j as createDecoder, h as createEncoder, m as proto } from '../../version_0-C6o0DvNW.js';
|
2
|
+
import '../../index-BJwgMx4y.js';
|
3
|
+
import '../../browser-DoQRY-an.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import '../browser-
|
1
|
+
import '../browser-DoQRY-an.js';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* Return pseudo random subset of the input.
|
@@ -28,51 +28,51 @@ function shuffle(arr) {
|
|
28
28
|
const DefaultWantedNumber = 1;
|
29
29
|
var Fleet;
|
30
30
|
(function (Fleet) {
|
31
|
-
Fleet["
|
31
|
+
Fleet["Sandbox"] = "sandbox";
|
32
32
|
Fleet["Test"] = "test";
|
33
33
|
})(Fleet || (Fleet = {}));
|
34
34
|
/**
|
35
35
|
* Return list of pre-defined (hardcoded) bootstrap nodes.
|
36
36
|
*
|
37
|
-
* Default behavior is to return nodes of the nwaku Status
|
37
|
+
* Default behavior is to return nodes of the nwaku Status Sandbox fleet.
|
38
38
|
*
|
39
|
-
* @param fleet The fleet to be returned. Defaults to
|
39
|
+
* @param fleet The fleet to be returned. Defaults to sandbox fleet.
|
40
40
|
* @param wantedNumber The number of connections desired. Defaults to {@link DefaultWantedNumber}.
|
41
41
|
*
|
42
42
|
* @returns An array of multiaddresses.
|
43
43
|
*/
|
44
|
-
function getPredefinedBootstrapNodes(fleet = Fleet.
|
44
|
+
function getPredefinedBootstrapNodes(fleet = Fleet.Sandbox, wantedNumber = DefaultWantedNumber) {
|
45
45
|
if (wantedNumber <= 0) {
|
46
46
|
return [];
|
47
47
|
}
|
48
48
|
let nodes;
|
49
49
|
switch (fleet) {
|
50
|
-
case Fleet.
|
51
|
-
nodes = fleets.fleets["
|
50
|
+
case Fleet.Sandbox:
|
51
|
+
nodes = fleets.fleets["waku.sandbox"]["waku-websocket"];
|
52
52
|
break;
|
53
53
|
case Fleet.Test:
|
54
|
-
nodes = fleets.fleets["
|
54
|
+
nodes = fleets.fleets["waku.test"]["waku-websocket"];
|
55
55
|
break;
|
56
56
|
default:
|
57
|
-
nodes = fleets.fleets["
|
57
|
+
nodes = fleets.fleets["waku.sandbox"]["waku-websocket"];
|
58
58
|
}
|
59
59
|
nodes = Object.values(nodes);
|
60
60
|
return getPseudoRandomSubset(nodes, wantedNumber);
|
61
61
|
}
|
62
62
|
const fleets = {
|
63
63
|
fleets: {
|
64
|
-
"
|
64
|
+
"waku.sandbox": {
|
65
65
|
"waku-websocket": {
|
66
|
-
"node-01.ac-cn-hongkong-c.
|
67
|
-
"node-01.do-ams3.
|
68
|
-
"node-01.gc-us-central1-a.
|
66
|
+
"node-01.ac-cn-hongkong-c.waku.sandbox": "/dns4/node-01.ac-cn-hongkong-c.waku.sandbox.status.im/tcp/8000/wss/p2p/16Uiu2HAmSJvSJphxRdbnigUV5bjRRZFBhTtWFTSyiKaQByCjwmpV",
|
67
|
+
"node-01.do-ams3.waku.sandbox": "/dns4/node-01.do-ams3.waku.sandbox.status.im/tcp/8000/wss/p2p/16Uiu2HAmQSMNExfUYUqfuXWkD5DaNZnMYnigRxFKbk3tcEFQeQeE",
|
68
|
+
"node-01.gc-us-central1-a.waku.sandbox": "/dns4/node-01.gc-us-central1-a.waku.sandbox.status.im/tcp/8000/wss/p2p/16Uiu2HAm6fyqE1jB5MonzvoMdU8v76bWV8ZeNpncDamY1MQXfjdB"
|
69
69
|
}
|
70
70
|
},
|
71
|
-
"
|
71
|
+
"waku.test": {
|
72
72
|
"waku-websocket": {
|
73
|
-
"node-01.ac-cn-hongkong-c.
|
74
|
-
"node-01.do-ams3.
|
75
|
-
"node-01.gc-us-central1-a.
|
73
|
+
"node-01.ac-cn-hongkong-c.waku.test": "/dns4/node-01.ac-cn-hongkong-c.waku.test.statusim.net/tcp/8000/wss/p2p/16Uiu2HAkzHaTP5JsUwfR9NR8Rj9HC24puS6ocaU8wze4QrXr9iXp",
|
74
|
+
"node-01.do-ams3.waku.test": "/dns4/node-01.do-ams3.waku.test.statusim.net/tcp/8000/wss/p2p/16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W",
|
75
|
+
"node-01.gc-us-central1-a.waku.test": "/dns4/node-01.gc-us-central1-a.waku.test.statusim.net/tcp/8000/wss/p2p/16Uiu2HAmDCp8XJ9z1ev18zuv8NHekAsjNyezAvmMfFEJkiharitG"
|
76
76
|
}
|
77
77
|
}
|
78
78
|
}
|