saito-wasm 0.2.7 → 0.2.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "saito-wasm"
3
- version = "0.2.7"
3
+ version = "0.2.9"
4
4
  edition = "2021"
5
5
 
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "js wrappings around saito-core using wasm",
5
5
  "scripts": {
6
6
  "test": "./node_modules/.bin/jest",
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-d957b4bff15e00bf/js/msg_handler.js`);
4
+ const { MsgHandler } = require(String.raw`./snippets/saito-wasm-bd3da1a31dc9b9e0/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');
@@ -2025,8 +2025,7 @@ class WasmWallet {
2025
2025
  */
2026
2026
  add_to_pending(tx) {
2027
2027
  _assertClass(tx, WasmTransaction);
2028
- var ptr0 = tx.__destroy_into_raw();
2029
- const ret = wasm.wasmwallet_add_to_pending(this.__wbg_ptr, ptr0);
2028
+ const ret = wasm.wasmwallet_add_to_pending(this.__wbg_ptr, tx.__wbg_ptr);
2030
2029
  return takeObject(ret);
2031
2030
  }
2032
2031
  /**
@@ -2174,18 +2173,13 @@ class WasmWalletSlip {
2174
2173
  }
2175
2174
  module.exports.WasmWalletSlip = WasmWalletSlip;
2176
2175
 
2177
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
2178
- takeObject(arg0);
2179
- };
2180
-
2181
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2182
- const ret = BigInt.asUintN(64, arg0);
2176
+ module.exports.__wbg_wasmtransaction_new = function(arg0) {
2177
+ const ret = WasmTransaction.__wrap(arg0);
2183
2178
  return addHeapObject(ret);
2184
2179
  };
2185
2180
 
2186
- module.exports.__wbg_wasmwallet_new = function(arg0) {
2187
- const ret = WasmWallet.__wrap(arg0);
2188
- return addHeapObject(ret);
2181
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
2182
+ takeObject(arg0);
2189
2183
  };
2190
2184
 
2191
2185
  module.exports.__wbindgen_string_new = function(arg0, arg1) {
@@ -2198,8 +2192,8 @@ module.exports.__wbg_wasmblock_new = function(arg0) {
2198
2192
  return addHeapObject(ret);
2199
2193
  };
2200
2194
 
2201
- module.exports.__wbg_wasmtransaction_new = function(arg0) {
2202
- const ret = WasmTransaction.__wrap(arg0);
2195
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
2196
+ const ret = WasmPeer.__wrap(arg0);
2203
2197
  return addHeapObject(ret);
2204
2198
  };
2205
2199
 
@@ -2208,8 +2202,13 @@ module.exports.__wbg_wasmslip_new = function(arg0) {
2208
2202
  return addHeapObject(ret);
2209
2203
  };
2210
2204
 
2211
- module.exports.__wbg_wasmpeer_new = function(arg0) {
2212
- const ret = WasmPeer.__wrap(arg0);
2205
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2206
+ const ret = BigInt.asUintN(64, arg0);
2207
+ return addHeapObject(ret);
2208
+ };
2209
+
2210
+ module.exports.__wbg_wasmblockchain_new = function(arg0) {
2211
+ const ret = WasmBlockchain.__wrap(arg0);
2213
2212
  return addHeapObject(ret);
2214
2213
  };
2215
2214
 
@@ -2223,8 +2222,8 @@ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2223
2222
  return addHeapObject(ret);
2224
2223
  };
2225
2224
 
2226
- module.exports.__wbg_wasmblockchain_new = function(arg0) {
2227
- const ret = WasmBlockchain.__wrap(arg0);
2225
+ module.exports.__wbg_wasmwallet_new = function(arg0) {
2226
+ const ret = WasmWallet.__wrap(arg0);
2228
2227
  return addHeapObject(ret);
2229
2228
  };
2230
2229
 
@@ -2273,15 +2272,15 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
2273
2272
  return ret;
2274
2273
  };
2275
2274
 
2276
- module.exports.__wbg_sendmessage_1212902dea9a6462 = function(arg0, arg1) {
2275
+ module.exports.__wbg_sendmessage_07cb2063e152c1d1 = function(arg0, arg1) {
2277
2276
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2278
2277
  };
2279
2278
 
2280
- module.exports.__wbg_sendmessagetoall_183360a6e457aafd = function(arg0, arg1) {
2279
+ module.exports.__wbg_sendmessagetoall_e85cac4a14bcb4af = function(arg0, arg1) {
2281
2280
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2282
2281
  };
2283
2282
 
2284
- module.exports.__wbg_connecttopeer_0cf6f403c55758af = function() { return handleError(function (arg0, arg1, arg2) {
2283
+ module.exports.__wbg_connecttopeer_929ddfbaa2702b30 = function() { return handleError(function (arg0, arg1, arg2) {
2285
2284
  let deferred0_0;
2286
2285
  let deferred0_1;
2287
2286
  try {
@@ -2294,12 +2293,12 @@ module.exports.__wbg_connecttopeer_0cf6f403c55758af = function() { return handle
2294
2293
  }
2295
2294
  }, arguments) };
2296
2295
 
2297
- module.exports.__wbg_disconnectfrompeer_a1dc7eccc30f5818 = function() { return handleError(function (arg0) {
2296
+ module.exports.__wbg_disconnectfrompeer_e0f21d4ff24d5d25 = function() { return handleError(function (arg0) {
2298
2297
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2299
2298
  return addHeapObject(ret);
2300
2299
  }, arguments) };
2301
2300
 
2302
- module.exports.__wbg_fetchblockfrompeer_e168ba6cd017328b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2301
+ module.exports.__wbg_fetchblockfrompeer_e0ab6bf666c50148 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2303
2302
  let deferred0_0;
2304
2303
  let deferred0_1;
2305
2304
  try {
@@ -2312,7 +2311,7 @@ module.exports.__wbg_fetchblockfrompeer_e168ba6cd017328b = function() { return h
2312
2311
  }
2313
2312
  }, arguments) };
2314
2313
 
2315
- module.exports.__wbg_writevalue_9a62a4977742a047 = function(arg0, arg1, arg2) {
2314
+ module.exports.__wbg_writevalue_2dc99a7486784a28 = function(arg0, arg1, arg2) {
2316
2315
  let deferred0_0;
2317
2316
  let deferred0_1;
2318
2317
  try {
@@ -2324,7 +2323,7 @@ module.exports.__wbg_writevalue_9a62a4977742a047 = function(arg0, arg1, arg2) {
2324
2323
  }
2325
2324
  };
2326
2325
 
2327
- module.exports.__wbg_appendvalue_63e50a60464d461e = function(arg0, arg1, arg2) {
2326
+ module.exports.__wbg_appendvalue_2525128b46a606c4 = function(arg0, arg1, arg2) {
2328
2327
  let deferred0_0;
2329
2328
  let deferred0_1;
2330
2329
  try {
@@ -2336,7 +2335,7 @@ module.exports.__wbg_appendvalue_63e50a60464d461e = function(arg0, arg1, arg2) {
2336
2335
  }
2337
2336
  };
2338
2337
 
2339
- module.exports.__wbg_flushdata_1acb4b409d575db6 = function(arg0, arg1) {
2338
+ module.exports.__wbg_flushdata_c2fd12cebaa8b37d = function(arg0, arg1) {
2340
2339
  let deferred0_0;
2341
2340
  let deferred0_1;
2342
2341
  try {
@@ -2348,7 +2347,7 @@ module.exports.__wbg_flushdata_1acb4b409d575db6 = function(arg0, arg1) {
2348
2347
  }
2349
2348
  };
2350
2349
 
2351
- module.exports.__wbg_readvalue_49067ac50abb8208 = function() { return handleError(function (arg0, arg1) {
2350
+ module.exports.__wbg_readvalue_12775204384c8aad = function() { return handleError(function (arg0, arg1) {
2352
2351
  let deferred0_0;
2353
2352
  let deferred0_1;
2354
2353
  try {
@@ -2361,12 +2360,12 @@ module.exports.__wbg_readvalue_49067ac50abb8208 = function() { return handleErro
2361
2360
  }
2362
2361
  }, arguments) };
2363
2362
 
2364
- module.exports.__wbg_loadblockfilelist_eb03e9752951a64a = function() { return handleError(function () {
2363
+ module.exports.__wbg_loadblockfilelist_788e799a85abd257 = function() { return handleError(function () {
2365
2364
  const ret = MsgHandler.load_block_file_list();
2366
2365
  return addHeapObject(ret);
2367
2366
  }, arguments) };
2368
2367
 
2369
- module.exports.__wbg_isexistingfile_81371a9c2a12a59c = function() { return handleError(function (arg0, arg1) {
2368
+ module.exports.__wbg_isexistingfile_1596a09c2b258049 = function() { return handleError(function (arg0, arg1) {
2370
2369
  let deferred0_0;
2371
2370
  let deferred0_1;
2372
2371
  try {
@@ -2379,7 +2378,7 @@ module.exports.__wbg_isexistingfile_81371a9c2a12a59c = function() { return handl
2379
2378
  }
2380
2379
  }, arguments) };
2381
2380
 
2382
- module.exports.__wbg_removevalue_c48bd4d3ddc63a16 = function() { return handleError(function (arg0, arg1) {
2381
+ module.exports.__wbg_removevalue_092dcde3747082a7 = function() { return handleError(function (arg0, arg1) {
2383
2382
  let deferred0_0;
2384
2383
  let deferred0_1;
2385
2384
  try {
@@ -2392,7 +2391,7 @@ module.exports.__wbg_removevalue_c48bd4d3ddc63a16 = function() { return handleEr
2392
2391
  }
2393
2392
  }, arguments) };
2394
2393
 
2395
- module.exports.__wbg_ensureblockdirectoryexists_b8ec8bfe122fc839 = function() { return handleError(function (arg0, arg1) {
2394
+ module.exports.__wbg_ensureblockdirectoryexists_587fb88f8f978734 = function() { return handleError(function (arg0, arg1) {
2396
2395
  let deferred0_0;
2397
2396
  let deferred0_1;
2398
2397
  try {
@@ -2404,19 +2403,19 @@ module.exports.__wbg_ensureblockdirectoryexists_b8ec8bfe122fc839 = function() {
2404
2403
  }
2405
2404
  }, arguments) };
2406
2405
 
2407
- module.exports.__wbg_processapicall_0ca260a137ffbce1 = function(arg0, arg1, arg2) {
2406
+ module.exports.__wbg_processapicall_253e2557ce3af4d5 = function(arg0, arg1, arg2) {
2408
2407
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2409
2408
  };
2410
2409
 
2411
- module.exports.__wbg_processapisuccess_6f6ceae85a6465b2 = function(arg0, arg1, arg2) {
2410
+ module.exports.__wbg_processapisuccess_20db560740320e8b = function(arg0, arg1, arg2) {
2412
2411
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2413
2412
  };
2414
2413
 
2415
- module.exports.__wbg_processapierror_8d79343f046dd6c7 = function(arg0, arg1, arg2) {
2414
+ module.exports.__wbg_processapierror_59d5a9dc39ab1a83 = function(arg0, arg1, arg2) {
2416
2415
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2417
2416
  };
2418
2417
 
2419
- module.exports.__wbg_sendinterfaceevent_7e2f07cb642775f1 = function(arg0, arg1, arg2) {
2418
+ module.exports.__wbg_sendinterfaceevent_3af6cf73067f2676 = function(arg0, arg1, arg2) {
2420
2419
  let deferred0_0;
2421
2420
  let deferred0_1;
2422
2421
  try {
@@ -2428,7 +2427,7 @@ module.exports.__wbg_sendinterfaceevent_7e2f07cb642775f1 = function(arg0, arg1,
2428
2427
  }
2429
2428
  };
2430
2429
 
2431
- module.exports.__wbg_sendblocksuccess_362a17063f76c899 = function(arg0, arg1, arg2) {
2430
+ module.exports.__wbg_sendblocksuccess_2fcd34ac0babaa25 = function(arg0, arg1, arg2) {
2432
2431
  let deferred0_0;
2433
2432
  let deferred0_1;
2434
2433
  try {
@@ -2440,11 +2439,11 @@ module.exports.__wbg_sendblocksuccess_362a17063f76c899 = function(arg0, arg1, ar
2440
2439
  }
2441
2440
  };
2442
2441
 
2443
- module.exports.__wbg_sendwalletupdate_3d9d825dd9f8e55b = function() {
2442
+ module.exports.__wbg_sendwalletupdate_2b6851389aad13a2 = function() {
2444
2443
  MsgHandler.send_wallet_update();
2445
2444
  };
2446
2445
 
2447
- module.exports.__wbg_sendnewversionalert_b1859d60af870099 = function(arg0, arg1, arg2) {
2446
+ module.exports.__wbg_sendnewversionalert_79d1e764cf010ba6 = function(arg0, arg1, arg2) {
2448
2447
  let deferred0_0;
2449
2448
  let deferred0_1;
2450
2449
  try {
@@ -2456,15 +2455,15 @@ module.exports.__wbg_sendnewversionalert_b1859d60af870099 = function(arg0, arg1,
2456
2455
  }
2457
2456
  };
2458
2457
 
2459
- module.exports.__wbg_savewallet_f160f9f36cd4902f = function() {
2458
+ module.exports.__wbg_savewallet_ed37aba363a337ab = function() {
2460
2459
  MsgHandler.save_wallet();
2461
2460
  };
2462
2461
 
2463
- module.exports.__wbg_loadwallet_d091a30c73f3c185 = function() {
2462
+ module.exports.__wbg_loadwallet_beec4f00e33228ad = function() {
2464
2463
  MsgHandler.load_wallet();
2465
2464
  };
2466
2465
 
2467
- module.exports.__wbg_getmyservices_0dec251bd1afa3c2 = function() {
2466
+ module.exports.__wbg_getmyservices_0a1d8f72d9b25161 = function() {
2468
2467
  const ret = MsgHandler.get_my_services();
2469
2468
  _assertClass(ret, WasmPeerServiceList);
2470
2469
  var ptr1 = ret.__destroy_into_raw();
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "files": [
5
5
  "index_bg.wasm",
6
6
  "index.js",
package/pkg/web/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { MsgHandler } from './snippets/saito-wasm-d957b4bff15e00bf/js/msg_handler.js';
1
+ import { MsgHandler } from './snippets/saito-wasm-bd3da1a31dc9b9e0/js/msg_handler.js';
2
2
 
3
3
  let wasm;
4
4
 
@@ -22,15 +22,6 @@ function takeObject(idx) {
22
22
  return ret;
23
23
  }
24
24
 
25
- function addHeapObject(obj) {
26
- if (heap_next === heap.length) heap.push(heap.length + 1);
27
- const idx = heap_next;
28
- heap_next = heap[idx];
29
-
30
- heap[idx] = obj;
31
- return idx;
32
- }
33
-
34
25
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
35
26
 
36
27
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@@ -49,6 +40,15 @@ function getStringFromWasm0(ptr, len) {
49
40
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
50
41
  }
51
42
 
43
+ function addHeapObject(obj) {
44
+ if (heap_next === heap.length) heap.push(heap.length + 1);
45
+ const idx = heap_next;
46
+ heap_next = heap[idx];
47
+
48
+ heap[idx] = obj;
49
+ return idx;
50
+ }
51
+
52
52
  let WASM_VECTOR_LEN = 0;
53
53
 
54
54
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -2011,8 +2011,7 @@ export class WasmWallet {
2011
2011
  */
2012
2012
  add_to_pending(tx) {
2013
2013
  _assertClass(tx, WasmTransaction);
2014
- var ptr0 = tx.__destroy_into_raw();
2015
- const ret = wasm.wasmwallet_add_to_pending(this.__wbg_ptr, ptr0);
2014
+ const ret = wasm.wasmwallet_add_to_pending(this.__wbg_ptr, tx.__wbg_ptr);
2016
2015
  return takeObject(ret);
2017
2016
  }
2018
2017
  /**
@@ -2192,16 +2191,12 @@ async function __wbg_load(module, imports) {
2192
2191
  function __wbg_get_imports() {
2193
2192
  const imports = {};
2194
2193
  imports.wbg = {};
2195
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2196
- takeObject(arg0);
2197
- };
2198
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2199
- const ret = BigInt.asUintN(64, arg0);
2194
+ imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2195
+ const ret = WasmTransaction.__wrap(arg0);
2200
2196
  return addHeapObject(ret);
2201
2197
  };
2202
- imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2203
- const ret = WasmWallet.__wrap(arg0);
2204
- return addHeapObject(ret);
2198
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2199
+ takeObject(arg0);
2205
2200
  };
2206
2201
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2207
2202
  const ret = getStringFromWasm0(arg0, arg1);
@@ -2211,16 +2206,20 @@ function __wbg_get_imports() {
2211
2206
  const ret = WasmBlock.__wrap(arg0);
2212
2207
  return addHeapObject(ret);
2213
2208
  };
2214
- imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2215
- const ret = WasmTransaction.__wrap(arg0);
2209
+ imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2210
+ const ret = WasmPeer.__wrap(arg0);
2216
2211
  return addHeapObject(ret);
2217
2212
  };
2218
2213
  imports.wbg.__wbg_wasmslip_new = function(arg0) {
2219
2214
  const ret = WasmSlip.__wrap(arg0);
2220
2215
  return addHeapObject(ret);
2221
2216
  };
2222
- imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2223
- const ret = WasmPeer.__wrap(arg0);
2217
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2218
+ const ret = BigInt.asUintN(64, arg0);
2219
+ return addHeapObject(ret);
2220
+ };
2221
+ imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2222
+ const ret = WasmBlockchain.__wrap(arg0);
2224
2223
  return addHeapObject(ret);
2225
2224
  };
2226
2225
  imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
@@ -2231,8 +2230,8 @@ function __wbg_get_imports() {
2231
2230
  const ret = WasmWalletSlip.__wrap(arg0);
2232
2231
  return addHeapObject(ret);
2233
2232
  };
2234
- imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2235
- const ret = WasmBlockchain.__wrap(arg0);
2233
+ imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2234
+ const ret = WasmWallet.__wrap(arg0);
2236
2235
  return addHeapObject(ret);
2237
2236
  };
2238
2237
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
@@ -2272,13 +2271,13 @@ function __wbg_get_imports() {
2272
2271
  const ret = getObject(arg0) in getObject(arg1);
2273
2272
  return ret;
2274
2273
  };
2275
- imports.wbg.__wbg_sendmessage_1212902dea9a6462 = function(arg0, arg1) {
2274
+ imports.wbg.__wbg_sendmessage_07cb2063e152c1d1 = function(arg0, arg1) {
2276
2275
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2277
2276
  };
2278
- imports.wbg.__wbg_sendmessagetoall_183360a6e457aafd = function(arg0, arg1) {
2277
+ imports.wbg.__wbg_sendmessagetoall_e85cac4a14bcb4af = function(arg0, arg1) {
2279
2278
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2280
2279
  };
2281
- imports.wbg.__wbg_connecttopeer_0cf6f403c55758af = function() { return handleError(function (arg0, arg1, arg2) {
2280
+ imports.wbg.__wbg_connecttopeer_929ddfbaa2702b30 = function() { return handleError(function (arg0, arg1, arg2) {
2282
2281
  let deferred0_0;
2283
2282
  let deferred0_1;
2284
2283
  try {
@@ -2290,11 +2289,11 @@ function __wbg_get_imports() {
2290
2289
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2291
2290
  }
2292
2291
  }, arguments) };
2293
- imports.wbg.__wbg_disconnectfrompeer_a1dc7eccc30f5818 = function() { return handleError(function (arg0) {
2292
+ imports.wbg.__wbg_disconnectfrompeer_e0f21d4ff24d5d25 = function() { return handleError(function (arg0) {
2294
2293
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2295
2294
  return addHeapObject(ret);
2296
2295
  }, arguments) };
2297
- imports.wbg.__wbg_fetchblockfrompeer_e168ba6cd017328b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2296
+ imports.wbg.__wbg_fetchblockfrompeer_e0ab6bf666c50148 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2298
2297
  let deferred0_0;
2299
2298
  let deferred0_1;
2300
2299
  try {
@@ -2306,7 +2305,7 @@ function __wbg_get_imports() {
2306
2305
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2307
2306
  }
2308
2307
  }, arguments) };
2309
- imports.wbg.__wbg_writevalue_9a62a4977742a047 = function(arg0, arg1, arg2) {
2308
+ imports.wbg.__wbg_writevalue_2dc99a7486784a28 = function(arg0, arg1, arg2) {
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.__wbg_appendvalue_63e50a60464d461e = function(arg0, arg1, arg2) {
2319
+ imports.wbg.__wbg_appendvalue_2525128b46a606c4 = function(arg0, arg1, arg2) {
2321
2320
  let deferred0_0;
2322
2321
  let deferred0_1;
2323
2322
  try {
@@ -2328,7 +2327,7 @@ function __wbg_get_imports() {
2328
2327
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2329
2328
  }
2330
2329
  };
2331
- imports.wbg.__wbg_flushdata_1acb4b409d575db6 = function(arg0, arg1) {
2330
+ imports.wbg.__wbg_flushdata_c2fd12cebaa8b37d = function(arg0, arg1) {
2332
2331
  let deferred0_0;
2333
2332
  let deferred0_1;
2334
2333
  try {
@@ -2339,7 +2338,7 @@ function __wbg_get_imports() {
2339
2338
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2340
2339
  }
2341
2340
  };
2342
- imports.wbg.__wbg_readvalue_49067ac50abb8208 = function() { return handleError(function (arg0, arg1) {
2341
+ imports.wbg.__wbg_readvalue_12775204384c8aad = function() { return handleError(function (arg0, arg1) {
2343
2342
  let deferred0_0;
2344
2343
  let deferred0_1;
2345
2344
  try {
@@ -2351,11 +2350,11 @@ function __wbg_get_imports() {
2351
2350
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2352
2351
  }
2353
2352
  }, arguments) };
2354
- imports.wbg.__wbg_loadblockfilelist_eb03e9752951a64a = function() { return handleError(function () {
2353
+ imports.wbg.__wbg_loadblockfilelist_788e799a85abd257 = function() { return handleError(function () {
2355
2354
  const ret = MsgHandler.load_block_file_list();
2356
2355
  return addHeapObject(ret);
2357
2356
  }, arguments) };
2358
- imports.wbg.__wbg_isexistingfile_81371a9c2a12a59c = function() { return handleError(function (arg0, arg1) {
2357
+ imports.wbg.__wbg_isexistingfile_1596a09c2b258049 = function() { return handleError(function (arg0, arg1) {
2359
2358
  let deferred0_0;
2360
2359
  let deferred0_1;
2361
2360
  try {
@@ -2367,7 +2366,7 @@ function __wbg_get_imports() {
2367
2366
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2368
2367
  }
2369
2368
  }, arguments) };
2370
- imports.wbg.__wbg_removevalue_c48bd4d3ddc63a16 = function() { return handleError(function (arg0, arg1) {
2369
+ imports.wbg.__wbg_removevalue_092dcde3747082a7 = function() { return handleError(function (arg0, arg1) {
2371
2370
  let deferred0_0;
2372
2371
  let deferred0_1;
2373
2372
  try {
@@ -2379,7 +2378,7 @@ function __wbg_get_imports() {
2379
2378
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2380
2379
  }
2381
2380
  }, arguments) };
2382
- imports.wbg.__wbg_ensureblockdirectoryexists_b8ec8bfe122fc839 = function() { return handleError(function (arg0, arg1) {
2381
+ imports.wbg.__wbg_ensureblockdirectoryexists_587fb88f8f978734 = function() { return handleError(function (arg0, arg1) {
2383
2382
  let deferred0_0;
2384
2383
  let deferred0_1;
2385
2384
  try {
@@ -2390,16 +2389,16 @@ function __wbg_get_imports() {
2390
2389
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2391
2390
  }
2392
2391
  }, arguments) };
2393
- imports.wbg.__wbg_processapicall_0ca260a137ffbce1 = function(arg0, arg1, arg2) {
2392
+ imports.wbg.__wbg_processapicall_253e2557ce3af4d5 = function(arg0, arg1, arg2) {
2394
2393
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2395
2394
  };
2396
- imports.wbg.__wbg_processapisuccess_6f6ceae85a6465b2 = function(arg0, arg1, arg2) {
2395
+ imports.wbg.__wbg_processapisuccess_20db560740320e8b = function(arg0, arg1, arg2) {
2397
2396
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2398
2397
  };
2399
- imports.wbg.__wbg_processapierror_8d79343f046dd6c7 = function(arg0, arg1, arg2) {
2398
+ imports.wbg.__wbg_processapierror_59d5a9dc39ab1a83 = function(arg0, arg1, arg2) {
2400
2399
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2401
2400
  };
2402
- imports.wbg.__wbg_sendinterfaceevent_7e2f07cb642775f1 = function(arg0, arg1, arg2) {
2401
+ imports.wbg.__wbg_sendinterfaceevent_3af6cf73067f2676 = function(arg0, arg1, arg2) {
2403
2402
  let deferred0_0;
2404
2403
  let deferred0_1;
2405
2404
  try {
@@ -2410,7 +2409,7 @@ function __wbg_get_imports() {
2410
2409
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2411
2410
  }
2412
2411
  };
2413
- imports.wbg.__wbg_sendblocksuccess_362a17063f76c899 = function(arg0, arg1, arg2) {
2412
+ imports.wbg.__wbg_sendblocksuccess_2fcd34ac0babaa25 = function(arg0, arg1, arg2) {
2414
2413
  let deferred0_0;
2415
2414
  let deferred0_1;
2416
2415
  try {
@@ -2421,10 +2420,10 @@ function __wbg_get_imports() {
2421
2420
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2422
2421
  }
2423
2422
  };
2424
- imports.wbg.__wbg_sendwalletupdate_3d9d825dd9f8e55b = function() {
2423
+ imports.wbg.__wbg_sendwalletupdate_2b6851389aad13a2 = function() {
2425
2424
  MsgHandler.send_wallet_update();
2426
2425
  };
2427
- imports.wbg.__wbg_sendnewversionalert_b1859d60af870099 = function(arg0, arg1, arg2) {
2426
+ imports.wbg.__wbg_sendnewversionalert_79d1e764cf010ba6 = function(arg0, arg1, arg2) {
2428
2427
  let deferred0_0;
2429
2428
  let deferred0_1;
2430
2429
  try {
@@ -2435,13 +2434,13 @@ function __wbg_get_imports() {
2435
2434
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2436
2435
  }
2437
2436
  };
2438
- imports.wbg.__wbg_savewallet_f160f9f36cd4902f = function() {
2437
+ imports.wbg.__wbg_savewallet_ed37aba363a337ab = function() {
2439
2438
  MsgHandler.save_wallet();
2440
2439
  };
2441
- imports.wbg.__wbg_loadwallet_d091a30c73f3c185 = function() {
2440
+ imports.wbg.__wbg_loadwallet_beec4f00e33228ad = function() {
2442
2441
  MsgHandler.load_wallet();
2443
2442
  };
2444
- imports.wbg.__wbg_getmyservices_0dec251bd1afa3c2 = function() {
2443
+ imports.wbg.__wbg_getmyservices_0a1d8f72d9b25161 = function() {
2445
2444
  const ret = MsgHandler.get_my_services();
2446
2445
  _assertClass(ret, WasmPeerServiceList);
2447
2446
  var ptr1 = ret.__destroy_into_raw();
Binary file
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.2.7",
3
+ "type": "module",
4
+ "version": "0.2.9",
4
5
  "files": [
5
6
  "index_bg.wasm",
6
7
  "index.js",
7
8
  "index.d.ts"
8
9
  ],
9
- "module": "index.js",
10
+ "main": "index.js",
10
11
  "types": "index.d.ts",
11
12
  "sideEffects": [
12
13
  "./snippets/*"