saito-wasm 0.2.26 → 0.2.28
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/Cargo.toml +1 -1
- package/package.json +1 -1
- package/pkg/node/index.js +71 -71
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.js +70 -70
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-bfc8dc7454c5403b → saito-wasm-8029de709aa727ca}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-bfc8dc7454c5403b → saito-wasm-8029de709aa727ca}/js/msg_handler.js +0 -0
package/Cargo.toml
CHANGED
package/package.json
CHANGED
package/pkg/node/index.js
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-
|
|
4
|
+
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-8029de709aa727ca/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
heap.push(undefined, null, true, false);
|
|
7
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
cachedTextDecoder.decode();
|
|
12
10
|
|
|
13
|
-
let
|
|
11
|
+
let cachedUint8Memory0 = null;
|
|
14
12
|
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
function getUint8Memory0() {
|
|
14
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
15
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
16
|
+
}
|
|
17
|
+
return cachedUint8Memory0;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return ret;
|
|
20
|
+
function getStringFromWasm0(ptr, len) {
|
|
21
|
+
ptr = ptr >>> 0;
|
|
22
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
25
23
|
}
|
|
26
24
|
|
|
25
|
+
const heap = new Array(128).fill(undefined);
|
|
26
|
+
|
|
27
|
+
heap.push(undefined, null, true, false);
|
|
28
|
+
|
|
29
|
+
let heap_next = heap.length;
|
|
30
|
+
|
|
27
31
|
function addHeapObject(obj) {
|
|
28
32
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
29
33
|
const idx = heap_next;
|
|
@@ -33,22 +37,18 @@ function addHeapObject(obj) {
|
|
|
33
37
|
return idx;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
cachedTextDecoder.decode();
|
|
39
|
-
|
|
40
|
-
let cachedUint8Memory0 = null;
|
|
40
|
+
function getObject(idx) { return heap[idx]; }
|
|
41
41
|
|
|
42
|
-
function
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return cachedUint8Memory0;
|
|
42
|
+
function dropObject(idx) {
|
|
43
|
+
if (idx < 132) return;
|
|
44
|
+
heap[idx] = heap_next;
|
|
45
|
+
heap_next = idx;
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
function takeObject(idx) {
|
|
49
|
+
const ret = getObject(idx);
|
|
50
|
+
dropObject(idx);
|
|
51
|
+
return ret;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
@@ -2224,8 +2224,8 @@ class WasmWalletSlip {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2226
2226
|
|
|
2227
|
-
module.exports.
|
|
2228
|
-
const ret =
|
|
2227
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2228
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2229
2229
|
return addHeapObject(ret);
|
|
2230
2230
|
};
|
|
2231
2231
|
|
|
@@ -2233,18 +2233,13 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
2233
2233
|
takeObject(arg0);
|
|
2234
2234
|
};
|
|
2235
2235
|
|
|
2236
|
-
module.exports.
|
|
2237
|
-
const ret =
|
|
2238
|
-
return addHeapObject(ret);
|
|
2239
|
-
};
|
|
2240
|
-
|
|
2241
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2242
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2236
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2237
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2243
2238
|
return addHeapObject(ret);
|
|
2244
2239
|
};
|
|
2245
2240
|
|
|
2246
|
-
module.exports.
|
|
2247
|
-
const ret =
|
|
2241
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2242
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2248
2243
|
return addHeapObject(ret);
|
|
2249
2244
|
};
|
|
2250
2245
|
|
|
@@ -2253,8 +2248,8 @@ module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
|
2253
2248
|
return addHeapObject(ret);
|
|
2254
2249
|
};
|
|
2255
2250
|
|
|
2256
|
-
module.exports.
|
|
2257
|
-
const ret =
|
|
2251
|
+
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2252
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2258
2253
|
return addHeapObject(ret);
|
|
2259
2254
|
};
|
|
2260
2255
|
|
|
@@ -2263,18 +2258,23 @@ module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
|
2263
2258
|
return addHeapObject(ret);
|
|
2264
2259
|
};
|
|
2265
2260
|
|
|
2266
|
-
module.exports.
|
|
2267
|
-
const ret =
|
|
2261
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2262
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2268
2263
|
return addHeapObject(ret);
|
|
2269
2264
|
};
|
|
2270
2265
|
|
|
2271
|
-
module.exports.
|
|
2272
|
-
const ret =
|
|
2266
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2267
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2273
2268
|
return addHeapObject(ret);
|
|
2274
2269
|
};
|
|
2275
2270
|
|
|
2276
|
-
module.exports.
|
|
2277
|
-
const ret =
|
|
2271
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2272
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2273
|
+
return addHeapObject(ret);
|
|
2274
|
+
};
|
|
2275
|
+
|
|
2276
|
+
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2277
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2278
2278
|
return addHeapObject(ret);
|
|
2279
2279
|
};
|
|
2280
2280
|
|
|
@@ -2292,15 +2292,15 @@ module.exports.__wbg_wasmconsensusvalues_new = function(arg0) {
|
|
|
2292
2292
|
return addHeapObject(ret);
|
|
2293
2293
|
};
|
|
2294
2294
|
|
|
2295
|
-
module.exports.
|
|
2295
|
+
module.exports.__wbg_sendmessage_6f50b65255dd4416 = function(arg0, arg1) {
|
|
2296
2296
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2297
2297
|
};
|
|
2298
2298
|
|
|
2299
|
-
module.exports.
|
|
2299
|
+
module.exports.__wbg_sendmessagetoall_4f60e5ab60b507fd = function(arg0, arg1) {
|
|
2300
2300
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2301
2301
|
};
|
|
2302
2302
|
|
|
2303
|
-
module.exports.
|
|
2303
|
+
module.exports.__wbg_connecttopeer_68034f6e5f02bc05 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2304
2304
|
let deferred0_0;
|
|
2305
2305
|
let deferred0_1;
|
|
2306
2306
|
try {
|
|
@@ -2313,12 +2313,12 @@ module.exports.__wbg_connecttopeer_f906eb0dcd27700b = function() { return handle
|
|
|
2313
2313
|
}
|
|
2314
2314
|
}, arguments) };
|
|
2315
2315
|
|
|
2316
|
-
module.exports.
|
|
2316
|
+
module.exports.__wbg_disconnectfrompeer_e1caa1bab3cd94c9 = function() { return handleError(function (arg0) {
|
|
2317
2317
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2318
2318
|
return addHeapObject(ret);
|
|
2319
2319
|
}, arguments) };
|
|
2320
2320
|
|
|
2321
|
-
module.exports.
|
|
2321
|
+
module.exports.__wbg_fetchblockfrompeer_50adf3000a031bbd = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2322
2322
|
let deferred0_0;
|
|
2323
2323
|
let deferred0_1;
|
|
2324
2324
|
try {
|
|
@@ -2331,7 +2331,7 @@ module.exports.__wbg_fetchblockfrompeer_7e56315f02697e56 = function() { return h
|
|
|
2331
2331
|
}
|
|
2332
2332
|
}, arguments) };
|
|
2333
2333
|
|
|
2334
|
-
module.exports.
|
|
2334
|
+
module.exports.__wbg_writevalue_615b6bfe0a8b95b8 = function(arg0, arg1, arg2) {
|
|
2335
2335
|
let deferred0_0;
|
|
2336
2336
|
let deferred0_1;
|
|
2337
2337
|
try {
|
|
@@ -2343,7 +2343,7 @@ module.exports.__wbg_writevalue_eb50890ccbe5a438 = function(arg0, arg1, arg2) {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
};
|
|
2345
2345
|
|
|
2346
|
-
module.exports.
|
|
2346
|
+
module.exports.__wbg_appendvalue_4cd041a920960ddc = function(arg0, arg1, arg2) {
|
|
2347
2347
|
let deferred0_0;
|
|
2348
2348
|
let deferred0_1;
|
|
2349
2349
|
try {
|
|
@@ -2355,7 +2355,7 @@ module.exports.__wbg_appendvalue_2ae90a075f44ab9c = function(arg0, arg1, arg2) {
|
|
|
2355
2355
|
}
|
|
2356
2356
|
};
|
|
2357
2357
|
|
|
2358
|
-
module.exports.
|
|
2358
|
+
module.exports.__wbg_flushdata_e8f503b060633cca = function(arg0, arg1) {
|
|
2359
2359
|
let deferred0_0;
|
|
2360
2360
|
let deferred0_1;
|
|
2361
2361
|
try {
|
|
@@ -2367,7 +2367,7 @@ module.exports.__wbg_flushdata_a07a25e5e0a6d850 = function(arg0, arg1) {
|
|
|
2367
2367
|
}
|
|
2368
2368
|
};
|
|
2369
2369
|
|
|
2370
|
-
module.exports.
|
|
2370
|
+
module.exports.__wbg_readvalue_6d365ed53ebbc656 = function() { return handleError(function (arg0, arg1) {
|
|
2371
2371
|
let deferred0_0;
|
|
2372
2372
|
let deferred0_1;
|
|
2373
2373
|
try {
|
|
@@ -2380,12 +2380,12 @@ module.exports.__wbg_readvalue_fa1bf39c0e316b32 = function() { return handleErro
|
|
|
2380
2380
|
}
|
|
2381
2381
|
}, arguments) };
|
|
2382
2382
|
|
|
2383
|
-
module.exports.
|
|
2383
|
+
module.exports.__wbg_loadblockfilelist_8745eb388ece6c53 = function() { return handleError(function () {
|
|
2384
2384
|
const ret = MsgHandler.load_block_file_list();
|
|
2385
2385
|
return addHeapObject(ret);
|
|
2386
2386
|
}, arguments) };
|
|
2387
2387
|
|
|
2388
|
-
module.exports.
|
|
2388
|
+
module.exports.__wbg_isexistingfile_74151373d6c8261c = function() { return handleError(function (arg0, arg1) {
|
|
2389
2389
|
let deferred0_0;
|
|
2390
2390
|
let deferred0_1;
|
|
2391
2391
|
try {
|
|
@@ -2398,7 +2398,7 @@ module.exports.__wbg_isexistingfile_a39441a23ff8ba5b = function() { return handl
|
|
|
2398
2398
|
}
|
|
2399
2399
|
}, arguments) };
|
|
2400
2400
|
|
|
2401
|
-
module.exports.
|
|
2401
|
+
module.exports.__wbg_removevalue_6b6eb7c204a46adc = function() { return handleError(function (arg0, arg1) {
|
|
2402
2402
|
let deferred0_0;
|
|
2403
2403
|
let deferred0_1;
|
|
2404
2404
|
try {
|
|
@@ -2411,7 +2411,7 @@ module.exports.__wbg_removevalue_848cb76fcb083f6f = function() { return handleEr
|
|
|
2411
2411
|
}
|
|
2412
2412
|
}, arguments) };
|
|
2413
2413
|
|
|
2414
|
-
module.exports.
|
|
2414
|
+
module.exports.__wbg_ensureblockdirectoryexists_32b28be8fb72e134 = function() { return handleError(function (arg0, arg1) {
|
|
2415
2415
|
let deferred0_0;
|
|
2416
2416
|
let deferred0_1;
|
|
2417
2417
|
try {
|
|
@@ -2423,19 +2423,19 @@ module.exports.__wbg_ensureblockdirectoryexists_3f9dbcad0ecf3ed2 = function() {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
}, arguments) };
|
|
2425
2425
|
|
|
2426
|
-
module.exports.
|
|
2426
|
+
module.exports.__wbg_processapicall_9683693d547297e1 = function(arg0, arg1, arg2) {
|
|
2427
2427
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2428
2428
|
};
|
|
2429
2429
|
|
|
2430
|
-
module.exports.
|
|
2430
|
+
module.exports.__wbg_processapisuccess_6197ac6fb1f66418 = function(arg0, arg1, arg2) {
|
|
2431
2431
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2432
2432
|
};
|
|
2433
2433
|
|
|
2434
|
-
module.exports.
|
|
2434
|
+
module.exports.__wbg_processapierror_84fbc8c56174fb13 = function(arg0, arg1, arg2) {
|
|
2435
2435
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2436
2436
|
};
|
|
2437
2437
|
|
|
2438
|
-
module.exports.
|
|
2438
|
+
module.exports.__wbg_sendinterfaceevent_91c7b385659ef05f = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2439
2439
|
let deferred0_0;
|
|
2440
2440
|
let deferred0_1;
|
|
2441
2441
|
let deferred1_0;
|
|
@@ -2452,7 +2452,7 @@ module.exports.__wbg_sendinterfaceevent_603f8f691c45eb8c = function(arg0, arg1,
|
|
|
2452
2452
|
}
|
|
2453
2453
|
};
|
|
2454
2454
|
|
|
2455
|
-
module.exports.
|
|
2455
|
+
module.exports.__wbg_sendblocksuccess_1874573ea082e620 = function(arg0, arg1, arg2) {
|
|
2456
2456
|
let deferred0_0;
|
|
2457
2457
|
let deferred0_1;
|
|
2458
2458
|
try {
|
|
@@ -2464,11 +2464,11 @@ module.exports.__wbg_sendblocksuccess_b59a58827546e9fe = function(arg0, arg1, ar
|
|
|
2464
2464
|
}
|
|
2465
2465
|
};
|
|
2466
2466
|
|
|
2467
|
-
module.exports.
|
|
2467
|
+
module.exports.__wbg_sendwalletupdate_9619682b29832e2c = function() {
|
|
2468
2468
|
MsgHandler.send_wallet_update();
|
|
2469
2469
|
};
|
|
2470
2470
|
|
|
2471
|
-
module.exports.
|
|
2471
|
+
module.exports.__wbg_sendnewversionalert_9ddb46dd0f43f382 = function(arg0, arg1, arg2) {
|
|
2472
2472
|
let deferred0_0;
|
|
2473
2473
|
let deferred0_1;
|
|
2474
2474
|
try {
|
|
@@ -2480,19 +2480,19 @@ module.exports.__wbg_sendnewversionalert_c6369dd1753fd8c4 = function(arg0, arg1,
|
|
|
2480
2480
|
}
|
|
2481
2481
|
};
|
|
2482
2482
|
|
|
2483
|
-
module.exports.
|
|
2483
|
+
module.exports.__wbg_sendblockfetchstatusevent_87a1b74457fa9001 = function(arg0) {
|
|
2484
2484
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2485
2485
|
};
|
|
2486
2486
|
|
|
2487
|
-
module.exports.
|
|
2487
|
+
module.exports.__wbg_savewallet_91611405c3824ad4 = function() {
|
|
2488
2488
|
MsgHandler.save_wallet();
|
|
2489
2489
|
};
|
|
2490
2490
|
|
|
2491
|
-
module.exports.
|
|
2491
|
+
module.exports.__wbg_loadwallet_2d0904dd4242e0d5 = function() {
|
|
2492
2492
|
MsgHandler.load_wallet();
|
|
2493
2493
|
};
|
|
2494
2494
|
|
|
2495
|
-
module.exports.
|
|
2495
|
+
module.exports.__wbg_getmyservices_40bca0ab0ee8b411 = function() {
|
|
2496
2496
|
const ret = MsgHandler.get_my_services();
|
|
2497
2497
|
_assertClass(ret, WasmPeerServiceList);
|
|
2498
2498
|
var ptr1 = ret.__destroy_into_raw();
|
|
@@ -2875,7 +2875,7 @@ module.exports.__wbindgen_memory = function() {
|
|
|
2875
2875
|
return addHeapObject(ret);
|
|
2876
2876
|
};
|
|
2877
2877
|
|
|
2878
|
-
module.exports.
|
|
2878
|
+
module.exports.__wbindgen_closure_wrapper1304 = function(arg0, arg1, arg2) {
|
|
2879
2879
|
const ret = makeMutClosure(arg0, arg1, 458, __wbg_adapter_38);
|
|
2880
2880
|
return addHeapObject(ret);
|
|
2881
2881
|
};
|
package/pkg/node/index_bg.wasm
CHANGED
|
Binary file
|
package/pkg/node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "saito-wasm",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.28",
|
|
4
4
|
"files": [
|
|
5
5
|
"index_bg.wasm",
|
|
6
6
|
"index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"types": "index.d.ts",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"cross-env": "^7.0.3",
|
|
13
|
+
"node-fetch": "^3.3.0"
|
|
14
14
|
}
|
|
15
15
|
}
|
package/pkg/web/index.js
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import { MsgHandler } from './snippets/saito-wasm-
|
|
1
|
+
import { MsgHandler } from './snippets/saito-wasm-8029de709aa727ca/js/msg_handler.js';
|
|
2
2
|
|
|
3
3
|
let wasm;
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
heap.push(undefined, null, true, false);
|
|
5
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
10
8
|
|
|
11
|
-
let
|
|
9
|
+
let cachedUint8Memory0 = null;
|
|
12
10
|
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
function getUint8Memory0() {
|
|
12
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
13
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
14
|
+
}
|
|
15
|
+
return cachedUint8Memory0;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return ret;
|
|
18
|
+
function getStringFromWasm0(ptr, len) {
|
|
19
|
+
ptr = ptr >>> 0;
|
|
20
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
23
21
|
}
|
|
24
22
|
|
|
23
|
+
const heap = new Array(128).fill(undefined);
|
|
24
|
+
|
|
25
|
+
heap.push(undefined, null, true, false);
|
|
26
|
+
|
|
27
|
+
let heap_next = heap.length;
|
|
28
|
+
|
|
25
29
|
function addHeapObject(obj) {
|
|
26
30
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
27
31
|
const idx = heap_next;
|
|
@@ -31,22 +35,18 @@ function addHeapObject(obj) {
|
|
|
31
35
|
return idx;
|
|
32
36
|
}
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
37
|
-
|
|
38
|
-
let cachedUint8Memory0 = null;
|
|
38
|
+
function getObject(idx) { return heap[idx]; }
|
|
39
39
|
|
|
40
|
-
function
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return cachedUint8Memory0;
|
|
40
|
+
function dropObject(idx) {
|
|
41
|
+
if (idx < 132) return;
|
|
42
|
+
heap[idx] = heap_next;
|
|
43
|
+
heap_next = idx;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
function takeObject(idx) {
|
|
47
|
+
const ret = getObject(idx);
|
|
48
|
+
dropObject(idx);
|
|
49
|
+
return ret;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
let WASM_VECTOR_LEN = 0;
|
|
@@ -2242,47 +2242,47 @@ async function __wbg_load(module, imports) {
|
|
|
2242
2242
|
function __wbg_get_imports() {
|
|
2243
2243
|
const imports = {};
|
|
2244
2244
|
imports.wbg = {};
|
|
2245
|
-
imports.wbg.
|
|
2246
|
-
const ret =
|
|
2245
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2246
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2247
2247
|
return addHeapObject(ret);
|
|
2248
2248
|
};
|
|
2249
2249
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
2250
2250
|
takeObject(arg0);
|
|
2251
2251
|
};
|
|
2252
|
-
imports.wbg.
|
|
2253
|
-
const ret =
|
|
2254
|
-
return addHeapObject(ret);
|
|
2255
|
-
};
|
|
2256
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2257
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2252
|
+
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2253
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2258
2254
|
return addHeapObject(ret);
|
|
2259
2255
|
};
|
|
2260
|
-
imports.wbg.
|
|
2261
|
-
const ret =
|
|
2256
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2257
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2262
2258
|
return addHeapObject(ret);
|
|
2263
2259
|
};
|
|
2264
2260
|
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2265
2261
|
const ret = WasmPeer.__wrap(arg0);
|
|
2266
2262
|
return addHeapObject(ret);
|
|
2267
2263
|
};
|
|
2268
|
-
imports.wbg.
|
|
2269
|
-
const ret =
|
|
2264
|
+
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
2265
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2270
2266
|
return addHeapObject(ret);
|
|
2271
2267
|
};
|
|
2272
2268
|
imports.wbg.__wbg_wasmwallet_new = function(arg0) {
|
|
2273
2269
|
const ret = WasmWallet.__wrap(arg0);
|
|
2274
2270
|
return addHeapObject(ret);
|
|
2275
2271
|
};
|
|
2276
|
-
imports.wbg.
|
|
2277
|
-
const ret =
|
|
2272
|
+
imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
|
|
2273
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2278
2274
|
return addHeapObject(ret);
|
|
2279
2275
|
};
|
|
2280
|
-
imports.wbg.
|
|
2281
|
-
const ret =
|
|
2276
|
+
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
2277
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2282
2278
|
return addHeapObject(ret);
|
|
2283
2279
|
};
|
|
2284
|
-
imports.wbg.
|
|
2285
|
-
const ret =
|
|
2280
|
+
imports.wbg.__wbg_wasmblock_new = function(arg0) {
|
|
2281
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2282
|
+
return addHeapObject(ret);
|
|
2283
|
+
};
|
|
2284
|
+
imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2285
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2286
2286
|
return addHeapObject(ret);
|
|
2287
2287
|
};
|
|
2288
2288
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
@@ -2297,13 +2297,13 @@ function __wbg_get_imports() {
|
|
|
2297
2297
|
const ret = WasmConsensusValues.__wrap(arg0);
|
|
2298
2298
|
return addHeapObject(ret);
|
|
2299
2299
|
};
|
|
2300
|
-
imports.wbg.
|
|
2300
|
+
imports.wbg.__wbg_sendmessage_6f50b65255dd4416 = function(arg0, arg1) {
|
|
2301
2301
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2302
2302
|
};
|
|
2303
|
-
imports.wbg.
|
|
2303
|
+
imports.wbg.__wbg_sendmessagetoall_4f60e5ab60b507fd = function(arg0, arg1) {
|
|
2304
2304
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2305
2305
|
};
|
|
2306
|
-
imports.wbg.
|
|
2306
|
+
imports.wbg.__wbg_connecttopeer_68034f6e5f02bc05 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2307
2307
|
let deferred0_0;
|
|
2308
2308
|
let deferred0_1;
|
|
2309
2309
|
try {
|
|
@@ -2315,11 +2315,11 @@ function __wbg_get_imports() {
|
|
|
2315
2315
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2316
2316
|
}
|
|
2317
2317
|
}, arguments) };
|
|
2318
|
-
imports.wbg.
|
|
2318
|
+
imports.wbg.__wbg_disconnectfrompeer_e1caa1bab3cd94c9 = function() { return handleError(function (arg0) {
|
|
2319
2319
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2320
2320
|
return addHeapObject(ret);
|
|
2321
2321
|
}, arguments) };
|
|
2322
|
-
imports.wbg.
|
|
2322
|
+
imports.wbg.__wbg_fetchblockfrompeer_50adf3000a031bbd = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2323
2323
|
let deferred0_0;
|
|
2324
2324
|
let deferred0_1;
|
|
2325
2325
|
try {
|
|
@@ -2331,7 +2331,7 @@ function __wbg_get_imports() {
|
|
|
2331
2331
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2332
2332
|
}
|
|
2333
2333
|
}, arguments) };
|
|
2334
|
-
imports.wbg.
|
|
2334
|
+
imports.wbg.__wbg_writevalue_615b6bfe0a8b95b8 = function(arg0, arg1, arg2) {
|
|
2335
2335
|
let deferred0_0;
|
|
2336
2336
|
let deferred0_1;
|
|
2337
2337
|
try {
|
|
@@ -2342,7 +2342,7 @@ function __wbg_get_imports() {
|
|
|
2342
2342
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2343
2343
|
}
|
|
2344
2344
|
};
|
|
2345
|
-
imports.wbg.
|
|
2345
|
+
imports.wbg.__wbg_appendvalue_4cd041a920960ddc = function(arg0, arg1, arg2) {
|
|
2346
2346
|
let deferred0_0;
|
|
2347
2347
|
let deferred0_1;
|
|
2348
2348
|
try {
|
|
@@ -2353,7 +2353,7 @@ function __wbg_get_imports() {
|
|
|
2353
2353
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2354
2354
|
}
|
|
2355
2355
|
};
|
|
2356
|
-
imports.wbg.
|
|
2356
|
+
imports.wbg.__wbg_flushdata_e8f503b060633cca = function(arg0, arg1) {
|
|
2357
2357
|
let deferred0_0;
|
|
2358
2358
|
let deferred0_1;
|
|
2359
2359
|
try {
|
|
@@ -2364,7 +2364,7 @@ function __wbg_get_imports() {
|
|
|
2364
2364
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2365
2365
|
}
|
|
2366
2366
|
};
|
|
2367
|
-
imports.wbg.
|
|
2367
|
+
imports.wbg.__wbg_readvalue_6d365ed53ebbc656 = function() { return handleError(function (arg0, arg1) {
|
|
2368
2368
|
let deferred0_0;
|
|
2369
2369
|
let deferred0_1;
|
|
2370
2370
|
try {
|
|
@@ -2376,11 +2376,11 @@ function __wbg_get_imports() {
|
|
|
2376
2376
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2377
2377
|
}
|
|
2378
2378
|
}, arguments) };
|
|
2379
|
-
imports.wbg.
|
|
2379
|
+
imports.wbg.__wbg_loadblockfilelist_8745eb388ece6c53 = function() { return handleError(function () {
|
|
2380
2380
|
const ret = MsgHandler.load_block_file_list();
|
|
2381
2381
|
return addHeapObject(ret);
|
|
2382
2382
|
}, arguments) };
|
|
2383
|
-
imports.wbg.
|
|
2383
|
+
imports.wbg.__wbg_isexistingfile_74151373d6c8261c = function() { return handleError(function (arg0, arg1) {
|
|
2384
2384
|
let deferred0_0;
|
|
2385
2385
|
let deferred0_1;
|
|
2386
2386
|
try {
|
|
@@ -2392,7 +2392,7 @@ function __wbg_get_imports() {
|
|
|
2392
2392
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2393
2393
|
}
|
|
2394
2394
|
}, arguments) };
|
|
2395
|
-
imports.wbg.
|
|
2395
|
+
imports.wbg.__wbg_removevalue_6b6eb7c204a46adc = function() { return handleError(function (arg0, arg1) {
|
|
2396
2396
|
let deferred0_0;
|
|
2397
2397
|
let deferred0_1;
|
|
2398
2398
|
try {
|
|
@@ -2404,7 +2404,7 @@ function __wbg_get_imports() {
|
|
|
2404
2404
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2405
2405
|
}
|
|
2406
2406
|
}, arguments) };
|
|
2407
|
-
imports.wbg.
|
|
2407
|
+
imports.wbg.__wbg_ensureblockdirectoryexists_32b28be8fb72e134 = function() { return handleError(function (arg0, arg1) {
|
|
2408
2408
|
let deferred0_0;
|
|
2409
2409
|
let deferred0_1;
|
|
2410
2410
|
try {
|
|
@@ -2415,16 +2415,16 @@ function __wbg_get_imports() {
|
|
|
2415
2415
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2416
2416
|
}
|
|
2417
2417
|
}, arguments) };
|
|
2418
|
-
imports.wbg.
|
|
2418
|
+
imports.wbg.__wbg_processapicall_9683693d547297e1 = function(arg0, arg1, arg2) {
|
|
2419
2419
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2420
2420
|
};
|
|
2421
|
-
imports.wbg.
|
|
2421
|
+
imports.wbg.__wbg_processapisuccess_6197ac6fb1f66418 = function(arg0, arg1, arg2) {
|
|
2422
2422
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2423
2423
|
};
|
|
2424
|
-
imports.wbg.
|
|
2424
|
+
imports.wbg.__wbg_processapierror_84fbc8c56174fb13 = function(arg0, arg1, arg2) {
|
|
2425
2425
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2426
2426
|
};
|
|
2427
|
-
imports.wbg.
|
|
2427
|
+
imports.wbg.__wbg_sendinterfaceevent_91c7b385659ef05f = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2428
2428
|
let deferred0_0;
|
|
2429
2429
|
let deferred0_1;
|
|
2430
2430
|
let deferred1_0;
|
|
@@ -2440,7 +2440,7 @@ function __wbg_get_imports() {
|
|
|
2440
2440
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2441
2441
|
}
|
|
2442
2442
|
};
|
|
2443
|
-
imports.wbg.
|
|
2443
|
+
imports.wbg.__wbg_sendblocksuccess_1874573ea082e620 = function(arg0, arg1, arg2) {
|
|
2444
2444
|
let deferred0_0;
|
|
2445
2445
|
let deferred0_1;
|
|
2446
2446
|
try {
|
|
@@ -2451,10 +2451,10 @@ function __wbg_get_imports() {
|
|
|
2451
2451
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2452
2452
|
}
|
|
2453
2453
|
};
|
|
2454
|
-
imports.wbg.
|
|
2454
|
+
imports.wbg.__wbg_sendwalletupdate_9619682b29832e2c = function() {
|
|
2455
2455
|
MsgHandler.send_wallet_update();
|
|
2456
2456
|
};
|
|
2457
|
-
imports.wbg.
|
|
2457
|
+
imports.wbg.__wbg_sendnewversionalert_9ddb46dd0f43f382 = function(arg0, arg1, arg2) {
|
|
2458
2458
|
let deferred0_0;
|
|
2459
2459
|
let deferred0_1;
|
|
2460
2460
|
try {
|
|
@@ -2465,16 +2465,16 @@ function __wbg_get_imports() {
|
|
|
2465
2465
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2466
2466
|
}
|
|
2467
2467
|
};
|
|
2468
|
-
imports.wbg.
|
|
2468
|
+
imports.wbg.__wbg_sendblockfetchstatusevent_87a1b74457fa9001 = function(arg0) {
|
|
2469
2469
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2470
2470
|
};
|
|
2471
|
-
imports.wbg.
|
|
2471
|
+
imports.wbg.__wbg_savewallet_91611405c3824ad4 = function() {
|
|
2472
2472
|
MsgHandler.save_wallet();
|
|
2473
2473
|
};
|
|
2474
|
-
imports.wbg.
|
|
2474
|
+
imports.wbg.__wbg_loadwallet_2d0904dd4242e0d5 = function() {
|
|
2475
2475
|
MsgHandler.load_wallet();
|
|
2476
2476
|
};
|
|
2477
|
-
imports.wbg.
|
|
2477
|
+
imports.wbg.__wbg_getmyservices_40bca0ab0ee8b411 = function() {
|
|
2478
2478
|
const ret = MsgHandler.get_my_services();
|
|
2479
2479
|
_assertClass(ret, WasmPeerServiceList);
|
|
2480
2480
|
var ptr1 = ret.__destroy_into_raw();
|
|
@@ -2786,7 +2786,7 @@ function __wbg_get_imports() {
|
|
|
2786
2786
|
const ret = wasm.memory;
|
|
2787
2787
|
return addHeapObject(ret);
|
|
2788
2788
|
};
|
|
2789
|
-
imports.wbg.
|
|
2789
|
+
imports.wbg.__wbindgen_closure_wrapper1304 = function(arg0, arg1, arg2) {
|
|
2790
2790
|
const ret = makeMutClosure(arg0, arg1, 458, __wbg_adapter_38);
|
|
2791
2791
|
return addHeapObject(ret);
|
|
2792
2792
|
};
|
package/pkg/web/index_bg.wasm
CHANGED
|
Binary file
|
package/pkg/web/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "saito-wasm",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.28",
|
|
4
4
|
"files": [
|
|
5
5
|
"index_bg.wasm",
|
|
6
6
|
"index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"./snippets/*"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"node-fetch": "^3.3.0",
|
|
16
|
+
"cross-env": "^7.0.3"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
File without changes
|
|
File without changes
|