saito-wasm 0.2.176 → 0.2.178
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +1 -1
- package/package.json +1 -1
- package/pkg/node/index.d.ts +138 -137
- package/pkg/node/index.js +324 -324
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +101 -101
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +239 -238
- package/pkg/web/index.js +322 -322
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +101 -101
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-2d0d837f15b87abe → saito-wasm-aa917f543b5208b0}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-2d0d837f15b87abe → saito-wasm-aa917f543b5208b0}/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-aa917f543b5208b0/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') } } );
|
|
@@ -232,114 +232,95 @@ 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
|
-
|
|
244
|
-
let stack_pointer = 128;
|
|
245
|
-
|
|
246
|
-
function addBorrowedObject(obj) {
|
|
247
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
248
|
-
heap[--stack_pointer] = obj;
|
|
249
|
-
return stack_pointer;
|
|
250
|
-
}
|
|
251
235
|
/**
|
|
252
|
-
* @param {bigint}
|
|
236
|
+
* @param {bigint} threshold
|
|
253
237
|
* @returns {Promise<void>}
|
|
254
238
|
*/
|
|
255
|
-
export function
|
|
256
|
-
const ret = wasm.
|
|
257
|
-
return takeObject(ret);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* @returns {Promise<bigint>}
|
|
262
|
-
*/
|
|
263
|
-
export function get_next_peer_index() {
|
|
264
|
-
const ret = wasm.get_next_peer_index();
|
|
239
|
+
export function write_issuance_file(threshold) {
|
|
240
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
265
241
|
return takeObject(ret);
|
|
266
242
|
}
|
|
267
243
|
|
|
268
244
|
/**
|
|
269
|
-
* @param {
|
|
245
|
+
* @param {bigint} num
|
|
246
|
+
* @param {bigint} deposit
|
|
270
247
|
* @param {Uint8Array} tx_msg
|
|
248
|
+
* @param {bigint} fee
|
|
249
|
+
* @param {string} recipient_public_key
|
|
250
|
+
* @param {string} nft_type
|
|
271
251
|
* @returns {Promise<WasmTransaction>}
|
|
272
252
|
*/
|
|
273
|
-
export function
|
|
274
|
-
const
|
|
275
|
-
const len0 = WASM_VECTOR_LEN;
|
|
276
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
253
|
+
export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
254
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
277
255
|
return takeObject(ret);
|
|
278
256
|
}
|
|
279
257
|
|
|
280
258
|
/**
|
|
281
|
-
* @returns {Promise<
|
|
259
|
+
* @returns {Promise<boolean>}
|
|
282
260
|
*/
|
|
283
|
-
export function
|
|
284
|
-
const ret = wasm.
|
|
261
|
+
export function produce_block_with_gt() {
|
|
262
|
+
const ret = wasm.produce_block_with_gt();
|
|
285
263
|
return takeObject(ret);
|
|
286
264
|
}
|
|
287
265
|
|
|
288
266
|
/**
|
|
289
|
-
* @
|
|
267
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
268
|
+
* @returns {Promise<void>}
|
|
290
269
|
*/
|
|
291
|
-
export function
|
|
292
|
-
|
|
270
|
+
export function update_from_balance_snapshot(snapshot) {
|
|
271
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
272
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
273
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
293
274
|
return takeObject(ret);
|
|
294
275
|
}
|
|
295
276
|
|
|
296
277
|
/**
|
|
297
|
-
* @
|
|
298
|
-
* @param {number} msg_index
|
|
299
|
-
* @param {bigint} peer_index
|
|
300
|
-
* @returns {Promise<void>}
|
|
278
|
+
* @returns {Promise<WasmWallet>}
|
|
301
279
|
*/
|
|
302
|
-
export function
|
|
303
|
-
const ret = wasm.
|
|
280
|
+
export function get_wallet() {
|
|
281
|
+
const ret = wasm.get_wallet();
|
|
304
282
|
return takeObject(ret);
|
|
305
283
|
}
|
|
306
284
|
|
|
307
285
|
/**
|
|
286
|
+
* @param {Uint8Array} hash
|
|
287
|
+
* @param {bigint} block_id
|
|
308
288
|
* @param {bigint} peer_index
|
|
309
|
-
* @param {string} ip
|
|
310
289
|
* @returns {Promise<void>}
|
|
311
290
|
*/
|
|
312
|
-
export function
|
|
313
|
-
const ret = wasm.
|
|
291
|
+
export function process_failed_block_fetch(hash, block_id, peer_index) {
|
|
292
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
314
293
|
return takeObject(ret);
|
|
315
294
|
}
|
|
316
295
|
|
|
317
296
|
/**
|
|
297
|
+
* @param {Uint8Array} buffer
|
|
298
|
+
* @param {number} msg_index
|
|
318
299
|
* @param {bigint} peer_index
|
|
319
|
-
* @param {string} public_key
|
|
320
300
|
* @returns {Promise<void>}
|
|
321
301
|
*/
|
|
322
|
-
export function
|
|
323
|
-
const ret = wasm.
|
|
302
|
+
export function send_api_success(buffer, msg_index, peer_index) {
|
|
303
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
324
304
|
return takeObject(ret);
|
|
325
305
|
}
|
|
326
306
|
|
|
327
307
|
/**
|
|
328
|
-
* @
|
|
308
|
+
* @param {Array<any>} public_keys
|
|
309
|
+
* @param {BigUint64Array} amounts
|
|
310
|
+
* @param {bigint} fee
|
|
311
|
+
* @param {boolean} _force_merge
|
|
312
|
+
* @returns {Promise<WasmTransaction>}
|
|
329
313
|
*/
|
|
330
|
-
export function
|
|
331
|
-
const ret = wasm.
|
|
314
|
+
export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
|
|
315
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
332
316
|
return takeObject(ret);
|
|
333
317
|
}
|
|
334
318
|
|
|
335
319
|
/**
|
|
336
|
-
* @
|
|
337
|
-
* @param {string} slip2_utxo_key
|
|
338
|
-
* @param {string} slip3_utxo_key
|
|
339
|
-
* @returns {Promise<WasmTransaction>}
|
|
320
|
+
* @returns {string}
|
|
340
321
|
*/
|
|
341
|
-
export function
|
|
342
|
-
const ret = wasm.
|
|
322
|
+
export function generate_private_key() {
|
|
323
|
+
const ret = wasm.generate_private_key();
|
|
343
324
|
return takeObject(ret);
|
|
344
325
|
}
|
|
345
326
|
|
|
@@ -352,32 +333,29 @@ export function get_peer_stats() {
|
|
|
352
333
|
}
|
|
353
334
|
|
|
354
335
|
/**
|
|
355
|
-
* @param {WasmTransaction} tx
|
|
356
336
|
* @returns {Promise<void>}
|
|
357
337
|
*/
|
|
358
|
-
export function
|
|
359
|
-
|
|
360
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
338
|
+
export function disable_producing_blocks_by_timer() {
|
|
339
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
361
340
|
return takeObject(ret);
|
|
362
341
|
}
|
|
363
342
|
|
|
364
343
|
/**
|
|
365
344
|
* @param {Uint8Array} buffer
|
|
366
|
-
* @
|
|
345
|
+
* @param {bigint} peer_index
|
|
346
|
+
* @returns {Promise<void>}
|
|
367
347
|
*/
|
|
368
|
-
export function
|
|
369
|
-
const ret = wasm.
|
|
348
|
+
export function process_msg_buffer_from_peer(buffer, peer_index) {
|
|
349
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
370
350
|
return takeObject(ret);
|
|
371
351
|
}
|
|
372
352
|
|
|
373
353
|
/**
|
|
374
|
-
* @param {Uint8Array} buffer
|
|
375
|
-
* @param {number} msg_index
|
|
376
354
|
* @param {bigint} peer_index
|
|
377
355
|
* @returns {Promise<void>}
|
|
378
356
|
*/
|
|
379
|
-
export function
|
|
380
|
-
const ret = wasm.
|
|
357
|
+
export function remove_stun_peer(peer_index) {
|
|
358
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
381
359
|
return takeObject(ret);
|
|
382
360
|
}
|
|
383
361
|
|
|
@@ -387,366 +365,388 @@ export function send_api_call(buffer, msg_index, peer_index) {
|
|
|
387
365
|
* @param {bigint} peer_index
|
|
388
366
|
* @returns {Promise<void>}
|
|
389
367
|
*/
|
|
390
|
-
export function
|
|
391
|
-
const ret = wasm.
|
|
368
|
+
export function send_api_error(buffer, msg_index, peer_index) {
|
|
369
|
+
const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
|
|
392
370
|
return takeObject(ret);
|
|
393
371
|
}
|
|
394
372
|
|
|
395
373
|
/**
|
|
396
|
-
* @
|
|
397
|
-
* @returns {Promise<void>}
|
|
374
|
+
* @returns {Promise<bigint>}
|
|
398
375
|
*/
|
|
399
|
-
export function
|
|
400
|
-
const ret = wasm.
|
|
376
|
+
export function get_next_peer_index() {
|
|
377
|
+
const ret = wasm.get_next_peer_index();
|
|
401
378
|
return takeObject(ret);
|
|
402
379
|
}
|
|
403
380
|
|
|
404
381
|
/**
|
|
405
|
-
* @param {
|
|
406
|
-
* @
|
|
407
|
-
* @param {Uint8Array} tx_msg
|
|
408
|
-
* @param {bigint} fee
|
|
409
|
-
* @param {string} recipient_public_key
|
|
410
|
-
* @param {string} nft_type
|
|
411
|
-
* @returns {Promise<WasmTransaction>}
|
|
382
|
+
* @param {string} block_hash
|
|
383
|
+
* @returns {Promise<WasmBlock>}
|
|
412
384
|
*/
|
|
413
|
-
export function
|
|
414
|
-
const ret = wasm.
|
|
385
|
+
export function get_block(block_hash) {
|
|
386
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
415
387
|
return takeObject(ret);
|
|
416
388
|
}
|
|
417
389
|
|
|
418
390
|
/**
|
|
419
|
-
* @
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
391
|
+
* @returns {Promise<string>}
|
|
392
|
+
*/
|
|
393
|
+
export function get_congestion_stats() {
|
|
394
|
+
const ret = wasm.get_congestion_stats();
|
|
395
|
+
return takeObject(ret);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* @param {string} nft_id_hex
|
|
400
|
+
* @param {Uint8Array} tx_msg
|
|
423
401
|
* @returns {Promise<WasmTransaction>}
|
|
424
402
|
*/
|
|
425
|
-
export function
|
|
426
|
-
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));
|
|
427
407
|
return takeObject(ret);
|
|
428
408
|
}
|
|
429
409
|
|
|
430
410
|
/**
|
|
431
|
-
* @
|
|
411
|
+
* @param {bigint} peer_index
|
|
412
|
+
* @returns {Promise<void>}
|
|
432
413
|
*/
|
|
433
|
-
export function
|
|
434
|
-
const ret = wasm.
|
|
414
|
+
export function process_peer_disconnection(peer_index) {
|
|
415
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
435
416
|
return takeObject(ret);
|
|
436
417
|
}
|
|
437
418
|
|
|
438
419
|
/**
|
|
420
|
+
* @param {WasmTransaction} tx
|
|
439
421
|
* @returns {Promise<void>}
|
|
440
422
|
*/
|
|
441
|
-
export function
|
|
442
|
-
|
|
423
|
+
export function propagate_transaction(tx) {
|
|
424
|
+
_assertClass(tx, WasmTransaction);
|
|
425
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
443
426
|
return takeObject(ret);
|
|
444
427
|
}
|
|
445
428
|
|
|
446
429
|
/**
|
|
447
|
-
* @
|
|
430
|
+
* @param {string} public_key
|
|
431
|
+
* @param {bigint} amount
|
|
432
|
+
* @param {bigint} fee
|
|
433
|
+
* @param {boolean} force_merge
|
|
434
|
+
* @returns {Promise<WasmTransaction>}
|
|
448
435
|
*/
|
|
449
|
-
export function
|
|
450
|
-
const ret = wasm.
|
|
436
|
+
export function create_transaction(public_key, amount, fee, force_merge) {
|
|
437
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
451
438
|
return takeObject(ret);
|
|
452
439
|
}
|
|
453
440
|
|
|
454
441
|
/**
|
|
455
|
-
* @returns {Promise<
|
|
442
|
+
* @returns {Promise<any>}
|
|
456
443
|
*/
|
|
457
|
-
export function
|
|
458
|
-
const ret = wasm.
|
|
444
|
+
export function get_confirmations() {
|
|
445
|
+
const ret = wasm.get_confirmations();
|
|
459
446
|
return takeObject(ret);
|
|
460
447
|
}
|
|
461
448
|
|
|
462
449
|
/**
|
|
463
450
|
* @param {bigint} peer_index
|
|
464
|
-
* @
|
|
451
|
+
* @param {string} public_key
|
|
452
|
+
* @returns {Promise<void>}
|
|
465
453
|
*/
|
|
466
|
-
export function
|
|
467
|
-
const ret = wasm.
|
|
454
|
+
export function process_stun_peer(peer_index, public_key) {
|
|
455
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
468
456
|
return takeObject(ret);
|
|
469
457
|
}
|
|
470
458
|
|
|
471
459
|
/**
|
|
472
|
-
* @param {string} config_json
|
|
473
460
|
* @param {string} private_key
|
|
474
|
-
* @
|
|
475
|
-
* @param {bigint} hasten_multiplier
|
|
476
|
-
* @param {boolean} delete_old_blocks
|
|
477
|
-
* @returns {Promise<any>}
|
|
461
|
+
* @returns {string}
|
|
478
462
|
*/
|
|
479
|
-
export function
|
|
480
|
-
|
|
481
|
-
|
|
463
|
+
export function generate_public_key(private_key) {
|
|
464
|
+
try {
|
|
465
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
466
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
467
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
468
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
469
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
470
|
+
if (r2) {
|
|
471
|
+
throw takeObject(r1);
|
|
472
|
+
}
|
|
473
|
+
return takeObject(r0);
|
|
474
|
+
} finally {
|
|
475
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
476
|
+
}
|
|
482
477
|
}
|
|
483
478
|
|
|
484
479
|
/**
|
|
485
|
-
* @
|
|
480
|
+
* @param {Uint8Array} buffer
|
|
481
|
+
* @param {string} signature
|
|
482
|
+
* @param {string} public_key
|
|
483
|
+
* @returns {boolean}
|
|
486
484
|
*/
|
|
487
|
-
export function
|
|
488
|
-
const ret = wasm.
|
|
489
|
-
return
|
|
485
|
+
export function verify_signature(buffer, signature, public_key) {
|
|
486
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
487
|
+
return ret !== 0;
|
|
490
488
|
}
|
|
491
489
|
|
|
492
490
|
/**
|
|
493
|
-
* @param {
|
|
494
|
-
* @
|
|
491
|
+
* @param {Uint8Array} buffer
|
|
492
|
+
* @param {string} private_key
|
|
493
|
+
* @returns {string}
|
|
495
494
|
*/
|
|
496
|
-
export function
|
|
497
|
-
|
|
498
|
-
|
|
495
|
+
export function sign_buffer(buffer, private_key) {
|
|
496
|
+
try {
|
|
497
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
498
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
499
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
500
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
501
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
502
|
+
if (r2) {
|
|
503
|
+
throw takeObject(r1);
|
|
504
|
+
}
|
|
505
|
+
return takeObject(r0);
|
|
506
|
+
} finally {
|
|
507
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
508
|
+
}
|
|
499
509
|
}
|
|
500
510
|
|
|
501
511
|
/**
|
|
502
|
-
* @param {string} public_key
|
|
503
512
|
* @returns {Promise<Array<any>>}
|
|
504
513
|
*/
|
|
505
|
-
export function
|
|
506
|
-
const ret = wasm.
|
|
514
|
+
export function get_peers() {
|
|
515
|
+
const ret = wasm.get_peers();
|
|
507
516
|
return takeObject(ret);
|
|
508
517
|
}
|
|
509
518
|
|
|
510
519
|
/**
|
|
511
520
|
* @param {bigint} peer_index
|
|
521
|
+
* @param {string} ip
|
|
512
522
|
* @returns {Promise<void>}
|
|
513
523
|
*/
|
|
514
|
-
export function
|
|
515
|
-
const ret = wasm.
|
|
524
|
+
export function process_new_peer(peer_index, ip) {
|
|
525
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
516
526
|
return takeObject(ret);
|
|
517
527
|
}
|
|
518
528
|
|
|
519
529
|
/**
|
|
520
|
-
* @param {
|
|
521
|
-
* @param {
|
|
522
|
-
* @param {
|
|
523
|
-
* @param {bigint}
|
|
524
|
-
* @
|
|
530
|
+
* @param {string} config_json
|
|
531
|
+
* @param {string} private_key
|
|
532
|
+
* @param {number} log_level_num
|
|
533
|
+
* @param {bigint} hasten_multiplier
|
|
534
|
+
* @param {boolean} delete_old_blocks
|
|
535
|
+
* @returns {Promise<any>}
|
|
525
536
|
*/
|
|
526
|
-
export function
|
|
527
|
-
const ret = wasm.
|
|
537
|
+
export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
538
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
528
539
|
return takeObject(ret);
|
|
529
540
|
}
|
|
530
541
|
|
|
531
542
|
/**
|
|
532
|
-
* @param {
|
|
533
|
-
* @
|
|
534
|
-
* @param {string} slip3_utxo_key
|
|
535
|
-
* @param {number} left_count
|
|
536
|
-
* @param {number} right_count
|
|
537
|
-
* @param {Uint8Array} tx_msg
|
|
538
|
-
* @returns {Promise<WasmTransaction>}
|
|
543
|
+
* @param {Array<any>} keys
|
|
544
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
539
545
|
*/
|
|
540
|
-
export function
|
|
541
|
-
const ret = wasm.
|
|
546
|
+
export function get_balance_snapshot(keys) {
|
|
547
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
542
548
|
return takeObject(ret);
|
|
543
549
|
}
|
|
544
550
|
|
|
545
551
|
/**
|
|
546
|
-
* @
|
|
552
|
+
* @param {Uint8Array} buffer
|
|
553
|
+
* @param {number} msg_index
|
|
554
|
+
* @param {bigint} peer_index
|
|
555
|
+
* @returns {Promise<void>}
|
|
547
556
|
*/
|
|
548
|
-
export function
|
|
549
|
-
const ret = wasm.
|
|
557
|
+
export function send_api_call(buffer, msg_index, peer_index) {
|
|
558
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
550
559
|
return takeObject(ret);
|
|
551
560
|
}
|
|
552
561
|
|
|
553
562
|
/**
|
|
554
563
|
* @returns {Promise<string>}
|
|
555
564
|
*/
|
|
556
|
-
export function
|
|
557
|
-
const ret = wasm.
|
|
565
|
+
export function get_latest_block_hash() {
|
|
566
|
+
const ret = wasm.get_latest_block_hash();
|
|
558
567
|
return takeObject(ret);
|
|
559
568
|
}
|
|
560
569
|
|
|
561
570
|
/**
|
|
562
|
-
* @param {
|
|
563
|
-
* @
|
|
564
|
-
* @param {number} patch
|
|
565
|
-
* @returns {Promise<void>}
|
|
571
|
+
* @param {bigint} peer_index
|
|
572
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
566
573
|
*/
|
|
567
|
-
export function
|
|
568
|
-
const ret = wasm.
|
|
574
|
+
export function get_peer(peer_index) {
|
|
575
|
+
const ret = wasm.get_peer(peer_index);
|
|
569
576
|
return takeObject(ret);
|
|
570
577
|
}
|
|
571
578
|
|
|
572
579
|
/**
|
|
573
|
-
* @
|
|
580
|
+
* @param {bigint} current_time
|
|
581
|
+
* @returns {Promise<void>}
|
|
574
582
|
*/
|
|
575
|
-
export function
|
|
576
|
-
const ret = wasm.
|
|
583
|
+
export function process_stat_interval(current_time) {
|
|
584
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
577
585
|
return takeObject(ret);
|
|
578
586
|
}
|
|
579
587
|
|
|
580
588
|
/**
|
|
581
|
-
* @param {bigint} amt
|
|
582
589
|
* @param {string} slip1_utxo_key
|
|
583
590
|
* @param {string} slip2_utxo_key
|
|
584
591
|
* @param {string} slip3_utxo_key
|
|
585
|
-
* @param {string} recipient_public_key
|
|
586
592
|
* @param {Uint8Array} tx_msg
|
|
587
593
|
* @returns {Promise<WasmTransaction>}
|
|
588
594
|
*/
|
|
589
|
-
export function
|
|
590
|
-
const ret = wasm.
|
|
595
|
+
export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, tx_msg) {
|
|
596
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(tx_msg));
|
|
597
|
+
return takeObject(ret);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* @returns {Promise<string>}
|
|
602
|
+
*/
|
|
603
|
+
export function get_stats() {
|
|
604
|
+
const ret = wasm.get_stats();
|
|
591
605
|
return takeObject(ret);
|
|
592
606
|
}
|
|
593
607
|
|
|
594
608
|
/**
|
|
595
609
|
* @param {Uint8Array} buffer
|
|
596
|
-
* @param {
|
|
597
|
-
* @
|
|
610
|
+
* @param {Uint8Array} hash
|
|
611
|
+
* @param {bigint} block_id
|
|
612
|
+
* @param {bigint} peer_index
|
|
613
|
+
* @returns {Promise<void>}
|
|
598
614
|
*/
|
|
599
|
-
export function
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
603
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
604
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
605
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
606
|
-
if (r2) {
|
|
607
|
-
throw takeObject(r1);
|
|
608
|
-
}
|
|
609
|
-
return takeObject(r0);
|
|
610
|
-
} finally {
|
|
611
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
612
|
-
}
|
|
615
|
+
export function process_fetched_block(buffer, hash, block_id, peer_index) {
|
|
616
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
617
|
+
return takeObject(ret);
|
|
613
618
|
}
|
|
614
619
|
|
|
615
620
|
/**
|
|
616
|
-
* @param {string}
|
|
617
|
-
* @returns {Promise<
|
|
621
|
+
* @param {string} public_key
|
|
622
|
+
* @returns {Promise<Array<any>>}
|
|
618
623
|
*/
|
|
619
|
-
export function
|
|
620
|
-
const ret = wasm.
|
|
624
|
+
export function get_account_slips(public_key) {
|
|
625
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
621
626
|
return takeObject(ret);
|
|
622
627
|
}
|
|
623
628
|
|
|
624
629
|
/**
|
|
625
|
-
* @param {
|
|
630
|
+
* @param {Uint8Array} buffer
|
|
626
631
|
* @returns {string}
|
|
627
632
|
*/
|
|
628
|
-
export function
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
632
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
633
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
634
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
635
|
-
if (r2) {
|
|
636
|
-
throw takeObject(r1);
|
|
637
|
-
}
|
|
638
|
-
return takeObject(r0);
|
|
639
|
-
} finally {
|
|
640
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
641
|
-
}
|
|
633
|
+
export function hash(buffer) {
|
|
634
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
635
|
+
return takeObject(ret);
|
|
642
636
|
}
|
|
643
637
|
|
|
644
638
|
/**
|
|
645
|
-
* @
|
|
646
|
-
* @param {string} signature
|
|
647
|
-
* @param {string} public_key
|
|
648
|
-
* @returns {boolean}
|
|
639
|
+
* @returns {Promise<WasmBlockchain>}
|
|
649
640
|
*/
|
|
650
|
-
export function
|
|
651
|
-
const ret = wasm.
|
|
652
|
-
return ret
|
|
641
|
+
export function get_blockchain() {
|
|
642
|
+
const ret = wasm.get_blockchain();
|
|
643
|
+
return takeObject(ret);
|
|
653
644
|
}
|
|
654
645
|
|
|
655
646
|
/**
|
|
656
|
-
* @param {
|
|
657
|
-
* @param {
|
|
658
|
-
* @
|
|
647
|
+
* @param {bigint} amt
|
|
648
|
+
* @param {string} slip1_utxo_key
|
|
649
|
+
* @param {string} slip2_utxo_key
|
|
650
|
+
* @param {string} slip3_utxo_key
|
|
651
|
+
* @param {string} recipient_public_key
|
|
652
|
+
* @param {Uint8Array} tx_msg
|
|
653
|
+
* @returns {Promise<WasmTransaction>}
|
|
659
654
|
*/
|
|
660
|
-
export function
|
|
661
|
-
const ret = wasm.
|
|
655
|
+
export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
656
|
+
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));
|
|
662
657
|
return takeObject(ret);
|
|
663
658
|
}
|
|
664
659
|
|
|
665
660
|
/**
|
|
666
661
|
* @returns {Promise<Array<any>>}
|
|
667
662
|
*/
|
|
668
|
-
export function
|
|
669
|
-
const ret = wasm.
|
|
663
|
+
export function get_nft_list() {
|
|
664
|
+
const ret = wasm.get_nft_list();
|
|
670
665
|
return takeObject(ret);
|
|
671
666
|
}
|
|
672
667
|
|
|
673
668
|
/**
|
|
674
|
-
* @
|
|
669
|
+
* @param {number} major
|
|
670
|
+
* @param {number} minor
|
|
671
|
+
* @param {number} patch
|
|
672
|
+
* @returns {Promise<void>}
|
|
675
673
|
*/
|
|
676
|
-
export function
|
|
677
|
-
const ret = wasm.
|
|
674
|
+
export function set_wallet_version(major, minor, patch) {
|
|
675
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
678
676
|
return takeObject(ret);
|
|
679
677
|
}
|
|
680
678
|
|
|
681
679
|
/**
|
|
682
|
-
* @
|
|
683
|
-
* @returns {boolean}
|
|
680
|
+
* @returns {Promise<boolean>}
|
|
684
681
|
*/
|
|
685
|
-
export function
|
|
686
|
-
const ret = wasm.
|
|
687
|
-
return ret
|
|
682
|
+
export function produce_block_without_gt() {
|
|
683
|
+
const ret = wasm.produce_block_without_gt();
|
|
684
|
+
return takeObject(ret);
|
|
688
685
|
}
|
|
689
686
|
|
|
690
687
|
/**
|
|
691
|
-
* @param {string}
|
|
692
|
-
* @param {
|
|
693
|
-
* @param {
|
|
694
|
-
* @param {
|
|
688
|
+
* @param {string} slip1_utxo_key
|
|
689
|
+
* @param {string} slip2_utxo_key
|
|
690
|
+
* @param {string} slip3_utxo_key
|
|
691
|
+
* @param {number} left_count
|
|
692
|
+
* @param {number} right_count
|
|
693
|
+
* @param {Uint8Array} tx_msg
|
|
695
694
|
* @returns {Promise<WasmTransaction>}
|
|
696
695
|
*/
|
|
697
|
-
export function
|
|
698
|
-
const ret = wasm.
|
|
696
|
+
export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
697
|
+
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));
|
|
699
698
|
return takeObject(ret);
|
|
700
699
|
}
|
|
701
700
|
|
|
702
701
|
/**
|
|
703
|
-
* @param {
|
|
702
|
+
* @param {bigint} duration_in_ms
|
|
704
703
|
* @returns {Promise<void>}
|
|
705
704
|
*/
|
|
706
|
-
export function
|
|
707
|
-
|
|
708
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
709
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
705
|
+
export function process_timer_event(duration_in_ms) {
|
|
706
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
710
707
|
return takeObject(ret);
|
|
711
708
|
}
|
|
712
709
|
|
|
713
710
|
/**
|
|
714
|
-
* @
|
|
711
|
+
* @param {string} key
|
|
712
|
+
* @returns {boolean}
|
|
715
713
|
*/
|
|
716
|
-
export function
|
|
717
|
-
const ret = wasm.
|
|
718
|
-
return
|
|
714
|
+
export function is_valid_public_key(key) {
|
|
715
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
716
|
+
return ret !== 0;
|
|
719
717
|
}
|
|
720
718
|
|
|
721
719
|
/**
|
|
722
|
-
* @param {bigint} current_time
|
|
723
720
|
* @returns {Promise<void>}
|
|
724
721
|
*/
|
|
725
|
-
export function
|
|
726
|
-
const ret = wasm.
|
|
722
|
+
export function start_from_received_ghost_chain() {
|
|
723
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
727
724
|
return takeObject(ret);
|
|
728
725
|
}
|
|
729
726
|
|
|
730
727
|
/**
|
|
731
|
-
* @
|
|
732
|
-
* @returns {Promise<WasmBalanceSnapshot>}
|
|
728
|
+
* @returns {Promise<Array<any>>}
|
|
733
729
|
*/
|
|
734
|
-
export function
|
|
735
|
-
const ret = wasm.
|
|
730
|
+
export function get_mempool_txs() {
|
|
731
|
+
const ret = wasm.get_mempool_txs();
|
|
736
732
|
return takeObject(ret);
|
|
737
733
|
}
|
|
738
734
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
export function process_failed_block_fetch(hash, block_id, peer_index) {
|
|
746
|
-
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
747
|
-
return takeObject(ret);
|
|
735
|
+
function handleError(f, args) {
|
|
736
|
+
try {
|
|
737
|
+
return f.apply(this, args);
|
|
738
|
+
} catch (e) {
|
|
739
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
740
|
+
}
|
|
748
741
|
}
|
|
749
742
|
|
|
743
|
+
let stack_pointer = 128;
|
|
744
|
+
|
|
745
|
+
function addBorrowedObject(obj) {
|
|
746
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
747
|
+
heap[--stack_pointer] = obj;
|
|
748
|
+
return stack_pointer;
|
|
749
|
+
}
|
|
750
750
|
function __wbg_adapter_454(arg0, arg1, arg2, arg3) {
|
|
751
751
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h67b6352f6b82f267(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
752
752
|
}
|
|
@@ -2700,26 +2700,22 @@ function __wbg_get_imports() {
|
|
|
2700
2700
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
2701
2701
|
takeObject(arg0);
|
|
2702
2702
|
};
|
|
2703
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2704
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
2705
|
-
return addHeapObject(ret);
|
|
2706
|
-
};
|
|
2707
|
-
imports.wbg.__wbg_wasmwallet_new = function(arg0) {
|
|
2708
|
-
const ret = WasmWallet.__wrap(arg0);
|
|
2709
|
-
return addHeapObject(ret);
|
|
2710
|
-
};
|
|
2711
|
-
imports.wbg.__wbg_wasmnft_new = function(arg0) {
|
|
2712
|
-
const ret = WasmNFT.__wrap(arg0);
|
|
2713
|
-
return addHeapObject(ret);
|
|
2714
|
-
};
|
|
2715
2703
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2716
2704
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
2717
2705
|
return addHeapObject(ret);
|
|
2718
2706
|
};
|
|
2707
|
+
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
2708
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2709
|
+
return addHeapObject(ret);
|
|
2710
|
+
};
|
|
2719
2711
|
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
2720
2712
|
const ret = WasmTransaction.__wrap(arg0);
|
|
2721
2713
|
return addHeapObject(ret);
|
|
2722
2714
|
};
|
|
2715
|
+
imports.wbg.__wbg_wasmnft_new = function(arg0) {
|
|
2716
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2717
|
+
return addHeapObject(ret);
|
|
2718
|
+
};
|
|
2723
2719
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
2724
2720
|
const obj = getObject(arg1);
|
|
2725
2721
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -2728,6 +2724,10 @@ function __wbg_get_imports() {
|
|
|
2728
2724
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2729
2725
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2730
2726
|
};
|
|
2727
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
2728
|
+
const ret = getObject(arg0);
|
|
2729
|
+
return addHeapObject(ret);
|
|
2730
|
+
};
|
|
2731
2731
|
imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
|
|
2732
2732
|
const ret = WasmBlockchain.__wrap(arg0);
|
|
2733
2733
|
return addHeapObject(ret);
|
|
@@ -2736,35 +2736,52 @@ function __wbg_get_imports() {
|
|
|
2736
2736
|
const ret = WasmBlock.__wrap(arg0);
|
|
2737
2737
|
return addHeapObject(ret);
|
|
2738
2738
|
};
|
|
2739
|
-
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2740
|
-
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2741
|
-
return addHeapObject(ret);
|
|
2742
|
-
};
|
|
2743
2739
|
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2744
2740
|
const ret = WasmPeer.__wrap(arg0);
|
|
2745
2741
|
return addHeapObject(ret);
|
|
2746
2742
|
};
|
|
2743
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2744
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2745
|
+
return addHeapObject(ret);
|
|
2746
|
+
};
|
|
2747
2747
|
imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2748
2748
|
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2749
2749
|
return addHeapObject(ret);
|
|
2750
2750
|
};
|
|
2751
|
-
imports.wbg.
|
|
2752
|
-
const ret =
|
|
2751
|
+
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2752
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2753
2753
|
return addHeapObject(ret);
|
|
2754
2754
|
};
|
|
2755
|
-
imports.wbg.
|
|
2756
|
-
const ret =
|
|
2755
|
+
imports.wbg.__wbg_wasmwallet_new = function(arg0) {
|
|
2756
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2757
|
+
return addHeapObject(ret);
|
|
2758
|
+
};
|
|
2759
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2760
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2757
2761
|
return addHeapObject(ret);
|
|
2758
2762
|
};
|
|
2759
2763
|
imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2760
2764
|
const ret = WasmPeerService.__wrap(arg0);
|
|
2761
2765
|
return addHeapObject(ret);
|
|
2762
2766
|
};
|
|
2767
|
+
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
2768
|
+
const val = getObject(arg0);
|
|
2769
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2770
|
+
return ret;
|
|
2771
|
+
};
|
|
2772
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
2773
|
+
const ret = getObject(arg0) === undefined;
|
|
2774
|
+
return ret;
|
|
2775
|
+
};
|
|
2776
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
2777
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
2778
|
+
return ret;
|
|
2779
|
+
};
|
|
2763
2780
|
imports.wbg.__wbg_wasmhop_new = function(arg0) {
|
|
2764
2781
|
const ret = WasmHop.__wrap(arg0);
|
|
2765
2782
|
return addHeapObject(ret);
|
|
2766
2783
|
};
|
|
2767
|
-
imports.wbg.
|
|
2784
|
+
imports.wbg.__wbg_flushdata_e19f8531f715563c = function(arg0, arg1) {
|
|
2768
2785
|
let deferred0_0;
|
|
2769
2786
|
let deferred0_1;
|
|
2770
2787
|
try {
|
|
@@ -2775,7 +2792,7 @@ function __wbg_get_imports() {
|
|
|
2775
2792
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2776
2793
|
}
|
|
2777
2794
|
};
|
|
2778
|
-
imports.wbg.
|
|
2795
|
+
imports.wbg.__wbg_readvalue_d3282c9c5d63c751 = function() { return handleError(function (arg0, arg1) {
|
|
2779
2796
|
let deferred0_0;
|
|
2780
2797
|
let deferred0_1;
|
|
2781
2798
|
try {
|
|
@@ -2787,13 +2804,13 @@ function __wbg_get_imports() {
|
|
|
2787
2804
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2788
2805
|
}
|
|
2789
2806
|
}, arguments) };
|
|
2790
|
-
imports.wbg.
|
|
2807
|
+
imports.wbg.__wbg_loadwallet_f66232ebdacd134c = function() {
|
|
2791
2808
|
MsgHandler.load_wallet();
|
|
2792
2809
|
};
|
|
2793
|
-
imports.wbg.
|
|
2810
|
+
imports.wbg.__wbg_savewallet_900c6615a7c444ff = function() {
|
|
2794
2811
|
MsgHandler.save_wallet();
|
|
2795
2812
|
};
|
|
2796
|
-
imports.wbg.
|
|
2813
|
+
imports.wbg.__wbg_writevalue_55ad59a477682cf4 = function(arg0, arg1, arg2) {
|
|
2797
2814
|
let deferred0_0;
|
|
2798
2815
|
let deferred0_1;
|
|
2799
2816
|
try {
|
|
@@ -2804,7 +2821,7 @@ function __wbg_get_imports() {
|
|
|
2804
2821
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2805
2822
|
}
|
|
2806
2823
|
};
|
|
2807
|
-
imports.wbg.
|
|
2824
|
+
imports.wbg.__wbg_appendvalue_9bad2e39591861df = function(arg0, arg1, arg2) {
|
|
2808
2825
|
let deferred0_0;
|
|
2809
2826
|
let deferred0_1;
|
|
2810
2827
|
try {
|
|
@@ -2815,7 +2832,7 @@ function __wbg_get_imports() {
|
|
|
2815
2832
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2816
2833
|
}
|
|
2817
2834
|
};
|
|
2818
|
-
imports.wbg.
|
|
2835
|
+
imports.wbg.__wbg_removevalue_0829d7a3fdf241e8 = function() { return handleError(function (arg0, arg1) {
|
|
2819
2836
|
let deferred0_0;
|
|
2820
2837
|
let deferred0_1;
|
|
2821
2838
|
try {
|
|
@@ -2827,10 +2844,10 @@ function __wbg_get_imports() {
|
|
|
2827
2844
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2828
2845
|
}
|
|
2829
2846
|
}, arguments) };
|
|
2830
|
-
imports.wbg.
|
|
2847
|
+
imports.wbg.__wbg_sendmessage_8bfa28cc4629d485 = function(arg0, arg1) {
|
|
2831
2848
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2832
2849
|
};
|
|
2833
|
-
imports.wbg.
|
|
2850
|
+
imports.wbg.__wbg_connecttopeer_a97abb6ea54e73f4 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2834
2851
|
let deferred0_0;
|
|
2835
2852
|
let deferred0_1;
|
|
2836
2853
|
try {
|
|
@@ -2842,13 +2859,13 @@ function __wbg_get_imports() {
|
|
|
2842
2859
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2843
2860
|
}
|
|
2844
2861
|
}, arguments) };
|
|
2845
|
-
imports.wbg.
|
|
2862
|
+
imports.wbg.__wbg_getmyservices_0af92500fd842b5c = function() {
|
|
2846
2863
|
const ret = MsgHandler.get_my_services();
|
|
2847
2864
|
_assertClass(ret, WasmPeerServiceList);
|
|
2848
2865
|
var ptr1 = ret.__destroy_into_raw();
|
|
2849
2866
|
return ptr1;
|
|
2850
2867
|
};
|
|
2851
|
-
imports.wbg.
|
|
2868
|
+
imports.wbg.__wbg_isexistingfile_c5074d5d9ae77250 = function() { return handleError(function (arg0, arg1) {
|
|
2852
2869
|
let deferred0_0;
|
|
2853
2870
|
let deferred0_1;
|
|
2854
2871
|
try {
|
|
@@ -2860,27 +2877,27 @@ function __wbg_get_imports() {
|
|
|
2860
2877
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2861
2878
|
}
|
|
2862
2879
|
}, arguments) };
|
|
2863
|
-
imports.wbg.
|
|
2880
|
+
imports.wbg.__wbg_processapicall_447fe8b16543cfe2 = function(arg0, arg1, arg2) {
|
|
2864
2881
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2865
2882
|
};
|
|
2866
|
-
imports.wbg.
|
|
2883
|
+
imports.wbg.__wbg_processapierror_ae6a7accec497e67 = function(arg0, arg1, arg2) {
|
|
2867
2884
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2868
2885
|
};
|
|
2869
|
-
imports.wbg.
|
|
2886
|
+
imports.wbg.__wbg_processapisuccess_55add6554d3b2fbf = function(arg0, arg1, arg2) {
|
|
2870
2887
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2871
2888
|
};
|
|
2872
|
-
imports.wbg.
|
|
2889
|
+
imports.wbg.__wbg_sendmessagetoall_9db2f0f8745a3b61 = function(arg0, arg1) {
|
|
2873
2890
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2874
2891
|
};
|
|
2875
|
-
imports.wbg.
|
|
2892
|
+
imports.wbg.__wbg_disconnectfrompeer_93f8374a739a911c = function() { return handleError(function (arg0) {
|
|
2876
2893
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2877
2894
|
return addHeapObject(ret);
|
|
2878
2895
|
}, arguments) };
|
|
2879
|
-
imports.wbg.
|
|
2896
|
+
imports.wbg.__wbg_loadblockfilelist_909ff75cd1004eec = function() { return handleError(function () {
|
|
2880
2897
|
const ret = MsgHandler.load_block_file_list();
|
|
2881
2898
|
return addHeapObject(ret);
|
|
2882
2899
|
}, arguments) };
|
|
2883
|
-
imports.wbg.
|
|
2900
|
+
imports.wbg.__wbg_sendinterfaceevent_7045bede3f7d75b1 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2884
2901
|
let deferred0_0;
|
|
2885
2902
|
let deferred0_1;
|
|
2886
2903
|
let deferred1_0;
|
|
@@ -2896,7 +2913,7 @@ function __wbg_get_imports() {
|
|
|
2896
2913
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2897
2914
|
}
|
|
2898
2915
|
};
|
|
2899
|
-
imports.wbg.
|
|
2916
|
+
imports.wbg.__wbg_sendblocksuccess_4a65fd07f3e613ab = function(arg0, arg1, arg2) {
|
|
2900
2917
|
let deferred0_0;
|
|
2901
2918
|
let deferred0_1;
|
|
2902
2919
|
try {
|
|
@@ -2907,10 +2924,10 @@ function __wbg_get_imports() {
|
|
|
2907
2924
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2908
2925
|
}
|
|
2909
2926
|
};
|
|
2910
|
-
imports.wbg.
|
|
2927
|
+
imports.wbg.__wbg_sendwalletupdate_4622857ac663a957 = function() {
|
|
2911
2928
|
MsgHandler.send_wallet_update();
|
|
2912
2929
|
};
|
|
2913
|
-
imports.wbg.
|
|
2930
|
+
imports.wbg.__wbg_sendnewversionalert_e01dcdcfd2560293 = function(arg0, arg1, arg2) {
|
|
2914
2931
|
let deferred0_0;
|
|
2915
2932
|
let deferred0_1;
|
|
2916
2933
|
try {
|
|
@@ -2921,13 +2938,13 @@ function __wbg_get_imports() {
|
|
|
2921
2938
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2922
2939
|
}
|
|
2923
2940
|
};
|
|
2924
|
-
imports.wbg.
|
|
2941
|
+
imports.wbg.__wbg_sendblockfetchstatusevent_4e05211bffe95385 = function(arg0) {
|
|
2925
2942
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2926
2943
|
};
|
|
2927
|
-
imports.wbg.
|
|
2944
|
+
imports.wbg.__wbg_sendnewchaindetectedevent_9db9e5dcd7e122b8 = function() {
|
|
2928
2945
|
MsgHandler.send_new_chain_detected_event();
|
|
2929
2946
|
};
|
|
2930
|
-
imports.wbg.
|
|
2947
|
+
imports.wbg.__wbg_fetchblockfrompeer_7f0851a8d64bfa82 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2931
2948
|
let deferred0_0;
|
|
2932
2949
|
let deferred0_1;
|
|
2933
2950
|
try {
|
|
@@ -2939,7 +2956,7 @@ function __wbg_get_imports() {
|
|
|
2939
2956
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2940
2957
|
}
|
|
2941
2958
|
}, arguments) };
|
|
2942
|
-
imports.wbg.
|
|
2959
|
+
imports.wbg.__wbg_ensuredirectoryexists_6bfc5f098f9a291d = function() { return handleError(function (arg0, arg1) {
|
|
2943
2960
|
let deferred0_0;
|
|
2944
2961
|
let deferred0_1;
|
|
2945
2962
|
try {
|
|
@@ -2950,23 +2967,6 @@ function __wbg_get_imports() {
|
|
|
2950
2967
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2951
2968
|
}
|
|
2952
2969
|
}, arguments) };
|
|
2953
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2954
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2955
|
-
return addHeapObject(ret);
|
|
2956
|
-
};
|
|
2957
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
2958
|
-
const val = getObject(arg0);
|
|
2959
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
2960
|
-
return ret;
|
|
2961
|
-
};
|
|
2962
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
2963
|
-
const ret = getObject(arg0) === undefined;
|
|
2964
|
-
return ret;
|
|
2965
|
-
};
|
|
2966
|
-
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
2967
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
2968
|
-
return ret;
|
|
2969
|
-
};
|
|
2970
2970
|
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2971
2971
|
const ret = getObject(arg0) == getObject(arg1);
|
|
2972
2972
|
return ret;
|
|
@@ -3276,7 +3276,7 @@ function __wbg_get_imports() {
|
|
|
3276
3276
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
3277
3277
|
};
|
|
3278
3278
|
imports.wbg.__wbindgen_closure_wrapper1615 = function(arg0, arg1, arg2) {
|
|
3279
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3279
|
+
const ret = makeMutClosure(arg0, arg1, 598, __wbg_adapter_38);
|
|
3280
3280
|
return addHeapObject(ret);
|
|
3281
3281
|
};
|
|
3282
3282
|
|