saito-wasm 0.0.9 → 0.0.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "saito-wasm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "js wrappings around saito-core using wasm",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "./node_modules/.bin/jest",
|
|
@@ -42,5 +42,6 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"node-fetch": "^3.3.0",
|
|
44
44
|
"cross-env": "^7.0.3"
|
|
45
|
-
}
|
|
45
|
+
},
|
|
46
|
+
"type": "module"
|
|
46
47
|
}
|
package/pkg/node/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
class MsgHandler {
|
|
2
2
|
static send_message(peer_index, buffer) {
|
|
3
3
|
console.debug("MsgHandler::send_message : " + peer_index);
|
|
4
4
|
return global.shared_methods.send_message(peer_index, buffer);
|
|
@@ -82,3 +82,14 @@ export class MsgHandler {
|
|
|
82
82
|
return global.shared_methods.send_block_success(hash, block_id);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
// if (typeof exports === "undefined") {
|
|
88
|
+
// module.exports = MsgHandler;
|
|
89
|
+
// } else {
|
|
90
|
+
// exports = MsgHandler;
|
|
91
|
+
// }
|
|
92
|
+
module.exports = exports = {MsgHandler};
|
|
93
|
+
} catch (e) {
|
|
94
|
+
console.error(e);
|
|
95
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
class MsgHandler {
|
|
2
2
|
static send_message(peer_index, buffer) {
|
|
3
3
|
console.debug("MsgHandler::send_message : " + peer_index);
|
|
4
4
|
return global.shared_methods.send_message(peer_index, buffer);
|
|
@@ -82,3 +82,14 @@ export class MsgHandler {
|
|
|
82
82
|
return global.shared_methods.send_block_success(hash, block_id);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
// if (typeof exports === "undefined") {
|
|
88
|
+
// module.exports = MsgHandler;
|
|
89
|
+
// } else {
|
|
90
|
+
// exports = MsgHandler;
|
|
91
|
+
// }
|
|
92
|
+
module.exports = exports = {MsgHandler};
|
|
93
|
+
} catch (e) {
|
|
94
|
+
console.error(e);
|
|
95
|
+
}
|