saito-wasm 0.2.24 → 0.2.25
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 +81 -77
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +76 -76
- package/pkg/node/package.json +3 -3
- package/pkg/node/snippets/{saito-wasm-d3b4a23dcc237713 → saito-wasm-5c25242fd1d8ed87}/js/msg_handler.js +4 -0
- package/pkg/web/index.d.ts +76 -76
- package/pkg/web/index.js +77 -74
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +76 -76
- package/pkg/web/package.json +1 -1
- package/pkg/web/snippets/{saito-wasm-d3b4a23dcc237713 → saito-wasm-5c25242fd1d8ed87}/js/msg_handler.js +4 -0
package/Cargo.toml
CHANGED
package/package.json
CHANGED
package/pkg/node/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-5c25242fd1d8ed87/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
7
|
const heap = new Array(128).fill(undefined);
|
|
@@ -24,15 +24,6 @@ function takeObject(idx) {
|
|
|
24
24
|
return ret;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function addHeapObject(obj) {
|
|
28
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
29
|
-
const idx = heap_next;
|
|
30
|
-
heap_next = heap[idx];
|
|
31
|
-
|
|
32
|
-
heap[idx] = obj;
|
|
33
|
-
return idx;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
27
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
37
28
|
|
|
38
29
|
cachedTextDecoder.decode();
|
|
@@ -51,6 +42,15 @@ function getStringFromWasm0(ptr, len) {
|
|
|
51
42
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
52
43
|
}
|
|
53
44
|
|
|
45
|
+
function addHeapObject(obj) {
|
|
46
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
47
|
+
const idx = heap_next;
|
|
48
|
+
heap_next = heap[idx];
|
|
49
|
+
|
|
50
|
+
heap[idx] = obj;
|
|
51
|
+
return idx;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
55
55
|
|
|
56
56
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -228,13 +228,6 @@ function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
|
228
228
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha18c4469c8531320(arg0, arg1, addHeapObject(arg2));
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
function _assertClass(instance, klass) {
|
|
232
|
-
if (!(instance instanceof klass)) {
|
|
233
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
234
|
-
}
|
|
235
|
-
return instance.ptr;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
231
|
function handleError(f, args) {
|
|
239
232
|
try {
|
|
240
233
|
return f.apply(this, args);
|
|
@@ -242,6 +235,13 @@ function handleError(f, args) {
|
|
|
242
235
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
243
236
|
}
|
|
244
237
|
}
|
|
238
|
+
|
|
239
|
+
function _assertClass(instance, klass) {
|
|
240
|
+
if (!(instance instanceof klass)) {
|
|
241
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
242
|
+
}
|
|
243
|
+
return instance.ptr;
|
|
244
|
+
}
|
|
245
245
|
/**
|
|
246
246
|
* @param {string} json
|
|
247
247
|
* @param {string} private_key
|
|
@@ -626,7 +626,7 @@ module.exports.produce_block_without_gt = function() {
|
|
|
626
626
|
return takeObject(ret);
|
|
627
627
|
};
|
|
628
628
|
|
|
629
|
-
function
|
|
629
|
+
function __wbg_adapter_381(arg0, arg1, arg2, arg3) {
|
|
630
630
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2c2d2984a3f304e5(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
631
631
|
}
|
|
632
632
|
|
|
@@ -2228,13 +2228,18 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
2228
2228
|
takeObject(arg0);
|
|
2229
2229
|
};
|
|
2230
2230
|
|
|
2231
|
-
module.exports.
|
|
2232
|
-
const ret =
|
|
2231
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2232
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2233
2233
|
return addHeapObject(ret);
|
|
2234
2234
|
};
|
|
2235
2235
|
|
|
2236
|
-
module.exports.
|
|
2237
|
-
const ret =
|
|
2236
|
+
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2237
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2238
|
+
return addHeapObject(ret);
|
|
2239
|
+
};
|
|
2240
|
+
|
|
2241
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2242
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2238
2243
|
return addHeapObject(ret);
|
|
2239
2244
|
};
|
|
2240
2245
|
|
|
@@ -2248,13 +2253,8 @@ module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
|
2248
2253
|
return addHeapObject(ret);
|
|
2249
2254
|
};
|
|
2250
2255
|
|
|
2251
|
-
module.exports.
|
|
2252
|
-
const ret =
|
|
2253
|
-
return addHeapObject(ret);
|
|
2254
|
-
};
|
|
2255
|
-
|
|
2256
|
-
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2257
|
-
const ret = WasmWallet.__wrap(arg0);
|
|
2256
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2257
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2258
2258
|
return addHeapObject(ret);
|
|
2259
2259
|
};
|
|
2260
2260
|
|
|
@@ -2263,23 +2263,18 @@ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
|
2263
2263
|
return addHeapObject(ret);
|
|
2264
2264
|
};
|
|
2265
2265
|
|
|
2266
|
-
module.exports.
|
|
2267
|
-
const ret =
|
|
2268
|
-
return addHeapObject(ret);
|
|
2269
|
-
};
|
|
2270
|
-
|
|
2271
|
-
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2272
|
-
const ret = WasmTransaction.__wrap(arg0);
|
|
2266
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2267
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2273
2268
|
return addHeapObject(ret);
|
|
2274
2269
|
};
|
|
2275
2270
|
|
|
2276
|
-
module.exports.
|
|
2277
|
-
const ret =
|
|
2271
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2272
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2278
2273
|
return addHeapObject(ret);
|
|
2279
2274
|
};
|
|
2280
2275
|
|
|
2281
|
-
module.exports.
|
|
2282
|
-
const ret =
|
|
2276
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2277
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2283
2278
|
return addHeapObject(ret);
|
|
2284
2279
|
};
|
|
2285
2280
|
|
|
@@ -2297,15 +2292,15 @@ module.exports.__wbg_wasmconsensusvalues_new = function(arg0) {
|
|
|
2297
2292
|
return addHeapObject(ret);
|
|
2298
2293
|
};
|
|
2299
2294
|
|
|
2300
|
-
module.exports.
|
|
2295
|
+
module.exports.__wbg_sendmessage_6b0ad86b7c29c61e = function(arg0, arg1) {
|
|
2301
2296
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2302
2297
|
};
|
|
2303
2298
|
|
|
2304
|
-
module.exports.
|
|
2299
|
+
module.exports.__wbg_sendmessagetoall_87158161fc7dfd20 = function(arg0, arg1) {
|
|
2305
2300
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2306
2301
|
};
|
|
2307
2302
|
|
|
2308
|
-
module.exports.
|
|
2303
|
+
module.exports.__wbg_connecttopeer_7df0b7c8da5d34db = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2309
2304
|
let deferred0_0;
|
|
2310
2305
|
let deferred0_1;
|
|
2311
2306
|
try {
|
|
@@ -2318,12 +2313,12 @@ module.exports.__wbg_connecttopeer_8cb955d30d3861d0 = function() { return handle
|
|
|
2318
2313
|
}
|
|
2319
2314
|
}, arguments) };
|
|
2320
2315
|
|
|
2321
|
-
module.exports.
|
|
2316
|
+
module.exports.__wbg_disconnectfrompeer_df9c14251431d2b3 = function() { return handleError(function (arg0) {
|
|
2322
2317
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2323
2318
|
return addHeapObject(ret);
|
|
2324
2319
|
}, arguments) };
|
|
2325
2320
|
|
|
2326
|
-
module.exports.
|
|
2321
|
+
module.exports.__wbg_fetchblockfrompeer_19cd687aed4abc7b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2327
2322
|
let deferred0_0;
|
|
2328
2323
|
let deferred0_1;
|
|
2329
2324
|
try {
|
|
@@ -2336,7 +2331,7 @@ module.exports.__wbg_fetchblockfrompeer_4075a18285e7d97a = function() { return h
|
|
|
2336
2331
|
}
|
|
2337
2332
|
}, arguments) };
|
|
2338
2333
|
|
|
2339
|
-
module.exports.
|
|
2334
|
+
module.exports.__wbg_writevalue_ecf4ac5285a91469 = function(arg0, arg1, arg2) {
|
|
2340
2335
|
let deferred0_0;
|
|
2341
2336
|
let deferred0_1;
|
|
2342
2337
|
try {
|
|
@@ -2348,7 +2343,7 @@ module.exports.__wbg_writevalue_a665be076403bad0 = function(arg0, arg1, arg2) {
|
|
|
2348
2343
|
}
|
|
2349
2344
|
};
|
|
2350
2345
|
|
|
2351
|
-
module.exports.
|
|
2346
|
+
module.exports.__wbg_appendvalue_fc982c07202b7757 = function(arg0, arg1, arg2) {
|
|
2352
2347
|
let deferred0_0;
|
|
2353
2348
|
let deferred0_1;
|
|
2354
2349
|
try {
|
|
@@ -2360,7 +2355,7 @@ module.exports.__wbg_appendvalue_943dd409569ec922 = function(arg0, arg1, arg2) {
|
|
|
2360
2355
|
}
|
|
2361
2356
|
};
|
|
2362
2357
|
|
|
2363
|
-
module.exports.
|
|
2358
|
+
module.exports.__wbg_flushdata_68e1546e87b93293 = function(arg0, arg1) {
|
|
2364
2359
|
let deferred0_0;
|
|
2365
2360
|
let deferred0_1;
|
|
2366
2361
|
try {
|
|
@@ -2372,7 +2367,7 @@ module.exports.__wbg_flushdata_0b9276c2bc7301ab = function(arg0, arg1) {
|
|
|
2372
2367
|
}
|
|
2373
2368
|
};
|
|
2374
2369
|
|
|
2375
|
-
module.exports.
|
|
2370
|
+
module.exports.__wbg_readvalue_19e03f373e3bbfef = function() { return handleError(function (arg0, arg1) {
|
|
2376
2371
|
let deferred0_0;
|
|
2377
2372
|
let deferred0_1;
|
|
2378
2373
|
try {
|
|
@@ -2385,12 +2380,12 @@ module.exports.__wbg_readvalue_4fe71b2f0b4bbf34 = function() { return handleErro
|
|
|
2385
2380
|
}
|
|
2386
2381
|
}, arguments) };
|
|
2387
2382
|
|
|
2388
|
-
module.exports.
|
|
2383
|
+
module.exports.__wbg_loadblockfilelist_06771287005e5934 = function() { return handleError(function () {
|
|
2389
2384
|
const ret = MsgHandler.load_block_file_list();
|
|
2390
2385
|
return addHeapObject(ret);
|
|
2391
2386
|
}, arguments) };
|
|
2392
2387
|
|
|
2393
|
-
module.exports.
|
|
2388
|
+
module.exports.__wbg_isexistingfile_8f14e1cea1ac2fc0 = function() { return handleError(function (arg0, arg1) {
|
|
2394
2389
|
let deferred0_0;
|
|
2395
2390
|
let deferred0_1;
|
|
2396
2391
|
try {
|
|
@@ -2403,7 +2398,7 @@ module.exports.__wbg_isexistingfile_9ba57a7d9b4d5a82 = function() { return handl
|
|
|
2403
2398
|
}
|
|
2404
2399
|
}, arguments) };
|
|
2405
2400
|
|
|
2406
|
-
module.exports.
|
|
2401
|
+
module.exports.__wbg_removevalue_569ddb06340909fa = function() { return handleError(function (arg0, arg1) {
|
|
2407
2402
|
let deferred0_0;
|
|
2408
2403
|
let deferred0_1;
|
|
2409
2404
|
try {
|
|
@@ -2416,7 +2411,7 @@ module.exports.__wbg_removevalue_18e0e74e748a30a5 = function() { return handleEr
|
|
|
2416
2411
|
}
|
|
2417
2412
|
}, arguments) };
|
|
2418
2413
|
|
|
2419
|
-
module.exports.
|
|
2414
|
+
module.exports.__wbg_ensureblockdirectoryexists_f3555cd01725a0a8 = function() { return handleError(function (arg0, arg1) {
|
|
2420
2415
|
let deferred0_0;
|
|
2421
2416
|
let deferred0_1;
|
|
2422
2417
|
try {
|
|
@@ -2428,19 +2423,19 @@ module.exports.__wbg_ensureblockdirectoryexists_683b6e2b98978033 = function() {
|
|
|
2428
2423
|
}
|
|
2429
2424
|
}, arguments) };
|
|
2430
2425
|
|
|
2431
|
-
module.exports.
|
|
2432
|
-
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0,
|
|
2426
|
+
module.exports.__wbg_processapicall_15a53848d5377955 = function(arg0, arg1, arg2) {
|
|
2427
|
+
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2433
2428
|
};
|
|
2434
2429
|
|
|
2435
|
-
module.exports.
|
|
2436
|
-
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0,
|
|
2430
|
+
module.exports.__wbg_processapisuccess_78d716af406160e1 = function(arg0, arg1, arg2) {
|
|
2431
|
+
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2437
2432
|
};
|
|
2438
2433
|
|
|
2439
|
-
module.exports.
|
|
2440
|
-
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0,
|
|
2434
|
+
module.exports.__wbg_processapierror_957c88011799d859 = function(arg0, arg1, arg2) {
|
|
2435
|
+
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2441
2436
|
};
|
|
2442
2437
|
|
|
2443
|
-
module.exports.
|
|
2438
|
+
module.exports.__wbg_sendinterfaceevent_2558a262a3112215 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2444
2439
|
let deferred0_0;
|
|
2445
2440
|
let deferred0_1;
|
|
2446
2441
|
let deferred1_0;
|
|
@@ -2450,61 +2445,75 @@ module.exports.__wbg_sendinterfaceevent_37cf461a73d78fd9 = function(arg0, arg1,
|
|
|
2450
2445
|
deferred0_1 = arg1;
|
|
2451
2446
|
deferred1_0 = arg3;
|
|
2452
2447
|
deferred1_1 = arg4;
|
|
2453
|
-
MsgHandler.send_interface_event(getStringFromWasm0(arg0, arg1),
|
|
2448
|
+
MsgHandler.send_interface_event(getStringFromWasm0(arg0, arg1), takeObject(arg2), getStringFromWasm0(arg3, arg4));
|
|
2454
2449
|
} finally {
|
|
2455
2450
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2456
2451
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2457
2452
|
}
|
|
2458
2453
|
};
|
|
2459
2454
|
|
|
2460
|
-
module.exports.
|
|
2455
|
+
module.exports.__wbg_sendblocksuccess_7d7d2f2d156053f8 = function(arg0, arg1, arg2) {
|
|
2461
2456
|
let deferred0_0;
|
|
2462
2457
|
let deferred0_1;
|
|
2463
2458
|
try {
|
|
2464
2459
|
deferred0_0 = arg0;
|
|
2465
2460
|
deferred0_1 = arg1;
|
|
2466
|
-
MsgHandler.send_block_success(getStringFromWasm0(arg0, arg1),
|
|
2461
|
+
MsgHandler.send_block_success(getStringFromWasm0(arg0, arg1), takeObject(arg2));
|
|
2467
2462
|
} finally {
|
|
2468
2463
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2469
2464
|
}
|
|
2470
2465
|
};
|
|
2471
2466
|
|
|
2472
|
-
module.exports.
|
|
2467
|
+
module.exports.__wbg_sendwalletupdate_011131ae87fcc26a = function() {
|
|
2473
2468
|
MsgHandler.send_wallet_update();
|
|
2474
2469
|
};
|
|
2475
2470
|
|
|
2476
|
-
module.exports.
|
|
2471
|
+
module.exports.__wbg_sendnewversionalert_5eb67e3a745c1c5a = function(arg0, arg1, arg2) {
|
|
2477
2472
|
let deferred0_0;
|
|
2478
2473
|
let deferred0_1;
|
|
2479
2474
|
try {
|
|
2480
2475
|
deferred0_0 = arg0;
|
|
2481
2476
|
deferred0_1 = arg1;
|
|
2482
|
-
MsgHandler.send_new_version_alert(getStringFromWasm0(arg0, arg1),
|
|
2477
|
+
MsgHandler.send_new_version_alert(getStringFromWasm0(arg0, arg1), takeObject(arg2));
|
|
2483
2478
|
} finally {
|
|
2484
2479
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2485
2480
|
}
|
|
2486
2481
|
};
|
|
2487
2482
|
|
|
2488
|
-
module.exports.
|
|
2483
|
+
module.exports.__wbg_sendblockfetchstatusevent_3fbd875ece947b89 = function(arg0) {
|
|
2484
|
+
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2485
|
+
};
|
|
2486
|
+
|
|
2487
|
+
module.exports.__wbg_savewallet_83a9346922528210 = function() {
|
|
2489
2488
|
MsgHandler.save_wallet();
|
|
2490
2489
|
};
|
|
2491
2490
|
|
|
2492
|
-
module.exports.
|
|
2491
|
+
module.exports.__wbg_loadwallet_7da8be590ae3e7d2 = function() {
|
|
2493
2492
|
MsgHandler.load_wallet();
|
|
2494
2493
|
};
|
|
2495
2494
|
|
|
2496
|
-
module.exports.
|
|
2495
|
+
module.exports.__wbg_getmyservices_08d10cec31a6c94e = function() {
|
|
2497
2496
|
const ret = MsgHandler.get_my_services();
|
|
2498
2497
|
_assertClass(ret, WasmPeerServiceList);
|
|
2499
2498
|
var ptr1 = ret.__destroy_into_raw();
|
|
2500
2499
|
return ptr1;
|
|
2501
2500
|
};
|
|
2502
2501
|
|
|
2502
|
+
module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
2503
|
+
const ret = WasmHop.__wrap(arg0);
|
|
2504
|
+
return addHeapObject(ret);
|
|
2505
|
+
};
|
|
2506
|
+
|
|
2503
2507
|
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2504
2508
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2505
2509
|
return addHeapObject(ret);
|
|
2506
2510
|
};
|
|
2507
2511
|
|
|
2512
|
+
module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2513
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
2514
|
+
return addHeapObject(ret);
|
|
2515
|
+
};
|
|
2516
|
+
|
|
2508
2517
|
module.exports.__wbindgen_is_object = function(arg0) {
|
|
2509
2518
|
const val = getObject(arg0);
|
|
2510
2519
|
const ret = typeof(val) === 'object' && val !== null;
|
|
@@ -2521,11 +2530,6 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
|
2521
2530
|
return ret;
|
|
2522
2531
|
};
|
|
2523
2532
|
|
|
2524
|
-
module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
2525
|
-
const ret = WasmHop.__wrap(arg0);
|
|
2526
|
-
return addHeapObject(ret);
|
|
2527
|
-
};
|
|
2528
|
-
|
|
2529
2533
|
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2530
2534
|
const ret = getObject(arg0) == getObject(arg1);
|
|
2531
2535
|
return ret;
|
|
@@ -2773,7 +2777,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
|
2773
2777
|
const a = state0.a;
|
|
2774
2778
|
state0.a = 0;
|
|
2775
2779
|
try {
|
|
2776
|
-
return
|
|
2780
|
+
return __wbg_adapter_381(a, state0.b, arg0, arg1);
|
|
2777
2781
|
} finally {
|
|
2778
2782
|
state0.a = a;
|
|
2779
2783
|
}
|
|
@@ -2871,8 +2875,8 @@ module.exports.__wbindgen_memory = function() {
|
|
|
2871
2875
|
return addHeapObject(ret);
|
|
2872
2876
|
};
|
|
2873
2877
|
|
|
2874
|
-
module.exports.
|
|
2875
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2878
|
+
module.exports.__wbindgen_closure_wrapper1304 = function(arg0, arg1, arg2) {
|
|
2879
|
+
const ret = makeMutClosure(arg0, arg1, 458, __wbg_adapter_38);
|
|
2876
2880
|
return addHeapObject(ret);
|
|
2877
2881
|
};
|
|
2878
2882
|
|
package/pkg/node/index_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,66 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export function __wbg_wasmhop_free(a: number): void;
|
|
5
|
-
export function wasmhop_from(a: number, b: number): void;
|
|
6
|
-
export function wasmhop_sig(a: number, b: number): void;
|
|
7
|
-
export function wasmhop_to(a: number, b: number): void;
|
|
8
|
-
export function __wbg_wasmpeer_free(a: number): void;
|
|
9
|
-
export function wasmpeer_get_public_key(a: number): number;
|
|
10
|
-
export function wasmpeer_get_key_list(a: number): number;
|
|
11
|
-
export function wasmpeer_get_peer_index(a: number): number;
|
|
12
|
-
export function wasmpeer_new(a: number): number;
|
|
13
|
-
export function wasmpeer_get_sync_type(a: number): number;
|
|
14
|
-
export function wasmpeer_get_services(a: number): number;
|
|
15
|
-
export function wasmpeer_set_services(a: number, b: number): void;
|
|
16
|
-
export function wasmpeer_has_service(a: number, b: number): number;
|
|
17
|
-
export function __wbg_wasmslip_free(a: number): void;
|
|
18
|
-
export function wasmslip_amount(a: number): number;
|
|
19
|
-
export function wasmslip_set_amount(a: number, b: number): void;
|
|
20
|
-
export function wasmslip_slip_type(a: number): number;
|
|
21
|
-
export function wasmslip_set_slip_type(a: number, b: number): void;
|
|
22
|
-
export function wasmslip_public_key(a: number): number;
|
|
23
|
-
export function wasmslip_set_public_key(a: number, b: number): void;
|
|
24
|
-
export function wasmslip_slip_index(a: number): number;
|
|
25
|
-
export function wasmslip_set_slip_index(a: number, b: number): void;
|
|
26
|
-
export function wasmslip_block_id(a: number): number;
|
|
27
|
-
export function wasmslip_set_block_id(a: number, b: number): void;
|
|
28
|
-
export function wasmslip_tx_ordinal(a: number): number;
|
|
29
|
-
export function wasmslip_set_tx_ordinal(a: number, b: number): void;
|
|
30
|
-
export function wasmslip_set_utxo_key(a: number, b: number): void;
|
|
31
|
-
export function wasmslip_utxo_key(a: number): number;
|
|
32
|
-
export function wasmslip_new(): number;
|
|
33
|
-
export function __wbg_wasmwallet_free(a: number): void;
|
|
34
|
-
export function __wbg_wasmwalletslip_free(a: number): void;
|
|
35
|
-
export function wasmwallet_save(a: number): number;
|
|
36
|
-
export function wasmwallet_reset(a: number): number;
|
|
37
|
-
export function wasmwallet_load(a: number): number;
|
|
38
|
-
export function wasmwallet_get_public_key(a: number): number;
|
|
39
|
-
export function wasmwallet_set_public_key(a: number, b: number): number;
|
|
40
|
-
export function wasmwallet_get_private_key(a: number): number;
|
|
41
|
-
export function wasmwallet_set_private_key(a: number, b: number): number;
|
|
42
|
-
export function wasmwallet_get_balance(a: number): number;
|
|
43
|
-
export function wasmwallet_get_pending_txs(a: number): number;
|
|
44
|
-
export function wasmwallet_get_slips(a: number): number;
|
|
45
|
-
export function wasmwallet_add_slip(a: number, b: number): number;
|
|
46
|
-
export function wasmwallet_add_to_pending(a: number, b: number): number;
|
|
47
|
-
export function wasmwallet_get_key_list(a: number): number;
|
|
48
|
-
export function wasmwallet_set_key_list(a: number, b: number): number;
|
|
49
|
-
export function wasmwalletslip_get_utxokey(a: number): number;
|
|
50
|
-
export function wasmwalletslip_set_utxokey(a: number, b: number): void;
|
|
51
|
-
export function wasmwalletslip_get_slip_index(a: number): number;
|
|
52
|
-
export function wasmwalletslip_set_slip_index(a: number, b: number): void;
|
|
53
|
-
export function wasmwalletslip_is_spent(a: number): number;
|
|
54
|
-
export function wasmwalletslip_set_spent(a: number, b: number): void;
|
|
55
|
-
export function wasmwalletslip_is_lc(a: number): number;
|
|
56
|
-
export function wasmwalletslip_set_lc(a: number, b: number): void;
|
|
57
|
-
export function wasmwalletslip_new_(): number;
|
|
58
|
-
export function wasmwalletslip_get_amount(a: number): number;
|
|
59
|
-
export function wasmwalletslip_get_block_id(a: number): number;
|
|
60
|
-
export function wasmwalletslip_get_tx_ordinal(a: number): number;
|
|
61
|
-
export function wasmwalletslip_set_amount(a: number, b: number): void;
|
|
62
|
-
export function wasmwalletslip_set_block_id(a: number, b: number): void;
|
|
63
|
-
export function wasmwalletslip_set_tx_ordinal(a: number, b: number): void;
|
|
64
4
|
export function __wbg_wasmblock_free(a: number): void;
|
|
65
5
|
export function wasmblock_new(): number;
|
|
66
6
|
export function wasmblock_get_transactions(a: number): number;
|
|
@@ -104,22 +44,6 @@ export function wasmblock_has_keylist_txs(a: number, b: number): number;
|
|
|
104
44
|
export function wasmblock_generate_lite_block(a: number, b: number): number;
|
|
105
45
|
export function wasmblock_treasury(a: number): number;
|
|
106
46
|
export function wasmblock_graveyard(a: number): number;
|
|
107
|
-
export function __wbg_wasmblockchain_free(a: number): void;
|
|
108
|
-
export function wasmblockchain_reset(a: number): number;
|
|
109
|
-
export function wasmblockchain_get_last_block_id(a: number): number;
|
|
110
|
-
export function wasmblockchain_get_last_timestamp(a: number): number;
|
|
111
|
-
export function wasmblockchain_get_longest_chain_hash_at(a: number, b: number): number;
|
|
112
|
-
export function wasmblockchain_get_last_block_hash(a: number): number;
|
|
113
|
-
export function wasmblockchain_get_last_burnfee(a: number): number;
|
|
114
|
-
export function wasmblockchain_get_genesis_block_id(a: number): number;
|
|
115
|
-
export function wasmblockchain_get_genesis_timestamp(a: number): number;
|
|
116
|
-
export function wasmblockchain_get_lowest_acceptable_timestamp(a: number): number;
|
|
117
|
-
export function wasmblockchain_get_lowest_acceptable_block_hash(a: number): number;
|
|
118
|
-
export function wasmblockchain_get_lowest_acceptable_block_id(a: number): number;
|
|
119
|
-
export function wasmblockchain_get_latest_block_id(a: number): number;
|
|
120
|
-
export function wasmblockchain_get_fork_id(a: number): number;
|
|
121
|
-
export function wasmblockchain_get_longest_chain_hash_at_id(a: number, b: number): number;
|
|
122
|
-
export function wasmblockchain_get_hashes_at_id(a: number, b: number): number;
|
|
123
47
|
export function __wbg_wasmconsensusvalues_free(a: number): void;
|
|
124
48
|
export function wasmconsensusvalues_it_num(a: number): number;
|
|
125
49
|
export function wasmconsensusvalues_fee_transaction(a: number): number;
|
|
@@ -153,6 +77,22 @@ export function wasmbalancesnapshot_get_file_name(a: number): number;
|
|
|
153
77
|
export function wasmbalancesnapshot_get_entries(a: number): number;
|
|
154
78
|
export function wasmbalancesnapshot_from_string(a: number, b: number): void;
|
|
155
79
|
export function wasmbalancesnapshot_to_string(a: number): number;
|
|
80
|
+
export function __wbg_wasmblockchain_free(a: number): void;
|
|
81
|
+
export function wasmblockchain_reset(a: number): number;
|
|
82
|
+
export function wasmblockchain_get_last_block_id(a: number): number;
|
|
83
|
+
export function wasmblockchain_get_last_timestamp(a: number): number;
|
|
84
|
+
export function wasmblockchain_get_longest_chain_hash_at(a: number, b: number): number;
|
|
85
|
+
export function wasmblockchain_get_last_block_hash(a: number): number;
|
|
86
|
+
export function wasmblockchain_get_last_burnfee(a: number): number;
|
|
87
|
+
export function wasmblockchain_get_genesis_block_id(a: number): number;
|
|
88
|
+
export function wasmblockchain_get_genesis_timestamp(a: number): number;
|
|
89
|
+
export function wasmblockchain_get_lowest_acceptable_timestamp(a: number): number;
|
|
90
|
+
export function wasmblockchain_get_lowest_acceptable_block_hash(a: number): number;
|
|
91
|
+
export function wasmblockchain_get_lowest_acceptable_block_id(a: number): number;
|
|
92
|
+
export function wasmblockchain_get_latest_block_id(a: number): number;
|
|
93
|
+
export function wasmblockchain_get_fork_id(a: number): number;
|
|
94
|
+
export function wasmblockchain_get_longest_chain_hash_at_id(a: number, b: number): number;
|
|
95
|
+
export function wasmblockchain_get_hashes_at_id(a: number, b: number): number;
|
|
156
96
|
export function __wbg_wasmconfiguration_free(a: number): void;
|
|
157
97
|
export function wasmconfiguration_new(): number;
|
|
158
98
|
export function __wbg_saitowasm_free(a: number): void;
|
|
@@ -217,6 +157,66 @@ export function wasmtransaction_set_type(a: number, b: number): void;
|
|
|
217
157
|
export function wasmtransaction_total_fees(a: number): number;
|
|
218
158
|
export function wasmtransaction_serialize(a: number): number;
|
|
219
159
|
export function wasmtransaction_deserialize(a: number, b: number): void;
|
|
160
|
+
export function __wbg_wasmhop_free(a: number): void;
|
|
161
|
+
export function wasmhop_from(a: number, b: number): void;
|
|
162
|
+
export function wasmhop_sig(a: number, b: number): void;
|
|
163
|
+
export function wasmhop_to(a: number, b: number): void;
|
|
164
|
+
export function __wbg_wasmpeer_free(a: number): void;
|
|
165
|
+
export function wasmpeer_get_public_key(a: number): number;
|
|
166
|
+
export function wasmpeer_get_key_list(a: number): number;
|
|
167
|
+
export function wasmpeer_get_peer_index(a: number): number;
|
|
168
|
+
export function wasmpeer_new(a: number): number;
|
|
169
|
+
export function wasmpeer_get_sync_type(a: number): number;
|
|
170
|
+
export function wasmpeer_get_services(a: number): number;
|
|
171
|
+
export function wasmpeer_set_services(a: number, b: number): void;
|
|
172
|
+
export function wasmpeer_has_service(a: number, b: number): number;
|
|
173
|
+
export function __wbg_wasmslip_free(a: number): void;
|
|
174
|
+
export function wasmslip_amount(a: number): number;
|
|
175
|
+
export function wasmslip_set_amount(a: number, b: number): void;
|
|
176
|
+
export function wasmslip_slip_type(a: number): number;
|
|
177
|
+
export function wasmslip_set_slip_type(a: number, b: number): void;
|
|
178
|
+
export function wasmslip_public_key(a: number): number;
|
|
179
|
+
export function wasmslip_set_public_key(a: number, b: number): void;
|
|
180
|
+
export function wasmslip_slip_index(a: number): number;
|
|
181
|
+
export function wasmslip_set_slip_index(a: number, b: number): void;
|
|
182
|
+
export function wasmslip_block_id(a: number): number;
|
|
183
|
+
export function wasmslip_set_block_id(a: number, b: number): void;
|
|
184
|
+
export function wasmslip_tx_ordinal(a: number): number;
|
|
185
|
+
export function wasmslip_set_tx_ordinal(a: number, b: number): void;
|
|
186
|
+
export function wasmslip_set_utxo_key(a: number, b: number): void;
|
|
187
|
+
export function wasmslip_utxo_key(a: number): number;
|
|
188
|
+
export function wasmslip_new(): number;
|
|
189
|
+
export function __wbg_wasmwallet_free(a: number): void;
|
|
190
|
+
export function __wbg_wasmwalletslip_free(a: number): void;
|
|
191
|
+
export function wasmwallet_save(a: number): number;
|
|
192
|
+
export function wasmwallet_reset(a: number): number;
|
|
193
|
+
export function wasmwallet_load(a: number): number;
|
|
194
|
+
export function wasmwallet_get_public_key(a: number): number;
|
|
195
|
+
export function wasmwallet_set_public_key(a: number, b: number): number;
|
|
196
|
+
export function wasmwallet_get_private_key(a: number): number;
|
|
197
|
+
export function wasmwallet_set_private_key(a: number, b: number): number;
|
|
198
|
+
export function wasmwallet_get_balance(a: number): number;
|
|
199
|
+
export function wasmwallet_get_pending_txs(a: number): number;
|
|
200
|
+
export function wasmwallet_get_slips(a: number): number;
|
|
201
|
+
export function wasmwallet_add_slip(a: number, b: number): number;
|
|
202
|
+
export function wasmwallet_add_to_pending(a: number, b: number): number;
|
|
203
|
+
export function wasmwallet_get_key_list(a: number): number;
|
|
204
|
+
export function wasmwallet_set_key_list(a: number, b: number): number;
|
|
205
|
+
export function wasmwalletslip_get_utxokey(a: number): number;
|
|
206
|
+
export function wasmwalletslip_set_utxokey(a: number, b: number): void;
|
|
207
|
+
export function wasmwalletslip_get_slip_index(a: number): number;
|
|
208
|
+
export function wasmwalletslip_set_slip_index(a: number, b: number): void;
|
|
209
|
+
export function wasmwalletslip_is_spent(a: number): number;
|
|
210
|
+
export function wasmwalletslip_set_spent(a: number, b: number): void;
|
|
211
|
+
export function wasmwalletslip_is_lc(a: number): number;
|
|
212
|
+
export function wasmwalletslip_set_lc(a: number, b: number): void;
|
|
213
|
+
export function wasmwalletslip_new_(): number;
|
|
214
|
+
export function wasmwalletslip_get_amount(a: number): number;
|
|
215
|
+
export function wasmwalletslip_get_block_id(a: number): number;
|
|
216
|
+
export function wasmwalletslip_get_tx_ordinal(a: number): number;
|
|
217
|
+
export function wasmwalletslip_set_amount(a: number, b: number): void;
|
|
218
|
+
export function wasmwalletslip_set_block_id(a: number, b: number): void;
|
|
219
|
+
export function wasmwalletslip_set_tx_ordinal(a: number, b: number): void;
|
|
220
220
|
export function rustsecp256k1_v0_10_0_context_create(a: number): number;
|
|
221
221
|
export function rustsecp256k1_v0_10_0_context_destroy(a: number): void;
|
|
222
222
|
export function rustsecp256k1_v0_10_0_default_illegal_callback_fn(a: number, b: number): void;
|
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.25",
|
|
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
|
}
|
|
@@ -71,6 +71,10 @@ class MsgHandler {
|
|
|
71
71
|
return global.shared_methods.send_interface_event(event, peerIndex, public_key);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
static send_block_fetch_status_event(count) {
|
|
75
|
+
return global.shared_methods.send_block_fetch_status_event(count);
|
|
76
|
+
}
|
|
77
|
+
|
|
74
78
|
static save_wallet() {
|
|
75
79
|
return global.shared_methods.save_wallet();
|
|
76
80
|
}
|