saito-wasm 0.1.45 → 0.1.46

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.1.45"
3
+ version = "0.1.46"
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.1.45",
3
+ "version": "0.1.46",
4
4
  "description": "js wrappings around saito-core using wasm",
5
5
  "scripts": {
6
6
  "test": "./node_modules/.bin/jest",
@@ -16,6 +16,14 @@ export function initialize(json: string, private_key: string, log_level_num: num
16
16
  */
17
17
  export function create_transaction(public_key: string, amount: bigint, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
18
18
  /**
19
+ * @param {Array<any>} public_keys
20
+ * @param {BigUint64Array} amounts
21
+ * @param {bigint} fee
22
+ * @param {boolean} force_merge
23
+ * @returns {Promise<WasmTransaction>}
24
+ */
25
+ export function create_transaction_with_multiple_payments(public_keys: Array<any>, amounts: BigUint64Array, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
26
+ /**
19
27
  * @returns {Promise<string>}
20
28
  */
21
29
  export function get_latest_block_hash(): Promise<string>;
@@ -150,6 +158,11 @@ export function get_mempool_txs(): Promise<Array<any>>;
150
158
  */
151
159
  export function set_wallet_version(major: number, minor: number, patch: number): Promise<void>;
152
160
  /**
161
+ * @param {string} key
162
+ * @returns {boolean}
163
+ */
164
+ export function is_valid_public_key(key: string): boolean;
165
+ /**
153
166
  */
154
167
  export class SaitoWasm {
155
168
  free(): void;
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-5900c973fb157930/js/msg_handler.js`);
4
+ const { MsgHandler } = require(String.raw`./snippets/saito-wasm-8c18e4f881e1872e/js/msg_handler.js`);
5
5
  const { TextDecoder, TextEncoder } = require(`util`);
6
6
 
7
7
  const heap = new Array(128).fill(undefined);
@@ -234,14 +234,6 @@ function _assertClass(instance, klass) {
234
234
  }
235
235
  return instance.ptr;
236
236
  }
237
-
238
- function handleError(f, args) {
239
- try {
240
- return f.apply(this, args);
241
- } catch (e) {
242
- wasm.__wbindgen_exn_store(addHeapObject(e));
243
- }
244
- }
245
237
  /**
246
238
  * @param {string} json
247
239
  * @param {string} private_key
@@ -265,6 +257,18 @@ module.exports.create_transaction = function(public_key, amount, fee, force_merg
265
257
  return takeObject(ret);
266
258
  };
267
259
 
260
+ /**
261
+ * @param {Array<any>} public_keys
262
+ * @param {BigUint64Array} amounts
263
+ * @param {bigint} fee
264
+ * @param {boolean} force_merge
265
+ * @returns {Promise<WasmTransaction>}
266
+ */
267
+ module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, force_merge) {
268
+ const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, force_merge);
269
+ return takeObject(ret);
270
+ };
271
+
268
272
  /**
269
273
  * @returns {Promise<string>}
270
274
  */
@@ -524,7 +528,23 @@ module.exports.set_wallet_version = function(major, minor, patch) {
524
528
  return takeObject(ret);
525
529
  };
526
530
 
527
- function __wbg_adapter_367(arg0, arg1, arg2, arg3) {
531
+ /**
532
+ * @param {string} key
533
+ * @returns {boolean}
534
+ */
535
+ module.exports.is_valid_public_key = function(key) {
536
+ const ret = wasm.is_valid_public_key(addHeapObject(key));
537
+ return ret !== 0;
538
+ };
539
+
540
+ function handleError(f, args) {
541
+ try {
542
+ return f.apply(this, args);
543
+ } catch (e) {
544
+ wasm.__wbindgen_exn_store(addHeapObject(e));
545
+ }
546
+ }
547
+ function __wbg_adapter_369(arg0, arg1, arg2, arg3) {
528
548
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h042dde47a1d77254(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
529
549
  }
530
550
 
@@ -2117,11 +2137,6 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
2117
2137
  takeObject(arg0);
2118
2138
  };
2119
2139
 
2120
- module.exports.__wbg_wasmpeer_new = function(arg0) {
2121
- const ret = WasmPeer.__wrap(arg0);
2122
- return addHeapObject(ret);
2123
- };
2124
-
2125
2140
  module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2126
2141
  const ret = BigInt.asUintN(64, arg0);
2127
2142
  return addHeapObject(ret);
@@ -2132,8 +2147,13 @@ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2132
2147
  return addHeapObject(ret);
2133
2148
  };
2134
2149
 
2135
- module.exports.__wbg_wasmtransaction_new = function(arg0) {
2136
- const ret = WasmTransaction.__wrap(arg0);
2150
+ module.exports.__wbg_wasmwallet_new = function(arg0) {
2151
+ const ret = WasmWallet.__wrap(arg0);
2152
+ return addHeapObject(ret);
2153
+ };
2154
+
2155
+ module.exports.__wbg_wasmblockchain_new = function(arg0) {
2156
+ const ret = WasmBlockchain.__wrap(arg0);
2137
2157
  return addHeapObject(ret);
2138
2158
  };
2139
2159
 
@@ -2147,6 +2167,16 @@ module.exports.__wbg_wasmslip_new = function(arg0) {
2147
2167
  return addHeapObject(ret);
2148
2168
  };
2149
2169
 
2170
+ module.exports.__wbg_wasmtransaction_new = function(arg0) {
2171
+ const ret = WasmTransaction.__wrap(arg0);
2172
+ return addHeapObject(ret);
2173
+ };
2174
+
2175
+ module.exports.__wbg_wasmblock_new = function(arg0) {
2176
+ const ret = WasmBlock.__wrap(arg0);
2177
+ return addHeapObject(ret);
2178
+ };
2179
+
2150
2180
  module.exports.__wbindgen_is_falsy = function(arg0) {
2151
2181
  const ret = !getObject(arg0);
2152
2182
  return ret;
@@ -2161,13 +2191,8 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
2161
2191
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2162
2192
  };
2163
2193
 
2164
- module.exports.__wbg_wasmblock_new = function(arg0) {
2165
- const ret = WasmBlock.__wrap(arg0);
2166
- return addHeapObject(ret);
2167
- };
2168
-
2169
- module.exports.__wbg_wasmwallet_new = function(arg0) {
2170
- const ret = WasmWallet.__wrap(arg0);
2194
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
2195
+ const ret = WasmPeer.__wrap(arg0);
2171
2196
  return addHeapObject(ret);
2172
2197
  };
2173
2198
 
@@ -2176,11 +2201,6 @@ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2176
2201
  return addHeapObject(ret);
2177
2202
  };
2178
2203
 
2179
- module.exports.__wbg_wasmblockchain_new = function(arg0) {
2180
- const ret = WasmBlockchain.__wrap(arg0);
2181
- return addHeapObject(ret);
2182
- };
2183
-
2184
2204
  module.exports.__wbg_wasmhop_new = function(arg0) {
2185
2205
  const ret = WasmHop.__wrap(arg0);
2186
2206
  return addHeapObject(ret);
@@ -2217,25 +2237,25 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
2217
2237
  return ret;
2218
2238
  };
2219
2239
 
2220
- module.exports.__wbg_sendmessage_dcd9de9cf072916d = function(arg0, arg1) {
2240
+ module.exports.__wbg_sendmessage_5ad9fcfca644e52d = function(arg0, arg1) {
2221
2241
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2222
2242
  };
2223
2243
 
2224
- module.exports.__wbg_sendmessagetoall_c0425ee38a63f4d9 = function(arg0, arg1) {
2244
+ module.exports.__wbg_sendmessagetoall_3a53e557d5a7b3f5 = function(arg0, arg1) {
2225
2245
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2226
2246
  };
2227
2247
 
2228
- module.exports.__wbg_connecttopeer_080b32e096ff559c = function() { return handleError(function (arg0) {
2248
+ module.exports.__wbg_connecttopeer_5111d21e039c34a4 = function() { return handleError(function (arg0) {
2229
2249
  const ret = MsgHandler.connect_to_peer(takeObject(arg0));
2230
2250
  return addHeapObject(ret);
2231
2251
  }, arguments) };
2232
2252
 
2233
- module.exports.__wbg_disconnectfrompeer_37415941e31e178a = function() { return handleError(function (arg0) {
2253
+ module.exports.__wbg_disconnectfrompeer_6147b8c175b9ff9a = function() { return handleError(function (arg0) {
2234
2254
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2235
2255
  return addHeapObject(ret);
2236
2256
  }, arguments) };
2237
2257
 
2238
- module.exports.__wbg_fetchblockfrompeer_8982dc9e1af80547 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2258
+ module.exports.__wbg_fetchblockfrompeer_9211aa1fb219db5f = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2239
2259
  let deferred0_0;
2240
2260
  let deferred0_1;
2241
2261
  try {
@@ -2248,7 +2268,7 @@ module.exports.__wbg_fetchblockfrompeer_8982dc9e1af80547 = function() { return h
2248
2268
  }
2249
2269
  }, arguments) };
2250
2270
 
2251
- module.exports.__wbg_writevalue_813b367ac90d2de0 = function(arg0, arg1, arg2) {
2271
+ module.exports.__wbg_writevalue_4fca84ab33c90cf3 = function(arg0, arg1, arg2) {
2252
2272
  let deferred0_0;
2253
2273
  let deferred0_1;
2254
2274
  try {
@@ -2260,7 +2280,7 @@ module.exports.__wbg_writevalue_813b367ac90d2de0 = function(arg0, arg1, arg2) {
2260
2280
  }
2261
2281
  };
2262
2282
 
2263
- module.exports.__wbg_readvalue_dd58d461ab4bf783 = function() { return handleError(function (arg0, arg1) {
2283
+ module.exports.__wbg_readvalue_d087b44f36774ed7 = function() { return handleError(function (arg0, arg1) {
2264
2284
  let deferred0_0;
2265
2285
  let deferred0_1;
2266
2286
  try {
@@ -2273,12 +2293,12 @@ module.exports.__wbg_readvalue_dd58d461ab4bf783 = function() { return handleErro
2273
2293
  }
2274
2294
  }, arguments) };
2275
2295
 
2276
- module.exports.__wbg_loadblockfilelist_2c0beccb457af27d = function() { return handleError(function () {
2296
+ module.exports.__wbg_loadblockfilelist_8f5f845d0fa0cfdf = function() { return handleError(function () {
2277
2297
  const ret = MsgHandler.load_block_file_list();
2278
2298
  return addHeapObject(ret);
2279
2299
  }, arguments) };
2280
2300
 
2281
- module.exports.__wbg_isexistingfile_a956653add00fea1 = function() { return handleError(function (arg0, arg1) {
2301
+ module.exports.__wbg_isexistingfile_209a2a6fd1e83bfc = function() { return handleError(function (arg0, arg1) {
2282
2302
  let deferred0_0;
2283
2303
  let deferred0_1;
2284
2304
  try {
@@ -2291,7 +2311,7 @@ module.exports.__wbg_isexistingfile_a956653add00fea1 = function() { return handl
2291
2311
  }
2292
2312
  }, arguments) };
2293
2313
 
2294
- module.exports.__wbg_removevalue_b8b545456b9ce686 = function() { return handleError(function (arg0, arg1) {
2314
+ module.exports.__wbg_removevalue_152b9e3b5c25b65b = function() { return handleError(function (arg0, arg1) {
2295
2315
  let deferred0_0;
2296
2316
  let deferred0_1;
2297
2317
  try {
@@ -2304,7 +2324,7 @@ module.exports.__wbg_removevalue_b8b545456b9ce686 = function() { return handleEr
2304
2324
  }
2305
2325
  }, arguments) };
2306
2326
 
2307
- module.exports.__wbg_ensureblockdirectoryexists_90e54b6fb40fbac0 = function() { return handleError(function (arg0, arg1) {
2327
+ module.exports.__wbg_ensureblockdirectoryexists_61aa09babd711ebd = function() { return handleError(function (arg0, arg1) {
2308
2328
  let deferred0_0;
2309
2329
  let deferred0_1;
2310
2330
  try {
@@ -2316,19 +2336,19 @@ module.exports.__wbg_ensureblockdirectoryexists_90e54b6fb40fbac0 = function() {
2316
2336
  }
2317
2337
  }, arguments) };
2318
2338
 
2319
- module.exports.__wbg_processapicall_d4a1830608ad9a0a = function(arg0, arg1, arg2) {
2339
+ module.exports.__wbg_processapicall_5837c3c1eb77b6ab = function(arg0, arg1, arg2) {
2320
2340
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2321
2341
  };
2322
2342
 
2323
- module.exports.__wbg_processapisuccess_02222fb0096c49d7 = function(arg0, arg1, arg2) {
2343
+ module.exports.__wbg_processapisuccess_d7b709a0dbbcdf97 = function(arg0, arg1, arg2) {
2324
2344
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2325
2345
  };
2326
2346
 
2327
- module.exports.__wbg_processapierror_f7524c9e05a7e67b = function(arg0, arg1, arg2) {
2347
+ module.exports.__wbg_processapierror_1d2ecb7b9c54f5fd = function(arg0, arg1, arg2) {
2328
2348
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2329
2349
  };
2330
2350
 
2331
- module.exports.__wbg_sendinterfaceevent_6a4f11b36c66021b = function(arg0, arg1, arg2) {
2351
+ module.exports.__wbg_sendinterfaceevent_6970a814a76481f5 = function(arg0, arg1, arg2) {
2332
2352
  let deferred0_0;
2333
2353
  let deferred0_1;
2334
2354
  try {
@@ -2340,7 +2360,7 @@ module.exports.__wbg_sendinterfaceevent_6a4f11b36c66021b = function(arg0, arg1,
2340
2360
  }
2341
2361
  };
2342
2362
 
2343
- module.exports.__wbg_sendblocksuccess_e85b92237d858d6e = function(arg0, arg1, arg2) {
2363
+ module.exports.__wbg_sendblocksuccess_f846a1f1e943b704 = function(arg0, arg1, arg2) {
2344
2364
  let deferred0_0;
2345
2365
  let deferred0_1;
2346
2366
  try {
@@ -2352,11 +2372,11 @@ module.exports.__wbg_sendblocksuccess_e85b92237d858d6e = function(arg0, arg1, ar
2352
2372
  }
2353
2373
  };
2354
2374
 
2355
- module.exports.__wbg_sendwalletupdate_6c5721280cfe040b = function() {
2375
+ module.exports.__wbg_sendwalletupdate_d7adc771b9b0d982 = function() {
2356
2376
  MsgHandler.send_wallet_update();
2357
2377
  };
2358
2378
 
2359
- module.exports.__wbg_sendnewversionalert_29721c3658bd04d0 = function(arg0, arg1, arg2) {
2379
+ module.exports.__wbg_sendnewversionalert_ba100fad975d0e8d = function(arg0, arg1, arg2) {
2360
2380
  let deferred0_0;
2361
2381
  let deferred0_1;
2362
2382
  try {
@@ -2368,15 +2388,15 @@ module.exports.__wbg_sendnewversionalert_29721c3658bd04d0 = function(arg0, arg1,
2368
2388
  }
2369
2389
  };
2370
2390
 
2371
- module.exports.__wbg_savewallet_2fa4d57c2d41a967 = function() {
2391
+ module.exports.__wbg_savewallet_6379efcc479145ec = function() {
2372
2392
  MsgHandler.save_wallet();
2373
2393
  };
2374
2394
 
2375
- module.exports.__wbg_loadwallet_1e4298b1479d07b2 = function() {
2395
+ module.exports.__wbg_loadwallet_f998f6f5e3d90b1e = function() {
2376
2396
  MsgHandler.load_wallet();
2377
2397
  };
2378
2398
 
2379
- module.exports.__wbg_getmyservices_58f0019ed967c00c = function() {
2399
+ module.exports.__wbg_getmyservices_4705725093cf9d12 = function() {
2380
2400
  const ret = MsgHandler.get_my_services();
2381
2401
  _assertClass(ret, WasmPeerServiceList);
2382
2402
  var ptr1 = ret.__destroy_into_raw();
@@ -2635,7 +2655,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
2635
2655
  const a = state0.a;
2636
2656
  state0.a = 0;
2637
2657
  try {
2638
- return __wbg_adapter_367(a, state0.b, arg0, arg1);
2658
+ return __wbg_adapter_369(a, state0.b, arg0, arg1);
2639
2659
  } finally {
2640
2660
  state0.a = a;
2641
2661
  }
@@ -2681,6 +2701,20 @@ module.exports.__wbg_length_c20a40f15020d68a = function(arg0) {
2681
2701
  return ret;
2682
2702
  };
2683
2703
 
2704
+ module.exports.__wbg_new_5b2a2842270c66e6 = function(arg0) {
2705
+ const ret = new BigUint64Array(getObject(arg0));
2706
+ return addHeapObject(ret);
2707
+ };
2708
+
2709
+ module.exports.__wbg_set_dc7aa8fdca321349 = function(arg0, arg1, arg2) {
2710
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
2711
+ };
2712
+
2713
+ module.exports.__wbg_length_a641162bc8055216 = function(arg0) {
2714
+ const ret = getObject(arg0).length;
2715
+ return ret;
2716
+ };
2717
+
2684
2718
  module.exports.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
2685
2719
  let result;
2686
2720
  try {
@@ -2729,8 +2763,8 @@ module.exports.__wbindgen_memory = function() {
2729
2763
  return addHeapObject(ret);
2730
2764
  };
2731
2765
 
2732
- module.exports.__wbindgen_closure_wrapper1165 = function(arg0, arg1, arg2) {
2733
- const ret = makeMutClosure(arg0, arg1, 423, __wbg_adapter_40);
2766
+ module.exports.__wbindgen_closure_wrapper1176 = function(arg0, arg1, arg2) {
2767
+ const ret = makeMutClosure(arg0, arg1, 427, __wbg_adapter_40);
2734
2768
  return addHeapObject(ret);
2735
2769
  };
2736
2770
 
Binary file
@@ -118,29 +118,10 @@ export function wasmbalancesnapshot_from_string(a: number, b: number): void;
118
118
  export function wasmbalancesnapshot_to_string(a: number): number;
119
119
  export function __wbg_wasmconfiguration_free(a: number): void;
120
120
  export function wasmconfiguration_new(): number;
121
- export function __wbg_wasmblockchain_free(a: number): void;
122
- export function wasmblockchain_reset(a: number): number;
123
- export function wasmblockchain_get_last_block_id(a: number): number;
124
- export function wasmblockchain_get_last_timestamp(a: number): number;
125
- export function wasmblockchain_get_longest_chain_hash_at(a: number, b: number): number;
126
- export function wasmblockchain_get_last_block_hash(a: number): number;
127
- export function wasmblockchain_get_last_burnfee(a: number): number;
128
- export function wasmblockchain_get_genesis_block_id(a: number): number;
129
- export function wasmblockchain_get_genesis_timestamp(a: number): number;
130
- export function wasmblockchain_get_lowest_acceptable_timestamp(a: number): number;
131
- export function wasmblockchain_get_lowest_acceptable_block_hash(a: number): number;
132
- export function wasmblockchain_get_lowest_acceptable_block_id(a: number): number;
133
- export function wasmblockchain_get_latest_block_id(a: number): number;
134
- export function wasmblockchain_get_fork_id(a: number): number;
135
- export function wasmblockchain_get_longest_chain_hash_at_id(a: number, b: number): number;
136
- export function wasmblockchain_get_hashes_at_id(a: number, b: number): number;
137
- export function __wbg_wasmhop_free(a: number): void;
138
- export function wasmhop_from(a: number, b: number): void;
139
- export function wasmhop_sig(a: number, b: number): void;
140
- export function wasmhop_to(a: number, b: number): void;
141
121
  export function __wbg_saitowasm_free(a: number): void;
142
122
  export function initialize(a: number, b: number, c: number): number;
143
123
  export function create_transaction(a: number, b: number, c: number, d: number): number;
124
+ export function create_transaction_with_multiple_payments(a: number, b: number, c: number, d: number): number;
144
125
  export function get_latest_block_hash(): number;
145
126
  export function get_block(a: number): number;
146
127
  export function process_new_peer(a: number, b: number): number;
@@ -166,6 +147,7 @@ export function get_wallet(): number;
166
147
  export function get_blockchain(): number;
167
148
  export function get_mempool_txs(): number;
168
149
  export function set_wallet_version(a: number, b: number, c: number): number;
150
+ export function is_valid_public_key(a: number): number;
169
151
  export function __wbg_wasmconsensusvalues_free(a: number): void;
170
152
  export function wasmconsensusvalues_it_num(a: number): number;
171
153
  export function wasmconsensusvalues_fee_transaction(a: number): number;
@@ -205,6 +187,26 @@ export function wasmtransaction_set_type(a: number, b: number): void;
205
187
  export function wasmtransaction_total_fees(a: number): number;
206
188
  export function wasmtransaction_serialize(a: number): number;
207
189
  export function wasmtransaction_deserialize(a: number, b: number): void;
190
+ export function __wbg_wasmblockchain_free(a: number): void;
191
+ export function wasmblockchain_reset(a: number): number;
192
+ export function wasmblockchain_get_last_block_id(a: number): number;
193
+ export function wasmblockchain_get_last_timestamp(a: number): number;
194
+ export function wasmblockchain_get_longest_chain_hash_at(a: number, b: number): number;
195
+ export function wasmblockchain_get_last_block_hash(a: number): number;
196
+ export function wasmblockchain_get_last_burnfee(a: number): number;
197
+ export function wasmblockchain_get_genesis_block_id(a: number): number;
198
+ export function wasmblockchain_get_genesis_timestamp(a: number): number;
199
+ export function wasmblockchain_get_lowest_acceptable_timestamp(a: number): number;
200
+ export function wasmblockchain_get_lowest_acceptable_block_hash(a: number): number;
201
+ export function wasmblockchain_get_lowest_acceptable_block_id(a: number): number;
202
+ export function wasmblockchain_get_latest_block_id(a: number): number;
203
+ export function wasmblockchain_get_fork_id(a: number): number;
204
+ export function wasmblockchain_get_longest_chain_hash_at_id(a: number, b: number): number;
205
+ export function wasmblockchain_get_hashes_at_id(a: number, b: number): number;
206
+ export function __wbg_wasmhop_free(a: number): void;
207
+ export function wasmhop_from(a: number, b: number): void;
208
+ export function wasmhop_sig(a: number, b: number): void;
209
+ export function wasmhop_to(a: number, b: number): void;
208
210
  export function rustsecp256k1_v0_9_0_context_create(a: number): number;
209
211
  export function rustsecp256k1_v0_9_0_context_destroy(a: number): void;
210
212
  export function rustsecp256k1_v0_9_0_default_illegal_callback_fn(a: number, b: number): void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
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
- "cross-env": "^7.0.3",
13
- "node-fetch": "^3.3.0"
12
+ "node-fetch": "^3.3.0",
13
+ "cross-env": "^7.0.3"
14
14
  }
15
15
  }
@@ -16,6 +16,14 @@ export function initialize(json: string, private_key: string, log_level_num: num
16
16
  */
17
17
  export function create_transaction(public_key: string, amount: bigint, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
18
18
  /**
19
+ * @param {Array<any>} public_keys
20
+ * @param {BigUint64Array} amounts
21
+ * @param {bigint} fee
22
+ * @param {boolean} force_merge
23
+ * @returns {Promise<WasmTransaction>}
24
+ */
25
+ export function create_transaction_with_multiple_payments(public_keys: Array<any>, amounts: BigUint64Array, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
26
+ /**
19
27
  * @returns {Promise<string>}
20
28
  */
21
29
  export function get_latest_block_hash(): Promise<string>;
@@ -150,6 +158,11 @@ export function get_mempool_txs(): Promise<Array<any>>;
150
158
  */
151
159
  export function set_wallet_version(major: number, minor: number, patch: number): Promise<void>;
152
160
  /**
161
+ * @param {string} key
162
+ * @returns {boolean}
163
+ */
164
+ export function is_valid_public_key(key: string): boolean;
165
+ /**
153
166
  */
154
167
  export class SaitoWasm {
155
168
  free(): void;
@@ -844,29 +857,10 @@ export interface InitOutput {
844
857
  readonly wasmbalancesnapshot_to_string: (a: number) => number;
845
858
  readonly __wbg_wasmconfiguration_free: (a: number) => void;
846
859
  readonly wasmconfiguration_new: () => number;
847
- readonly __wbg_wasmblockchain_free: (a: number) => void;
848
- readonly wasmblockchain_reset: (a: number) => number;
849
- readonly wasmblockchain_get_last_block_id: (a: number) => number;
850
- readonly wasmblockchain_get_last_timestamp: (a: number) => number;
851
- readonly wasmblockchain_get_longest_chain_hash_at: (a: number, b: number) => number;
852
- readonly wasmblockchain_get_last_block_hash: (a: number) => number;
853
- readonly wasmblockchain_get_last_burnfee: (a: number) => number;
854
- readonly wasmblockchain_get_genesis_block_id: (a: number) => number;
855
- readonly wasmblockchain_get_genesis_timestamp: (a: number) => number;
856
- readonly wasmblockchain_get_lowest_acceptable_timestamp: (a: number) => number;
857
- readonly wasmblockchain_get_lowest_acceptable_block_hash: (a: number) => number;
858
- readonly wasmblockchain_get_lowest_acceptable_block_id: (a: number) => number;
859
- readonly wasmblockchain_get_latest_block_id: (a: number) => number;
860
- readonly wasmblockchain_get_fork_id: (a: number) => number;
861
- readonly wasmblockchain_get_longest_chain_hash_at_id: (a: number, b: number) => number;
862
- readonly wasmblockchain_get_hashes_at_id: (a: number, b: number) => number;
863
- readonly __wbg_wasmhop_free: (a: number) => void;
864
- readonly wasmhop_from: (a: number, b: number) => void;
865
- readonly wasmhop_sig: (a: number, b: number) => void;
866
- readonly wasmhop_to: (a: number, b: number) => void;
867
860
  readonly __wbg_saitowasm_free: (a: number) => void;
868
861
  readonly initialize: (a: number, b: number, c: number) => number;
869
862
  readonly create_transaction: (a: number, b: number, c: number, d: number) => number;
863
+ readonly create_transaction_with_multiple_payments: (a: number, b: number, c: number, d: number) => number;
870
864
  readonly get_latest_block_hash: () => number;
871
865
  readonly get_block: (a: number) => number;
872
866
  readonly process_new_peer: (a: number, b: number) => number;
@@ -892,6 +886,7 @@ export interface InitOutput {
892
886
  readonly get_blockchain: () => number;
893
887
  readonly get_mempool_txs: () => number;
894
888
  readonly set_wallet_version: (a: number, b: number, c: number) => number;
889
+ readonly is_valid_public_key: (a: number) => number;
895
890
  readonly __wbg_wasmconsensusvalues_free: (a: number) => void;
896
891
  readonly wasmconsensusvalues_it_num: (a: number) => number;
897
892
  readonly wasmconsensusvalues_fee_transaction: (a: number) => number;
@@ -931,6 +926,26 @@ export interface InitOutput {
931
926
  readonly wasmtransaction_total_fees: (a: number) => number;
932
927
  readonly wasmtransaction_serialize: (a: number) => number;
933
928
  readonly wasmtransaction_deserialize: (a: number, b: number) => void;
929
+ readonly __wbg_wasmblockchain_free: (a: number) => void;
930
+ readonly wasmblockchain_reset: (a: number) => number;
931
+ readonly wasmblockchain_get_last_block_id: (a: number) => number;
932
+ readonly wasmblockchain_get_last_timestamp: (a: number) => number;
933
+ readonly wasmblockchain_get_longest_chain_hash_at: (a: number, b: number) => number;
934
+ readonly wasmblockchain_get_last_block_hash: (a: number) => number;
935
+ readonly wasmblockchain_get_last_burnfee: (a: number) => number;
936
+ readonly wasmblockchain_get_genesis_block_id: (a: number) => number;
937
+ readonly wasmblockchain_get_genesis_timestamp: (a: number) => number;
938
+ readonly wasmblockchain_get_lowest_acceptable_timestamp: (a: number) => number;
939
+ readonly wasmblockchain_get_lowest_acceptable_block_hash: (a: number) => number;
940
+ readonly wasmblockchain_get_lowest_acceptable_block_id: (a: number) => number;
941
+ readonly wasmblockchain_get_latest_block_id: (a: number) => number;
942
+ readonly wasmblockchain_get_fork_id: (a: number) => number;
943
+ readonly wasmblockchain_get_longest_chain_hash_at_id: (a: number, b: number) => number;
944
+ readonly wasmblockchain_get_hashes_at_id: (a: number, b: number) => number;
945
+ readonly __wbg_wasmhop_free: (a: number) => void;
946
+ readonly wasmhop_from: (a: number, b: number) => void;
947
+ readonly wasmhop_sig: (a: number, b: number) => void;
948
+ readonly wasmhop_to: (a: number, b: number) => void;
934
949
  readonly rustsecp256k1_v0_9_0_context_create: (a: number) => number;
935
950
  readonly rustsecp256k1_v0_9_0_context_destroy: (a: number) => void;
936
951
  readonly rustsecp256k1_v0_9_0_default_illegal_callback_fn: (a: number, b: number) => void;
package/pkg/web/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { MsgHandler } from './snippets/saito-wasm-5900c973fb157930/js/msg_handler.js';
1
+ import { MsgHandler } from './snippets/saito-wasm-8c18e4f881e1872e/js/msg_handler.js';
2
2
 
3
3
  let wasm;
4
4
 
@@ -232,14 +232,6 @@ function _assertClass(instance, klass) {
232
232
  }
233
233
  return instance.ptr;
234
234
  }
235
-
236
- function handleError(f, args) {
237
- try {
238
- return f.apply(this, args);
239
- } catch (e) {
240
- wasm.__wbindgen_exn_store(addHeapObject(e));
241
- }
242
- }
243
235
  /**
244
236
  * @param {string} json
245
237
  * @param {string} private_key
@@ -263,6 +255,18 @@ export function create_transaction(public_key, amount, fee, force_merge) {
263
255
  return takeObject(ret);
264
256
  }
265
257
 
258
+ /**
259
+ * @param {Array<any>} public_keys
260
+ * @param {BigUint64Array} amounts
261
+ * @param {bigint} fee
262
+ * @param {boolean} force_merge
263
+ * @returns {Promise<WasmTransaction>}
264
+ */
265
+ export function create_transaction_with_multiple_payments(public_keys, amounts, fee, force_merge) {
266
+ const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, force_merge);
267
+ return takeObject(ret);
268
+ }
269
+
266
270
  /**
267
271
  * @returns {Promise<string>}
268
272
  */
@@ -522,7 +526,23 @@ export function set_wallet_version(major, minor, patch) {
522
526
  return takeObject(ret);
523
527
  }
524
528
 
525
- function __wbg_adapter_367(arg0, arg1, arg2, arg3) {
529
+ /**
530
+ * @param {string} key
531
+ * @returns {boolean}
532
+ */
533
+ export function is_valid_public_key(key) {
534
+ const ret = wasm.is_valid_public_key(addHeapObject(key));
535
+ return ret !== 0;
536
+ }
537
+
538
+ function handleError(f, args) {
539
+ try {
540
+ return f.apply(this, args);
541
+ } catch (e) {
542
+ wasm.__wbindgen_exn_store(addHeapObject(e));
543
+ }
544
+ }
545
+ function __wbg_adapter_369(arg0, arg1, arg2, arg3) {
526
546
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h042dde47a1d77254(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
527
547
  }
528
548
 
@@ -2134,10 +2154,6 @@ function __wbg_get_imports() {
2134
2154
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2135
2155
  takeObject(arg0);
2136
2156
  };
2137
- imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2138
- const ret = WasmPeer.__wrap(arg0);
2139
- return addHeapObject(ret);
2140
- };
2141
2157
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2142
2158
  const ret = BigInt.asUintN(64, arg0);
2143
2159
  return addHeapObject(ret);
@@ -2146,8 +2162,12 @@ function __wbg_get_imports() {
2146
2162
  const ret = WasmWalletSlip.__wrap(arg0);
2147
2163
  return addHeapObject(ret);
2148
2164
  };
2149
- imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2150
- const ret = WasmTransaction.__wrap(arg0);
2165
+ imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2166
+ const ret = WasmWallet.__wrap(arg0);
2167
+ return addHeapObject(ret);
2168
+ };
2169
+ imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2170
+ const ret = WasmBlockchain.__wrap(arg0);
2151
2171
  return addHeapObject(ret);
2152
2172
  };
2153
2173
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
@@ -2158,6 +2178,14 @@ function __wbg_get_imports() {
2158
2178
  const ret = WasmSlip.__wrap(arg0);
2159
2179
  return addHeapObject(ret);
2160
2180
  };
2181
+ imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2182
+ const ret = WasmTransaction.__wrap(arg0);
2183
+ return addHeapObject(ret);
2184
+ };
2185
+ imports.wbg.__wbg_wasmblock_new = function(arg0) {
2186
+ const ret = WasmBlock.__wrap(arg0);
2187
+ return addHeapObject(ret);
2188
+ };
2161
2189
  imports.wbg.__wbindgen_is_falsy = function(arg0) {
2162
2190
  const ret = !getObject(arg0);
2163
2191
  return ret;
@@ -2170,22 +2198,14 @@ function __wbg_get_imports() {
2170
2198
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2171
2199
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2172
2200
  };
2173
- imports.wbg.__wbg_wasmblock_new = function(arg0) {
2174
- const ret = WasmBlock.__wrap(arg0);
2175
- return addHeapObject(ret);
2176
- };
2177
- imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2178
- const ret = WasmWallet.__wrap(arg0);
2201
+ imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2202
+ const ret = WasmPeer.__wrap(arg0);
2179
2203
  return addHeapObject(ret);
2180
2204
  };
2181
2205
  imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2182
2206
  const ret = WasmBalanceSnapshot.__wrap(arg0);
2183
2207
  return addHeapObject(ret);
2184
2208
  };
2185
- imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2186
- const ret = WasmBlockchain.__wrap(arg0);
2187
- return addHeapObject(ret);
2188
- };
2189
2209
  imports.wbg.__wbg_wasmhop_new = function(arg0) {
2190
2210
  const ret = WasmHop.__wrap(arg0);
2191
2211
  return addHeapObject(ret);
@@ -2215,21 +2235,21 @@ function __wbg_get_imports() {
2215
2235
  const ret = getObject(arg0) in getObject(arg1);
2216
2236
  return ret;
2217
2237
  };
2218
- imports.wbg.__wbg_sendmessage_dcd9de9cf072916d = function(arg0, arg1) {
2238
+ imports.wbg.__wbg_sendmessage_5ad9fcfca644e52d = function(arg0, arg1) {
2219
2239
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2220
2240
  };
2221
- imports.wbg.__wbg_sendmessagetoall_c0425ee38a63f4d9 = function(arg0, arg1) {
2241
+ imports.wbg.__wbg_sendmessagetoall_3a53e557d5a7b3f5 = function(arg0, arg1) {
2222
2242
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2223
2243
  };
2224
- imports.wbg.__wbg_connecttopeer_080b32e096ff559c = function() { return handleError(function (arg0) {
2244
+ imports.wbg.__wbg_connecttopeer_5111d21e039c34a4 = function() { return handleError(function (arg0) {
2225
2245
  const ret = MsgHandler.connect_to_peer(takeObject(arg0));
2226
2246
  return addHeapObject(ret);
2227
2247
  }, arguments) };
2228
- imports.wbg.__wbg_disconnectfrompeer_37415941e31e178a = function() { return handleError(function (arg0) {
2248
+ imports.wbg.__wbg_disconnectfrompeer_6147b8c175b9ff9a = function() { return handleError(function (arg0) {
2229
2249
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2230
2250
  return addHeapObject(ret);
2231
2251
  }, arguments) };
2232
- imports.wbg.__wbg_fetchblockfrompeer_8982dc9e1af80547 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2252
+ imports.wbg.__wbg_fetchblockfrompeer_9211aa1fb219db5f = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2233
2253
  let deferred0_0;
2234
2254
  let deferred0_1;
2235
2255
  try {
@@ -2241,7 +2261,7 @@ function __wbg_get_imports() {
2241
2261
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2242
2262
  }
2243
2263
  }, arguments) };
2244
- imports.wbg.__wbg_writevalue_813b367ac90d2de0 = function(arg0, arg1, arg2) {
2264
+ imports.wbg.__wbg_writevalue_4fca84ab33c90cf3 = function(arg0, arg1, arg2) {
2245
2265
  let deferred0_0;
2246
2266
  let deferred0_1;
2247
2267
  try {
@@ -2252,7 +2272,7 @@ function __wbg_get_imports() {
2252
2272
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2253
2273
  }
2254
2274
  };
2255
- imports.wbg.__wbg_readvalue_dd58d461ab4bf783 = function() { return handleError(function (arg0, arg1) {
2275
+ imports.wbg.__wbg_readvalue_d087b44f36774ed7 = function() { return handleError(function (arg0, arg1) {
2256
2276
  let deferred0_0;
2257
2277
  let deferred0_1;
2258
2278
  try {
@@ -2264,11 +2284,11 @@ function __wbg_get_imports() {
2264
2284
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2265
2285
  }
2266
2286
  }, arguments) };
2267
- imports.wbg.__wbg_loadblockfilelist_2c0beccb457af27d = function() { return handleError(function () {
2287
+ imports.wbg.__wbg_loadblockfilelist_8f5f845d0fa0cfdf = function() { return handleError(function () {
2268
2288
  const ret = MsgHandler.load_block_file_list();
2269
2289
  return addHeapObject(ret);
2270
2290
  }, arguments) };
2271
- imports.wbg.__wbg_isexistingfile_a956653add00fea1 = function() { return handleError(function (arg0, arg1) {
2291
+ imports.wbg.__wbg_isexistingfile_209a2a6fd1e83bfc = function() { return handleError(function (arg0, arg1) {
2272
2292
  let deferred0_0;
2273
2293
  let deferred0_1;
2274
2294
  try {
@@ -2280,7 +2300,7 @@ function __wbg_get_imports() {
2280
2300
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2281
2301
  }
2282
2302
  }, arguments) };
2283
- imports.wbg.__wbg_removevalue_b8b545456b9ce686 = function() { return handleError(function (arg0, arg1) {
2303
+ imports.wbg.__wbg_removevalue_152b9e3b5c25b65b = function() { return handleError(function (arg0, arg1) {
2284
2304
  let deferred0_0;
2285
2305
  let deferred0_1;
2286
2306
  try {
@@ -2292,7 +2312,7 @@ function __wbg_get_imports() {
2292
2312
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2293
2313
  }
2294
2314
  }, arguments) };
2295
- imports.wbg.__wbg_ensureblockdirectoryexists_90e54b6fb40fbac0 = function() { return handleError(function (arg0, arg1) {
2315
+ imports.wbg.__wbg_ensureblockdirectoryexists_61aa09babd711ebd = function() { return handleError(function (arg0, arg1) {
2296
2316
  let deferred0_0;
2297
2317
  let deferred0_1;
2298
2318
  try {
@@ -2303,16 +2323,16 @@ function __wbg_get_imports() {
2303
2323
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2304
2324
  }
2305
2325
  }, arguments) };
2306
- imports.wbg.__wbg_processapicall_d4a1830608ad9a0a = function(arg0, arg1, arg2) {
2326
+ imports.wbg.__wbg_processapicall_5837c3c1eb77b6ab = function(arg0, arg1, arg2) {
2307
2327
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2308
2328
  };
2309
- imports.wbg.__wbg_processapisuccess_02222fb0096c49d7 = function(arg0, arg1, arg2) {
2329
+ imports.wbg.__wbg_processapisuccess_d7b709a0dbbcdf97 = function(arg0, arg1, arg2) {
2310
2330
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2311
2331
  };
2312
- imports.wbg.__wbg_processapierror_f7524c9e05a7e67b = function(arg0, arg1, arg2) {
2332
+ imports.wbg.__wbg_processapierror_1d2ecb7b9c54f5fd = function(arg0, arg1, arg2) {
2313
2333
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, BigInt.asUintN(64, arg2));
2314
2334
  };
2315
- imports.wbg.__wbg_sendinterfaceevent_6a4f11b36c66021b = function(arg0, arg1, arg2) {
2335
+ imports.wbg.__wbg_sendinterfaceevent_6970a814a76481f5 = function(arg0, arg1, arg2) {
2316
2336
  let deferred0_0;
2317
2337
  let deferred0_1;
2318
2338
  try {
@@ -2323,7 +2343,7 @@ function __wbg_get_imports() {
2323
2343
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2324
2344
  }
2325
2345
  };
2326
- imports.wbg.__wbg_sendblocksuccess_e85b92237d858d6e = function(arg0, arg1, arg2) {
2346
+ imports.wbg.__wbg_sendblocksuccess_f846a1f1e943b704 = function(arg0, arg1, arg2) {
2327
2347
  let deferred0_0;
2328
2348
  let deferred0_1;
2329
2349
  try {
@@ -2334,10 +2354,10 @@ function __wbg_get_imports() {
2334
2354
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2335
2355
  }
2336
2356
  };
2337
- imports.wbg.__wbg_sendwalletupdate_6c5721280cfe040b = function() {
2357
+ imports.wbg.__wbg_sendwalletupdate_d7adc771b9b0d982 = function() {
2338
2358
  MsgHandler.send_wallet_update();
2339
2359
  };
2340
- imports.wbg.__wbg_sendnewversionalert_29721c3658bd04d0 = function(arg0, arg1, arg2) {
2360
+ imports.wbg.__wbg_sendnewversionalert_ba100fad975d0e8d = function(arg0, arg1, arg2) {
2341
2361
  let deferred0_0;
2342
2362
  let deferred0_1;
2343
2363
  try {
@@ -2348,13 +2368,13 @@ function __wbg_get_imports() {
2348
2368
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2349
2369
  }
2350
2370
  };
2351
- imports.wbg.__wbg_savewallet_2fa4d57c2d41a967 = function() {
2371
+ imports.wbg.__wbg_savewallet_6379efcc479145ec = function() {
2352
2372
  MsgHandler.save_wallet();
2353
2373
  };
2354
- imports.wbg.__wbg_loadwallet_1e4298b1479d07b2 = function() {
2374
+ imports.wbg.__wbg_loadwallet_f998f6f5e3d90b1e = function() {
2355
2375
  MsgHandler.load_wallet();
2356
2376
  };
2357
- imports.wbg.__wbg_getmyservices_58f0019ed967c00c = function() {
2377
+ imports.wbg.__wbg_getmyservices_4705725093cf9d12 = function() {
2358
2378
  const ret = MsgHandler.get_my_services();
2359
2379
  _assertClass(ret, WasmPeerServiceList);
2360
2380
  var ptr1 = ret.__destroy_into_raw();
@@ -2564,7 +2584,7 @@ function __wbg_get_imports() {
2564
2584
  const a = state0.a;
2565
2585
  state0.a = 0;
2566
2586
  try {
2567
- return __wbg_adapter_367(a, state0.b, arg0, arg1);
2587
+ return __wbg_adapter_369(a, state0.b, arg0, arg1);
2568
2588
  } finally {
2569
2589
  state0.a = a;
2570
2590
  }
@@ -2602,6 +2622,17 @@ function __wbg_get_imports() {
2602
2622
  const ret = getObject(arg0).length;
2603
2623
  return ret;
2604
2624
  };
2625
+ imports.wbg.__wbg_new_5b2a2842270c66e6 = function(arg0) {
2626
+ const ret = new BigUint64Array(getObject(arg0));
2627
+ return addHeapObject(ret);
2628
+ };
2629
+ imports.wbg.__wbg_set_dc7aa8fdca321349 = function(arg0, arg1, arg2) {
2630
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
2631
+ };
2632
+ imports.wbg.__wbg_length_a641162bc8055216 = function(arg0) {
2633
+ const ret = getObject(arg0).length;
2634
+ return ret;
2635
+ };
2605
2636
  imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
2606
2637
  let result;
2607
2638
  try {
@@ -2642,8 +2673,8 @@ function __wbg_get_imports() {
2642
2673
  const ret = wasm.memory;
2643
2674
  return addHeapObject(ret);
2644
2675
  };
2645
- imports.wbg.__wbindgen_closure_wrapper1165 = function(arg0, arg1, arg2) {
2646
- const ret = makeMutClosure(arg0, arg1, 423, __wbg_adapter_40);
2676
+ imports.wbg.__wbindgen_closure_wrapper1176 = function(arg0, arg1, arg2) {
2677
+ const ret = makeMutClosure(arg0, arg1, 427, __wbg_adapter_40);
2647
2678
  return addHeapObject(ret);
2648
2679
  };
2649
2680
 
Binary file
@@ -118,29 +118,10 @@ export function wasmbalancesnapshot_from_string(a: number, b: number): void;
118
118
  export function wasmbalancesnapshot_to_string(a: number): number;
119
119
  export function __wbg_wasmconfiguration_free(a: number): void;
120
120
  export function wasmconfiguration_new(): number;
121
- export function __wbg_wasmblockchain_free(a: number): void;
122
- export function wasmblockchain_reset(a: number): number;
123
- export function wasmblockchain_get_last_block_id(a: number): number;
124
- export function wasmblockchain_get_last_timestamp(a: number): number;
125
- export function wasmblockchain_get_longest_chain_hash_at(a: number, b: number): number;
126
- export function wasmblockchain_get_last_block_hash(a: number): number;
127
- export function wasmblockchain_get_last_burnfee(a: number): number;
128
- export function wasmblockchain_get_genesis_block_id(a: number): number;
129
- export function wasmblockchain_get_genesis_timestamp(a: number): number;
130
- export function wasmblockchain_get_lowest_acceptable_timestamp(a: number): number;
131
- export function wasmblockchain_get_lowest_acceptable_block_hash(a: number): number;
132
- export function wasmblockchain_get_lowest_acceptable_block_id(a: number): number;
133
- export function wasmblockchain_get_latest_block_id(a: number): number;
134
- export function wasmblockchain_get_fork_id(a: number): number;
135
- export function wasmblockchain_get_longest_chain_hash_at_id(a: number, b: number): number;
136
- export function wasmblockchain_get_hashes_at_id(a: number, b: number): number;
137
- export function __wbg_wasmhop_free(a: number): void;
138
- export function wasmhop_from(a: number, b: number): void;
139
- export function wasmhop_sig(a: number, b: number): void;
140
- export function wasmhop_to(a: number, b: number): void;
141
121
  export function __wbg_saitowasm_free(a: number): void;
142
122
  export function initialize(a: number, b: number, c: number): number;
143
123
  export function create_transaction(a: number, b: number, c: number, d: number): number;
124
+ export function create_transaction_with_multiple_payments(a: number, b: number, c: number, d: number): number;
144
125
  export function get_latest_block_hash(): number;
145
126
  export function get_block(a: number): number;
146
127
  export function process_new_peer(a: number, b: number): number;
@@ -166,6 +147,7 @@ export function get_wallet(): number;
166
147
  export function get_blockchain(): number;
167
148
  export function get_mempool_txs(): number;
168
149
  export function set_wallet_version(a: number, b: number, c: number): number;
150
+ export function is_valid_public_key(a: number): number;
169
151
  export function __wbg_wasmconsensusvalues_free(a: number): void;
170
152
  export function wasmconsensusvalues_it_num(a: number): number;
171
153
  export function wasmconsensusvalues_fee_transaction(a: number): number;
@@ -205,6 +187,26 @@ export function wasmtransaction_set_type(a: number, b: number): void;
205
187
  export function wasmtransaction_total_fees(a: number): number;
206
188
  export function wasmtransaction_serialize(a: number): number;
207
189
  export function wasmtransaction_deserialize(a: number, b: number): void;
190
+ export function __wbg_wasmblockchain_free(a: number): void;
191
+ export function wasmblockchain_reset(a: number): number;
192
+ export function wasmblockchain_get_last_block_id(a: number): number;
193
+ export function wasmblockchain_get_last_timestamp(a: number): number;
194
+ export function wasmblockchain_get_longest_chain_hash_at(a: number, b: number): number;
195
+ export function wasmblockchain_get_last_block_hash(a: number): number;
196
+ export function wasmblockchain_get_last_burnfee(a: number): number;
197
+ export function wasmblockchain_get_genesis_block_id(a: number): number;
198
+ export function wasmblockchain_get_genesis_timestamp(a: number): number;
199
+ export function wasmblockchain_get_lowest_acceptable_timestamp(a: number): number;
200
+ export function wasmblockchain_get_lowest_acceptable_block_hash(a: number): number;
201
+ export function wasmblockchain_get_lowest_acceptable_block_id(a: number): number;
202
+ export function wasmblockchain_get_latest_block_id(a: number): number;
203
+ export function wasmblockchain_get_fork_id(a: number): number;
204
+ export function wasmblockchain_get_longest_chain_hash_at_id(a: number, b: number): number;
205
+ export function wasmblockchain_get_hashes_at_id(a: number, b: number): number;
206
+ export function __wbg_wasmhop_free(a: number): void;
207
+ export function wasmhop_from(a: number, b: number): void;
208
+ export function wasmhop_sig(a: number, b: number): void;
209
+ export function wasmhop_to(a: number, b: number): void;
208
210
  export function rustsecp256k1_v0_9_0_context_create(a: number): number;
209
211
  export function rustsecp256k1_v0_9_0_context_destroy(a: number): void;
210
212
  export function rustsecp256k1_v0_9_0_default_illegal_callback_fn(a: number, b: number): void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
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
- "node-fetch": "^3.3.0",
16
- "cross-env": "^7.0.3"
15
+ "cross-env": "^7.0.3",
16
+ "node-fetch": "^3.3.0"
17
17
  }
18
18
  }