saito-wasm 0.2.4 → 0.2.5
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.d.ts +1 -2
- package/pkg/node/index.js +77 -83
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +2 -2
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +3 -4
- package/pkg/web/index.js +74 -79
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +2 -2
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-a07e1fafe917b5c6 → saito-wasm-69ae4f04e698b514}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-a07e1fafe917b5c6 → saito-wasm-69ae4f04e698b514}/js/msg_handler.js +0 -0
package/Cargo.toml
CHANGED
package/package.json
CHANGED
package/pkg/node/index.d.ts
CHANGED
|
@@ -588,10 +588,9 @@ export class WasmTransaction {
|
|
|
588
588
|
*/
|
|
589
589
|
is_to(key: string): boolean;
|
|
590
590
|
/**
|
|
591
|
-
* @param {string} private_key
|
|
592
591
|
* @returns {Promise<void>}
|
|
593
592
|
*/
|
|
594
|
-
sign(
|
|
593
|
+
sign(): Promise<void>;
|
|
595
594
|
/**
|
|
596
595
|
* @returns {Uint8Array}
|
|
597
596
|
*/
|
package/pkg/node/index.js
CHANGED
|
@@ -1,32 +1,28 @@
|
|
|
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-69ae4f04e698b514/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const heap = new Array(128).fill(undefined);
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
heap.push(undefined, null, true, false);
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function getObject(idx) { return heap[idx]; }
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
15
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
16
|
-
}
|
|
17
|
-
return cachedUint8Memory0;
|
|
18
|
-
}
|
|
13
|
+
let heap_next = heap.length;
|
|
19
14
|
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
function dropObject(idx) {
|
|
16
|
+
if (idx < 132) return;
|
|
17
|
+
heap[idx] = heap_next;
|
|
18
|
+
heap_next = idx;
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
function takeObject(idx) {
|
|
22
|
+
const ret = getObject(idx);
|
|
23
|
+
dropObject(idx);
|
|
24
|
+
return ret;
|
|
25
|
+
}
|
|
30
26
|
|
|
31
27
|
function addHeapObject(obj) {
|
|
32
28
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
@@ -37,18 +33,22 @@ function addHeapObject(obj) {
|
|
|
37
33
|
return idx;
|
|
38
34
|
}
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
cachedTextDecoder.decode();
|
|
39
|
+
|
|
40
|
+
let cachedUint8Memory0 = null;
|
|
41
|
+
|
|
42
|
+
function getUint8Memory0() {
|
|
43
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
44
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
45
|
+
}
|
|
46
|
+
return cachedUint8Memory0;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return ret;
|
|
49
|
+
function getStringFromWasm0(ptr, len) {
|
|
50
|
+
ptr = ptr >>> 0;
|
|
51
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
@@ -582,7 +582,7 @@ function handleError(f, args) {
|
|
|
582
582
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function __wbg_adapter_372(arg0, arg1, arg2, arg3) {
|
|
586
586
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h633d734e7d6d6514(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
587
587
|
}
|
|
588
588
|
|
|
@@ -1856,11 +1856,10 @@ class WasmTransaction {
|
|
|
1856
1856
|
wasm.wasmtransaction_set_timestamp(this.__wbg_ptr, timestamp);
|
|
1857
1857
|
}
|
|
1858
1858
|
/**
|
|
1859
|
-
* @param {string} private_key
|
|
1860
1859
|
* @returns {Promise<void>}
|
|
1861
1860
|
*/
|
|
1862
|
-
sign(
|
|
1863
|
-
const ret = wasm.wasmtransaction_sign(this.__wbg_ptr
|
|
1861
|
+
sign() {
|
|
1862
|
+
const ret = wasm.wasmtransaction_sign(this.__wbg_ptr);
|
|
1864
1863
|
return takeObject(ret);
|
|
1865
1864
|
}
|
|
1866
1865
|
/**
|
|
@@ -2068,7 +2067,7 @@ class WasmWalletSlip {
|
|
|
2068
2067
|
* @returns {string}
|
|
2069
2068
|
*/
|
|
2070
2069
|
get_utxokey() {
|
|
2071
|
-
const ret = wasm.
|
|
2070
|
+
const ret = wasm.wasmwalletslip_get_utxokey(this.__wbg_ptr);
|
|
2072
2071
|
return takeObject(ret);
|
|
2073
2072
|
}
|
|
2074
2073
|
/**
|
|
@@ -2165,25 +2164,10 @@ class WasmWalletSlip {
|
|
|
2165
2164
|
}
|
|
2166
2165
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2167
2166
|
|
|
2168
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2169
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2170
|
-
return addHeapObject(ret);
|
|
2171
|
-
};
|
|
2172
|
-
|
|
2173
2167
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2174
2168
|
takeObject(arg0);
|
|
2175
2169
|
};
|
|
2176
2170
|
|
|
2177
|
-
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2178
|
-
const ret = WasmBlock.__wrap(arg0);
|
|
2179
|
-
return addHeapObject(ret);
|
|
2180
|
-
};
|
|
2181
|
-
|
|
2182
|
-
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2183
|
-
const ret = WasmTransaction.__wrap(arg0);
|
|
2184
|
-
return addHeapObject(ret);
|
|
2185
|
-
};
|
|
2186
|
-
|
|
2187
2171
|
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2188
2172
|
const ret = BigInt.asUintN(64, arg0);
|
|
2189
2173
|
return addHeapObject(ret);
|
|
@@ -2194,13 +2178,13 @@ module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
|
2194
2178
|
return addHeapObject(ret);
|
|
2195
2179
|
};
|
|
2196
2180
|
|
|
2197
|
-
module.exports.
|
|
2198
|
-
const ret =
|
|
2181
|
+
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2182
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2199
2183
|
return addHeapObject(ret);
|
|
2200
2184
|
};
|
|
2201
2185
|
|
|
2202
|
-
module.exports.
|
|
2203
|
-
const ret =
|
|
2186
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2187
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2204
2188
|
return addHeapObject(ret);
|
|
2205
2189
|
};
|
|
2206
2190
|
|
|
@@ -2209,8 +2193,18 @@ module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
|
2209
2193
|
return addHeapObject(ret);
|
|
2210
2194
|
};
|
|
2211
2195
|
|
|
2212
|
-
module.exports.
|
|
2213
|
-
const ret =
|
|
2196
|
+
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2197
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2198
|
+
return addHeapObject(ret);
|
|
2199
|
+
};
|
|
2200
|
+
|
|
2201
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2202
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2203
|
+
return addHeapObject(ret);
|
|
2204
|
+
};
|
|
2205
|
+
|
|
2206
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2207
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2214
2208
|
return addHeapObject(ret);
|
|
2215
2209
|
};
|
|
2216
2210
|
|
|
@@ -2219,6 +2213,11 @@ module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
|
2219
2213
|
return addHeapObject(ret);
|
|
2220
2214
|
};
|
|
2221
2215
|
|
|
2216
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2217
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2218
|
+
return addHeapObject(ret);
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2222
2221
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2223
2222
|
const obj = getObject(arg1);
|
|
2224
2223
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -2248,15 +2247,15 @@ module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
|
2248
2247
|
return addHeapObject(ret);
|
|
2249
2248
|
};
|
|
2250
2249
|
|
|
2251
|
-
module.exports.
|
|
2250
|
+
module.exports.__wbg_sendmessage_2fb4eb5e1fb5ce92 = function(arg0, arg1) {
|
|
2252
2251
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2253
2252
|
};
|
|
2254
2253
|
|
|
2255
|
-
module.exports.
|
|
2254
|
+
module.exports.__wbg_sendmessagetoall_82fb1731c191408b = function(arg0, arg1) {
|
|
2256
2255
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2257
2256
|
};
|
|
2258
2257
|
|
|
2259
|
-
module.exports.
|
|
2258
|
+
module.exports.__wbg_connecttopeer_ad1082a2016dbb15 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2260
2259
|
let deferred0_0;
|
|
2261
2260
|
let deferred0_1;
|
|
2262
2261
|
try {
|
|
@@ -2269,12 +2268,12 @@ module.exports.__wbg_connecttopeer_34eab1844d61a5c0 = function() { return handle
|
|
|
2269
2268
|
}
|
|
2270
2269
|
}, arguments) };
|
|
2271
2270
|
|
|
2272
|
-
module.exports.
|
|
2271
|
+
module.exports.__wbg_disconnectfrompeer_789575120f5b2a77 = function() { return handleError(function (arg0) {
|
|
2273
2272
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2274
2273
|
return addHeapObject(ret);
|
|
2275
2274
|
}, arguments) };
|
|
2276
2275
|
|
|
2277
|
-
module.exports.
|
|
2276
|
+
module.exports.__wbg_fetchblockfrompeer_074e2f4b8da268fc = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2278
2277
|
let deferred0_0;
|
|
2279
2278
|
let deferred0_1;
|
|
2280
2279
|
try {
|
|
@@ -2287,7 +2286,7 @@ module.exports.__wbg_fetchblockfrompeer_7130e7753ae6e06c = function() { return h
|
|
|
2287
2286
|
}
|
|
2288
2287
|
}, arguments) };
|
|
2289
2288
|
|
|
2290
|
-
module.exports.
|
|
2289
|
+
module.exports.__wbg_writevalue_ac4432c03bbafa5b = function(arg0, arg1, arg2) {
|
|
2291
2290
|
let deferred0_0;
|
|
2292
2291
|
let deferred0_1;
|
|
2293
2292
|
try {
|
|
@@ -2299,7 +2298,7 @@ module.exports.__wbg_writevalue_911fb41ea9729264 = function(arg0, arg1, arg2) {
|
|
|
2299
2298
|
}
|
|
2300
2299
|
};
|
|
2301
2300
|
|
|
2302
|
-
module.exports.
|
|
2301
|
+
module.exports.__wbg_appendvalue_d5035e0293073822 = function(arg0, arg1, arg2) {
|
|
2303
2302
|
let deferred0_0;
|
|
2304
2303
|
let deferred0_1;
|
|
2305
2304
|
try {
|
|
@@ -2311,7 +2310,7 @@ module.exports.__wbg_appendvalue_5c921467f4ba535e = function(arg0, arg1, arg2) {
|
|
|
2311
2310
|
}
|
|
2312
2311
|
};
|
|
2313
2312
|
|
|
2314
|
-
module.exports.
|
|
2313
|
+
module.exports.__wbg_flushdata_43cc88ecc9a7bacf = function(arg0, arg1) {
|
|
2315
2314
|
let deferred0_0;
|
|
2316
2315
|
let deferred0_1;
|
|
2317
2316
|
try {
|
|
@@ -2323,7 +2322,7 @@ module.exports.__wbg_flushdata_69c2b56988946a06 = function(arg0, arg1) {
|
|
|
2323
2322
|
}
|
|
2324
2323
|
};
|
|
2325
2324
|
|
|
2326
|
-
module.exports.
|
|
2325
|
+
module.exports.__wbg_readvalue_270bd3c527b3b626 = function() { return handleError(function (arg0, arg1) {
|
|
2327
2326
|
let deferred0_0;
|
|
2328
2327
|
let deferred0_1;
|
|
2329
2328
|
try {
|
|
@@ -2336,12 +2335,12 @@ module.exports.__wbg_readvalue_a0ef58f234498dc1 = function() { return handleErro
|
|
|
2336
2335
|
}
|
|
2337
2336
|
}, arguments) };
|
|
2338
2337
|
|
|
2339
|
-
module.exports.
|
|
2338
|
+
module.exports.__wbg_loadblockfilelist_6ee80bb6826e2837 = function() { return handleError(function () {
|
|
2340
2339
|
const ret = MsgHandler.load_block_file_list();
|
|
2341
2340
|
return addHeapObject(ret);
|
|
2342
2341
|
}, arguments) };
|
|
2343
2342
|
|
|
2344
|
-
module.exports.
|
|
2343
|
+
module.exports.__wbg_isexistingfile_7479195f7f35072b = function() { return handleError(function (arg0, arg1) {
|
|
2345
2344
|
let deferred0_0;
|
|
2346
2345
|
let deferred0_1;
|
|
2347
2346
|
try {
|
|
@@ -2354,7 +2353,7 @@ module.exports.__wbg_isexistingfile_dccfea43fa6c57a4 = function() { return handl
|
|
|
2354
2353
|
}
|
|
2355
2354
|
}, arguments) };
|
|
2356
2355
|
|
|
2357
|
-
module.exports.
|
|
2356
|
+
module.exports.__wbg_removevalue_bba5f72736098022 = function() { return handleError(function (arg0, arg1) {
|
|
2358
2357
|
let deferred0_0;
|
|
2359
2358
|
let deferred0_1;
|
|
2360
2359
|
try {
|
|
@@ -2367,7 +2366,7 @@ module.exports.__wbg_removevalue_8d74a068d1ccffa9 = function() { return handleEr
|
|
|
2367
2366
|
}
|
|
2368
2367
|
}, arguments) };
|
|
2369
2368
|
|
|
2370
|
-
module.exports.
|
|
2369
|
+
module.exports.__wbg_ensureblockdirectoryexists_c8ab9c961a633eea = function() { return handleError(function (arg0, arg1) {
|
|
2371
2370
|
let deferred0_0;
|
|
2372
2371
|
let deferred0_1;
|
|
2373
2372
|
try {
|
|
@@ -2379,19 +2378,19 @@ module.exports.__wbg_ensureblockdirectoryexists_79540c3dff4ee1cf = function() {
|
|
|
2379
2378
|
}
|
|
2380
2379
|
}, arguments) };
|
|
2381
2380
|
|
|
2382
|
-
module.exports.
|
|
2381
|
+
module.exports.__wbg_processapicall_1808c81ea2b0811b = function(arg0, arg1, arg2) {
|
|
2383
2382
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
|
|
2384
2383
|
};
|
|
2385
2384
|
|
|
2386
|
-
module.exports.
|
|
2385
|
+
module.exports.__wbg_processapisuccess_d7e274eda8689aaf = function(arg0, arg1, arg2) {
|
|
2387
2386
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
|
|
2388
2387
|
};
|
|
2389
2388
|
|
|
2390
|
-
module.exports.
|
|
2389
|
+
module.exports.__wbg_processapierror_e14bc8efef636c67 = function(arg0, arg1, arg2) {
|
|
2391
2390
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
|
|
2392
2391
|
};
|
|
2393
2392
|
|
|
2394
|
-
module.exports.
|
|
2393
|
+
module.exports.__wbg_sendinterfaceevent_f7f7e8ea0d79e2e8 = function(arg0, arg1, arg2) {
|
|
2395
2394
|
let deferred0_0;
|
|
2396
2395
|
let deferred0_1;
|
|
2397
2396
|
try {
|
|
@@ -2403,7 +2402,7 @@ module.exports.__wbg_sendinterfaceevent_c214ce9e2a672dd1 = function(arg0, arg1,
|
|
|
2403
2402
|
}
|
|
2404
2403
|
};
|
|
2405
2404
|
|
|
2406
|
-
module.exports.
|
|
2405
|
+
module.exports.__wbg_sendblocksuccess_3f8552322c16f5f2 = function(arg0, arg1, arg2) {
|
|
2407
2406
|
let deferred0_0;
|
|
2408
2407
|
let deferred0_1;
|
|
2409
2408
|
try {
|
|
@@ -2415,11 +2414,11 @@ module.exports.__wbg_sendblocksuccess_9628c887be151962 = function(arg0, arg1, ar
|
|
|
2415
2414
|
}
|
|
2416
2415
|
};
|
|
2417
2416
|
|
|
2418
|
-
module.exports.
|
|
2417
|
+
module.exports.__wbg_sendwalletupdate_29571ffa109716fa = function() {
|
|
2419
2418
|
MsgHandler.send_wallet_update();
|
|
2420
2419
|
};
|
|
2421
2420
|
|
|
2422
|
-
module.exports.
|
|
2421
|
+
module.exports.__wbg_sendnewversionalert_034951d778a25ba8 = function(arg0, arg1, arg2) {
|
|
2423
2422
|
let deferred0_0;
|
|
2424
2423
|
let deferred0_1;
|
|
2425
2424
|
try {
|
|
@@ -2431,15 +2430,15 @@ module.exports.__wbg_sendnewversionalert_97d88b033f29573c = function(arg0, arg1,
|
|
|
2431
2430
|
}
|
|
2432
2431
|
};
|
|
2433
2432
|
|
|
2434
|
-
module.exports.
|
|
2433
|
+
module.exports.__wbg_savewallet_7248be77a005dd52 = function() {
|
|
2435
2434
|
MsgHandler.save_wallet();
|
|
2436
2435
|
};
|
|
2437
2436
|
|
|
2438
|
-
module.exports.
|
|
2437
|
+
module.exports.__wbg_loadwallet_5153f6b85a5cd29c = function() {
|
|
2439
2438
|
MsgHandler.load_wallet();
|
|
2440
2439
|
};
|
|
2441
2440
|
|
|
2442
|
-
module.exports.
|
|
2441
|
+
module.exports.__wbg_getmyservices_78b2eb2d7d64f049 = function() {
|
|
2443
2442
|
const ret = MsgHandler.get_my_services();
|
|
2444
2443
|
_assertClass(ret, WasmPeerServiceList);
|
|
2445
2444
|
var ptr1 = ret.__destroy_into_raw();
|
|
@@ -2637,11 +2636,6 @@ module.exports.__wbg_call_27c0f87801dedf93 = function() { return handleError(fun
|
|
|
2637
2636
|
return addHeapObject(ret);
|
|
2638
2637
|
}, arguments) };
|
|
2639
2638
|
|
|
2640
|
-
module.exports.__wbg_length_dee433d4c85c9387 = function(arg0) {
|
|
2641
|
-
const ret = getObject(arg0).length;
|
|
2642
|
-
return ret;
|
|
2643
|
-
};
|
|
2644
|
-
|
|
2645
2639
|
module.exports.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
|
|
2646
2640
|
const ret = self.self;
|
|
2647
2641
|
return addHeapObject(ret);
|
|
@@ -2714,7 +2708,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
|
2714
2708
|
const a = state0.a;
|
|
2715
2709
|
state0.a = 0;
|
|
2716
2710
|
try {
|
|
2717
|
-
return
|
|
2711
|
+
return __wbg_adapter_372(a, state0.b, arg0, arg1);
|
|
2718
2712
|
} finally {
|
|
2719
2713
|
state0.a = a;
|
|
2720
2714
|
}
|
|
@@ -2812,7 +2806,7 @@ module.exports.__wbindgen_memory = function() {
|
|
|
2812
2806
|
return addHeapObject(ret);
|
|
2813
2807
|
};
|
|
2814
2808
|
|
|
2815
|
-
module.exports.
|
|
2809
|
+
module.exports.__wbindgen_closure_wrapper1209 = function(arg0, arg1, arg2) {
|
|
2816
2810
|
const ret = makeMutClosure(arg0, arg1, 456, __wbg_adapter_38);
|
|
2817
2811
|
return addHeapObject(ret);
|
|
2818
2812
|
};
|
package/pkg/node/index_bg.wasm
CHANGED
|
Binary file
|
|
@@ -161,7 +161,7 @@ export function wasmtransaction_get_data(a: number): number;
|
|
|
161
161
|
export function wasmtransaction_set_data(a: number, b: number): void;
|
|
162
162
|
export function wasmtransaction_get_timestamp(a: number): number;
|
|
163
163
|
export function wasmtransaction_set_timestamp(a: number, b: number): void;
|
|
164
|
-
export function wasmtransaction_sign(a: number
|
|
164
|
+
export function wasmtransaction_sign(a: number): number;
|
|
165
165
|
export function wasmtransaction_get_type(a: number): number;
|
|
166
166
|
export function wasmtransaction_set_type(a: number, b: number): void;
|
|
167
167
|
export function wasmtransaction_total_fees(a: number): number;
|
|
@@ -182,6 +182,7 @@ export function wasmwallet_get_slips(a: number): number;
|
|
|
182
182
|
export function wasmwallet_add_slip(a: number, b: number): number;
|
|
183
183
|
export function wasmwallet_get_key_list(a: number): number;
|
|
184
184
|
export function wasmwallet_set_key_list(a: number, b: number): number;
|
|
185
|
+
export function wasmwalletslip_get_utxokey(a: number): number;
|
|
185
186
|
export function wasmwalletslip_set_utxokey(a: number, b: number): void;
|
|
186
187
|
export function wasmwalletslip_get_slip_index(a: number): number;
|
|
187
188
|
export function wasmwalletslip_set_slip_index(a: number, b: number): void;
|
|
@@ -196,7 +197,6 @@ export function wasmwalletslip_get_tx_ordinal(a: number): number;
|
|
|
196
197
|
export function wasmwalletslip_set_amount(a: number, b: number): void;
|
|
197
198
|
export function wasmwalletslip_set_block_id(a: number, b: number): void;
|
|
198
199
|
export function wasmwalletslip_set_tx_ordinal(a: number, b: number): void;
|
|
199
|
-
export function wasmwalletslip_get_utxokey(a: number): number;
|
|
200
200
|
export function __wbg_wasmhop_free(a: number): void;
|
|
201
201
|
export function wasmhop_from(a: number, b: number): void;
|
|
202
202
|
export function wasmhop_sig(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.5",
|
|
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.d.ts
CHANGED
|
@@ -588,10 +588,9 @@ export class WasmTransaction {
|
|
|
588
588
|
*/
|
|
589
589
|
is_to(key: string): boolean;
|
|
590
590
|
/**
|
|
591
|
-
* @param {string} private_key
|
|
592
591
|
* @returns {Promise<void>}
|
|
593
592
|
*/
|
|
594
|
-
sign(
|
|
593
|
+
sign(): Promise<void>;
|
|
595
594
|
/**
|
|
596
595
|
* @returns {Uint8Array}
|
|
597
596
|
*/
|
|
@@ -919,7 +918,7 @@ export interface InitOutput {
|
|
|
919
918
|
readonly wasmtransaction_set_data: (a: number, b: number) => void;
|
|
920
919
|
readonly wasmtransaction_get_timestamp: (a: number) => number;
|
|
921
920
|
readonly wasmtransaction_set_timestamp: (a: number, b: number) => void;
|
|
922
|
-
readonly wasmtransaction_sign: (a: number
|
|
921
|
+
readonly wasmtransaction_sign: (a: number) => number;
|
|
923
922
|
readonly wasmtransaction_get_type: (a: number) => number;
|
|
924
923
|
readonly wasmtransaction_set_type: (a: number, b: number) => void;
|
|
925
924
|
readonly wasmtransaction_total_fees: (a: number) => number;
|
|
@@ -940,6 +939,7 @@ export interface InitOutput {
|
|
|
940
939
|
readonly wasmwallet_add_slip: (a: number, b: number) => number;
|
|
941
940
|
readonly wasmwallet_get_key_list: (a: number) => number;
|
|
942
941
|
readonly wasmwallet_set_key_list: (a: number, b: number) => number;
|
|
942
|
+
readonly wasmwalletslip_get_utxokey: (a: number) => number;
|
|
943
943
|
readonly wasmwalletslip_set_utxokey: (a: number, b: number) => void;
|
|
944
944
|
readonly wasmwalletslip_get_slip_index: (a: number) => number;
|
|
945
945
|
readonly wasmwalletslip_set_slip_index: (a: number, b: number) => void;
|
|
@@ -954,7 +954,6 @@ export interface InitOutput {
|
|
|
954
954
|
readonly wasmwalletslip_set_amount: (a: number, b: number) => void;
|
|
955
955
|
readonly wasmwalletslip_set_block_id: (a: number, b: number) => void;
|
|
956
956
|
readonly wasmwalletslip_set_tx_ordinal: (a: number, b: number) => void;
|
|
957
|
-
readonly wasmwalletslip_get_utxokey: (a: number) => number;
|
|
958
957
|
readonly __wbg_wasmhop_free: (a: number) => void;
|
|
959
958
|
readonly wasmhop_from: (a: number, b: number) => void;
|
|
960
959
|
readonly wasmhop_sig: (a: number, b: number) => void;
|
package/pkg/web/index.js
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
import { MsgHandler } from './snippets/saito-wasm-
|
|
1
|
+
import { MsgHandler } from './snippets/saito-wasm-69ae4f04e698b514/js/msg_handler.js';
|
|
2
2
|
|
|
3
3
|
let wasm;
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const heap = new Array(128).fill(undefined);
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
heap.push(undefined, null, true, false);
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
function getObject(idx) { return heap[idx]; }
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
13
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
14
|
-
}
|
|
15
|
-
return cachedUint8Memory0;
|
|
16
|
-
}
|
|
11
|
+
let heap_next = heap.length;
|
|
17
12
|
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
function dropObject(idx) {
|
|
14
|
+
if (idx < 132) return;
|
|
15
|
+
heap[idx] = heap_next;
|
|
16
|
+
heap_next = idx;
|
|
21
17
|
}
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
function takeObject(idx) {
|
|
20
|
+
const ret = getObject(idx);
|
|
21
|
+
dropObject(idx);
|
|
22
|
+
return ret;
|
|
23
|
+
}
|
|
28
24
|
|
|
29
25
|
function addHeapObject(obj) {
|
|
30
26
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
@@ -35,18 +31,22 @@ function addHeapObject(obj) {
|
|
|
35
31
|
return idx;
|
|
36
32
|
}
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
37
|
+
|
|
38
|
+
let cachedUint8Memory0 = null;
|
|
39
|
+
|
|
40
|
+
function getUint8Memory0() {
|
|
41
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
42
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
43
|
+
}
|
|
44
|
+
return cachedUint8Memory0;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return ret;
|
|
47
|
+
function getStringFromWasm0(ptr, len) {
|
|
48
|
+
ptr = ptr >>> 0;
|
|
49
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
let WASM_VECTOR_LEN = 0;
|
|
@@ -580,7 +580,7 @@ function handleError(f, args) {
|
|
|
580
580
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function __wbg_adapter_372(arg0, arg1, arg2, arg3) {
|
|
584
584
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h633d734e7d6d6514(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
585
585
|
}
|
|
586
586
|
|
|
@@ -1843,11 +1843,10 @@ export class WasmTransaction {
|
|
|
1843
1843
|
wasm.wasmtransaction_set_timestamp(this.__wbg_ptr, timestamp);
|
|
1844
1844
|
}
|
|
1845
1845
|
/**
|
|
1846
|
-
* @param {string} private_key
|
|
1847
1846
|
* @returns {Promise<void>}
|
|
1848
1847
|
*/
|
|
1849
|
-
sign(
|
|
1850
|
-
const ret = wasm.wasmtransaction_sign(this.__wbg_ptr
|
|
1848
|
+
sign() {
|
|
1849
|
+
const ret = wasm.wasmtransaction_sign(this.__wbg_ptr);
|
|
1851
1850
|
return takeObject(ret);
|
|
1852
1851
|
}
|
|
1853
1852
|
/**
|
|
@@ -2053,7 +2052,7 @@ export class WasmWalletSlip {
|
|
|
2053
2052
|
* @returns {string}
|
|
2054
2053
|
*/
|
|
2055
2054
|
get_utxokey() {
|
|
2056
|
-
const ret = wasm.
|
|
2055
|
+
const ret = wasm.wasmwalletslip_get_utxokey(this.__wbg_ptr);
|
|
2057
2056
|
return takeObject(ret);
|
|
2058
2057
|
}
|
|
2059
2058
|
/**
|
|
@@ -2183,21 +2182,9 @@ async function __wbg_load(module, imports) {
|
|
|
2183
2182
|
function __wbg_get_imports() {
|
|
2184
2183
|
const imports = {};
|
|
2185
2184
|
imports.wbg = {};
|
|
2186
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2187
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2188
|
-
return addHeapObject(ret);
|
|
2189
|
-
};
|
|
2190
2185
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
2191
2186
|
takeObject(arg0);
|
|
2192
2187
|
};
|
|
2193
|
-
imports.wbg.__wbg_wasmblock_new = function(arg0) {
|
|
2194
|
-
const ret = WasmBlock.__wrap(arg0);
|
|
2195
|
-
return addHeapObject(ret);
|
|
2196
|
-
};
|
|
2197
|
-
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
2198
|
-
const ret = WasmTransaction.__wrap(arg0);
|
|
2199
|
-
return addHeapObject(ret);
|
|
2200
|
-
};
|
|
2201
2188
|
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2202
2189
|
const ret = BigInt.asUintN(64, arg0);
|
|
2203
2190
|
return addHeapObject(ret);
|
|
@@ -2206,26 +2193,38 @@ function __wbg_get_imports() {
|
|
|
2206
2193
|
const ret = WasmBlockchain.__wrap(arg0);
|
|
2207
2194
|
return addHeapObject(ret);
|
|
2208
2195
|
};
|
|
2209
|
-
imports.wbg.
|
|
2210
|
-
const ret =
|
|
2196
|
+
imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2197
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2211
2198
|
return addHeapObject(ret);
|
|
2212
2199
|
};
|
|
2213
|
-
imports.wbg.
|
|
2214
|
-
const ret =
|
|
2200
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2201
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2215
2202
|
return addHeapObject(ret);
|
|
2216
2203
|
};
|
|
2217
2204
|
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
2218
2205
|
const ret = WasmSlip.__wrap(arg0);
|
|
2219
2206
|
return addHeapObject(ret);
|
|
2220
2207
|
};
|
|
2221
|
-
imports.wbg.
|
|
2222
|
-
const ret =
|
|
2208
|
+
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
2209
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2210
|
+
return addHeapObject(ret);
|
|
2211
|
+
};
|
|
2212
|
+
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2213
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2214
|
+
return addHeapObject(ret);
|
|
2215
|
+
};
|
|
2216
|
+
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2217
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2223
2218
|
return addHeapObject(ret);
|
|
2224
2219
|
};
|
|
2225
2220
|
imports.wbg.__wbg_wasmwallet_new = function(arg0) {
|
|
2226
2221
|
const ret = WasmWallet.__wrap(arg0);
|
|
2227
2222
|
return addHeapObject(ret);
|
|
2228
2223
|
};
|
|
2224
|
+
imports.wbg.__wbg_wasmblock_new = function(arg0) {
|
|
2225
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2226
|
+
return addHeapObject(ret);
|
|
2227
|
+
};
|
|
2229
2228
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
2230
2229
|
const obj = getObject(arg1);
|
|
2231
2230
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -2250,13 +2249,13 @@ function __wbg_get_imports() {
|
|
|
2250
2249
|
const ret = WasmPeerService.__wrap(arg0);
|
|
2251
2250
|
return addHeapObject(ret);
|
|
2252
2251
|
};
|
|
2253
|
-
imports.wbg.
|
|
2252
|
+
imports.wbg.__wbg_sendmessage_2fb4eb5e1fb5ce92 = function(arg0, arg1) {
|
|
2254
2253
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2255
2254
|
};
|
|
2256
|
-
imports.wbg.
|
|
2255
|
+
imports.wbg.__wbg_sendmessagetoall_82fb1731c191408b = function(arg0, arg1) {
|
|
2257
2256
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2258
2257
|
};
|
|
2259
|
-
imports.wbg.
|
|
2258
|
+
imports.wbg.__wbg_connecttopeer_ad1082a2016dbb15 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2260
2259
|
let deferred0_0;
|
|
2261
2260
|
let deferred0_1;
|
|
2262
2261
|
try {
|
|
@@ -2268,11 +2267,11 @@ function __wbg_get_imports() {
|
|
|
2268
2267
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2269
2268
|
}
|
|
2270
2269
|
}, arguments) };
|
|
2271
|
-
imports.wbg.
|
|
2270
|
+
imports.wbg.__wbg_disconnectfrompeer_789575120f5b2a77 = function() { return handleError(function (arg0) {
|
|
2272
2271
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2273
2272
|
return addHeapObject(ret);
|
|
2274
2273
|
}, arguments) };
|
|
2275
|
-
imports.wbg.
|
|
2274
|
+
imports.wbg.__wbg_fetchblockfrompeer_074e2f4b8da268fc = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2276
2275
|
let deferred0_0;
|
|
2277
2276
|
let deferred0_1;
|
|
2278
2277
|
try {
|
|
@@ -2284,7 +2283,7 @@ function __wbg_get_imports() {
|
|
|
2284
2283
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2285
2284
|
}
|
|
2286
2285
|
}, arguments) };
|
|
2287
|
-
imports.wbg.
|
|
2286
|
+
imports.wbg.__wbg_writevalue_ac4432c03bbafa5b = function(arg0, arg1, arg2) {
|
|
2288
2287
|
let deferred0_0;
|
|
2289
2288
|
let deferred0_1;
|
|
2290
2289
|
try {
|
|
@@ -2295,7 +2294,7 @@ function __wbg_get_imports() {
|
|
|
2295
2294
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2296
2295
|
}
|
|
2297
2296
|
};
|
|
2298
|
-
imports.wbg.
|
|
2297
|
+
imports.wbg.__wbg_appendvalue_d5035e0293073822 = function(arg0, arg1, arg2) {
|
|
2299
2298
|
let deferred0_0;
|
|
2300
2299
|
let deferred0_1;
|
|
2301
2300
|
try {
|
|
@@ -2306,7 +2305,7 @@ function __wbg_get_imports() {
|
|
|
2306
2305
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2307
2306
|
}
|
|
2308
2307
|
};
|
|
2309
|
-
imports.wbg.
|
|
2308
|
+
imports.wbg.__wbg_flushdata_43cc88ecc9a7bacf = function(arg0, arg1) {
|
|
2310
2309
|
let deferred0_0;
|
|
2311
2310
|
let deferred0_1;
|
|
2312
2311
|
try {
|
|
@@ -2317,7 +2316,7 @@ function __wbg_get_imports() {
|
|
|
2317
2316
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2318
2317
|
}
|
|
2319
2318
|
};
|
|
2320
|
-
imports.wbg.
|
|
2319
|
+
imports.wbg.__wbg_readvalue_270bd3c527b3b626 = function() { return handleError(function (arg0, arg1) {
|
|
2321
2320
|
let deferred0_0;
|
|
2322
2321
|
let deferred0_1;
|
|
2323
2322
|
try {
|
|
@@ -2329,11 +2328,11 @@ function __wbg_get_imports() {
|
|
|
2329
2328
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2330
2329
|
}
|
|
2331
2330
|
}, arguments) };
|
|
2332
|
-
imports.wbg.
|
|
2331
|
+
imports.wbg.__wbg_loadblockfilelist_6ee80bb6826e2837 = function() { return handleError(function () {
|
|
2333
2332
|
const ret = MsgHandler.load_block_file_list();
|
|
2334
2333
|
return addHeapObject(ret);
|
|
2335
2334
|
}, arguments) };
|
|
2336
|
-
imports.wbg.
|
|
2335
|
+
imports.wbg.__wbg_isexistingfile_7479195f7f35072b = function() { return handleError(function (arg0, arg1) {
|
|
2337
2336
|
let deferred0_0;
|
|
2338
2337
|
let deferred0_1;
|
|
2339
2338
|
try {
|
|
@@ -2345,7 +2344,7 @@ function __wbg_get_imports() {
|
|
|
2345
2344
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2346
2345
|
}
|
|
2347
2346
|
}, arguments) };
|
|
2348
|
-
imports.wbg.
|
|
2347
|
+
imports.wbg.__wbg_removevalue_bba5f72736098022 = function() { return handleError(function (arg0, arg1) {
|
|
2349
2348
|
let deferred0_0;
|
|
2350
2349
|
let deferred0_1;
|
|
2351
2350
|
try {
|
|
@@ -2357,7 +2356,7 @@ function __wbg_get_imports() {
|
|
|
2357
2356
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2358
2357
|
}
|
|
2359
2358
|
}, arguments) };
|
|
2360
|
-
imports.wbg.
|
|
2359
|
+
imports.wbg.__wbg_ensureblockdirectoryexists_c8ab9c961a633eea = function() { return handleError(function (arg0, arg1) {
|
|
2361
2360
|
let deferred0_0;
|
|
2362
2361
|
let deferred0_1;
|
|
2363
2362
|
try {
|
|
@@ -2368,16 +2367,16 @@ function __wbg_get_imports() {
|
|
|
2368
2367
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2369
2368
|
}
|
|
2370
2369
|
}, arguments) };
|
|
2371
|
-
imports.wbg.
|
|
2370
|
+
imports.wbg.__wbg_processapicall_1808c81ea2b0811b = function(arg0, arg1, arg2) {
|
|
2372
2371
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
|
|
2373
2372
|
};
|
|
2374
|
-
imports.wbg.
|
|
2373
|
+
imports.wbg.__wbg_processapisuccess_d7e274eda8689aaf = function(arg0, arg1, arg2) {
|
|
2375
2374
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
|
|
2376
2375
|
};
|
|
2377
|
-
imports.wbg.
|
|
2376
|
+
imports.wbg.__wbg_processapierror_e14bc8efef636c67 = function(arg0, arg1, arg2) {
|
|
2378
2377
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
|
|
2379
2378
|
};
|
|
2380
|
-
imports.wbg.
|
|
2379
|
+
imports.wbg.__wbg_sendinterfaceevent_f7f7e8ea0d79e2e8 = function(arg0, arg1, arg2) {
|
|
2381
2380
|
let deferred0_0;
|
|
2382
2381
|
let deferred0_1;
|
|
2383
2382
|
try {
|
|
@@ -2388,7 +2387,7 @@ function __wbg_get_imports() {
|
|
|
2388
2387
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2389
2388
|
}
|
|
2390
2389
|
};
|
|
2391
|
-
imports.wbg.
|
|
2390
|
+
imports.wbg.__wbg_sendblocksuccess_3f8552322c16f5f2 = function(arg0, arg1, arg2) {
|
|
2392
2391
|
let deferred0_0;
|
|
2393
2392
|
let deferred0_1;
|
|
2394
2393
|
try {
|
|
@@ -2399,10 +2398,10 @@ function __wbg_get_imports() {
|
|
|
2399
2398
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2400
2399
|
}
|
|
2401
2400
|
};
|
|
2402
|
-
imports.wbg.
|
|
2401
|
+
imports.wbg.__wbg_sendwalletupdate_29571ffa109716fa = function() {
|
|
2403
2402
|
MsgHandler.send_wallet_update();
|
|
2404
2403
|
};
|
|
2405
|
-
imports.wbg.
|
|
2404
|
+
imports.wbg.__wbg_sendnewversionalert_034951d778a25ba8 = function(arg0, arg1, arg2) {
|
|
2406
2405
|
let deferred0_0;
|
|
2407
2406
|
let deferred0_1;
|
|
2408
2407
|
try {
|
|
@@ -2413,13 +2412,13 @@ function __wbg_get_imports() {
|
|
|
2413
2412
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2414
2413
|
}
|
|
2415
2414
|
};
|
|
2416
|
-
imports.wbg.
|
|
2415
|
+
imports.wbg.__wbg_savewallet_7248be77a005dd52 = function() {
|
|
2417
2416
|
MsgHandler.save_wallet();
|
|
2418
2417
|
};
|
|
2419
|
-
imports.wbg.
|
|
2418
|
+
imports.wbg.__wbg_loadwallet_5153f6b85a5cd29c = function() {
|
|
2420
2419
|
MsgHandler.load_wallet();
|
|
2421
2420
|
};
|
|
2422
|
-
imports.wbg.
|
|
2421
|
+
imports.wbg.__wbg_getmyservices_78b2eb2d7d64f049 = function() {
|
|
2423
2422
|
const ret = MsgHandler.get_my_services();
|
|
2424
2423
|
_assertClass(ret, WasmPeerServiceList);
|
|
2425
2424
|
var ptr1 = ret.__destroy_into_raw();
|
|
@@ -2578,10 +2577,6 @@ function __wbg_get_imports() {
|
|
|
2578
2577
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
2579
2578
|
return addHeapObject(ret);
|
|
2580
2579
|
}, arguments) };
|
|
2581
|
-
imports.wbg.__wbg_length_dee433d4c85c9387 = function(arg0) {
|
|
2582
|
-
const ret = getObject(arg0).length;
|
|
2583
|
-
return ret;
|
|
2584
|
-
};
|
|
2585
2580
|
imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
|
|
2586
2581
|
const ret = self.self;
|
|
2587
2582
|
return addHeapObject(ret);
|
|
@@ -2642,7 +2637,7 @@ function __wbg_get_imports() {
|
|
|
2642
2637
|
const a = state0.a;
|
|
2643
2638
|
state0.a = 0;
|
|
2644
2639
|
try {
|
|
2645
|
-
return
|
|
2640
|
+
return __wbg_adapter_372(a, state0.b, arg0, arg1);
|
|
2646
2641
|
} finally {
|
|
2647
2642
|
state0.a = a;
|
|
2648
2643
|
}
|
|
@@ -2723,7 +2718,7 @@ function __wbg_get_imports() {
|
|
|
2723
2718
|
const ret = wasm.memory;
|
|
2724
2719
|
return addHeapObject(ret);
|
|
2725
2720
|
};
|
|
2726
|
-
imports.wbg.
|
|
2721
|
+
imports.wbg.__wbindgen_closure_wrapper1209 = function(arg0, arg1, arg2) {
|
|
2727
2722
|
const ret = makeMutClosure(arg0, arg1, 456, __wbg_adapter_38);
|
|
2728
2723
|
return addHeapObject(ret);
|
|
2729
2724
|
};
|
package/pkg/web/index_bg.wasm
CHANGED
|
Binary file
|
|
@@ -161,7 +161,7 @@ export function wasmtransaction_get_data(a: number): number;
|
|
|
161
161
|
export function wasmtransaction_set_data(a: number, b: number): void;
|
|
162
162
|
export function wasmtransaction_get_timestamp(a: number): number;
|
|
163
163
|
export function wasmtransaction_set_timestamp(a: number, b: number): void;
|
|
164
|
-
export function wasmtransaction_sign(a: number
|
|
164
|
+
export function wasmtransaction_sign(a: number): number;
|
|
165
165
|
export function wasmtransaction_get_type(a: number): number;
|
|
166
166
|
export function wasmtransaction_set_type(a: number, b: number): void;
|
|
167
167
|
export function wasmtransaction_total_fees(a: number): number;
|
|
@@ -182,6 +182,7 @@ export function wasmwallet_get_slips(a: number): number;
|
|
|
182
182
|
export function wasmwallet_add_slip(a: number, b: number): number;
|
|
183
183
|
export function wasmwallet_get_key_list(a: number): number;
|
|
184
184
|
export function wasmwallet_set_key_list(a: number, b: number): number;
|
|
185
|
+
export function wasmwalletslip_get_utxokey(a: number): number;
|
|
185
186
|
export function wasmwalletslip_set_utxokey(a: number, b: number): void;
|
|
186
187
|
export function wasmwalletslip_get_slip_index(a: number): number;
|
|
187
188
|
export function wasmwalletslip_set_slip_index(a: number, b: number): void;
|
|
@@ -196,7 +197,6 @@ export function wasmwalletslip_get_tx_ordinal(a: number): number;
|
|
|
196
197
|
export function wasmwalletslip_set_amount(a: number, b: number): void;
|
|
197
198
|
export function wasmwalletslip_set_block_id(a: number, b: number): void;
|
|
198
199
|
export function wasmwalletslip_set_tx_ordinal(a: number, b: number): void;
|
|
199
|
-
export function wasmwalletslip_get_utxokey(a: number): number;
|
|
200
200
|
export function __wbg_wasmhop_free(a: number): void;
|
|
201
201
|
export function wasmhop_from(a: number, b: number): void;
|
|
202
202
|
export function wasmhop_sig(a: number, b: number): void;
|
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.5",
|
|
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
|