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