saito-wasm 0.2.162 → 0.2.163
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 -138
- package/pkg/node/index.js +290 -290
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +138 -138
- package/pkg/web/index.js +287 -287
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/package.json +1 -1
- /package/pkg/node/snippets/{saito-wasm-4fafc63e3cd3af2c → saito-wasm-e8d94f6fc48cc1ba}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-4fafc63e3cd3af2c → saito-wasm-e8d94f6fc48cc1ba}/js/msg_handler.js +0 -0
package/pkg/node/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-
|
|
4
|
+
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-e8d94f6fc48cc1ba/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
7
|
const heap = new Array(128).fill(undefined);
|
|
@@ -24,6 +24,15 @@ function takeObject(idx) {
|
|
|
24
24
|
return ret;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
function addHeapObject(obj) {
|
|
28
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
29
|
+
const idx = heap_next;
|
|
30
|
+
heap_next = heap[idx];
|
|
31
|
+
|
|
32
|
+
heap[idx] = obj;
|
|
33
|
+
return idx;
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
28
37
|
|
|
29
38
|
cachedTextDecoder.decode();
|
|
@@ -42,15 +51,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
42
51
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
43
52
|
}
|
|
44
53
|
|
|
45
|
-
function addHeapObject(obj) {
|
|
46
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
47
|
-
const idx = heap_next;
|
|
48
|
-
heap_next = heap[idx];
|
|
49
|
-
|
|
50
|
-
heap[idx] = obj;
|
|
51
|
-
return idx;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
55
55
|
|
|
56
56
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -242,74 +242,48 @@ function addBorrowedObject(obj) {
|
|
|
242
242
|
heap[--stack_pointer] = obj;
|
|
243
243
|
return stack_pointer;
|
|
244
244
|
}
|
|
245
|
-
/**
|
|
246
|
-
* @param {string} public_key
|
|
247
|
-
* @returns {Promise<Array<any>>}
|
|
248
|
-
*/
|
|
249
|
-
module.exports.get_account_slips = function(public_key) {
|
|
250
|
-
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
251
|
-
return takeObject(ret);
|
|
252
|
-
};
|
|
253
|
-
|
|
254
245
|
/**
|
|
255
246
|
* @param {bigint} peer_index
|
|
256
|
-
* @returns {Promise<
|
|
247
|
+
* @returns {Promise<void>}
|
|
257
248
|
*/
|
|
258
|
-
module.exports.
|
|
259
|
-
const ret = wasm.
|
|
249
|
+
module.exports.remove_stun_peer = function(peer_index) {
|
|
250
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
260
251
|
return takeObject(ret);
|
|
261
252
|
};
|
|
262
253
|
|
|
263
254
|
/**
|
|
264
|
-
* @
|
|
255
|
+
* @param {bigint} amt
|
|
256
|
+
* @param {string} slip1_utxo_key
|
|
257
|
+
* @param {string} slip2_utxo_key
|
|
258
|
+
* @param {string} slip3_utxo_key
|
|
259
|
+
* @param {string} recipient_public_key
|
|
260
|
+
* @param {Uint8Array} tx_msg
|
|
261
|
+
* @returns {Promise<WasmTransaction>}
|
|
265
262
|
*/
|
|
266
|
-
module.exports.
|
|
267
|
-
const ret = wasm.
|
|
263
|
+
module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
264
|
+
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));
|
|
268
265
|
return takeObject(ret);
|
|
269
266
|
};
|
|
270
267
|
|
|
271
268
|
/**
|
|
272
|
-
* @param {Uint8Array} buffer
|
|
273
|
-
* @param {number} msg_index
|
|
274
269
|
* @param {bigint} peer_index
|
|
270
|
+
* @param {string} ip
|
|
275
271
|
* @returns {Promise<void>}
|
|
276
272
|
*/
|
|
277
|
-
module.exports.
|
|
278
|
-
const ret = wasm.
|
|
279
|
-
return takeObject(ret);
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @param {number} major
|
|
284
|
-
* @param {number} minor
|
|
285
|
-
* @param {number} patch
|
|
286
|
-
* @returns {Promise<void>}
|
|
287
|
-
*/
|
|
288
|
-
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
289
|
-
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
290
|
-
return takeObject(ret);
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* @param {string} block_hash
|
|
295
|
-
* @returns {Promise<WasmBlock>}
|
|
296
|
-
*/
|
|
297
|
-
module.exports.get_block = function(block_hash) {
|
|
298
|
-
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
273
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
274
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
299
275
|
return takeObject(ret);
|
|
300
276
|
};
|
|
301
277
|
|
|
302
278
|
/**
|
|
303
|
-
* @param {
|
|
304
|
-
* @param {
|
|
305
|
-
* @param {Uint8Array} tx_msg
|
|
279
|
+
* @param {Array<any>} public_keys
|
|
280
|
+
* @param {BigUint64Array} amounts
|
|
306
281
|
* @param {bigint} fee
|
|
307
|
-
* @param {
|
|
308
|
-
* @param {string} nft_type
|
|
282
|
+
* @param {boolean} _force_merge
|
|
309
283
|
* @returns {Promise<WasmTransaction>}
|
|
310
284
|
*/
|
|
311
|
-
module.exports.
|
|
312
|
-
const ret = wasm.
|
|
285
|
+
module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
|
|
286
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
313
287
|
return takeObject(ret);
|
|
314
288
|
};
|
|
315
289
|
|
|
@@ -327,71 +301,75 @@ module.exports.initialize = function(config_json, private_key, log_level_num, ha
|
|
|
327
301
|
};
|
|
328
302
|
|
|
329
303
|
/**
|
|
330
|
-
* @
|
|
331
|
-
* @param {string} signature
|
|
332
|
-
* @param {string} public_key
|
|
333
|
-
* @returns {boolean}
|
|
304
|
+
* @returns {Promise<void>}
|
|
334
305
|
*/
|
|
335
|
-
module.exports.
|
|
336
|
-
const ret = wasm.
|
|
337
|
-
return ret
|
|
306
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
307
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
308
|
+
return takeObject(ret);
|
|
338
309
|
};
|
|
339
310
|
|
|
340
311
|
/**
|
|
341
|
-
* @
|
|
312
|
+
* @param {Uint8Array} hash
|
|
313
|
+
* @param {bigint} block_id
|
|
314
|
+
* @param {bigint} peer_index
|
|
315
|
+
* @returns {Promise<void>}
|
|
342
316
|
*/
|
|
343
|
-
module.exports.
|
|
344
|
-
const ret = wasm.
|
|
317
|
+
module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
|
|
318
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
345
319
|
return takeObject(ret);
|
|
346
320
|
};
|
|
347
321
|
|
|
348
322
|
/**
|
|
349
|
-
* @param {bigint} peer_index
|
|
350
323
|
* @param {string} public_key
|
|
351
|
-
* @
|
|
324
|
+
* @param {bigint} amount
|
|
325
|
+
* @param {bigint} fee
|
|
326
|
+
* @param {boolean} force_merge
|
|
327
|
+
* @returns {Promise<WasmTransaction>}
|
|
352
328
|
*/
|
|
353
|
-
module.exports.
|
|
354
|
-
const ret = wasm.
|
|
329
|
+
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
330
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
355
331
|
return takeObject(ret);
|
|
356
332
|
};
|
|
357
333
|
|
|
358
334
|
/**
|
|
359
|
-
* @param {
|
|
360
|
-
* @param {
|
|
361
|
-
* @
|
|
335
|
+
* @param {Uint8Array} buffer
|
|
336
|
+
* @param {number} msg_index
|
|
337
|
+
* @param {bigint} peer_index
|
|
338
|
+
* @returns {Promise<void>}
|
|
362
339
|
*/
|
|
363
|
-
module.exports.
|
|
364
|
-
const
|
|
365
|
-
const len0 = WASM_VECTOR_LEN;
|
|
366
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
340
|
+
module.exports.send_api_success = function(buffer, msg_index, peer_index) {
|
|
341
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
367
342
|
return takeObject(ret);
|
|
368
343
|
};
|
|
369
344
|
|
|
370
345
|
/**
|
|
371
|
-
* @param {
|
|
346
|
+
* @param {bigint} threshold
|
|
372
347
|
* @returns {Promise<void>}
|
|
373
348
|
*/
|
|
374
|
-
module.exports.
|
|
375
|
-
|
|
376
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
349
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
350
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
377
351
|
return takeObject(ret);
|
|
378
352
|
};
|
|
379
353
|
|
|
380
354
|
/**
|
|
381
355
|
* @returns {Promise<Array<any>>}
|
|
382
356
|
*/
|
|
383
|
-
module.exports.
|
|
384
|
-
const ret = wasm.
|
|
357
|
+
module.exports.get_peers = function() {
|
|
358
|
+
const ret = wasm.get_peers();
|
|
385
359
|
return takeObject(ret);
|
|
386
360
|
};
|
|
387
361
|
|
|
388
362
|
/**
|
|
389
|
-
* @param {bigint}
|
|
390
|
-
* @param {
|
|
391
|
-
* @
|
|
363
|
+
* @param {bigint} num
|
|
364
|
+
* @param {bigint} deposit
|
|
365
|
+
* @param {Uint8Array} tx_msg
|
|
366
|
+
* @param {bigint} fee
|
|
367
|
+
* @param {string} recipient_public_key
|
|
368
|
+
* @param {string} nft_type
|
|
369
|
+
* @returns {Promise<WasmTransaction>}
|
|
392
370
|
*/
|
|
393
|
-
module.exports.
|
|
394
|
-
const ret = wasm.
|
|
371
|
+
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
372
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
395
373
|
return takeObject(ret);
|
|
396
374
|
};
|
|
397
375
|
|
|
@@ -410,34 +388,81 @@ module.exports.update_from_balance_snapshot = function(snapshot) {
|
|
|
410
388
|
* @param {bigint} peer_index
|
|
411
389
|
* @returns {Promise<void>}
|
|
412
390
|
*/
|
|
413
|
-
module.exports.
|
|
414
|
-
const ret = wasm.
|
|
391
|
+
module.exports.process_peer_disconnection = function(peer_index) {
|
|
392
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
415
393
|
return takeObject(ret);
|
|
416
394
|
};
|
|
417
395
|
|
|
418
396
|
/**
|
|
419
|
-
* @
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
397
|
+
* @returns {Promise<any>}
|
|
398
|
+
*/
|
|
399
|
+
module.exports.get_confirmations = function() {
|
|
400
|
+
const ret = wasm.get_confirmations();
|
|
401
|
+
return takeObject(ret);
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* @param {Uint8Array} buffer
|
|
406
|
+
* @returns {string}
|
|
407
|
+
*/
|
|
408
|
+
module.exports.hash = function(buffer) {
|
|
409
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
410
|
+
return takeObject(ret);
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* @returns {Promise<bigint>}
|
|
415
|
+
*/
|
|
416
|
+
module.exports.get_next_peer_index = function() {
|
|
417
|
+
const ret = wasm.get_next_peer_index();
|
|
418
|
+
return takeObject(ret);
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* @returns {Promise<string>}
|
|
423
|
+
*/
|
|
424
|
+
module.exports.get_peer_stats = function() {
|
|
425
|
+
const ret = wasm.get_peer_stats();
|
|
426
|
+
return takeObject(ret);
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* @param {string} key
|
|
431
|
+
* @returns {boolean}
|
|
432
|
+
*/
|
|
433
|
+
module.exports.is_valid_public_key = function(key) {
|
|
434
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
435
|
+
return ret !== 0;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* @param {string} nft_id_hex
|
|
424
440
|
* @param {Uint8Array} tx_msg
|
|
425
441
|
* @returns {Promise<WasmTransaction>}
|
|
426
442
|
*/
|
|
427
|
-
module.exports.
|
|
428
|
-
const
|
|
443
|
+
module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
|
|
444
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
445
|
+
const len0 = WASM_VECTOR_LEN;
|
|
446
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
447
|
+
return takeObject(ret);
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* @returns {Promise<boolean>}
|
|
452
|
+
*/
|
|
453
|
+
module.exports.produce_block_with_gt = function() {
|
|
454
|
+
const ret = wasm.produce_block_with_gt();
|
|
429
455
|
return takeObject(ret);
|
|
430
456
|
};
|
|
431
457
|
|
|
432
458
|
/**
|
|
433
|
-
* @param {Uint8Array} buffer
|
|
434
459
|
* @param {string} private_key
|
|
435
460
|
* @returns {string}
|
|
436
461
|
*/
|
|
437
|
-
module.exports.
|
|
462
|
+
module.exports.generate_public_key = function(private_key) {
|
|
438
463
|
try {
|
|
439
464
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
440
|
-
wasm.
|
|
465
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
441
466
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
442
467
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
443
468
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -451,22 +476,34 @@ module.exports.sign_buffer = function(buffer, private_key) {
|
|
|
451
476
|
};
|
|
452
477
|
|
|
453
478
|
/**
|
|
454
|
-
* @
|
|
455
|
-
* @returns {Promise<void>}
|
|
479
|
+
* @returns {Promise<WasmBlockchain>}
|
|
456
480
|
*/
|
|
457
|
-
module.exports.
|
|
458
|
-
const ret = wasm.
|
|
481
|
+
module.exports.get_blockchain = function() {
|
|
482
|
+
const ret = wasm.get_blockchain();
|
|
459
483
|
return takeObject(ret);
|
|
460
484
|
};
|
|
461
485
|
|
|
462
486
|
/**
|
|
463
|
-
* @
|
|
487
|
+
* @param {bigint} peer_index
|
|
488
|
+
* @param {string} public_key
|
|
489
|
+
* @returns {Promise<void>}
|
|
464
490
|
*/
|
|
465
|
-
module.exports.
|
|
466
|
-
const ret = wasm.
|
|
491
|
+
module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
492
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
467
493
|
return takeObject(ret);
|
|
468
494
|
};
|
|
469
495
|
|
|
496
|
+
/**
|
|
497
|
+
* @param {Uint8Array} buffer
|
|
498
|
+
* @param {string} signature
|
|
499
|
+
* @param {string} public_key
|
|
500
|
+
* @returns {boolean}
|
|
501
|
+
*/
|
|
502
|
+
module.exports.verify_signature = function(buffer, signature, public_key) {
|
|
503
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
504
|
+
return ret !== 0;
|
|
505
|
+
};
|
|
506
|
+
|
|
470
507
|
/**
|
|
471
508
|
* @returns {Promise<string>}
|
|
472
509
|
*/
|
|
@@ -476,27 +513,48 @@ module.exports.get_congestion_stats = function() {
|
|
|
476
513
|
};
|
|
477
514
|
|
|
478
515
|
/**
|
|
479
|
-
* @
|
|
516
|
+
* @returns {Promise<Array<any>>}
|
|
517
|
+
*/
|
|
518
|
+
module.exports.get_nft_list = function() {
|
|
519
|
+
const ret = wasm.get_nft_list();
|
|
520
|
+
return takeObject(ret);
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* @param {Uint8Array} buffer
|
|
525
|
+
* @param {number} msg_index
|
|
526
|
+
* @param {bigint} peer_index
|
|
480
527
|
* @returns {Promise<void>}
|
|
481
528
|
*/
|
|
482
|
-
module.exports.
|
|
483
|
-
const ret = wasm.
|
|
529
|
+
module.exports.send_api_call = function(buffer, msg_index, peer_index) {
|
|
530
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
531
|
+
return takeObject(ret);
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* @param {WasmTransaction} tx
|
|
536
|
+
* @returns {Promise<void>}
|
|
537
|
+
*/
|
|
538
|
+
module.exports.propagate_transaction = function(tx) {
|
|
539
|
+
_assertClass(tx, WasmTransaction);
|
|
540
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
484
541
|
return takeObject(ret);
|
|
485
542
|
};
|
|
486
543
|
|
|
487
544
|
/**
|
|
488
|
-
* @
|
|
545
|
+
* @param {string} public_key
|
|
546
|
+
* @returns {Promise<Array<any>>}
|
|
489
547
|
*/
|
|
490
|
-
module.exports.
|
|
491
|
-
const ret = wasm.
|
|
548
|
+
module.exports.get_account_slips = function(public_key) {
|
|
549
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
492
550
|
return takeObject(ret);
|
|
493
551
|
};
|
|
494
552
|
|
|
495
553
|
/**
|
|
496
|
-
* @returns {Promise<
|
|
554
|
+
* @returns {Promise<boolean>}
|
|
497
555
|
*/
|
|
498
|
-
module.exports.
|
|
499
|
-
const ret = wasm.
|
|
556
|
+
module.exports.produce_block_without_gt = function() {
|
|
557
|
+
const ret = wasm.produce_block_without_gt();
|
|
500
558
|
return takeObject(ret);
|
|
501
559
|
};
|
|
502
560
|
|
|
@@ -506,16 +564,17 @@ module.exports.get_latest_block_hash = function() {
|
|
|
506
564
|
* @param {bigint} peer_index
|
|
507
565
|
* @returns {Promise<void>}
|
|
508
566
|
*/
|
|
509
|
-
module.exports.
|
|
510
|
-
const ret = wasm.
|
|
567
|
+
module.exports.send_api_error = function(buffer, msg_index, peer_index) {
|
|
568
|
+
const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
|
|
511
569
|
return takeObject(ret);
|
|
512
570
|
};
|
|
513
571
|
|
|
514
572
|
/**
|
|
515
|
-
* @
|
|
573
|
+
* @param {bigint} current_time
|
|
574
|
+
* @returns {Promise<void>}
|
|
516
575
|
*/
|
|
517
|
-
module.exports.
|
|
518
|
-
const ret = wasm.
|
|
576
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
577
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
519
578
|
return takeObject(ret);
|
|
520
579
|
};
|
|
521
580
|
|
|
@@ -534,112 +593,69 @@ module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_u
|
|
|
534
593
|
};
|
|
535
594
|
|
|
536
595
|
/**
|
|
537
|
-
* @
|
|
538
|
-
* @returns {Promise<void>}
|
|
539
|
-
*/
|
|
540
|
-
module.exports.process_peer_disconnection = function(peer_index) {
|
|
541
|
-
const ret = wasm.process_peer_disconnection(peer_index);
|
|
542
|
-
return takeObject(ret);
|
|
543
|
-
};
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* @param {string} public_key
|
|
547
|
-
* @param {bigint} amount
|
|
548
|
-
* @param {bigint} fee
|
|
549
|
-
* @param {boolean} force_merge
|
|
550
|
-
* @returns {Promise<WasmTransaction>}
|
|
551
|
-
*/
|
|
552
|
-
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
553
|
-
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
554
|
-
return takeObject(ret);
|
|
555
|
-
};
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* @returns {Promise<boolean>}
|
|
596
|
+
* @returns {Promise<string>}
|
|
559
597
|
*/
|
|
560
|
-
module.exports.
|
|
561
|
-
const ret = wasm.
|
|
598
|
+
module.exports.get_latest_block_hash = function() {
|
|
599
|
+
const ret = wasm.get_latest_block_hash();
|
|
562
600
|
return takeObject(ret);
|
|
563
601
|
};
|
|
564
602
|
|
|
565
603
|
/**
|
|
566
|
-
* @
|
|
567
|
-
* @returns {string}
|
|
568
|
-
*/
|
|
569
|
-
module.exports.generate_public_key = function(private_key) {
|
|
570
|
-
try {
|
|
571
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
572
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
573
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
574
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
575
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
576
|
-
if (r2) {
|
|
577
|
-
throw takeObject(r1);
|
|
578
|
-
}
|
|
579
|
-
return takeObject(r0);
|
|
580
|
-
} finally {
|
|
581
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* @returns {Promise<WasmWallet>}
|
|
604
|
+
* @returns {Promise<string>}
|
|
587
605
|
*/
|
|
588
|
-
module.exports.
|
|
589
|
-
const ret = wasm.
|
|
606
|
+
module.exports.get_stats = function() {
|
|
607
|
+
const ret = wasm.get_stats();
|
|
590
608
|
return takeObject(ret);
|
|
591
609
|
};
|
|
592
610
|
|
|
593
611
|
/**
|
|
594
|
-
* @
|
|
612
|
+
* @param {Array<any>} keys
|
|
613
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
595
614
|
*/
|
|
596
|
-
module.exports.
|
|
597
|
-
const ret = wasm.
|
|
615
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
616
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
598
617
|
return takeObject(ret);
|
|
599
618
|
};
|
|
600
619
|
|
|
601
620
|
/**
|
|
602
621
|
* @returns {Promise<void>}
|
|
603
622
|
*/
|
|
604
|
-
module.exports.
|
|
605
|
-
const ret = wasm.
|
|
623
|
+
module.exports.disable_producing_blocks_by_timer = function() {
|
|
624
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
606
625
|
return takeObject(ret);
|
|
607
626
|
};
|
|
608
627
|
|
|
609
628
|
/**
|
|
610
|
-
* @
|
|
611
|
-
* @returns {Promise<void>}
|
|
629
|
+
* @returns {string}
|
|
612
630
|
*/
|
|
613
|
-
module.exports.
|
|
614
|
-
const ret = wasm.
|
|
631
|
+
module.exports.generate_private_key = function() {
|
|
632
|
+
const ret = wasm.generate_private_key();
|
|
615
633
|
return takeObject(ret);
|
|
616
634
|
};
|
|
617
635
|
|
|
618
636
|
/**
|
|
619
|
-
* @
|
|
637
|
+
* @param {string} block_hash
|
|
638
|
+
* @returns {Promise<WasmBlock>}
|
|
620
639
|
*/
|
|
621
|
-
module.exports.
|
|
622
|
-
const ret = wasm.
|
|
640
|
+
module.exports.get_block = function(block_hash) {
|
|
641
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
623
642
|
return takeObject(ret);
|
|
624
643
|
};
|
|
625
644
|
|
|
626
645
|
/**
|
|
627
|
-
* @param {
|
|
628
|
-
* @param {Uint8Array} hash
|
|
629
|
-
* @param {bigint} block_id
|
|
630
|
-
* @param {bigint} peer_index
|
|
646
|
+
* @param {bigint} duration_in_ms
|
|
631
647
|
* @returns {Promise<void>}
|
|
632
648
|
*/
|
|
633
|
-
module.exports.
|
|
634
|
-
const ret = wasm.
|
|
649
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
650
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
635
651
|
return takeObject(ret);
|
|
636
652
|
};
|
|
637
653
|
|
|
638
654
|
/**
|
|
639
|
-
* @returns {Promise<
|
|
655
|
+
* @returns {Promise<WasmWallet>}
|
|
640
656
|
*/
|
|
641
|
-
module.exports.
|
|
642
|
-
const ret = wasm.
|
|
657
|
+
module.exports.get_wallet = function() {
|
|
658
|
+
const ret = wasm.get_wallet();
|
|
643
659
|
return takeObject(ret);
|
|
644
660
|
};
|
|
645
661
|
|
|
@@ -654,79 +670,63 @@ module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
|
|
|
654
670
|
};
|
|
655
671
|
|
|
656
672
|
/**
|
|
657
|
-
* @
|
|
658
|
-
* @returns {boolean}
|
|
659
|
-
*/
|
|
660
|
-
module.exports.is_valid_public_key = function(key) {
|
|
661
|
-
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
662
|
-
return ret !== 0;
|
|
663
|
-
};
|
|
664
|
-
|
|
665
|
-
/**
|
|
666
|
-
* @param {Array<any>} public_keys
|
|
667
|
-
* @param {BigUint64Array} amounts
|
|
668
|
-
* @param {bigint} fee
|
|
669
|
-
* @param {boolean} _force_merge
|
|
670
|
-
* @returns {Promise<WasmTransaction>}
|
|
671
|
-
*/
|
|
672
|
-
module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
|
|
673
|
-
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
674
|
-
return takeObject(ret);
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
/**
|
|
678
|
-
* @returns {Promise<WasmBlockchain>}
|
|
673
|
+
* @returns {Promise<Array<any>>}
|
|
679
674
|
*/
|
|
680
|
-
module.exports.
|
|
681
|
-
const ret = wasm.
|
|
675
|
+
module.exports.get_mempool_txs = function() {
|
|
676
|
+
const ret = wasm.get_mempool_txs();
|
|
682
677
|
return takeObject(ret);
|
|
683
678
|
};
|
|
684
679
|
|
|
685
680
|
/**
|
|
681
|
+
* @param {number} major
|
|
682
|
+
* @param {number} minor
|
|
683
|
+
* @param {number} patch
|
|
686
684
|
* @returns {Promise<void>}
|
|
687
685
|
*/
|
|
688
|
-
module.exports.
|
|
689
|
-
const ret = wasm.
|
|
686
|
+
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
687
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
690
688
|
return takeObject(ret);
|
|
691
689
|
};
|
|
692
690
|
|
|
693
691
|
/**
|
|
694
692
|
* @param {Uint8Array} buffer
|
|
693
|
+
* @param {string} private_key
|
|
695
694
|
* @returns {string}
|
|
696
695
|
*/
|
|
697
|
-
module.exports.
|
|
698
|
-
|
|
699
|
-
|
|
696
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
697
|
+
try {
|
|
698
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
699
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
700
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
701
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
702
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
703
|
+
if (r2) {
|
|
704
|
+
throw takeObject(r1);
|
|
705
|
+
}
|
|
706
|
+
return takeObject(r0);
|
|
707
|
+
} finally {
|
|
708
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
709
|
+
}
|
|
700
710
|
};
|
|
701
711
|
|
|
702
712
|
/**
|
|
703
|
-
* @param {Uint8Array} hash
|
|
704
|
-
* @param {bigint} block_id
|
|
705
713
|
* @param {bigint} peer_index
|
|
706
|
-
* @returns {Promise<
|
|
714
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
707
715
|
*/
|
|
708
|
-
module.exports.
|
|
709
|
-
const ret = wasm.
|
|
716
|
+
module.exports.get_peer = function(peer_index) {
|
|
717
|
+
const ret = wasm.get_peer(peer_index);
|
|
710
718
|
return takeObject(ret);
|
|
711
719
|
};
|
|
712
720
|
|
|
713
721
|
/**
|
|
714
722
|
* @param {Uint8Array} buffer
|
|
715
|
-
* @param {
|
|
723
|
+
* @param {Uint8Array} hash
|
|
724
|
+
* @param {bigint} block_id
|
|
716
725
|
* @param {bigint} peer_index
|
|
717
726
|
* @returns {Promise<void>}
|
|
718
727
|
*/
|
|
719
|
-
module.exports.
|
|
720
|
-
const ret = wasm.
|
|
721
|
-
return takeObject(ret);
|
|
722
|
-
};
|
|
723
|
-
|
|
724
|
-
/**
|
|
725
|
-
* @param {Array<any>} keys
|
|
726
|
-
* @returns {Promise<WasmBalanceSnapshot>}
|
|
727
|
-
*/
|
|
728
|
-
module.exports.get_balance_snapshot = function(keys) {
|
|
729
|
-
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
728
|
+
module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
|
|
729
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
730
730
|
return takeObject(ret);
|
|
731
731
|
};
|
|
732
732
|
|
|
@@ -2645,28 +2645,42 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
2645
2645
|
takeObject(arg0);
|
|
2646
2646
|
};
|
|
2647
2647
|
|
|
2648
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2649
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2650
|
+
return addHeapObject(ret);
|
|
2651
|
+
};
|
|
2652
|
+
|
|
2653
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2654
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2655
|
+
return addHeapObject(ret);
|
|
2656
|
+
};
|
|
2657
|
+
|
|
2648
2658
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2649
2659
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
2650
2660
|
return addHeapObject(ret);
|
|
2651
2661
|
};
|
|
2652
2662
|
|
|
2653
|
-
module.exports.
|
|
2654
|
-
const
|
|
2655
|
-
|
|
2663
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2664
|
+
const obj = getObject(arg1);
|
|
2665
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2666
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2667
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2668
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2669
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2656
2670
|
};
|
|
2657
2671
|
|
|
2658
|
-
module.exports.
|
|
2659
|
-
const ret =
|
|
2672
|
+
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2673
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2660
2674
|
return addHeapObject(ret);
|
|
2661
2675
|
};
|
|
2662
2676
|
|
|
2663
|
-
module.exports.
|
|
2664
|
-
const ret =
|
|
2677
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2678
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2665
2679
|
return addHeapObject(ret);
|
|
2666
2680
|
};
|
|
2667
2681
|
|
|
2668
|
-
module.exports.
|
|
2669
|
-
const ret =
|
|
2682
|
+
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2683
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2670
2684
|
return addHeapObject(ret);
|
|
2671
2685
|
};
|
|
2672
2686
|
|
|
@@ -2675,13 +2689,9 @@ module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
|
2675
2689
|
return addHeapObject(ret);
|
|
2676
2690
|
};
|
|
2677
2691
|
|
|
2678
|
-
module.exports.
|
|
2679
|
-
const
|
|
2680
|
-
|
|
2681
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2682
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2683
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2684
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2692
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2693
|
+
const ret = getObject(arg0);
|
|
2694
|
+
return addHeapObject(ret);
|
|
2685
2695
|
};
|
|
2686
2696
|
|
|
2687
2697
|
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
@@ -2689,13 +2699,13 @@ module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
|
2689
2699
|
return addHeapObject(ret);
|
|
2690
2700
|
};
|
|
2691
2701
|
|
|
2692
|
-
module.exports.
|
|
2693
|
-
const ret =
|
|
2702
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2703
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2694
2704
|
return addHeapObject(ret);
|
|
2695
2705
|
};
|
|
2696
2706
|
|
|
2697
|
-
module.exports.
|
|
2698
|
-
const ret =
|
|
2707
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2708
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2699
2709
|
return addHeapObject(ret);
|
|
2700
2710
|
};
|
|
2701
2711
|
|
|
@@ -2704,16 +2714,6 @@ module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
|
2704
2714
|
return addHeapObject(ret);
|
|
2705
2715
|
};
|
|
2706
2716
|
|
|
2707
|
-
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2708
|
-
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2709
|
-
return addHeapObject(ret);
|
|
2710
|
-
};
|
|
2711
|
-
|
|
2712
|
-
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2713
|
-
const ret = WasmWallet.__wrap(arg0);
|
|
2714
|
-
return addHeapObject(ret);
|
|
2715
|
-
};
|
|
2716
|
-
|
|
2717
2717
|
module.exports.__wbindgen_is_object = function(arg0) {
|
|
2718
2718
|
const val = getObject(arg0);
|
|
2719
2719
|
const ret = typeof(val) === 'object' && val !== null;
|
|
@@ -2745,7 +2745,7 @@ module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
|
2745
2745
|
return addHeapObject(ret);
|
|
2746
2746
|
};
|
|
2747
2747
|
|
|
2748
|
-
module.exports.
|
|
2748
|
+
module.exports.__wbg_flushdata_43f1541fff3d78bd = function(arg0, arg1) {
|
|
2749
2749
|
let deferred0_0;
|
|
2750
2750
|
let deferred0_1;
|
|
2751
2751
|
try {
|
|
@@ -2757,7 +2757,7 @@ module.exports.__wbg_flushdata_18a251eb49cec9a9 = function(arg0, arg1) {
|
|
|
2757
2757
|
}
|
|
2758
2758
|
};
|
|
2759
2759
|
|
|
2760
|
-
module.exports.
|
|
2760
|
+
module.exports.__wbg_readvalue_0a9c92750448f1d1 = function() { return handleError(function (arg0, arg1) {
|
|
2761
2761
|
let deferred0_0;
|
|
2762
2762
|
let deferred0_1;
|
|
2763
2763
|
try {
|
|
@@ -2770,15 +2770,15 @@ module.exports.__wbg_readvalue_63d41520b484fd87 = function() { return handleErro
|
|
|
2770
2770
|
}
|
|
2771
2771
|
}, arguments) };
|
|
2772
2772
|
|
|
2773
|
-
module.exports.
|
|
2773
|
+
module.exports.__wbg_loadwallet_5cd451ac436ab682 = function() {
|
|
2774
2774
|
MsgHandler.load_wallet();
|
|
2775
2775
|
};
|
|
2776
2776
|
|
|
2777
|
-
module.exports.
|
|
2777
|
+
module.exports.__wbg_savewallet_6826e875e5dd251b = function() {
|
|
2778
2778
|
MsgHandler.save_wallet();
|
|
2779
2779
|
};
|
|
2780
2780
|
|
|
2781
|
-
module.exports.
|
|
2781
|
+
module.exports.__wbg_writevalue_cf07df01ae9d9d9b = function(arg0, arg1, arg2) {
|
|
2782
2782
|
let deferred0_0;
|
|
2783
2783
|
let deferred0_1;
|
|
2784
2784
|
try {
|
|
@@ -2790,7 +2790,7 @@ module.exports.__wbg_writevalue_9096a95d5621ed81 = function(arg0, arg1, arg2) {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
};
|
|
2792
2792
|
|
|
2793
|
-
module.exports.
|
|
2793
|
+
module.exports.__wbg_appendvalue_3d3f4ddc7cd7f668 = function(arg0, arg1, arg2) {
|
|
2794
2794
|
let deferred0_0;
|
|
2795
2795
|
let deferred0_1;
|
|
2796
2796
|
try {
|
|
@@ -2802,7 +2802,7 @@ module.exports.__wbg_appendvalue_72e46d3bea542087 = function(arg0, arg1, arg2) {
|
|
|
2802
2802
|
}
|
|
2803
2803
|
};
|
|
2804
2804
|
|
|
2805
|
-
module.exports.
|
|
2805
|
+
module.exports.__wbg_removevalue_f5900816b911805e = function() { return handleError(function (arg0, arg1) {
|
|
2806
2806
|
let deferred0_0;
|
|
2807
2807
|
let deferred0_1;
|
|
2808
2808
|
try {
|
|
@@ -2815,11 +2815,11 @@ module.exports.__wbg_removevalue_f0a580705086fe4e = function() { return handleEr
|
|
|
2815
2815
|
}
|
|
2816
2816
|
}, arguments) };
|
|
2817
2817
|
|
|
2818
|
-
module.exports.
|
|
2818
|
+
module.exports.__wbg_sendmessage_6d75e3e0b6cbcdea = function(arg0, arg1) {
|
|
2819
2819
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2820
2820
|
};
|
|
2821
2821
|
|
|
2822
|
-
module.exports.
|
|
2822
|
+
module.exports.__wbg_connecttopeer_0dbfd6477b38b460 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2823
2823
|
let deferred0_0;
|
|
2824
2824
|
let deferred0_1;
|
|
2825
2825
|
try {
|
|
@@ -2832,14 +2832,14 @@ module.exports.__wbg_connecttopeer_6324d1d563208b33 = function() { return handle
|
|
|
2832
2832
|
}
|
|
2833
2833
|
}, arguments) };
|
|
2834
2834
|
|
|
2835
|
-
module.exports.
|
|
2835
|
+
module.exports.__wbg_getmyservices_671fa3941c07e37c = function() {
|
|
2836
2836
|
const ret = MsgHandler.get_my_services();
|
|
2837
2837
|
_assertClass(ret, WasmPeerServiceList);
|
|
2838
2838
|
var ptr1 = ret.__destroy_into_raw();
|
|
2839
2839
|
return ptr1;
|
|
2840
2840
|
};
|
|
2841
2841
|
|
|
2842
|
-
module.exports.
|
|
2842
|
+
module.exports.__wbg_isexistingfile_9c5802df7eec1b8c = function() { return handleError(function (arg0, arg1) {
|
|
2843
2843
|
let deferred0_0;
|
|
2844
2844
|
let deferred0_1;
|
|
2845
2845
|
try {
|
|
@@ -2852,33 +2852,33 @@ module.exports.__wbg_isexistingfile_066460c532232f85 = function() { return handl
|
|
|
2852
2852
|
}
|
|
2853
2853
|
}, arguments) };
|
|
2854
2854
|
|
|
2855
|
-
module.exports.
|
|
2855
|
+
module.exports.__wbg_processapicall_84802524f4b72626 = function(arg0, arg1, arg2) {
|
|
2856
2856
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2857
2857
|
};
|
|
2858
2858
|
|
|
2859
|
-
module.exports.
|
|
2859
|
+
module.exports.__wbg_processapierror_d543c65b7ba51917 = function(arg0, arg1, arg2) {
|
|
2860
2860
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2861
2861
|
};
|
|
2862
2862
|
|
|
2863
|
-
module.exports.
|
|
2863
|
+
module.exports.__wbg_processapisuccess_346f01f1e249ab95 = function(arg0, arg1, arg2) {
|
|
2864
2864
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2865
2865
|
};
|
|
2866
2866
|
|
|
2867
|
-
module.exports.
|
|
2867
|
+
module.exports.__wbg_sendmessagetoall_8b367c13a928c498 = function(arg0, arg1) {
|
|
2868
2868
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2869
2869
|
};
|
|
2870
2870
|
|
|
2871
|
-
module.exports.
|
|
2871
|
+
module.exports.__wbg_disconnectfrompeer_eb1d4acfd8e133d3 = function() { return handleError(function (arg0) {
|
|
2872
2872
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2873
2873
|
return addHeapObject(ret);
|
|
2874
2874
|
}, arguments) };
|
|
2875
2875
|
|
|
2876
|
-
module.exports.
|
|
2876
|
+
module.exports.__wbg_loadblockfilelist_e8a6bbf7850e77ec = function() { return handleError(function () {
|
|
2877
2877
|
const ret = MsgHandler.load_block_file_list();
|
|
2878
2878
|
return addHeapObject(ret);
|
|
2879
2879
|
}, arguments) };
|
|
2880
2880
|
|
|
2881
|
-
module.exports.
|
|
2881
|
+
module.exports.__wbg_sendinterfaceevent_478dfe7c1d77edc1 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2882
2882
|
let deferred0_0;
|
|
2883
2883
|
let deferred0_1;
|
|
2884
2884
|
let deferred1_0;
|
|
@@ -2895,7 +2895,7 @@ module.exports.__wbg_sendinterfaceevent_0f5591a40cdc28a0 = function(arg0, arg1,
|
|
|
2895
2895
|
}
|
|
2896
2896
|
};
|
|
2897
2897
|
|
|
2898
|
-
module.exports.
|
|
2898
|
+
module.exports.__wbg_sendblocksuccess_50f30a221c95ccb2 = function(arg0, arg1, arg2) {
|
|
2899
2899
|
let deferred0_0;
|
|
2900
2900
|
let deferred0_1;
|
|
2901
2901
|
try {
|
|
@@ -2907,11 +2907,11 @@ module.exports.__wbg_sendblocksuccess_331ed20b601c69a1 = function(arg0, arg1, ar
|
|
|
2907
2907
|
}
|
|
2908
2908
|
};
|
|
2909
2909
|
|
|
2910
|
-
module.exports.
|
|
2910
|
+
module.exports.__wbg_sendwalletupdate_f56f83f3e07b49a9 = function() {
|
|
2911
2911
|
MsgHandler.send_wallet_update();
|
|
2912
2912
|
};
|
|
2913
2913
|
|
|
2914
|
-
module.exports.
|
|
2914
|
+
module.exports.__wbg_sendnewversionalert_cf706b447638507f = function(arg0, arg1, arg2) {
|
|
2915
2915
|
let deferred0_0;
|
|
2916
2916
|
let deferred0_1;
|
|
2917
2917
|
try {
|
|
@@ -2923,15 +2923,15 @@ module.exports.__wbg_sendnewversionalert_0668d8f5d25f4178 = function(arg0, arg1,
|
|
|
2923
2923
|
}
|
|
2924
2924
|
};
|
|
2925
2925
|
|
|
2926
|
-
module.exports.
|
|
2926
|
+
module.exports.__wbg_sendblockfetchstatusevent_34b0e8fb201fbfc5 = function(arg0) {
|
|
2927
2927
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2928
2928
|
};
|
|
2929
2929
|
|
|
2930
|
-
module.exports.
|
|
2930
|
+
module.exports.__wbg_sendnewchaindetectedevent_3ebfc9ce48ce2f00 = function() {
|
|
2931
2931
|
MsgHandler.send_new_chain_detected_event();
|
|
2932
2932
|
};
|
|
2933
2933
|
|
|
2934
|
-
module.exports.
|
|
2934
|
+
module.exports.__wbg_fetchblockfrompeer_42bdb36ab5eb6374 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2935
2935
|
let deferred0_0;
|
|
2936
2936
|
let deferred0_1;
|
|
2937
2937
|
try {
|
|
@@ -2944,7 +2944,7 @@ module.exports.__wbg_fetchblockfrompeer_07c7276e8f9a93fe = function() { return h
|
|
|
2944
2944
|
}
|
|
2945
2945
|
}, arguments) };
|
|
2946
2946
|
|
|
2947
|
-
module.exports.
|
|
2947
|
+
module.exports.__wbg_ensureblockdirectoryexists_2eeab9246fcb6206 = function() { return handleError(function (arg0, arg1) {
|
|
2948
2948
|
let deferred0_0;
|
|
2949
2949
|
let deferred0_1;
|
|
2950
2950
|
try {
|