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