saito-wasm 0.2.178 → 0.2.179
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 +142 -142
- package/pkg/node/index.js +297 -297
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +142 -142
- package/pkg/web/index.js +293 -293
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-aa917f543b5208b0 → saito-wasm-cb5d42cd87cbad30}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-aa917f543b5208b0 → saito-wasm-cb5d42cd87cbad30}/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-cb5d42cd87cbad30/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
7
|
const heap = new Array(128).fill(undefined);
|
|
@@ -12,6 +12,15 @@ function getObject(idx) { return heap[idx]; }
|
|
|
12
12
|
|
|
13
13
|
let heap_next = heap.length;
|
|
14
14
|
|
|
15
|
+
function addHeapObject(obj) {
|
|
16
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
17
|
+
const idx = heap_next;
|
|
18
|
+
heap_next = heap[idx];
|
|
19
|
+
|
|
20
|
+
heap[idx] = obj;
|
|
21
|
+
return idx;
|
|
22
|
+
}
|
|
23
|
+
|
|
15
24
|
function dropObject(idx) {
|
|
16
25
|
if (idx < 132) return;
|
|
17
26
|
heap[idx] = heap_next;
|
|
@@ -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');
|
|
@@ -235,74 +235,51 @@ function _assertClass(instance, klass) {
|
|
|
235
235
|
return instance.ptr;
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
|
-
* @
|
|
239
|
-
* @returns {Promise<void>}
|
|
240
|
-
*/
|
|
241
|
-
module.exports.write_issuance_file = function(threshold) {
|
|
242
|
-
const ret = wasm.write_issuance_file(threshold);
|
|
243
|
-
return takeObject(ret);
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* @param {bigint} num
|
|
248
|
-
* @param {bigint} deposit
|
|
249
|
-
* @param {Uint8Array} tx_msg
|
|
250
|
-
* @param {bigint} fee
|
|
251
|
-
* @param {string} recipient_public_key
|
|
252
|
-
* @param {string} nft_type
|
|
253
|
-
* @returns {Promise<WasmTransaction>}
|
|
254
|
-
*/
|
|
255
|
-
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
256
|
-
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
257
|
-
return takeObject(ret);
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* @returns {Promise<boolean>}
|
|
238
|
+
* @returns {Promise<Array<any>>}
|
|
262
239
|
*/
|
|
263
|
-
module.exports.
|
|
264
|
-
const ret = wasm.
|
|
240
|
+
module.exports.get_mempool_txs = function() {
|
|
241
|
+
const ret = wasm.get_mempool_txs();
|
|
265
242
|
return takeObject(ret);
|
|
266
243
|
};
|
|
267
244
|
|
|
268
245
|
/**
|
|
269
|
-
* @param {
|
|
246
|
+
* @param {bigint} peer_index
|
|
270
247
|
* @returns {Promise<void>}
|
|
271
248
|
*/
|
|
272
|
-
module.exports.
|
|
273
|
-
|
|
274
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
275
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
249
|
+
module.exports.remove_stun_peer = function(peer_index) {
|
|
250
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
276
251
|
return takeObject(ret);
|
|
277
252
|
};
|
|
278
253
|
|
|
279
254
|
/**
|
|
280
|
-
* @
|
|
255
|
+
* @param {string} slip1_utxo_key
|
|
256
|
+
* @param {string} slip2_utxo_key
|
|
257
|
+
* @param {string} slip3_utxo_key
|
|
258
|
+
* @param {number} left_count
|
|
259
|
+
* @param {number} right_count
|
|
260
|
+
* @param {Uint8Array} tx_msg
|
|
261
|
+
* @returns {Promise<WasmTransaction>}
|
|
281
262
|
*/
|
|
282
|
-
module.exports.
|
|
283
|
-
const ret = wasm.
|
|
263
|
+
module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
264
|
+
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));
|
|
284
265
|
return takeObject(ret);
|
|
285
266
|
};
|
|
286
267
|
|
|
287
268
|
/**
|
|
288
|
-
* @param {Uint8Array} hash
|
|
289
|
-
* @param {bigint} block_id
|
|
290
269
|
* @param {bigint} peer_index
|
|
270
|
+
* @param {string} ip
|
|
291
271
|
* @returns {Promise<void>}
|
|
292
272
|
*/
|
|
293
|
-
module.exports.
|
|
294
|
-
const ret = wasm.
|
|
273
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
274
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
295
275
|
return takeObject(ret);
|
|
296
276
|
};
|
|
297
277
|
|
|
298
278
|
/**
|
|
299
|
-
* @
|
|
300
|
-
* @param {number} msg_index
|
|
301
|
-
* @param {bigint} peer_index
|
|
302
|
-
* @returns {Promise<void>}
|
|
279
|
+
* @returns {Promise<string>}
|
|
303
280
|
*/
|
|
304
|
-
module.exports.
|
|
305
|
-
const ret = wasm.
|
|
281
|
+
module.exports.get_stats = function() {
|
|
282
|
+
const ret = wasm.get_stats();
|
|
306
283
|
return takeObject(ret);
|
|
307
284
|
};
|
|
308
285
|
|
|
@@ -319,18 +296,44 @@ module.exports.create_transaction_with_multiple_payments = function(public_keys,
|
|
|
319
296
|
};
|
|
320
297
|
|
|
321
298
|
/**
|
|
299
|
+
* @param {string} private_key
|
|
322
300
|
* @returns {string}
|
|
323
301
|
*/
|
|
324
|
-
module.exports.
|
|
325
|
-
|
|
302
|
+
module.exports.generate_public_key = function(private_key) {
|
|
303
|
+
try {
|
|
304
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
305
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
306
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
307
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
308
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
309
|
+
if (r2) {
|
|
310
|
+
throw takeObject(r1);
|
|
311
|
+
}
|
|
312
|
+
return takeObject(r0);
|
|
313
|
+
} finally {
|
|
314
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* @param {bigint} num
|
|
320
|
+
* @param {bigint} deposit
|
|
321
|
+
* @param {Uint8Array} tx_msg
|
|
322
|
+
* @param {bigint} fee
|
|
323
|
+
* @param {string} recipient_public_key
|
|
324
|
+
* @param {string} nft_type
|
|
325
|
+
* @returns {Promise<WasmTransaction>}
|
|
326
|
+
*/
|
|
327
|
+
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
328
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
326
329
|
return takeObject(ret);
|
|
327
330
|
};
|
|
328
331
|
|
|
329
332
|
/**
|
|
330
|
-
* @returns {Promise<
|
|
333
|
+
* @returns {Promise<boolean>}
|
|
331
334
|
*/
|
|
332
|
-
module.exports.
|
|
333
|
-
const ret = wasm.
|
|
335
|
+
module.exports.produce_block_with_gt = function() {
|
|
336
|
+
const ret = wasm.produce_block_with_gt();
|
|
334
337
|
return takeObject(ret);
|
|
335
338
|
};
|
|
336
339
|
|
|
@@ -343,210 +346,193 @@ module.exports.disable_producing_blocks_by_timer = function() {
|
|
|
343
346
|
};
|
|
344
347
|
|
|
345
348
|
/**
|
|
346
|
-
* @param {
|
|
347
|
-
* @param {bigint} peer_index
|
|
349
|
+
* @param {WasmTransaction} tx
|
|
348
350
|
* @returns {Promise<void>}
|
|
349
351
|
*/
|
|
350
|
-
module.exports.
|
|
351
|
-
|
|
352
|
+
module.exports.propagate_transaction = function(tx) {
|
|
353
|
+
_assertClass(tx, WasmTransaction);
|
|
354
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
352
355
|
return takeObject(ret);
|
|
353
356
|
};
|
|
354
357
|
|
|
355
358
|
/**
|
|
356
|
-
* @
|
|
357
|
-
* @returns {Promise<void>}
|
|
359
|
+
* @returns {string}
|
|
358
360
|
*/
|
|
359
|
-
module.exports.
|
|
360
|
-
const ret = wasm.
|
|
361
|
+
module.exports.generate_private_key = function() {
|
|
362
|
+
const ret = wasm.generate_private_key();
|
|
361
363
|
return takeObject(ret);
|
|
362
364
|
};
|
|
363
365
|
|
|
364
366
|
/**
|
|
365
367
|
* @param {Uint8Array} buffer
|
|
366
|
-
* @param {
|
|
368
|
+
* @param {Uint8Array} hash
|
|
369
|
+
* @param {bigint} block_id
|
|
367
370
|
* @param {bigint} peer_index
|
|
368
371
|
* @returns {Promise<void>}
|
|
369
372
|
*/
|
|
370
|
-
module.exports.
|
|
371
|
-
const ret = wasm.
|
|
373
|
+
module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
|
|
374
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
372
375
|
return takeObject(ret);
|
|
373
376
|
};
|
|
374
377
|
|
|
375
378
|
/**
|
|
376
|
-
* @
|
|
379
|
+
* @param {bigint} peer_index
|
|
380
|
+
* @param {string} public_key
|
|
381
|
+
* @returns {Promise<void>}
|
|
377
382
|
*/
|
|
378
|
-
module.exports.
|
|
379
|
-
const ret = wasm.
|
|
383
|
+
module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
384
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
380
385
|
return takeObject(ret);
|
|
381
386
|
};
|
|
382
387
|
|
|
383
388
|
/**
|
|
384
|
-
* @param {string}
|
|
385
|
-
* @
|
|
389
|
+
* @param {string} slip1_utxo_key
|
|
390
|
+
* @param {string} slip2_utxo_key
|
|
391
|
+
* @param {string} slip3_utxo_key
|
|
392
|
+
* @param {Uint8Array} tx_msg
|
|
393
|
+
* @returns {Promise<WasmTransaction>}
|
|
386
394
|
*/
|
|
387
|
-
module.exports.
|
|
388
|
-
const ret = wasm.
|
|
395
|
+
module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, tx_msg) {
|
|
396
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(tx_msg));
|
|
389
397
|
return takeObject(ret);
|
|
390
398
|
};
|
|
391
399
|
|
|
392
400
|
/**
|
|
393
|
-
* @
|
|
401
|
+
* @param {Array<any>} keys
|
|
402
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
394
403
|
*/
|
|
395
|
-
module.exports.
|
|
396
|
-
const ret = wasm.
|
|
404
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
405
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
397
406
|
return takeObject(ret);
|
|
398
407
|
};
|
|
399
408
|
|
|
400
409
|
/**
|
|
401
|
-
* @param {
|
|
402
|
-
* @param {
|
|
403
|
-
* @returns {
|
|
410
|
+
* @param {Uint8Array} buffer
|
|
411
|
+
* @param {string} private_key
|
|
412
|
+
* @returns {string}
|
|
404
413
|
*/
|
|
405
|
-
module.exports.
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
414
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
415
|
+
try {
|
|
416
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
417
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
418
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
419
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
420
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
421
|
+
if (r2) {
|
|
422
|
+
throw takeObject(r1);
|
|
423
|
+
}
|
|
424
|
+
return takeObject(r0);
|
|
425
|
+
} finally {
|
|
426
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
427
|
+
}
|
|
410
428
|
};
|
|
411
429
|
|
|
412
430
|
/**
|
|
413
|
-
* @
|
|
414
|
-
* @returns {Promise<void>}
|
|
431
|
+
* @returns {Promise<boolean>}
|
|
415
432
|
*/
|
|
416
|
-
module.exports.
|
|
417
|
-
const ret = wasm.
|
|
433
|
+
module.exports.produce_block_without_gt = function() {
|
|
434
|
+
const ret = wasm.produce_block_without_gt();
|
|
418
435
|
return takeObject(ret);
|
|
419
436
|
};
|
|
420
437
|
|
|
421
438
|
/**
|
|
422
|
-
* @param {
|
|
439
|
+
* @param {bigint} threshold
|
|
423
440
|
* @returns {Promise<void>}
|
|
424
441
|
*/
|
|
425
|
-
module.exports.
|
|
426
|
-
|
|
427
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
428
|
-
return takeObject(ret);
|
|
429
|
-
};
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* @param {string} public_key
|
|
433
|
-
* @param {bigint} amount
|
|
434
|
-
* @param {bigint} fee
|
|
435
|
-
* @param {boolean} force_merge
|
|
436
|
-
* @returns {Promise<WasmTransaction>}
|
|
437
|
-
*/
|
|
438
|
-
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
439
|
-
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
442
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
443
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
440
444
|
return takeObject(ret);
|
|
441
445
|
};
|
|
442
446
|
|
|
443
447
|
/**
|
|
448
|
+
* @param {string} config_json
|
|
449
|
+
* @param {string} private_key
|
|
450
|
+
* @param {number} log_level_num
|
|
451
|
+
* @param {bigint} hasten_multiplier
|
|
452
|
+
* @param {boolean} delete_old_blocks
|
|
444
453
|
* @returns {Promise<any>}
|
|
445
454
|
*/
|
|
446
|
-
module.exports.
|
|
447
|
-
const ret = wasm.
|
|
455
|
+
module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
456
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
448
457
|
return takeObject(ret);
|
|
449
458
|
};
|
|
450
459
|
|
|
451
460
|
/**
|
|
452
|
-
* @
|
|
453
|
-
* @param {string} public_key
|
|
454
|
-
* @returns {Promise<void>}
|
|
461
|
+
* @returns {Promise<Array<any>>}
|
|
455
462
|
*/
|
|
456
|
-
module.exports.
|
|
457
|
-
const ret = wasm.
|
|
463
|
+
module.exports.get_nft_list = function() {
|
|
464
|
+
const ret = wasm.get_nft_list();
|
|
458
465
|
return takeObject(ret);
|
|
459
466
|
};
|
|
460
467
|
|
|
461
468
|
/**
|
|
462
|
-
* @
|
|
463
|
-
* @returns {string}
|
|
464
|
-
*/
|
|
465
|
-
module.exports.generate_public_key = function(private_key) {
|
|
466
|
-
try {
|
|
467
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
468
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
469
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
470
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
471
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
472
|
-
if (r2) {
|
|
473
|
-
throw takeObject(r1);
|
|
474
|
-
}
|
|
475
|
-
return takeObject(r0);
|
|
476
|
-
} finally {
|
|
477
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* @param {Uint8Array} buffer
|
|
483
|
-
* @param {string} signature
|
|
484
|
-
* @param {string} public_key
|
|
485
|
-
* @returns {boolean}
|
|
469
|
+
* @returns {Promise<Array<any>>}
|
|
486
470
|
*/
|
|
487
|
-
module.exports.
|
|
488
|
-
const ret = wasm.
|
|
489
|
-
return ret
|
|
471
|
+
module.exports.get_peers = function() {
|
|
472
|
+
const ret = wasm.get_peers();
|
|
473
|
+
return takeObject(ret);
|
|
490
474
|
};
|
|
491
475
|
|
|
492
476
|
/**
|
|
493
|
-
* @param {Uint8Array}
|
|
494
|
-
* @param {
|
|
495
|
-
* @
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
502
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
503
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
504
|
-
if (r2) {
|
|
505
|
-
throw takeObject(r1);
|
|
506
|
-
}
|
|
507
|
-
return takeObject(r0);
|
|
508
|
-
} finally {
|
|
509
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
510
|
-
}
|
|
477
|
+
* @param {Uint8Array} hash
|
|
478
|
+
* @param {bigint} block_id
|
|
479
|
+
* @param {bigint} peer_index
|
|
480
|
+
* @returns {Promise<void>}
|
|
481
|
+
*/
|
|
482
|
+
module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
|
|
483
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
484
|
+
return takeObject(ret);
|
|
511
485
|
};
|
|
512
486
|
|
|
513
487
|
/**
|
|
514
|
-
* @
|
|
488
|
+
* @param {Uint8Array} buffer
|
|
489
|
+
* @param {number} msg_index
|
|
490
|
+
* @param {bigint} peer_index
|
|
491
|
+
* @returns {Promise<void>}
|
|
515
492
|
*/
|
|
516
|
-
module.exports.
|
|
517
|
-
const ret = wasm.
|
|
493
|
+
module.exports.send_api_error = function(buffer, msg_index, peer_index) {
|
|
494
|
+
const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
|
|
518
495
|
return takeObject(ret);
|
|
519
496
|
};
|
|
520
497
|
|
|
521
498
|
/**
|
|
499
|
+
* @param {Uint8Array} buffer
|
|
522
500
|
* @param {bigint} peer_index
|
|
523
|
-
* @param {string} ip
|
|
524
501
|
* @returns {Promise<void>}
|
|
525
502
|
*/
|
|
526
|
-
module.exports.
|
|
527
|
-
const ret = wasm.
|
|
503
|
+
module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
|
|
504
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
528
505
|
return takeObject(ret);
|
|
529
506
|
};
|
|
530
507
|
|
|
531
508
|
/**
|
|
532
|
-
* @
|
|
533
|
-
* @param {string} private_key
|
|
534
|
-
* @param {number} log_level_num
|
|
535
|
-
* @param {bigint} hasten_multiplier
|
|
536
|
-
* @param {boolean} delete_old_blocks
|
|
537
|
-
* @returns {Promise<any>}
|
|
509
|
+
* @returns {Promise<string>}
|
|
538
510
|
*/
|
|
539
|
-
module.exports.
|
|
540
|
-
const ret = wasm.
|
|
511
|
+
module.exports.get_peer_stats = function() {
|
|
512
|
+
const ret = wasm.get_peer_stats();
|
|
541
513
|
return takeObject(ret);
|
|
542
514
|
};
|
|
543
515
|
|
|
544
516
|
/**
|
|
545
|
-
* @param {
|
|
546
|
-
* @
|
|
517
|
+
* @param {bigint} amt
|
|
518
|
+
* @param {string} slip1_utxo_key
|
|
519
|
+
* @param {string} slip2_utxo_key
|
|
520
|
+
* @param {string} slip3_utxo_key
|
|
521
|
+
* @param {string} recipient_public_key
|
|
522
|
+
* @param {Uint8Array} tx_msg
|
|
523
|
+
* @returns {Promise<WasmTransaction>}
|
|
547
524
|
*/
|
|
548
|
-
module.exports.
|
|
549
|
-
const ret = wasm.
|
|
525
|
+
module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
526
|
+
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));
|
|
527
|
+
return takeObject(ret);
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* @param {Uint8Array} buffer
|
|
532
|
+
* @returns {string}
|
|
533
|
+
*/
|
|
534
|
+
module.exports.hash = function(buffer) {
|
|
535
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
550
536
|
return takeObject(ret);
|
|
551
537
|
};
|
|
552
538
|
|
|
@@ -562,11 +548,14 @@ module.exports.send_api_call = function(buffer, msg_index, peer_index) {
|
|
|
562
548
|
};
|
|
563
549
|
|
|
564
550
|
/**
|
|
565
|
-
* @
|
|
551
|
+
* @param {Uint8Array} buffer
|
|
552
|
+
* @param {string} signature
|
|
553
|
+
* @param {string} public_key
|
|
554
|
+
* @returns {boolean}
|
|
566
555
|
*/
|
|
567
|
-
module.exports.
|
|
568
|
-
const ret = wasm.
|
|
569
|
-
return
|
|
556
|
+
module.exports.verify_signature = function(buffer, signature, public_key) {
|
|
557
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
558
|
+
return ret !== 0;
|
|
570
559
|
};
|
|
571
560
|
|
|
572
561
|
/**
|
|
@@ -579,91 +568,83 @@ module.exports.get_peer = function(peer_index) {
|
|
|
579
568
|
};
|
|
580
569
|
|
|
581
570
|
/**
|
|
582
|
-
* @
|
|
583
|
-
* @returns {Promise<void>}
|
|
571
|
+
* @returns {Promise<string>}
|
|
584
572
|
*/
|
|
585
|
-
module.exports.
|
|
586
|
-
const ret = wasm.
|
|
573
|
+
module.exports.get_congestion_stats = function() {
|
|
574
|
+
const ret = wasm.get_congestion_stats();
|
|
587
575
|
return takeObject(ret);
|
|
588
576
|
};
|
|
589
577
|
|
|
590
578
|
/**
|
|
591
|
-
* @param {
|
|
592
|
-
* @
|
|
593
|
-
* @param {string} slip3_utxo_key
|
|
594
|
-
* @param {Uint8Array} tx_msg
|
|
595
|
-
* @returns {Promise<WasmTransaction>}
|
|
579
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
580
|
+
* @returns {Promise<void>}
|
|
596
581
|
*/
|
|
597
|
-
module.exports.
|
|
598
|
-
|
|
582
|
+
module.exports.update_from_balance_snapshot = function(snapshot) {
|
|
583
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
584
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
585
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
599
586
|
return takeObject(ret);
|
|
600
587
|
};
|
|
601
588
|
|
|
602
589
|
/**
|
|
603
|
-
* @returns {Promise<
|
|
590
|
+
* @returns {Promise<WasmWallet>}
|
|
604
591
|
*/
|
|
605
|
-
module.exports.
|
|
606
|
-
const ret = wasm.
|
|
592
|
+
module.exports.get_wallet = function() {
|
|
593
|
+
const ret = wasm.get_wallet();
|
|
607
594
|
return takeObject(ret);
|
|
608
595
|
};
|
|
609
596
|
|
|
610
597
|
/**
|
|
611
|
-
* @
|
|
612
|
-
* @param {Uint8Array} hash
|
|
613
|
-
* @param {bigint} block_id
|
|
614
|
-
* @param {bigint} peer_index
|
|
615
|
-
* @returns {Promise<void>}
|
|
598
|
+
* @returns {Promise<WasmBlockchain>}
|
|
616
599
|
*/
|
|
617
|
-
module.exports.
|
|
618
|
-
const ret = wasm.
|
|
600
|
+
module.exports.get_blockchain = function() {
|
|
601
|
+
const ret = wasm.get_blockchain();
|
|
619
602
|
return takeObject(ret);
|
|
620
603
|
};
|
|
621
604
|
|
|
622
605
|
/**
|
|
623
606
|
* @param {string} public_key
|
|
624
|
-
* @
|
|
607
|
+
* @param {bigint} amount
|
|
608
|
+
* @param {bigint} fee
|
|
609
|
+
* @param {boolean} force_merge
|
|
610
|
+
* @returns {Promise<WasmTransaction>}
|
|
625
611
|
*/
|
|
626
|
-
module.exports.
|
|
627
|
-
const ret = wasm.
|
|
612
|
+
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
613
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
628
614
|
return takeObject(ret);
|
|
629
615
|
};
|
|
630
616
|
|
|
631
617
|
/**
|
|
632
|
-
* @
|
|
633
|
-
* @returns {string}
|
|
618
|
+
* @returns {Promise<void>}
|
|
634
619
|
*/
|
|
635
|
-
module.exports.
|
|
636
|
-
const ret = wasm.
|
|
620
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
621
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
637
622
|
return takeObject(ret);
|
|
638
623
|
};
|
|
639
624
|
|
|
640
625
|
/**
|
|
641
|
-
* @
|
|
626
|
+
* @param {bigint} duration_in_ms
|
|
627
|
+
* @returns {Promise<void>}
|
|
642
628
|
*/
|
|
643
|
-
module.exports.
|
|
644
|
-
const ret = wasm.
|
|
629
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
630
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
645
631
|
return takeObject(ret);
|
|
646
632
|
};
|
|
647
633
|
|
|
648
634
|
/**
|
|
649
|
-
* @param {bigint}
|
|
650
|
-
* @
|
|
651
|
-
* @param {string} slip2_utxo_key
|
|
652
|
-
* @param {string} slip3_utxo_key
|
|
653
|
-
* @param {string} recipient_public_key
|
|
654
|
-
* @param {Uint8Array} tx_msg
|
|
655
|
-
* @returns {Promise<WasmTransaction>}
|
|
635
|
+
* @param {bigint} peer_index
|
|
636
|
+
* @returns {Promise<void>}
|
|
656
637
|
*/
|
|
657
|
-
module.exports.
|
|
658
|
-
const ret = wasm.
|
|
638
|
+
module.exports.process_peer_disconnection = function(peer_index) {
|
|
639
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
659
640
|
return takeObject(ret);
|
|
660
641
|
};
|
|
661
642
|
|
|
662
643
|
/**
|
|
663
|
-
* @returns {Promise<
|
|
644
|
+
* @returns {Promise<bigint>}
|
|
664
645
|
*/
|
|
665
|
-
module.exports.
|
|
666
|
-
const ret = wasm.
|
|
646
|
+
module.exports.get_next_peer_index = function() {
|
|
647
|
+
const ret = wasm.get_next_peer_index();
|
|
667
648
|
return takeObject(ret);
|
|
668
649
|
};
|
|
669
650
|
|
|
@@ -679,33 +660,23 @@ module.exports.set_wallet_version = function(major, minor, patch) {
|
|
|
679
660
|
};
|
|
680
661
|
|
|
681
662
|
/**
|
|
682
|
-
* @
|
|
663
|
+
* @param {string} block_hash
|
|
664
|
+
* @returns {Promise<WasmBlock>}
|
|
683
665
|
*/
|
|
684
|
-
module.exports.
|
|
685
|
-
const ret = wasm.
|
|
666
|
+
module.exports.get_block = function(block_hash) {
|
|
667
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
686
668
|
return takeObject(ret);
|
|
687
669
|
};
|
|
688
670
|
|
|
689
671
|
/**
|
|
690
|
-
* @param {string}
|
|
691
|
-
* @param {string} slip2_utxo_key
|
|
692
|
-
* @param {string} slip3_utxo_key
|
|
693
|
-
* @param {number} left_count
|
|
694
|
-
* @param {number} right_count
|
|
672
|
+
* @param {string} nft_id_hex
|
|
695
673
|
* @param {Uint8Array} tx_msg
|
|
696
674
|
* @returns {Promise<WasmTransaction>}
|
|
697
675
|
*/
|
|
698
|
-
module.exports.
|
|
699
|
-
const
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* @param {bigint} duration_in_ms
|
|
705
|
-
* @returns {Promise<void>}
|
|
706
|
-
*/
|
|
707
|
-
module.exports.process_timer_event = function(duration_in_ms) {
|
|
708
|
-
const ret = wasm.process_timer_event(duration_in_ms);
|
|
676
|
+
module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
|
|
677
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
678
|
+
const len0 = WASM_VECTOR_LEN;
|
|
679
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
709
680
|
return takeObject(ret);
|
|
710
681
|
};
|
|
711
682
|
|
|
@@ -719,18 +690,47 @@ module.exports.is_valid_public_key = function(key) {
|
|
|
719
690
|
};
|
|
720
691
|
|
|
721
692
|
/**
|
|
693
|
+
* @returns {Promise<string>}
|
|
694
|
+
*/
|
|
695
|
+
module.exports.get_latest_block_hash = function() {
|
|
696
|
+
const ret = wasm.get_latest_block_hash();
|
|
697
|
+
return takeObject(ret);
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* @returns {Promise<any>}
|
|
702
|
+
*/
|
|
703
|
+
module.exports.get_confirmations = function() {
|
|
704
|
+
const ret = wasm.get_confirmations();
|
|
705
|
+
return takeObject(ret);
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* @param {bigint} current_time
|
|
722
710
|
* @returns {Promise<void>}
|
|
723
711
|
*/
|
|
724
|
-
module.exports.
|
|
725
|
-
const ret = wasm.
|
|
712
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
713
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
726
714
|
return takeObject(ret);
|
|
727
715
|
};
|
|
728
716
|
|
|
729
717
|
/**
|
|
718
|
+
* @param {string} public_key
|
|
730
719
|
* @returns {Promise<Array<any>>}
|
|
731
720
|
*/
|
|
732
|
-
module.exports.
|
|
733
|
-
const ret = wasm.
|
|
721
|
+
module.exports.get_account_slips = function(public_key) {
|
|
722
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
723
|
+
return takeObject(ret);
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* @param {Uint8Array} buffer
|
|
728
|
+
* @param {number} msg_index
|
|
729
|
+
* @param {bigint} peer_index
|
|
730
|
+
* @returns {Promise<void>}
|
|
731
|
+
*/
|
|
732
|
+
module.exports.send_api_success = function(buffer, msg_index, peer_index) {
|
|
733
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
734
734
|
return takeObject(ret);
|
|
735
735
|
};
|
|
736
736
|
|
|
@@ -2681,6 +2681,11 @@ class WasmWalletSlip {
|
|
|
2681
2681
|
}
|
|
2682
2682
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2683
2683
|
|
|
2684
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2685
|
+
const ret = getObject(arg0);
|
|
2686
|
+
return addHeapObject(ret);
|
|
2687
|
+
};
|
|
2688
|
+
|
|
2684
2689
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2685
2690
|
takeObject(arg0);
|
|
2686
2691
|
};
|
|
@@ -2690,13 +2695,23 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
|
2690
2695
|
return addHeapObject(ret);
|
|
2691
2696
|
};
|
|
2692
2697
|
|
|
2698
|
+
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2699
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2700
|
+
return addHeapObject(ret);
|
|
2701
|
+
};
|
|
2702
|
+
|
|
2693
2703
|
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2694
2704
|
const ret = WasmSlip.__wrap(arg0);
|
|
2695
2705
|
return addHeapObject(ret);
|
|
2696
2706
|
};
|
|
2697
2707
|
|
|
2698
|
-
module.exports.
|
|
2699
|
-
const ret =
|
|
2708
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2709
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2710
|
+
return addHeapObject(ret);
|
|
2711
|
+
};
|
|
2712
|
+
|
|
2713
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2714
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2700
2715
|
return addHeapObject(ret);
|
|
2701
2716
|
};
|
|
2702
2717
|
|
|
@@ -2705,6 +2720,11 @@ module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
|
2705
2720
|
return addHeapObject(ret);
|
|
2706
2721
|
};
|
|
2707
2722
|
|
|
2723
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2724
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2725
|
+
return addHeapObject(ret);
|
|
2726
|
+
};
|
|
2727
|
+
|
|
2708
2728
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2709
2729
|
const obj = getObject(arg1);
|
|
2710
2730
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -2714,13 +2734,8 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
2714
2734
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2715
2735
|
};
|
|
2716
2736
|
|
|
2717
|
-
module.exports.
|
|
2718
|
-
const ret =
|
|
2719
|
-
return addHeapObject(ret);
|
|
2720
|
-
};
|
|
2721
|
-
|
|
2722
|
-
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2723
|
-
const ret = WasmBlockchain.__wrap(arg0);
|
|
2737
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2738
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2724
2739
|
return addHeapObject(ret);
|
|
2725
2740
|
};
|
|
2726
2741
|
|
|
@@ -2729,16 +2744,6 @@ module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
|
2729
2744
|
return addHeapObject(ret);
|
|
2730
2745
|
};
|
|
2731
2746
|
|
|
2732
|
-
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2733
|
-
const ret = WasmPeer.__wrap(arg0);
|
|
2734
|
-
return addHeapObject(ret);
|
|
2735
|
-
};
|
|
2736
|
-
|
|
2737
|
-
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2738
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
2739
|
-
return addHeapObject(ret);
|
|
2740
|
-
};
|
|
2741
|
-
|
|
2742
2747
|
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2743
2748
|
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2744
2749
|
return addHeapObject(ret);
|
|
@@ -2749,11 +2754,6 @@ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
|
2749
2754
|
return addHeapObject(ret);
|
|
2750
2755
|
};
|
|
2751
2756
|
|
|
2752
|
-
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2753
|
-
const ret = WasmWallet.__wrap(arg0);
|
|
2754
|
-
return addHeapObject(ret);
|
|
2755
|
-
};
|
|
2756
|
-
|
|
2757
2757
|
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2758
2758
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2759
2759
|
return addHeapObject(ret);
|
|
@@ -2785,7 +2785,7 @@ module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
|
2785
2785
|
return addHeapObject(ret);
|
|
2786
2786
|
};
|
|
2787
2787
|
|
|
2788
|
-
module.exports.
|
|
2788
|
+
module.exports.__wbg_flushdata_57a24af0b42b2a24 = function(arg0, arg1) {
|
|
2789
2789
|
let deferred0_0;
|
|
2790
2790
|
let deferred0_1;
|
|
2791
2791
|
try {
|
|
@@ -2797,7 +2797,7 @@ module.exports.__wbg_flushdata_e19f8531f715563c = function(arg0, arg1) {
|
|
|
2797
2797
|
}
|
|
2798
2798
|
};
|
|
2799
2799
|
|
|
2800
|
-
module.exports.
|
|
2800
|
+
module.exports.__wbg_readvalue_eda09e3e85f91c6e = function() { return handleError(function (arg0, arg1) {
|
|
2801
2801
|
let deferred0_0;
|
|
2802
2802
|
let deferred0_1;
|
|
2803
2803
|
try {
|
|
@@ -2810,15 +2810,15 @@ module.exports.__wbg_readvalue_d3282c9c5d63c751 = function() { return handleErro
|
|
|
2810
2810
|
}
|
|
2811
2811
|
}, arguments) };
|
|
2812
2812
|
|
|
2813
|
-
module.exports.
|
|
2813
|
+
module.exports.__wbg_loadwallet_b5182506283605ab = function() {
|
|
2814
2814
|
MsgHandler.load_wallet();
|
|
2815
2815
|
};
|
|
2816
2816
|
|
|
2817
|
-
module.exports.
|
|
2817
|
+
module.exports.__wbg_savewallet_1c5ab82d380b4271 = function() {
|
|
2818
2818
|
MsgHandler.save_wallet();
|
|
2819
2819
|
};
|
|
2820
2820
|
|
|
2821
|
-
module.exports.
|
|
2821
|
+
module.exports.__wbg_writevalue_d45c2dd3c8c56d4f = function(arg0, arg1, arg2) {
|
|
2822
2822
|
let deferred0_0;
|
|
2823
2823
|
let deferred0_1;
|
|
2824
2824
|
try {
|
|
@@ -2830,7 +2830,7 @@ module.exports.__wbg_writevalue_55ad59a477682cf4 = function(arg0, arg1, arg2) {
|
|
|
2830
2830
|
}
|
|
2831
2831
|
};
|
|
2832
2832
|
|
|
2833
|
-
module.exports.
|
|
2833
|
+
module.exports.__wbg_appendvalue_80a14b3de2c6810c = function(arg0, arg1, arg2) {
|
|
2834
2834
|
let deferred0_0;
|
|
2835
2835
|
let deferred0_1;
|
|
2836
2836
|
try {
|
|
@@ -2842,7 +2842,7 @@ module.exports.__wbg_appendvalue_9bad2e39591861df = function(arg0, arg1, arg2) {
|
|
|
2842
2842
|
}
|
|
2843
2843
|
};
|
|
2844
2844
|
|
|
2845
|
-
module.exports.
|
|
2845
|
+
module.exports.__wbg_removevalue_0bcbb4eb73cb550c = function() { return handleError(function (arg0, arg1) {
|
|
2846
2846
|
let deferred0_0;
|
|
2847
2847
|
let deferred0_1;
|
|
2848
2848
|
try {
|
|
@@ -2855,11 +2855,11 @@ module.exports.__wbg_removevalue_0829d7a3fdf241e8 = function() { return handleEr
|
|
|
2855
2855
|
}
|
|
2856
2856
|
}, arguments) };
|
|
2857
2857
|
|
|
2858
|
-
module.exports.
|
|
2858
|
+
module.exports.__wbg_sendmessage_ace5b81144243ec4 = function(arg0, arg1) {
|
|
2859
2859
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2860
2860
|
};
|
|
2861
2861
|
|
|
2862
|
-
module.exports.
|
|
2862
|
+
module.exports.__wbg_connecttopeer_718f23f2a1dad46e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2863
2863
|
let deferred0_0;
|
|
2864
2864
|
let deferred0_1;
|
|
2865
2865
|
try {
|
|
@@ -2872,14 +2872,14 @@ module.exports.__wbg_connecttopeer_a97abb6ea54e73f4 = function() { return handle
|
|
|
2872
2872
|
}
|
|
2873
2873
|
}, arguments) };
|
|
2874
2874
|
|
|
2875
|
-
module.exports.
|
|
2875
|
+
module.exports.__wbg_getmyservices_7c7c0312b835ecdf = function() {
|
|
2876
2876
|
const ret = MsgHandler.get_my_services();
|
|
2877
2877
|
_assertClass(ret, WasmPeerServiceList);
|
|
2878
2878
|
var ptr1 = ret.__destroy_into_raw();
|
|
2879
2879
|
return ptr1;
|
|
2880
2880
|
};
|
|
2881
2881
|
|
|
2882
|
-
module.exports.
|
|
2882
|
+
module.exports.__wbg_isexistingfile_10384e694274432a = function() { return handleError(function (arg0, arg1) {
|
|
2883
2883
|
let deferred0_0;
|
|
2884
2884
|
let deferred0_1;
|
|
2885
2885
|
try {
|
|
@@ -2892,33 +2892,33 @@ module.exports.__wbg_isexistingfile_c5074d5d9ae77250 = function() { return handl
|
|
|
2892
2892
|
}
|
|
2893
2893
|
}, arguments) };
|
|
2894
2894
|
|
|
2895
|
-
module.exports.
|
|
2895
|
+
module.exports.__wbg_processapicall_429c448ba53022f8 = function(arg0, arg1, arg2) {
|
|
2896
2896
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2897
2897
|
};
|
|
2898
2898
|
|
|
2899
|
-
module.exports.
|
|
2899
|
+
module.exports.__wbg_processapierror_481f5de5114e5c58 = function(arg0, arg1, arg2) {
|
|
2900
2900
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2901
2901
|
};
|
|
2902
2902
|
|
|
2903
|
-
module.exports.
|
|
2903
|
+
module.exports.__wbg_processapisuccess_e7f80683c7350d70 = function(arg0, arg1, arg2) {
|
|
2904
2904
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2905
2905
|
};
|
|
2906
2906
|
|
|
2907
|
-
module.exports.
|
|
2907
|
+
module.exports.__wbg_sendmessagetoall_929a50f93e17f953 = function(arg0, arg1) {
|
|
2908
2908
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2909
2909
|
};
|
|
2910
2910
|
|
|
2911
|
-
module.exports.
|
|
2911
|
+
module.exports.__wbg_disconnectfrompeer_4f6e3738fa40715a = function() { return handleError(function (arg0) {
|
|
2912
2912
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2913
2913
|
return addHeapObject(ret);
|
|
2914
2914
|
}, arguments) };
|
|
2915
2915
|
|
|
2916
|
-
module.exports.
|
|
2916
|
+
module.exports.__wbg_loadblockfilelist_570aba530ebee4ed = function() { return handleError(function () {
|
|
2917
2917
|
const ret = MsgHandler.load_block_file_list();
|
|
2918
2918
|
return addHeapObject(ret);
|
|
2919
2919
|
}, arguments) };
|
|
2920
2920
|
|
|
2921
|
-
module.exports.
|
|
2921
|
+
module.exports.__wbg_sendinterfaceevent_c21cebbf951ca686 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2922
2922
|
let deferred0_0;
|
|
2923
2923
|
let deferred0_1;
|
|
2924
2924
|
let deferred1_0;
|
|
@@ -2935,7 +2935,7 @@ module.exports.__wbg_sendinterfaceevent_7045bede3f7d75b1 = function(arg0, arg1,
|
|
|
2935
2935
|
}
|
|
2936
2936
|
};
|
|
2937
2937
|
|
|
2938
|
-
module.exports.
|
|
2938
|
+
module.exports.__wbg_sendblocksuccess_802b9fa50313a64b = function(arg0, arg1, arg2) {
|
|
2939
2939
|
let deferred0_0;
|
|
2940
2940
|
let deferred0_1;
|
|
2941
2941
|
try {
|
|
@@ -2947,11 +2947,11 @@ module.exports.__wbg_sendblocksuccess_4a65fd07f3e613ab = function(arg0, arg1, ar
|
|
|
2947
2947
|
}
|
|
2948
2948
|
};
|
|
2949
2949
|
|
|
2950
|
-
module.exports.
|
|
2950
|
+
module.exports.__wbg_sendwalletupdate_636634402ee17f59 = function() {
|
|
2951
2951
|
MsgHandler.send_wallet_update();
|
|
2952
2952
|
};
|
|
2953
2953
|
|
|
2954
|
-
module.exports.
|
|
2954
|
+
module.exports.__wbg_sendnewversionalert_732df9ad6cd449c7 = function(arg0, arg1, arg2) {
|
|
2955
2955
|
let deferred0_0;
|
|
2956
2956
|
let deferred0_1;
|
|
2957
2957
|
try {
|
|
@@ -2963,15 +2963,15 @@ module.exports.__wbg_sendnewversionalert_e01dcdcfd2560293 = function(arg0, arg1,
|
|
|
2963
2963
|
}
|
|
2964
2964
|
};
|
|
2965
2965
|
|
|
2966
|
-
module.exports.
|
|
2966
|
+
module.exports.__wbg_sendblockfetchstatusevent_b001665c60100280 = function(arg0) {
|
|
2967
2967
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2968
2968
|
};
|
|
2969
2969
|
|
|
2970
|
-
module.exports.
|
|
2970
|
+
module.exports.__wbg_sendnewchaindetectedevent_5478f95c31363715 = function() {
|
|
2971
2971
|
MsgHandler.send_new_chain_detected_event();
|
|
2972
2972
|
};
|
|
2973
2973
|
|
|
2974
|
-
module.exports.
|
|
2974
|
+
module.exports.__wbg_fetchblockfrompeer_2586d36df17cd9e4 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2975
2975
|
let deferred0_0;
|
|
2976
2976
|
let deferred0_1;
|
|
2977
2977
|
try {
|
|
@@ -2984,7 +2984,7 @@ module.exports.__wbg_fetchblockfrompeer_7f0851a8d64bfa82 = function() { return h
|
|
|
2984
2984
|
}
|
|
2985
2985
|
}, arguments) };
|
|
2986
2986
|
|
|
2987
|
-
module.exports.
|
|
2987
|
+
module.exports.__wbg_ensuredirectoryexists_f091e82931e71635 = function() { return handleError(function (arg0, arg1) {
|
|
2988
2988
|
let deferred0_0;
|
|
2989
2989
|
let deferred0_1;
|
|
2990
2990
|
try {
|