saito-wasm 0.2.164 → 0.2.166
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 +5 -2
- package/package.json +1 -1
- package/pkg/node/index.d.ts +142 -135
- package/pkg/node/index.js +325 -313
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +112 -111
- package/pkg/node/package.json +1 -1
- package/pkg/web/index.d.ts +254 -246
- package/pkg/web/index.js +322 -310
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +112 -111
- package/pkg/web/package.json +1 -1
- /package/pkg/node/snippets/{saito-wasm-21975b2e7dbeb5a0 → saito-wasm-083e81febfc0ef0c}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-21975b2e7dbeb5a0 → saito-wasm-083e81febfc0ef0c}/js/msg_handler.js +0 -0
package/pkg/web/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MsgHandler } from './snippets/saito-wasm-
|
|
1
|
+
import { MsgHandler } from './snippets/saito-wasm-083e81febfc0ef0c/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') } } );
|
|
@@ -223,7 +223,15 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
223
223
|
return real;
|
|
224
224
|
}
|
|
225
225
|
function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
226
|
-
wasm.
|
|
226
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h18f9d53151d93e96(arg0, arg1, addHeapObject(arg2));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
let stack_pointer = 128;
|
|
230
|
+
|
|
231
|
+
function addBorrowedObject(obj) {
|
|
232
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
233
|
+
heap[--stack_pointer] = obj;
|
|
234
|
+
return stack_pointer;
|
|
227
235
|
}
|
|
228
236
|
|
|
229
237
|
function _assertClass(instance, klass) {
|
|
@@ -233,108 +241,106 @@ function _assertClass(instance, klass) {
|
|
|
233
241
|
return instance.ptr;
|
|
234
242
|
}
|
|
235
243
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
244
|
+
function handleError(f, args) {
|
|
245
|
+
try {
|
|
246
|
+
return f.apply(this, args);
|
|
247
|
+
} catch (e) {
|
|
248
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
249
|
+
}
|
|
242
250
|
}
|
|
243
251
|
/**
|
|
244
|
-
* @
|
|
245
|
-
* @returns {string}
|
|
252
|
+
* @returns {Promise<string>}
|
|
246
253
|
*/
|
|
247
|
-
export function
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
251
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
252
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
253
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
254
|
-
if (r2) {
|
|
255
|
-
throw takeObject(r1);
|
|
256
|
-
}
|
|
257
|
-
return takeObject(r0);
|
|
258
|
-
} finally {
|
|
259
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
260
|
-
}
|
|
254
|
+
export function get_congestion_stats() {
|
|
255
|
+
const ret = wasm.get_congestion_stats();
|
|
256
|
+
return takeObject(ret);
|
|
261
257
|
}
|
|
262
258
|
|
|
263
259
|
/**
|
|
264
|
-
* @param {
|
|
260
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
265
261
|
* @returns {Promise<void>}
|
|
266
262
|
*/
|
|
267
|
-
export function
|
|
268
|
-
|
|
263
|
+
export function update_from_balance_snapshot(snapshot) {
|
|
264
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
265
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
266
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
269
267
|
return takeObject(ret);
|
|
270
268
|
}
|
|
271
269
|
|
|
272
270
|
/**
|
|
273
|
-
* @
|
|
274
|
-
* @returns {Promise<Array<any>>}
|
|
271
|
+
* @returns {Promise<void>}
|
|
275
272
|
*/
|
|
276
|
-
export function
|
|
277
|
-
const ret = wasm.
|
|
273
|
+
export function disable_producing_blocks_by_timer() {
|
|
274
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
278
275
|
return takeObject(ret);
|
|
279
276
|
}
|
|
280
277
|
|
|
281
278
|
/**
|
|
282
279
|
* @returns {Promise<string>}
|
|
283
280
|
*/
|
|
284
|
-
export function
|
|
285
|
-
const ret = wasm.
|
|
281
|
+
export function get_stats() {
|
|
282
|
+
const ret = wasm.get_stats();
|
|
286
283
|
return takeObject(ret);
|
|
287
284
|
}
|
|
288
285
|
|
|
289
286
|
/**
|
|
290
|
-
* @param {
|
|
291
|
-
* @returns {Promise<
|
|
287
|
+
* @param {string} public_key
|
|
288
|
+
* @returns {Promise<Array<any>>}
|
|
292
289
|
*/
|
|
293
|
-
export function
|
|
294
|
-
const ret = wasm.
|
|
290
|
+
export function get_account_slips(public_key) {
|
|
291
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
295
292
|
return takeObject(ret);
|
|
296
293
|
}
|
|
297
294
|
|
|
298
295
|
/**
|
|
299
|
-
* @
|
|
296
|
+
* @param {bigint} num
|
|
297
|
+
* @param {bigint} deposit
|
|
298
|
+
* @param {Uint8Array} tx_msg
|
|
299
|
+
* @param {bigint} fee
|
|
300
|
+
* @param {string} recipient_public_key
|
|
301
|
+
* @param {string} nft_type
|
|
302
|
+
* @returns {Promise<WasmTransaction>}
|
|
300
303
|
*/
|
|
301
|
-
export function
|
|
302
|
-
const ret = wasm.
|
|
304
|
+
export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
305
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
303
306
|
return takeObject(ret);
|
|
304
307
|
}
|
|
305
308
|
|
|
306
309
|
/**
|
|
307
|
-
* @param {Uint8Array} buffer
|
|
308
|
-
* @param {number} msg_index
|
|
309
310
|
* @param {bigint} peer_index
|
|
310
311
|
* @returns {Promise<void>}
|
|
311
312
|
*/
|
|
312
|
-
export function
|
|
313
|
-
const ret = wasm.
|
|
313
|
+
export function remove_stun_peer(peer_index) {
|
|
314
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
314
315
|
return takeObject(ret);
|
|
315
316
|
}
|
|
316
317
|
|
|
317
318
|
/**
|
|
318
|
-
* @
|
|
319
|
-
* @param {string} public_key
|
|
320
|
-
* @returns {Promise<void>}
|
|
319
|
+
* @returns {Promise<any>}
|
|
321
320
|
*/
|
|
322
|
-
export function
|
|
323
|
-
const ret = wasm.
|
|
321
|
+
export function get_confirmations() {
|
|
322
|
+
const ret = wasm.get_confirmations();
|
|
324
323
|
return takeObject(ret);
|
|
325
324
|
}
|
|
326
325
|
|
|
327
326
|
/**
|
|
328
|
-
* @param {
|
|
329
|
-
* @param {bigint} block_id
|
|
330
|
-
* @param {bigint} peer_index
|
|
327
|
+
* @param {bigint} current_time
|
|
331
328
|
* @returns {Promise<void>}
|
|
332
329
|
*/
|
|
333
|
-
export function
|
|
334
|
-
const ret = wasm.
|
|
330
|
+
export function process_stat_interval(current_time) {
|
|
331
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
335
332
|
return takeObject(ret);
|
|
336
333
|
}
|
|
337
334
|
|
|
335
|
+
/**
|
|
336
|
+
* @param {string} key
|
|
337
|
+
* @returns {boolean}
|
|
338
|
+
*/
|
|
339
|
+
export function is_valid_public_key(key) {
|
|
340
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
341
|
+
return ret !== 0;
|
|
342
|
+
}
|
|
343
|
+
|
|
338
344
|
/**
|
|
339
345
|
* @param {string} config_json
|
|
340
346
|
* @param {string} private_key
|
|
@@ -349,31 +355,27 @@ export function initialize(config_json, private_key, log_level_num, hasten_multi
|
|
|
349
355
|
}
|
|
350
356
|
|
|
351
357
|
/**
|
|
352
|
-
* @param {
|
|
353
|
-
* @
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* @returns {Promise<Array<any>>}
|
|
358
|
+
* @param {bigint} amt
|
|
359
|
+
* @param {string} slip1_utxo_key
|
|
360
|
+
* @param {string} slip2_utxo_key
|
|
361
|
+
* @param {string} slip3_utxo_key
|
|
362
|
+
* @param {string} recipient_public_key
|
|
363
|
+
* @param {Uint8Array} tx_msg
|
|
364
|
+
* @returns {Promise<WasmTransaction>}
|
|
362
365
|
*/
|
|
363
|
-
export function
|
|
364
|
-
const ret = wasm.
|
|
366
|
+
export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
367
|
+
const ret = wasm.create_send_bound_transaction(amt, addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(recipient_public_key), addHeapObject(tx_msg));
|
|
365
368
|
return takeObject(ret);
|
|
366
369
|
}
|
|
367
370
|
|
|
368
371
|
/**
|
|
369
|
-
* @param {string}
|
|
370
|
-
* @param {
|
|
372
|
+
* @param {string} slip1_utxo_key
|
|
373
|
+
* @param {string} slip2_utxo_key
|
|
374
|
+
* @param {string} slip3_utxo_key
|
|
371
375
|
* @returns {Promise<WasmTransaction>}
|
|
372
376
|
*/
|
|
373
|
-
export function
|
|
374
|
-
const
|
|
375
|
-
const len0 = WASM_VECTOR_LEN;
|
|
376
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
377
|
+
export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
|
|
378
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
|
|
377
379
|
return takeObject(ret);
|
|
378
380
|
}
|
|
379
381
|
|
|
@@ -386,56 +388,76 @@ export function get_blockchain() {
|
|
|
386
388
|
}
|
|
387
389
|
|
|
388
390
|
/**
|
|
389
|
-
* @
|
|
390
|
-
* @returns {Promise<WasmBalanceSnapshot>}
|
|
391
|
+
* @returns {Promise<Array<any>>}
|
|
391
392
|
*/
|
|
392
|
-
export function
|
|
393
|
-
const ret = wasm.
|
|
393
|
+
export function get_mempool_txs() {
|
|
394
|
+
const ret = wasm.get_mempool_txs();
|
|
394
395
|
return takeObject(ret);
|
|
395
396
|
}
|
|
396
397
|
|
|
397
398
|
/**
|
|
398
|
-
* @param {
|
|
399
|
-
* @
|
|
399
|
+
* @param {string} nft_id_hex
|
|
400
|
+
* @param {Uint8Array} tx_msg
|
|
401
|
+
* @returns {Promise<WasmTransaction>}
|
|
400
402
|
*/
|
|
401
|
-
export function
|
|
402
|
-
const
|
|
403
|
+
export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
|
|
404
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
405
|
+
const len0 = WASM_VECTOR_LEN;
|
|
406
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
403
407
|
return takeObject(ret);
|
|
404
408
|
}
|
|
405
409
|
|
|
406
410
|
/**
|
|
407
|
-
* @
|
|
408
|
-
* @param {Uint8Array} hash
|
|
409
|
-
* @param {bigint} block_id
|
|
410
|
-
* @param {bigint} peer_index
|
|
411
|
-
* @returns {Promise<void>}
|
|
411
|
+
* @returns {Promise<Array<any>>}
|
|
412
412
|
*/
|
|
413
|
-
export function
|
|
414
|
-
const ret = wasm.
|
|
413
|
+
export function get_nft_list() {
|
|
414
|
+
const ret = wasm.get_nft_list();
|
|
415
415
|
return takeObject(ret);
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
/**
|
|
419
|
-
* @returns {Promise<
|
|
419
|
+
* @returns {Promise<string>}
|
|
420
420
|
*/
|
|
421
|
-
export function
|
|
422
|
-
const ret = wasm.
|
|
421
|
+
export function get_latest_block_hash() {
|
|
422
|
+
const ret = wasm.get_latest_block_hash();
|
|
423
423
|
return takeObject(ret);
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
/**
|
|
427
|
-
* @
|
|
427
|
+
* @param {Uint8Array} buffer
|
|
428
|
+
* @param {string} private_key
|
|
429
|
+
* @returns {string}
|
|
428
430
|
*/
|
|
429
|
-
export function
|
|
430
|
-
|
|
431
|
+
export function sign_buffer(buffer, private_key) {
|
|
432
|
+
try {
|
|
433
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
434
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
435
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
436
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
437
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
438
|
+
if (r2) {
|
|
439
|
+
throw takeObject(r1);
|
|
440
|
+
}
|
|
441
|
+
return takeObject(r0);
|
|
442
|
+
} finally {
|
|
443
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* @param {bigint} peer_index
|
|
449
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
450
|
+
*/
|
|
451
|
+
export function get_peer(peer_index) {
|
|
452
|
+
const ret = wasm.get_peer(peer_index);
|
|
431
453
|
return takeObject(ret);
|
|
432
454
|
}
|
|
433
455
|
|
|
434
456
|
/**
|
|
435
|
-
* @returns {Promise<
|
|
457
|
+
* @returns {Promise<void>}
|
|
436
458
|
*/
|
|
437
|
-
export function
|
|
438
|
-
const ret = wasm.
|
|
459
|
+
export function start_from_received_ghost_chain() {
|
|
460
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
439
461
|
return takeObject(ret);
|
|
440
462
|
}
|
|
441
463
|
|
|
@@ -447,6 +469,15 @@ export function generate_private_key() {
|
|
|
447
469
|
return takeObject(ret);
|
|
448
470
|
}
|
|
449
471
|
|
|
472
|
+
/**
|
|
473
|
+
* @param {string} block_hash
|
|
474
|
+
* @returns {Promise<WasmBlock>}
|
|
475
|
+
*/
|
|
476
|
+
export function get_block(block_hash) {
|
|
477
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
478
|
+
return takeObject(ret);
|
|
479
|
+
}
|
|
480
|
+
|
|
450
481
|
/**
|
|
451
482
|
* @param {Uint8Array} buffer
|
|
452
483
|
* @param {number} msg_index
|
|
@@ -459,58 +490,82 @@ export function send_api_error(buffer, msg_index, peer_index) {
|
|
|
459
490
|
}
|
|
460
491
|
|
|
461
492
|
/**
|
|
462
|
-
* @param {
|
|
463
|
-
* @param {
|
|
464
|
-
* @param {
|
|
465
|
-
* @param {
|
|
466
|
-
* @param {number} right_count
|
|
467
|
-
* @param {Uint8Array} tx_msg
|
|
493
|
+
* @param {Array<any>} public_keys
|
|
494
|
+
* @param {BigUint64Array} amounts
|
|
495
|
+
* @param {bigint} fee
|
|
496
|
+
* @param {boolean} _force_merge
|
|
468
497
|
* @returns {Promise<WasmTransaction>}
|
|
469
498
|
*/
|
|
470
|
-
export function
|
|
471
|
-
const ret = wasm.
|
|
499
|
+
export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
|
|
500
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
472
501
|
return takeObject(ret);
|
|
473
502
|
}
|
|
474
503
|
|
|
475
504
|
/**
|
|
476
|
-
* @param {
|
|
505
|
+
* @param {Uint8Array} buffer
|
|
506
|
+
* @returns {string}
|
|
507
|
+
*/
|
|
508
|
+
export function hash(buffer) {
|
|
509
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
510
|
+
return takeObject(ret);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @returns {Promise<boolean>}
|
|
515
|
+
*/
|
|
516
|
+
export function produce_block_with_gt() {
|
|
517
|
+
const ret = wasm.produce_block_with_gt();
|
|
518
|
+
return takeObject(ret);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* @param {Uint8Array} hash
|
|
523
|
+
* @param {bigint} block_id
|
|
524
|
+
* @param {bigint} peer_index
|
|
477
525
|
* @returns {Promise<void>}
|
|
478
526
|
*/
|
|
479
|
-
export function
|
|
480
|
-
|
|
481
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
482
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
527
|
+
export function process_failed_block_fetch(hash, block_id, peer_index) {
|
|
528
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
483
529
|
return takeObject(ret);
|
|
484
530
|
}
|
|
485
531
|
|
|
486
532
|
/**
|
|
487
|
-
* @param {
|
|
488
|
-
* @param {
|
|
489
|
-
* @param {
|
|
490
|
-
* @param {
|
|
491
|
-
* @
|
|
492
|
-
* @param {Uint8Array} tx_msg
|
|
493
|
-
* @returns {Promise<WasmTransaction>}
|
|
533
|
+
* @param {Uint8Array} buffer
|
|
534
|
+
* @param {Uint8Array} hash
|
|
535
|
+
* @param {bigint} block_id
|
|
536
|
+
* @param {bigint} peer_index
|
|
537
|
+
* @returns {Promise<void>}
|
|
494
538
|
*/
|
|
495
|
-
export function
|
|
496
|
-
const ret = wasm.
|
|
539
|
+
export function process_fetched_block(buffer, hash, block_id, peer_index) {
|
|
540
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
497
541
|
return takeObject(ret);
|
|
498
542
|
}
|
|
499
543
|
|
|
500
544
|
/**
|
|
501
|
-
* @param {
|
|
502
|
-
* @
|
|
545
|
+
* @param {number} major
|
|
546
|
+
* @param {number} minor
|
|
547
|
+
* @param {number} patch
|
|
548
|
+
* @returns {Promise<void>}
|
|
503
549
|
*/
|
|
504
|
-
export function
|
|
505
|
-
const ret = wasm.
|
|
550
|
+
export function set_wallet_version(major, minor, patch) {
|
|
551
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
552
|
+
return takeObject(ret);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* @returns {Promise<boolean>}
|
|
557
|
+
*/
|
|
558
|
+
export function produce_block_without_gt() {
|
|
559
|
+
const ret = wasm.produce_block_without_gt();
|
|
506
560
|
return takeObject(ret);
|
|
507
561
|
}
|
|
508
562
|
|
|
509
563
|
/**
|
|
510
|
-
* @
|
|
564
|
+
* @param {bigint} threshold
|
|
565
|
+
* @returns {Promise<void>}
|
|
511
566
|
*/
|
|
512
|
-
export function
|
|
513
|
-
const ret = wasm.
|
|
567
|
+
export function write_issuance_file(threshold) {
|
|
568
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
514
569
|
return takeObject(ret);
|
|
515
570
|
}
|
|
516
571
|
|
|
@@ -518,49 +573,49 @@ export function get_peer_stats() {
|
|
|
518
573
|
* @param {bigint} peer_index
|
|
519
574
|
* @returns {Promise<void>}
|
|
520
575
|
*/
|
|
521
|
-
export function
|
|
522
|
-
const ret = wasm.
|
|
576
|
+
export function process_peer_disconnection(peer_index) {
|
|
577
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
523
578
|
return takeObject(ret);
|
|
524
579
|
}
|
|
525
580
|
|
|
526
581
|
/**
|
|
527
|
-
* @param {
|
|
528
|
-
* @
|
|
582
|
+
* @param {string} public_key
|
|
583
|
+
* @param {bigint} amount
|
|
584
|
+
* @param {bigint} fee
|
|
585
|
+
* @param {boolean} force_merge
|
|
586
|
+
* @returns {Promise<WasmTransaction>}
|
|
529
587
|
*/
|
|
530
|
-
export function
|
|
531
|
-
const ret = wasm.
|
|
588
|
+
export function create_transaction(public_key, amount, fee, force_merge) {
|
|
589
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
532
590
|
return takeObject(ret);
|
|
533
591
|
}
|
|
534
592
|
|
|
535
593
|
/**
|
|
536
|
-
* @param {Array<any>}
|
|
537
|
-
* @
|
|
538
|
-
* @param {bigint} fee
|
|
539
|
-
* @param {boolean} _force_merge
|
|
540
|
-
* @returns {Promise<WasmTransaction>}
|
|
594
|
+
* @param {Array<any>} keys
|
|
595
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
541
596
|
*/
|
|
542
|
-
export function
|
|
543
|
-
const ret = wasm.
|
|
597
|
+
export function get_balance_snapshot(keys) {
|
|
598
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
544
599
|
return takeObject(ret);
|
|
545
600
|
}
|
|
546
601
|
|
|
547
602
|
/**
|
|
548
|
-
* @param {
|
|
603
|
+
* @param {Uint8Array} buffer
|
|
604
|
+
* @param {bigint} peer_index
|
|
549
605
|
* @returns {Promise<void>}
|
|
550
606
|
*/
|
|
551
|
-
export function
|
|
552
|
-
const ret = wasm.
|
|
607
|
+
export function process_msg_buffer_from_peer(buffer, peer_index) {
|
|
608
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
553
609
|
return takeObject(ret);
|
|
554
610
|
}
|
|
555
611
|
|
|
556
612
|
/**
|
|
557
|
-
* @param {
|
|
558
|
-
* @param {
|
|
559
|
-
* @param {number} patch
|
|
613
|
+
* @param {bigint} peer_index
|
|
614
|
+
* @param {string} public_key
|
|
560
615
|
* @returns {Promise<void>}
|
|
561
616
|
*/
|
|
562
|
-
export function
|
|
563
|
-
const ret = wasm.
|
|
617
|
+
export function process_stun_peer(peer_index, public_key) {
|
|
618
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
564
619
|
return takeObject(ret);
|
|
565
620
|
}
|
|
566
621
|
|
|
@@ -576,26 +631,13 @@ export function send_api_success(buffer, msg_index, peer_index) {
|
|
|
576
631
|
}
|
|
577
632
|
|
|
578
633
|
/**
|
|
579
|
-
* @
|
|
580
|
-
* @param {string} ip
|
|
581
|
-
* @returns {Promise<void>}
|
|
634
|
+
* @returns {Promise<WasmWallet>}
|
|
582
635
|
*/
|
|
583
|
-
export function
|
|
584
|
-
const ret = wasm.
|
|
636
|
+
export function get_wallet() {
|
|
637
|
+
const ret = wasm.get_wallet();
|
|
585
638
|
return takeObject(ret);
|
|
586
639
|
}
|
|
587
640
|
|
|
588
|
-
/**
|
|
589
|
-
* @param {Uint8Array} buffer
|
|
590
|
-
* @param {string} signature
|
|
591
|
-
* @param {string} public_key
|
|
592
|
-
* @returns {boolean}
|
|
593
|
-
*/
|
|
594
|
-
export function verify_signature(buffer, signature, public_key) {
|
|
595
|
-
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
596
|
-
return ret !== 0;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
641
|
/**
|
|
600
642
|
* @returns {Promise<Array<any>>}
|
|
601
643
|
*/
|
|
@@ -606,51 +648,70 @@ export function get_peers() {
|
|
|
606
648
|
|
|
607
649
|
/**
|
|
608
650
|
* @param {Uint8Array} buffer
|
|
651
|
+
* @param {number} msg_index
|
|
609
652
|
* @param {bigint} peer_index
|
|
610
653
|
* @returns {Promise<void>}
|
|
611
654
|
*/
|
|
612
|
-
export function
|
|
613
|
-
const ret = wasm.
|
|
655
|
+
export function send_api_call(buffer, msg_index, peer_index) {
|
|
656
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
614
657
|
return takeObject(ret);
|
|
615
658
|
}
|
|
616
659
|
|
|
617
660
|
/**
|
|
661
|
+
* @param {bigint} peer_index
|
|
662
|
+
* @param {string} ip
|
|
618
663
|
* @returns {Promise<void>}
|
|
619
664
|
*/
|
|
620
|
-
export function
|
|
621
|
-
const ret = wasm.
|
|
665
|
+
export function process_new_peer(peer_index, ip) {
|
|
666
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
622
667
|
return takeObject(ret);
|
|
623
668
|
}
|
|
624
669
|
|
|
625
670
|
/**
|
|
626
|
-
* @param {
|
|
627
|
-
* @
|
|
628
|
-
* @param {bigint} fee
|
|
629
|
-
* @param {boolean} force_merge
|
|
630
|
-
* @returns {Promise<WasmTransaction>}
|
|
671
|
+
* @param {WasmTransaction} tx
|
|
672
|
+
* @returns {Promise<void>}
|
|
631
673
|
*/
|
|
632
|
-
export function
|
|
633
|
-
|
|
674
|
+
export function propagate_transaction(tx) {
|
|
675
|
+
_assertClass(tx, WasmTransaction);
|
|
676
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
634
677
|
return takeObject(ret);
|
|
635
678
|
}
|
|
636
679
|
|
|
637
680
|
/**
|
|
638
681
|
* @returns {Promise<string>}
|
|
639
682
|
*/
|
|
640
|
-
export function
|
|
641
|
-
const ret = wasm.
|
|
683
|
+
export function get_peer_stats() {
|
|
684
|
+
const ret = wasm.get_peer_stats();
|
|
642
685
|
return takeObject(ret);
|
|
643
686
|
}
|
|
644
687
|
|
|
645
688
|
/**
|
|
646
689
|
* @param {Uint8Array} buffer
|
|
690
|
+
* @param {string} signature
|
|
691
|
+
* @param {string} public_key
|
|
692
|
+
* @returns {boolean}
|
|
693
|
+
*/
|
|
694
|
+
export function verify_signature(buffer, signature, public_key) {
|
|
695
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
696
|
+
return ret !== 0;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* @returns {Promise<bigint>}
|
|
701
|
+
*/
|
|
702
|
+
export function get_next_peer_index() {
|
|
703
|
+
const ret = wasm.get_next_peer_index();
|
|
704
|
+
return takeObject(ret);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
/**
|
|
647
708
|
* @param {string} private_key
|
|
648
709
|
* @returns {string}
|
|
649
710
|
*/
|
|
650
|
-
export function
|
|
711
|
+
export function generate_public_key(private_key) {
|
|
651
712
|
try {
|
|
652
713
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
653
|
-
wasm.
|
|
714
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
654
715
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
655
716
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
656
717
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -664,79 +725,30 @@ export function sign_buffer(buffer, private_key) {
|
|
|
664
725
|
}
|
|
665
726
|
|
|
666
727
|
/**
|
|
667
|
-
* @
|
|
728
|
+
* @param {bigint} duration_in_ms
|
|
729
|
+
* @returns {Promise<void>}
|
|
668
730
|
*/
|
|
669
|
-
export function
|
|
670
|
-
const ret = wasm.
|
|
731
|
+
export function process_timer_event(duration_in_ms) {
|
|
732
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
671
733
|
return takeObject(ret);
|
|
672
734
|
}
|
|
673
735
|
|
|
674
736
|
/**
|
|
675
|
-
* @param {
|
|
676
|
-
* @param {
|
|
737
|
+
* @param {string} slip1_utxo_key
|
|
738
|
+
* @param {string} slip2_utxo_key
|
|
739
|
+
* @param {string} slip3_utxo_key
|
|
740
|
+
* @param {number} left_count
|
|
741
|
+
* @param {number} right_count
|
|
677
742
|
* @param {Uint8Array} tx_msg
|
|
678
|
-
* @param {bigint} fee
|
|
679
|
-
* @param {string} recipient_public_key
|
|
680
|
-
* @param {string} nft_type
|
|
681
743
|
* @returns {Promise<WasmTransaction>}
|
|
682
744
|
*/
|
|
683
|
-
export function
|
|
684
|
-
const ret = wasm.
|
|
685
|
-
return takeObject(ret);
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
* @returns {Promise<any>}
|
|
690
|
-
*/
|
|
691
|
-
export function get_confirmations() {
|
|
692
|
-
const ret = wasm.get_confirmations();
|
|
693
|
-
return takeObject(ret);
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* @param {WasmTransaction} tx
|
|
698
|
-
* @returns {Promise<void>}
|
|
699
|
-
*/
|
|
700
|
-
export function propagate_transaction(tx) {
|
|
701
|
-
_assertClass(tx, WasmTransaction);
|
|
702
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
703
|
-
return takeObject(ret);
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* @returns {Promise<string>}
|
|
708
|
-
*/
|
|
709
|
-
export function get_stats() {
|
|
710
|
-
const ret = wasm.get_stats();
|
|
711
|
-
return takeObject(ret);
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* @param {bigint} peer_index
|
|
716
|
-
* @returns {Promise<void>}
|
|
717
|
-
*/
|
|
718
|
-
export function process_peer_disconnection(peer_index) {
|
|
719
|
-
const ret = wasm.process_peer_disconnection(peer_index);
|
|
720
|
-
return takeObject(ret);
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
* @returns {Promise<void>}
|
|
725
|
-
*/
|
|
726
|
-
export function disable_producing_blocks_by_timer() {
|
|
727
|
-
const ret = wasm.disable_producing_blocks_by_timer();
|
|
745
|
+
export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
746
|
+
const ret = wasm.create_split_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), left_count, right_count, addHeapObject(tx_msg));
|
|
728
747
|
return takeObject(ret);
|
|
729
748
|
}
|
|
730
749
|
|
|
731
|
-
function
|
|
732
|
-
|
|
733
|
-
return f.apply(this, args);
|
|
734
|
-
} catch (e) {
|
|
735
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
function __wbg_adapter_393(arg0, arg1, arg2, arg3) {
|
|
739
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__hbc768321d477e205(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
750
|
+
function __wbg_adapter_406(arg0, arg1, arg2, arg3) {
|
|
751
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h58ba5fc31ee09770(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
740
752
|
}
|
|
741
753
|
|
|
742
754
|
const SaitoWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2660,28 +2672,32 @@ function __wbg_get_imports() {
|
|
|
2660
2672
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
2661
2673
|
takeObject(arg0);
|
|
2662
2674
|
};
|
|
2663
|
-
imports.wbg.
|
|
2664
|
-
const ret =
|
|
2675
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2676
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2677
|
+
return addHeapObject(ret);
|
|
2678
|
+
};
|
|
2679
|
+
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2680
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2665
2681
|
return addHeapObject(ret);
|
|
2666
2682
|
};
|
|
2667
2683
|
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
2668
2684
|
const ret = WasmTransaction.__wrap(arg0);
|
|
2669
2685
|
return addHeapObject(ret);
|
|
2670
2686
|
};
|
|
2671
|
-
imports.wbg.
|
|
2672
|
-
const ret =
|
|
2687
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2688
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2673
2689
|
return addHeapObject(ret);
|
|
2674
2690
|
};
|
|
2675
|
-
imports.wbg.
|
|
2676
|
-
const ret =
|
|
2691
|
+
imports.wbg.__wbg_wasmblock_new = function(arg0) {
|
|
2692
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2677
2693
|
return addHeapObject(ret);
|
|
2678
2694
|
};
|
|
2679
|
-
imports.wbg.
|
|
2680
|
-
const ret =
|
|
2695
|
+
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2696
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2681
2697
|
return addHeapObject(ret);
|
|
2682
2698
|
};
|
|
2683
|
-
imports.wbg.
|
|
2684
|
-
const ret =
|
|
2699
|
+
imports.wbg.__wbg_wasmnft_new = function(arg0) {
|
|
2700
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2685
2701
|
return addHeapObject(ret);
|
|
2686
2702
|
};
|
|
2687
2703
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
@@ -2692,28 +2708,32 @@ function __wbg_get_imports() {
|
|
|
2692
2708
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2693
2709
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2694
2710
|
};
|
|
2695
|
-
imports.wbg.
|
|
2696
|
-
const ret =
|
|
2711
|
+
imports.wbg.__wbg_wasmwallet_new = function(arg0) {
|
|
2712
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2697
2713
|
return addHeapObject(ret);
|
|
2698
2714
|
};
|
|
2699
|
-
imports.wbg.
|
|
2700
|
-
const ret =
|
|
2715
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
2716
|
+
const ret = getObject(arg0);
|
|
2701
2717
|
return addHeapObject(ret);
|
|
2702
2718
|
};
|
|
2703
|
-
imports.wbg.
|
|
2704
|
-
const ret =
|
|
2719
|
+
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
2720
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2705
2721
|
return addHeapObject(ret);
|
|
2706
2722
|
};
|
|
2707
|
-
imports.wbg.
|
|
2708
|
-
const ret =
|
|
2723
|
+
imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
|
|
2724
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2709
2725
|
return addHeapObject(ret);
|
|
2710
2726
|
};
|
|
2711
|
-
imports.wbg.
|
|
2712
|
-
const ret =
|
|
2727
|
+
imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2728
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2713
2729
|
return addHeapObject(ret);
|
|
2714
2730
|
};
|
|
2715
|
-
imports.wbg.
|
|
2716
|
-
const ret =
|
|
2731
|
+
imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2732
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
2733
|
+
return addHeapObject(ret);
|
|
2734
|
+
};
|
|
2735
|
+
imports.wbg.__wbg_wasmhop_new = function(arg0) {
|
|
2736
|
+
const ret = WasmHop.__wrap(arg0);
|
|
2717
2737
|
return addHeapObject(ret);
|
|
2718
2738
|
};
|
|
2719
2739
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
@@ -2729,19 +2749,7 @@ function __wbg_get_imports() {
|
|
|
2729
2749
|
const ret = getObject(arg0) in getObject(arg1);
|
|
2730
2750
|
return ret;
|
|
2731
2751
|
};
|
|
2732
|
-
imports.wbg.
|
|
2733
|
-
const ret = WasmHop.__wrap(arg0);
|
|
2734
|
-
return addHeapObject(ret);
|
|
2735
|
-
};
|
|
2736
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2737
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2738
|
-
return addHeapObject(ret);
|
|
2739
|
-
};
|
|
2740
|
-
imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2741
|
-
const ret = WasmPeerService.__wrap(arg0);
|
|
2742
|
-
return addHeapObject(ret);
|
|
2743
|
-
};
|
|
2744
|
-
imports.wbg.__wbg_flushdata_aece8dc223521e86 = function(arg0, arg1) {
|
|
2752
|
+
imports.wbg.__wbg_flushdata_3e493160b5623279 = function(arg0, arg1) {
|
|
2745
2753
|
let deferred0_0;
|
|
2746
2754
|
let deferred0_1;
|
|
2747
2755
|
try {
|
|
@@ -2752,7 +2760,7 @@ function __wbg_get_imports() {
|
|
|
2752
2760
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2753
2761
|
}
|
|
2754
2762
|
};
|
|
2755
|
-
imports.wbg.
|
|
2763
|
+
imports.wbg.__wbg_readvalue_5d0f093e1595617d = function() { return handleError(function (arg0, arg1) {
|
|
2756
2764
|
let deferred0_0;
|
|
2757
2765
|
let deferred0_1;
|
|
2758
2766
|
try {
|
|
@@ -2764,13 +2772,13 @@ function __wbg_get_imports() {
|
|
|
2764
2772
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2765
2773
|
}
|
|
2766
2774
|
}, arguments) };
|
|
2767
|
-
imports.wbg.
|
|
2775
|
+
imports.wbg.__wbg_loadwallet_59081515a24e409d = function() {
|
|
2768
2776
|
MsgHandler.load_wallet();
|
|
2769
2777
|
};
|
|
2770
|
-
imports.wbg.
|
|
2778
|
+
imports.wbg.__wbg_savewallet_86e332f8fdf6bc63 = function() {
|
|
2771
2779
|
MsgHandler.save_wallet();
|
|
2772
2780
|
};
|
|
2773
|
-
imports.wbg.
|
|
2781
|
+
imports.wbg.__wbg_writevalue_9f48cba844bce929 = function(arg0, arg1, arg2) {
|
|
2774
2782
|
let deferred0_0;
|
|
2775
2783
|
let deferred0_1;
|
|
2776
2784
|
try {
|
|
@@ -2781,7 +2789,7 @@ function __wbg_get_imports() {
|
|
|
2781
2789
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2782
2790
|
}
|
|
2783
2791
|
};
|
|
2784
|
-
imports.wbg.
|
|
2792
|
+
imports.wbg.__wbg_appendvalue_e7ab232264abb10f = function(arg0, arg1, arg2) {
|
|
2785
2793
|
let deferred0_0;
|
|
2786
2794
|
let deferred0_1;
|
|
2787
2795
|
try {
|
|
@@ -2792,7 +2800,7 @@ function __wbg_get_imports() {
|
|
|
2792
2800
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2793
2801
|
}
|
|
2794
2802
|
};
|
|
2795
|
-
imports.wbg.
|
|
2803
|
+
imports.wbg.__wbg_removevalue_c5af6fcdb8e65e93 = function() { return handleError(function (arg0, arg1) {
|
|
2796
2804
|
let deferred0_0;
|
|
2797
2805
|
let deferred0_1;
|
|
2798
2806
|
try {
|
|
@@ -2804,10 +2812,10 @@ function __wbg_get_imports() {
|
|
|
2804
2812
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2805
2813
|
}
|
|
2806
2814
|
}, arguments) };
|
|
2807
|
-
imports.wbg.
|
|
2815
|
+
imports.wbg.__wbg_sendmessage_360fd9c5b7eb6710 = function(arg0, arg1) {
|
|
2808
2816
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2809
2817
|
};
|
|
2810
|
-
imports.wbg.
|
|
2818
|
+
imports.wbg.__wbg_connecttopeer_099b3d1c7c6e20da = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2811
2819
|
let deferred0_0;
|
|
2812
2820
|
let deferred0_1;
|
|
2813
2821
|
try {
|
|
@@ -2819,13 +2827,13 @@ function __wbg_get_imports() {
|
|
|
2819
2827
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2820
2828
|
}
|
|
2821
2829
|
}, arguments) };
|
|
2822
|
-
imports.wbg.
|
|
2830
|
+
imports.wbg.__wbg_getmyservices_012e89506828bc2f = function() {
|
|
2823
2831
|
const ret = MsgHandler.get_my_services();
|
|
2824
2832
|
_assertClass(ret, WasmPeerServiceList);
|
|
2825
2833
|
var ptr1 = ret.__destroy_into_raw();
|
|
2826
2834
|
return ptr1;
|
|
2827
2835
|
};
|
|
2828
|
-
imports.wbg.
|
|
2836
|
+
imports.wbg.__wbg_isexistingfile_89e9eb758e45ff5e = function() { return handleError(function (arg0, arg1) {
|
|
2829
2837
|
let deferred0_0;
|
|
2830
2838
|
let deferred0_1;
|
|
2831
2839
|
try {
|
|
@@ -2837,27 +2845,27 @@ function __wbg_get_imports() {
|
|
|
2837
2845
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2838
2846
|
}
|
|
2839
2847
|
}, arguments) };
|
|
2840
|
-
imports.wbg.
|
|
2848
|
+
imports.wbg.__wbg_processapicall_06672752efc468c6 = function(arg0, arg1, arg2) {
|
|
2841
2849
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2842
2850
|
};
|
|
2843
|
-
imports.wbg.
|
|
2851
|
+
imports.wbg.__wbg_processapierror_f821f4aea886cad6 = function(arg0, arg1, arg2) {
|
|
2844
2852
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2845
2853
|
};
|
|
2846
|
-
imports.wbg.
|
|
2854
|
+
imports.wbg.__wbg_processapisuccess_b088c5350b1602ab = function(arg0, arg1, arg2) {
|
|
2847
2855
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2848
2856
|
};
|
|
2849
|
-
imports.wbg.
|
|
2857
|
+
imports.wbg.__wbg_sendmessagetoall_6fcbaa970ca58136 = function(arg0, arg1) {
|
|
2850
2858
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2851
2859
|
};
|
|
2852
|
-
imports.wbg.
|
|
2860
|
+
imports.wbg.__wbg_disconnectfrompeer_300d63aa93f61d50 = function() { return handleError(function (arg0) {
|
|
2853
2861
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2854
2862
|
return addHeapObject(ret);
|
|
2855
2863
|
}, arguments) };
|
|
2856
|
-
imports.wbg.
|
|
2864
|
+
imports.wbg.__wbg_loadblockfilelist_7ebdc6dd8988f2e9 = function() { return handleError(function () {
|
|
2857
2865
|
const ret = MsgHandler.load_block_file_list();
|
|
2858
2866
|
return addHeapObject(ret);
|
|
2859
2867
|
}, arguments) };
|
|
2860
|
-
imports.wbg.
|
|
2868
|
+
imports.wbg.__wbg_sendinterfaceevent_3091ea002268b66a = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2861
2869
|
let deferred0_0;
|
|
2862
2870
|
let deferred0_1;
|
|
2863
2871
|
let deferred1_0;
|
|
@@ -2873,7 +2881,7 @@ function __wbg_get_imports() {
|
|
|
2873
2881
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2874
2882
|
}
|
|
2875
2883
|
};
|
|
2876
|
-
imports.wbg.
|
|
2884
|
+
imports.wbg.__wbg_sendblocksuccess_4076186533b0dd4b = function(arg0, arg1, arg2) {
|
|
2877
2885
|
let deferred0_0;
|
|
2878
2886
|
let deferred0_1;
|
|
2879
2887
|
try {
|
|
@@ -2884,10 +2892,10 @@ function __wbg_get_imports() {
|
|
|
2884
2892
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2885
2893
|
}
|
|
2886
2894
|
};
|
|
2887
|
-
imports.wbg.
|
|
2895
|
+
imports.wbg.__wbg_sendwalletupdate_a4a45445d63fa2a1 = function() {
|
|
2888
2896
|
MsgHandler.send_wallet_update();
|
|
2889
2897
|
};
|
|
2890
|
-
imports.wbg.
|
|
2898
|
+
imports.wbg.__wbg_sendnewversionalert_3ec71b6bf65d28d0 = function(arg0, arg1, arg2) {
|
|
2891
2899
|
let deferred0_0;
|
|
2892
2900
|
let deferred0_1;
|
|
2893
2901
|
try {
|
|
@@ -2898,13 +2906,13 @@ function __wbg_get_imports() {
|
|
|
2898
2906
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2899
2907
|
}
|
|
2900
2908
|
};
|
|
2901
|
-
imports.wbg.
|
|
2909
|
+
imports.wbg.__wbg_sendblockfetchstatusevent_23c7a26cfd3a5d15 = function(arg0) {
|
|
2902
2910
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2903
2911
|
};
|
|
2904
|
-
imports.wbg.
|
|
2912
|
+
imports.wbg.__wbg_sendnewchaindetectedevent_9814eea25ed127aa = function() {
|
|
2905
2913
|
MsgHandler.send_new_chain_detected_event();
|
|
2906
2914
|
};
|
|
2907
|
-
imports.wbg.
|
|
2915
|
+
imports.wbg.__wbg_fetchblockfrompeer_ab58f5ed93834e68 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2908
2916
|
let deferred0_0;
|
|
2909
2917
|
let deferred0_1;
|
|
2910
2918
|
try {
|
|
@@ -2916,7 +2924,7 @@ function __wbg_get_imports() {
|
|
|
2916
2924
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2917
2925
|
}
|
|
2918
2926
|
}, arguments) };
|
|
2919
|
-
imports.wbg.
|
|
2927
|
+
imports.wbg.__wbg_ensureblockdirectoryexists_e06f5acab13f0888 = function() { return handleError(function (arg0, arg1) {
|
|
2920
2928
|
let deferred0_0;
|
|
2921
2929
|
let deferred0_1;
|
|
2922
2930
|
try {
|
|
@@ -2927,6 +2935,10 @@ function __wbg_get_imports() {
|
|
|
2927
2935
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2928
2936
|
}
|
|
2929
2937
|
}, arguments) };
|
|
2938
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2939
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2940
|
+
return addHeapObject(ret);
|
|
2941
|
+
};
|
|
2930
2942
|
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2931
2943
|
const ret = getObject(arg0) == getObject(arg1);
|
|
2932
2944
|
return ret;
|
|
@@ -3174,7 +3186,7 @@ function __wbg_get_imports() {
|
|
|
3174
3186
|
const a = state0.a;
|
|
3175
3187
|
state0.a = 0;
|
|
3176
3188
|
try {
|
|
3177
|
-
return
|
|
3189
|
+
return __wbg_adapter_406(a, state0.b, arg0, arg1);
|
|
3178
3190
|
} finally {
|
|
3179
3191
|
state0.a = a;
|
|
3180
3192
|
}
|
|
@@ -3235,8 +3247,8 @@ function __wbg_get_imports() {
|
|
|
3235
3247
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
3236
3248
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
3237
3249
|
};
|
|
3238
|
-
imports.wbg.
|
|
3239
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3250
|
+
imports.wbg.__wbindgen_closure_wrapper1627 = function(arg0, arg1, arg2) {
|
|
3251
|
+
const ret = makeMutClosure(arg0, arg1, 581, __wbg_adapter_38);
|
|
3240
3252
|
return addHeapObject(ret);
|
|
3241
3253
|
};
|
|
3242
3254
|
|