saito-wasm 0.2.170 → 0.2.172
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 +163 -146
- package/pkg/node/index.js +354 -326
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +46 -42
- package/pkg/node/package.json +1 -1
- package/pkg/web/index.d.ts +209 -188
- package/pkg/web/index.js +346 -318
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +46 -42
- package/pkg/web/package.json +1 -1
- /package/pkg/node/snippets/{saito-wasm-110f636d48c332b6 → saito-wasm-d2385e3b1368ba5c}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-110f636d48c332b6 → saito-wasm-d2385e3b1368ba5c}/js/msg_handler.js +0 -0
package/pkg/web/index.js
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
import { MsgHandler } from './snippets/saito-wasm-
|
|
1
|
+
import { MsgHandler } from './snippets/saito-wasm-d2385e3b1368ba5c/js/msg_handler.js';
|
|
2
2
|
|
|
3
3
|
let wasm;
|
|
4
4
|
|
|
5
|
-
const heap = new Array(128).fill(undefined);
|
|
6
|
-
|
|
7
|
-
heap.push(undefined, null, true, false);
|
|
8
|
-
|
|
9
|
-
function getObject(idx) { return heap[idx]; }
|
|
10
|
-
|
|
11
|
-
let heap_next = heap.length;
|
|
12
|
-
|
|
13
|
-
function dropObject(idx) {
|
|
14
|
-
if (idx < 132) return;
|
|
15
|
-
heap[idx] = heap_next;
|
|
16
|
-
heap_next = idx;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function takeObject(idx) {
|
|
20
|
-
const ret = getObject(idx);
|
|
21
|
-
dropObject(idx);
|
|
22
|
-
return ret;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
5
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
26
6
|
|
|
27
7
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
@@ -40,6 +20,12 @@ function getStringFromWasm0(ptr, len) {
|
|
|
40
20
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
41
21
|
}
|
|
42
22
|
|
|
23
|
+
const heap = new Array(128).fill(undefined);
|
|
24
|
+
|
|
25
|
+
heap.push(undefined, null, true, false);
|
|
26
|
+
|
|
27
|
+
let heap_next = heap.length;
|
|
28
|
+
|
|
43
29
|
function addHeapObject(obj) {
|
|
44
30
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
45
31
|
const idx = heap_next;
|
|
@@ -49,6 +35,20 @@ function addHeapObject(obj) {
|
|
|
49
35
|
return idx;
|
|
50
36
|
}
|
|
51
37
|
|
|
38
|
+
function getObject(idx) { return heap[idx]; }
|
|
39
|
+
|
|
40
|
+
function dropObject(idx) {
|
|
41
|
+
if (idx < 132) return;
|
|
42
|
+
heap[idx] = heap_next;
|
|
43
|
+
heap_next = idx;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function takeObject(idx) {
|
|
47
|
+
const ret = getObject(idx);
|
|
48
|
+
dropObject(idx);
|
|
49
|
+
return ret;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
52
|
let WASM_VECTOR_LEN = 0;
|
|
53
53
|
|
|
54
54
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
@@ -232,36 +232,49 @@ function _assertClass(instance, klass) {
|
|
|
232
232
|
}
|
|
233
233
|
return instance.ptr;
|
|
234
234
|
}
|
|
235
|
+
|
|
236
|
+
let stack_pointer = 128;
|
|
237
|
+
|
|
238
|
+
function addBorrowedObject(obj) {
|
|
239
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
240
|
+
heap[--stack_pointer] = obj;
|
|
241
|
+
return stack_pointer;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @returns {Promise<Array<any>>}
|
|
245
|
+
*/
|
|
246
|
+
export function get_mempool_txs() {
|
|
247
|
+
const ret = wasm.get_mempool_txs();
|
|
248
|
+
return takeObject(ret);
|
|
249
|
+
}
|
|
250
|
+
|
|
235
251
|
/**
|
|
236
|
-
* @param {Uint8Array} buffer
|
|
237
252
|
* @param {bigint} peer_index
|
|
238
253
|
* @returns {Promise<void>}
|
|
239
254
|
*/
|
|
240
|
-
export function
|
|
241
|
-
const ret = wasm.
|
|
255
|
+
export function remove_stun_peer(peer_index) {
|
|
256
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
242
257
|
return takeObject(ret);
|
|
243
258
|
}
|
|
244
259
|
|
|
245
260
|
/**
|
|
246
|
-
* @param {string}
|
|
247
|
-
* @param {
|
|
248
|
-
* @param {
|
|
261
|
+
* @param {string} public_key
|
|
262
|
+
* @param {bigint} amount
|
|
263
|
+
* @param {bigint} fee
|
|
264
|
+
* @param {boolean} force_merge
|
|
249
265
|
* @returns {Promise<WasmTransaction>}
|
|
250
266
|
*/
|
|
251
|
-
export function
|
|
252
|
-
const ret = wasm.
|
|
267
|
+
export function create_transaction(public_key, amount, fee, force_merge) {
|
|
268
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
253
269
|
return takeObject(ret);
|
|
254
270
|
}
|
|
255
271
|
|
|
256
272
|
/**
|
|
257
|
-
* @param {
|
|
258
|
-
* @
|
|
259
|
-
* @param {bigint} block_id
|
|
260
|
-
* @param {bigint} peer_index
|
|
261
|
-
* @returns {Promise<void>}
|
|
273
|
+
* @param {Array<any>} keys
|
|
274
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
262
275
|
*/
|
|
263
|
-
export function
|
|
264
|
-
const ret = wasm.
|
|
276
|
+
export function get_balance_snapshot(keys) {
|
|
277
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
265
278
|
return takeObject(ret);
|
|
266
279
|
}
|
|
267
280
|
|
|
@@ -275,46 +288,66 @@ export function get_peer(peer_index) {
|
|
|
275
288
|
}
|
|
276
289
|
|
|
277
290
|
/**
|
|
278
|
-
* @
|
|
279
|
-
* @returns {Promise<WasmBlock>}
|
|
291
|
+
* @returns {Promise<string>}
|
|
280
292
|
*/
|
|
281
|
-
export function
|
|
282
|
-
const ret = wasm.
|
|
293
|
+
export function get_stats() {
|
|
294
|
+
const ret = wasm.get_stats();
|
|
283
295
|
return takeObject(ret);
|
|
284
296
|
}
|
|
285
297
|
|
|
286
298
|
/**
|
|
287
|
-
* @
|
|
299
|
+
* @param {Uint8Array} buffer
|
|
300
|
+
* @returns {string}
|
|
288
301
|
*/
|
|
289
|
-
export function
|
|
290
|
-
const ret = wasm.
|
|
302
|
+
export function hash(buffer) {
|
|
303
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
291
304
|
return takeObject(ret);
|
|
292
305
|
}
|
|
293
306
|
|
|
294
307
|
/**
|
|
295
|
-
* @param {
|
|
308
|
+
* @param {string} key
|
|
309
|
+
* @returns {boolean}
|
|
310
|
+
*/
|
|
311
|
+
export function is_valid_public_key(key) {
|
|
312
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
313
|
+
return ret !== 0;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @param {Uint8Array} buffer
|
|
318
|
+
* @param {string} signature
|
|
296
319
|
* @param {string} public_key
|
|
320
|
+
* @returns {boolean}
|
|
321
|
+
*/
|
|
322
|
+
export function verify_signature(buffer, signature, public_key) {
|
|
323
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
324
|
+
return ret !== 0;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* @param {bigint} peer_index
|
|
329
|
+
* @param {string} ip
|
|
297
330
|
* @returns {Promise<void>}
|
|
298
331
|
*/
|
|
299
|
-
export function
|
|
300
|
-
const ret = wasm.
|
|
332
|
+
export function process_new_peer(peer_index, ip) {
|
|
333
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
301
334
|
return takeObject(ret);
|
|
302
335
|
}
|
|
303
336
|
|
|
304
337
|
/**
|
|
305
|
-
* @param {
|
|
306
|
-
* @returns {
|
|
338
|
+
* @param {bigint} threshold
|
|
339
|
+
* @returns {Promise<void>}
|
|
307
340
|
*/
|
|
308
|
-
export function
|
|
309
|
-
const ret = wasm.
|
|
310
|
-
return ret
|
|
341
|
+
export function write_issuance_file(threshold) {
|
|
342
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
343
|
+
return takeObject(ret);
|
|
311
344
|
}
|
|
312
345
|
|
|
313
346
|
/**
|
|
314
|
-
* @returns {
|
|
347
|
+
* @returns {string}
|
|
315
348
|
*/
|
|
316
|
-
export function
|
|
317
|
-
const ret = wasm.
|
|
349
|
+
export function generate_private_key() {
|
|
350
|
+
const ret = wasm.generate_private_key();
|
|
318
351
|
return takeObject(ret);
|
|
319
352
|
}
|
|
320
353
|
|
|
@@ -340,11 +373,10 @@ export function sign_buffer(buffer, private_key) {
|
|
|
340
373
|
}
|
|
341
374
|
|
|
342
375
|
/**
|
|
343
|
-
* @
|
|
344
|
-
* @returns {Promise<void>}
|
|
376
|
+
* @returns {Promise<string>}
|
|
345
377
|
*/
|
|
346
|
-
export function
|
|
347
|
-
const ret = wasm.
|
|
378
|
+
export function get_peer_stats() {
|
|
379
|
+
const ret = wasm.get_peer_stats();
|
|
348
380
|
return takeObject(ret);
|
|
349
381
|
}
|
|
350
382
|
|
|
@@ -357,70 +389,29 @@ export function get_blockchain() {
|
|
|
357
389
|
}
|
|
358
390
|
|
|
359
391
|
/**
|
|
360
|
-
* @
|
|
361
|
-
|
|
362
|
-
export function get_congestion_stats() {
|
|
363
|
-
const ret = wasm.get_congestion_stats();
|
|
364
|
-
return takeObject(ret);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* @returns {Promise<any>}
|
|
369
|
-
*/
|
|
370
|
-
export function get_confirmations() {
|
|
371
|
-
const ret = wasm.get_confirmations();
|
|
372
|
-
return takeObject(ret);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* @param {string} slip1_utxo_key
|
|
377
|
-
* @param {string} slip2_utxo_key
|
|
378
|
-
* @param {string} slip3_utxo_key
|
|
379
|
-
* @param {number} left_count
|
|
380
|
-
* @param {number} right_count
|
|
381
|
-
* @param {Uint8Array} tx_msg
|
|
382
|
-
* @returns {Promise<WasmTransaction>}
|
|
383
|
-
*/
|
|
384
|
-
export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
385
|
-
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));
|
|
386
|
-
return takeObject(ret);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* @param {bigint} amt
|
|
391
|
-
* @param {string} slip1_utxo_key
|
|
392
|
-
* @param {string} slip2_utxo_key
|
|
393
|
-
* @param {string} slip3_utxo_key
|
|
394
|
-
* @param {string} recipient_public_key
|
|
395
|
-
* @param {Uint8Array} tx_msg
|
|
396
|
-
* @returns {Promise<WasmTransaction>}
|
|
397
|
-
*/
|
|
398
|
-
export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
399
|
-
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));
|
|
400
|
-
return takeObject(ret);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* @returns {Promise<string>}
|
|
392
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
393
|
+
* @returns {Promise<void>}
|
|
405
394
|
*/
|
|
406
|
-
export function
|
|
407
|
-
|
|
395
|
+
export function update_from_balance_snapshot(snapshot) {
|
|
396
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
397
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
398
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
408
399
|
return takeObject(ret);
|
|
409
400
|
}
|
|
410
401
|
|
|
411
402
|
/**
|
|
412
|
-
* @returns {Promise<
|
|
403
|
+
* @returns {Promise<void>}
|
|
413
404
|
*/
|
|
414
|
-
export function
|
|
415
|
-
const ret = wasm.
|
|
405
|
+
export function start_from_received_ghost_chain() {
|
|
406
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
416
407
|
return takeObject(ret);
|
|
417
408
|
}
|
|
418
409
|
|
|
419
410
|
/**
|
|
420
411
|
* @returns {Promise<string>}
|
|
421
412
|
*/
|
|
422
|
-
export function
|
|
423
|
-
const ret = wasm.
|
|
413
|
+
export function get_congestion_stats() {
|
|
414
|
+
const ret = wasm.get_congestion_stats();
|
|
424
415
|
return takeObject(ret);
|
|
425
416
|
}
|
|
426
417
|
|
|
@@ -434,104 +425,79 @@ export function get_peers() {
|
|
|
434
425
|
|
|
435
426
|
/**
|
|
436
427
|
* @param {Uint8Array} buffer
|
|
437
|
-
* @param {
|
|
428
|
+
* @param {Uint8Array} hash
|
|
429
|
+
* @param {bigint} block_id
|
|
438
430
|
* @param {bigint} peer_index
|
|
439
431
|
* @returns {Promise<void>}
|
|
440
432
|
*/
|
|
441
|
-
export function
|
|
442
|
-
const ret = wasm.
|
|
443
|
-
return takeObject(ret);
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* @param {string} private_key
|
|
448
|
-
* @returns {string}
|
|
449
|
-
*/
|
|
450
|
-
export function generate_public_key(private_key) {
|
|
451
|
-
try {
|
|
452
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
453
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
454
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
455
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
456
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
457
|
-
if (r2) {
|
|
458
|
-
throw takeObject(r1);
|
|
459
|
-
}
|
|
460
|
-
return takeObject(r0);
|
|
461
|
-
} finally {
|
|
462
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* @param {WasmTransaction} tx
|
|
468
|
-
* @returns {Promise<void>}
|
|
469
|
-
*/
|
|
470
|
-
export function propagate_transaction(tx) {
|
|
471
|
-
_assertClass(tx, WasmTransaction);
|
|
472
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
433
|
+
export function process_fetched_block(buffer, hash, block_id, peer_index) {
|
|
434
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
473
435
|
return takeObject(ret);
|
|
474
436
|
}
|
|
475
437
|
|
|
476
438
|
/**
|
|
477
|
-
* @param {
|
|
478
|
-
* @returns {Promise<
|
|
439
|
+
* @param {string} public_key
|
|
440
|
+
* @returns {Promise<Array<any>>}
|
|
479
441
|
*/
|
|
480
|
-
export function
|
|
481
|
-
const ret = wasm.
|
|
442
|
+
export function get_account_slips(public_key) {
|
|
443
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
482
444
|
return takeObject(ret);
|
|
483
445
|
}
|
|
484
446
|
|
|
485
447
|
/**
|
|
486
|
-
* @
|
|
487
|
-
* @param {Uint8Array} tx_msg
|
|
488
|
-
* @returns {Promise<WasmTransaction>}
|
|
448
|
+
* @returns {Promise<WasmWallet>}
|
|
489
449
|
*/
|
|
490
|
-
export function
|
|
491
|
-
const
|
|
492
|
-
const len0 = WASM_VECTOR_LEN;
|
|
493
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
450
|
+
export function get_wallet() {
|
|
451
|
+
const ret = wasm.get_wallet();
|
|
494
452
|
return takeObject(ret);
|
|
495
453
|
}
|
|
496
454
|
|
|
497
455
|
/**
|
|
456
|
+
* @param {Uint8Array} hash
|
|
457
|
+
* @param {bigint} block_id
|
|
498
458
|
* @param {bigint} peer_index
|
|
499
|
-
* @param {string} ip
|
|
500
459
|
* @returns {Promise<void>}
|
|
501
460
|
*/
|
|
502
|
-
export function
|
|
503
|
-
const ret = wasm.
|
|
461
|
+
export function process_failed_block_fetch(hash, block_id, peer_index) {
|
|
462
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
504
463
|
return takeObject(ret);
|
|
505
464
|
}
|
|
506
465
|
|
|
507
466
|
/**
|
|
508
|
-
* @param {
|
|
509
|
-
* @param {
|
|
467
|
+
* @param {bigint} num
|
|
468
|
+
* @param {bigint} deposit
|
|
469
|
+
* @param {Uint8Array} tx_msg
|
|
510
470
|
* @param {bigint} fee
|
|
511
|
-
* @param {
|
|
471
|
+
* @param {string} recipient_public_key
|
|
472
|
+
* @param {string} nft_type
|
|
512
473
|
* @returns {Promise<WasmTransaction>}
|
|
513
474
|
*/
|
|
514
|
-
export function
|
|
515
|
-
const ret = wasm.
|
|
475
|
+
export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
476
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
516
477
|
return takeObject(ret);
|
|
517
478
|
}
|
|
518
479
|
|
|
519
480
|
/**
|
|
520
|
-
* @param {Uint8Array}
|
|
521
|
-
* @param {
|
|
481
|
+
* @param {Uint8Array} buffer
|
|
482
|
+
* @param {number} msg_index
|
|
522
483
|
* @param {bigint} peer_index
|
|
523
484
|
* @returns {Promise<void>}
|
|
524
485
|
*/
|
|
525
|
-
export function
|
|
526
|
-
const ret = wasm.
|
|
486
|
+
export function send_api_call(buffer, msg_index, peer_index) {
|
|
487
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
527
488
|
return takeObject(ret);
|
|
528
489
|
}
|
|
529
490
|
|
|
530
491
|
/**
|
|
531
|
-
* @
|
|
492
|
+
* @param {string} config_json
|
|
493
|
+
* @param {string} private_key
|
|
494
|
+
* @param {number} log_level_num
|
|
495
|
+
* @param {bigint} hasten_multiplier
|
|
496
|
+
* @param {boolean} delete_old_blocks
|
|
497
|
+
* @returns {Promise<any>}
|
|
532
498
|
*/
|
|
533
|
-
export function
|
|
534
|
-
const ret = wasm.
|
|
499
|
+
export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
500
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
535
501
|
return takeObject(ret);
|
|
536
502
|
}
|
|
537
503
|
|
|
@@ -547,96 +513,89 @@ export function produce_block_with_gt() {
|
|
|
547
513
|
* @param {bigint} peer_index
|
|
548
514
|
* @returns {Promise<void>}
|
|
549
515
|
*/
|
|
550
|
-
export function
|
|
551
|
-
const ret = wasm.
|
|
552
|
-
return takeObject(ret);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* @returns {string}
|
|
557
|
-
*/
|
|
558
|
-
export function generate_private_key() {
|
|
559
|
-
const ret = wasm.generate_private_key();
|
|
516
|
+
export function process_peer_disconnection(peer_index) {
|
|
517
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
560
518
|
return takeObject(ret);
|
|
561
519
|
}
|
|
562
520
|
|
|
563
521
|
/**
|
|
564
|
-
* @returns {Promise<
|
|
522
|
+
* @returns {Promise<bigint>}
|
|
565
523
|
*/
|
|
566
|
-
export function
|
|
567
|
-
const ret = wasm.
|
|
524
|
+
export function get_next_peer_index() {
|
|
525
|
+
const ret = wasm.get_next_peer_index();
|
|
568
526
|
return takeObject(ret);
|
|
569
527
|
}
|
|
570
528
|
|
|
571
529
|
/**
|
|
572
|
-
* @param {string}
|
|
573
|
-
* @param {
|
|
574
|
-
* @param {
|
|
575
|
-
* @param {boolean} force_merge
|
|
530
|
+
* @param {string} slip1_utxo_key
|
|
531
|
+
* @param {string} slip2_utxo_key
|
|
532
|
+
* @param {string} slip3_utxo_key
|
|
576
533
|
* @returns {Promise<WasmTransaction>}
|
|
577
534
|
*/
|
|
578
|
-
export function
|
|
579
|
-
const ret = wasm.
|
|
535
|
+
export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
|
|
536
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
|
|
580
537
|
return takeObject(ret);
|
|
581
538
|
}
|
|
582
539
|
|
|
583
540
|
/**
|
|
584
|
-
* @param {
|
|
585
|
-
* @
|
|
541
|
+
* @param {number} major
|
|
542
|
+
* @param {number} minor
|
|
543
|
+
* @param {number} patch
|
|
544
|
+
* @returns {Promise<void>}
|
|
586
545
|
*/
|
|
587
|
-
export function
|
|
588
|
-
const ret = wasm.
|
|
546
|
+
export function set_wallet_version(major, minor, patch) {
|
|
547
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
589
548
|
return takeObject(ret);
|
|
590
549
|
}
|
|
591
550
|
|
|
592
551
|
/**
|
|
593
|
-
* @
|
|
594
|
-
* @param {bigint} deposit
|
|
595
|
-
* @param {Uint8Array} tx_msg
|
|
596
|
-
* @param {bigint} fee
|
|
597
|
-
* @param {string} recipient_public_key
|
|
598
|
-
* @param {string} nft_type
|
|
599
|
-
* @returns {Promise<WasmTransaction>}
|
|
552
|
+
* @returns {Promise<Array<any>>}
|
|
600
553
|
*/
|
|
601
|
-
export function
|
|
602
|
-
const ret = wasm.
|
|
554
|
+
export function get_nft_list() {
|
|
555
|
+
const ret = wasm.get_nft_list();
|
|
603
556
|
return takeObject(ret);
|
|
604
557
|
}
|
|
605
558
|
|
|
606
559
|
/**
|
|
607
|
-
* @
|
|
608
|
-
* @returns {Promise<void>}
|
|
560
|
+
* @returns {Promise<any>}
|
|
609
561
|
*/
|
|
610
|
-
export function
|
|
611
|
-
const ret = wasm.
|
|
562
|
+
export function get_confirmations() {
|
|
563
|
+
const ret = wasm.get_confirmations();
|
|
612
564
|
return takeObject(ret);
|
|
613
565
|
}
|
|
614
566
|
|
|
615
567
|
/**
|
|
568
|
+
* @param {Uint8Array} buffer
|
|
569
|
+
* @param {number} msg_index
|
|
570
|
+
* @param {bigint} peer_index
|
|
616
571
|
* @returns {Promise<void>}
|
|
617
572
|
*/
|
|
618
|
-
export function
|
|
619
|
-
const ret = wasm.
|
|
573
|
+
export function send_api_error(buffer, msg_index, peer_index) {
|
|
574
|
+
const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
|
|
620
575
|
return takeObject(ret);
|
|
621
576
|
}
|
|
622
577
|
|
|
623
578
|
/**
|
|
624
579
|
* @param {Uint8Array} buffer
|
|
625
|
-
* @param {number} msg_index
|
|
626
580
|
* @param {bigint} peer_index
|
|
627
581
|
* @returns {Promise<void>}
|
|
628
582
|
*/
|
|
629
|
-
export function
|
|
630
|
-
const ret = wasm.
|
|
583
|
+
export function process_msg_buffer_from_peer(buffer, peer_index) {
|
|
584
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
631
585
|
return takeObject(ret);
|
|
632
586
|
}
|
|
633
587
|
|
|
634
588
|
/**
|
|
635
|
-
* @param {bigint}
|
|
636
|
-
* @
|
|
589
|
+
* @param {bigint} amt
|
|
590
|
+
* @param {string} slip1_utxo_key
|
|
591
|
+
* @param {string} slip2_utxo_key
|
|
592
|
+
* @param {string} slip3_utxo_key
|
|
593
|
+
* @param {string} recipient_public_key
|
|
594
|
+
* @param {Uint8Array} tx_msg
|
|
595
|
+
* @returns {Promise<WasmTransaction>}
|
|
637
596
|
*/
|
|
638
|
-
export function
|
|
639
|
-
const ret = wasm.
|
|
597
|
+
export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
598
|
+
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));
|
|
640
599
|
return takeObject(ret);
|
|
641
600
|
}
|
|
642
601
|
|
|
@@ -649,74 +608,114 @@ export function produce_block_without_gt() {
|
|
|
649
608
|
}
|
|
650
609
|
|
|
651
610
|
/**
|
|
652
|
-
* @param {
|
|
611
|
+
* @param {string} private_key
|
|
612
|
+
* @returns {string}
|
|
613
|
+
*/
|
|
614
|
+
export function generate_public_key(private_key) {
|
|
615
|
+
try {
|
|
616
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
617
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
618
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
619
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
620
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
621
|
+
if (r2) {
|
|
622
|
+
throw takeObject(r1);
|
|
623
|
+
}
|
|
624
|
+
return takeObject(r0);
|
|
625
|
+
} finally {
|
|
626
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* @returns {Promise<string>}
|
|
632
|
+
*/
|
|
633
|
+
export function get_latest_block_hash() {
|
|
634
|
+
const ret = wasm.get_latest_block_hash();
|
|
635
|
+
return takeObject(ret);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
653
639
|
* @returns {Promise<void>}
|
|
654
640
|
*/
|
|
655
|
-
export function
|
|
656
|
-
|
|
657
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
658
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
641
|
+
export function disable_producing_blocks_by_timer() {
|
|
642
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
659
643
|
return takeObject(ret);
|
|
660
644
|
}
|
|
661
645
|
|
|
662
646
|
/**
|
|
663
|
-
* @param {
|
|
664
|
-
* @
|
|
665
|
-
* @param {string} public_key
|
|
666
|
-
* @returns {boolean}
|
|
647
|
+
* @param {WasmTransaction} tx
|
|
648
|
+
* @returns {Promise<void>}
|
|
667
649
|
*/
|
|
668
|
-
export function
|
|
669
|
-
|
|
670
|
-
|
|
650
|
+
export function propagate_transaction(tx) {
|
|
651
|
+
_assertClass(tx, WasmTransaction);
|
|
652
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
653
|
+
return takeObject(ret);
|
|
671
654
|
}
|
|
672
655
|
|
|
673
656
|
/**
|
|
674
|
-
* @param {
|
|
675
|
-
* @param {
|
|
676
|
-
* @param {number} patch
|
|
657
|
+
* @param {bigint} peer_index
|
|
658
|
+
* @param {string} public_key
|
|
677
659
|
* @returns {Promise<void>}
|
|
678
660
|
*/
|
|
679
|
-
export function
|
|
680
|
-
const ret = wasm.
|
|
661
|
+
export function process_stun_peer(peer_index, public_key) {
|
|
662
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
681
663
|
return takeObject(ret);
|
|
682
664
|
}
|
|
683
665
|
|
|
684
666
|
/**
|
|
685
|
-
* @param {
|
|
667
|
+
* @param {string} nft_id_hex
|
|
668
|
+
* @param {Uint8Array} tx_msg
|
|
669
|
+
* @returns {Promise<WasmTransaction>}
|
|
670
|
+
*/
|
|
671
|
+
export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
|
|
672
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
673
|
+
const len0 = WASM_VECTOR_LEN;
|
|
674
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
675
|
+
return takeObject(ret);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* @param {bigint} current_time
|
|
686
680
|
* @returns {Promise<void>}
|
|
687
681
|
*/
|
|
688
|
-
export function
|
|
689
|
-
const ret = wasm.
|
|
682
|
+
export function process_stat_interval(current_time) {
|
|
683
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
690
684
|
return takeObject(ret);
|
|
691
685
|
}
|
|
692
686
|
|
|
693
687
|
/**
|
|
694
|
-
* @
|
|
688
|
+
* @param {string} slip1_utxo_key
|
|
689
|
+
* @param {string} slip2_utxo_key
|
|
690
|
+
* @param {string} slip3_utxo_key
|
|
691
|
+
* @param {number} left_count
|
|
692
|
+
* @param {number} right_count
|
|
693
|
+
* @param {Uint8Array} tx_msg
|
|
694
|
+
* @returns {Promise<WasmTransaction>}
|
|
695
695
|
*/
|
|
696
|
-
export function
|
|
697
|
-
const ret = wasm.
|
|
696
|
+
export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
697
|
+
const ret = wasm.create_split_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), left_count, right_count, addHeapObject(tx_msg));
|
|
698
698
|
return takeObject(ret);
|
|
699
699
|
}
|
|
700
700
|
|
|
701
701
|
/**
|
|
702
|
-
* @param {
|
|
703
|
-
* @
|
|
702
|
+
* @param {Array<any>} public_keys
|
|
703
|
+
* @param {BigUint64Array} amounts
|
|
704
|
+
* @param {bigint} fee
|
|
705
|
+
* @param {boolean} _force_merge
|
|
706
|
+
* @returns {Promise<WasmTransaction>}
|
|
704
707
|
*/
|
|
705
|
-
export function
|
|
706
|
-
const ret = wasm.
|
|
708
|
+
export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
|
|
709
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
707
710
|
return takeObject(ret);
|
|
708
711
|
}
|
|
709
712
|
|
|
710
713
|
/**
|
|
711
|
-
* @param {
|
|
712
|
-
* @
|
|
713
|
-
* @param {number} log_level_num
|
|
714
|
-
* @param {bigint} hasten_multiplier
|
|
715
|
-
* @param {boolean} delete_old_blocks
|
|
716
|
-
* @returns {Promise<any>}
|
|
714
|
+
* @param {bigint} duration_in_ms
|
|
715
|
+
* @returns {Promise<void>}
|
|
717
716
|
*/
|
|
718
|
-
export function
|
|
719
|
-
const ret = wasm.
|
|
717
|
+
export function process_timer_event(duration_in_ms) {
|
|
718
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
720
719
|
return takeObject(ret);
|
|
721
720
|
}
|
|
722
721
|
|
|
@@ -726,8 +725,17 @@ export function initialize(config_json, private_key, log_level_num, hasten_multi
|
|
|
726
725
|
* @param {bigint} peer_index
|
|
727
726
|
* @returns {Promise<void>}
|
|
728
727
|
*/
|
|
729
|
-
export function
|
|
730
|
-
const ret = wasm.
|
|
728
|
+
export function send_api_success(buffer, msg_index, peer_index) {
|
|
729
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
730
|
+
return takeObject(ret);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* @param {string} block_hash
|
|
735
|
+
* @returns {Promise<WasmBlock>}
|
|
736
|
+
*/
|
|
737
|
+
export function get_block(block_hash) {
|
|
738
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
731
739
|
return takeObject(ret);
|
|
732
740
|
}
|
|
733
741
|
|
|
@@ -738,15 +746,7 @@ function handleError(f, args) {
|
|
|
738
746
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
739
747
|
}
|
|
740
748
|
}
|
|
741
|
-
|
|
742
|
-
let stack_pointer = 128;
|
|
743
|
-
|
|
744
|
-
function addBorrowedObject(obj) {
|
|
745
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
746
|
-
heap[--stack_pointer] = obj;
|
|
747
|
-
return stack_pointer;
|
|
748
|
-
}
|
|
749
|
-
function __wbg_adapter_406(arg0, arg1, arg2, arg3) {
|
|
749
|
+
function __wbg_adapter_410(arg0, arg1, arg2, arg3) {
|
|
750
750
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h58ba5fc31ee09770(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
751
751
|
}
|
|
752
752
|
|
|
@@ -1338,6 +1338,14 @@ export class WasmBlockchain {
|
|
|
1338
1338
|
return takeObject(ret);
|
|
1339
1339
|
}
|
|
1340
1340
|
/**
|
|
1341
|
+
* @param {string} utxokey_hex
|
|
1342
|
+
* @returns {Promise<boolean>}
|
|
1343
|
+
*/
|
|
1344
|
+
is_slip_spendable(utxokey_hex) {
|
|
1345
|
+
const ret = wasm.wasmblockchain_is_slip_spendable(this.__wbg_ptr, addHeapObject(utxokey_hex));
|
|
1346
|
+
return takeObject(ret);
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1341
1349
|
* @param {Function} reorg_cb
|
|
1342
1350
|
* @param {Function} add_block_cb
|
|
1343
1351
|
* @param {Function} confirm_cb
|
|
@@ -2089,6 +2097,14 @@ export class WasmSlip {
|
|
|
2089
2097
|
wasm.wasmslip_set_tx_ordinal(this.__wbg_ptr, ordinal);
|
|
2090
2098
|
}
|
|
2091
2099
|
/**
|
|
2100
|
+
* @param {string} key_hex
|
|
2101
|
+
* @returns {WasmSlip | undefined}
|
|
2102
|
+
*/
|
|
2103
|
+
static parse_slip_from_utxokey(key_hex) {
|
|
2104
|
+
const ret = wasm.wasmslip_parse_slip_from_utxokey(addHeapObject(key_hex));
|
|
2105
|
+
return ret === 0 ? undefined : WasmSlip.__wrap(ret);
|
|
2106
|
+
}
|
|
2107
|
+
/**
|
|
2092
2108
|
*/
|
|
2093
2109
|
constructor() {
|
|
2094
2110
|
const ret = wasm.wasmslip_new();
|
|
@@ -2253,6 +2269,18 @@ export class WasmTransaction {
|
|
|
2253
2269
|
wasm.wasmtransaction_set_txs_replacements(this.__wbg_ptr, r);
|
|
2254
2270
|
}
|
|
2255
2271
|
/**
|
|
2272
|
+
* @returns {Uint8Array}
|
|
2273
|
+
*/
|
|
2274
|
+
get_hash_for_signature() {
|
|
2275
|
+
const ret = wasm.wasmtransaction_get_hash_for_signature(this.__wbg_ptr);
|
|
2276
|
+
return takeObject(ret);
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
*/
|
|
2280
|
+
generate_hash_for_signature() {
|
|
2281
|
+
wasm.wasmtransaction_generate_hash_for_signature(this.__wbg_ptr);
|
|
2282
|
+
}
|
|
2283
|
+
/**
|
|
2256
2284
|
* @returns {Array<any>}
|
|
2257
2285
|
*/
|
|
2258
2286
|
get to() {
|
|
@@ -2668,35 +2696,31 @@ async function __wbg_load(module, imports) {
|
|
|
2668
2696
|
function __wbg_get_imports() {
|
|
2669
2697
|
const imports = {};
|
|
2670
2698
|
imports.wbg = {};
|
|
2699
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2700
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2701
|
+
return addHeapObject(ret);
|
|
2702
|
+
};
|
|
2671
2703
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
2672
2704
|
takeObject(arg0);
|
|
2673
2705
|
};
|
|
2674
|
-
imports.wbg.
|
|
2675
|
-
const ret =
|
|
2706
|
+
imports.wbg.__wbg_wasmblock_new = function(arg0) {
|
|
2707
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2676
2708
|
return addHeapObject(ret);
|
|
2677
2709
|
};
|
|
2678
2710
|
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
2679
2711
|
const ret = WasmTransaction.__wrap(arg0);
|
|
2680
2712
|
return addHeapObject(ret);
|
|
2681
2713
|
};
|
|
2682
|
-
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2683
|
-
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2684
|
-
return addHeapObject(ret);
|
|
2685
|
-
};
|
|
2686
2714
|
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2687
2715
|
const ret = BigInt.asUintN(64, arg0);
|
|
2688
2716
|
return addHeapObject(ret);
|
|
2689
2717
|
};
|
|
2690
|
-
imports.wbg.
|
|
2691
|
-
const ret =
|
|
2692
|
-
return addHeapObject(ret);
|
|
2693
|
-
};
|
|
2694
|
-
imports.wbg.__wbg_wasmblock_new = function(arg0) {
|
|
2695
|
-
const ret = WasmBlock.__wrap(arg0);
|
|
2718
|
+
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2719
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2696
2720
|
return addHeapObject(ret);
|
|
2697
2721
|
};
|
|
2698
|
-
imports.wbg.
|
|
2699
|
-
const ret =
|
|
2722
|
+
imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
|
|
2723
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2700
2724
|
return addHeapObject(ret);
|
|
2701
2725
|
};
|
|
2702
2726
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
@@ -2707,36 +2731,28 @@ function __wbg_get_imports() {
|
|
|
2707
2731
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2708
2732
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2709
2733
|
};
|
|
2710
|
-
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2711
|
-
const ret = WasmPeer.__wrap(arg0);
|
|
2712
|
-
return addHeapObject(ret);
|
|
2713
|
-
};
|
|
2714
2734
|
imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2715
2735
|
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2716
2736
|
return addHeapObject(ret);
|
|
2717
2737
|
};
|
|
2718
|
-
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
2719
|
-
const ret = WasmSlip.__wrap(arg0);
|
|
2720
|
-
return addHeapObject(ret);
|
|
2721
|
-
};
|
|
2722
2738
|
imports.wbg.__wbg_wasmwallet_new = function(arg0) {
|
|
2723
2739
|
const ret = WasmWallet.__wrap(arg0);
|
|
2724
2740
|
return addHeapObject(ret);
|
|
2725
2741
|
};
|
|
2726
|
-
imports.wbg.
|
|
2727
|
-
const ret =
|
|
2742
|
+
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2743
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2728
2744
|
return addHeapObject(ret);
|
|
2729
2745
|
};
|
|
2730
|
-
imports.wbg.
|
|
2731
|
-
const ret =
|
|
2746
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
2747
|
+
const ret = getObject(arg0);
|
|
2732
2748
|
return addHeapObject(ret);
|
|
2733
2749
|
};
|
|
2734
|
-
imports.wbg.
|
|
2735
|
-
const ret =
|
|
2750
|
+
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
2751
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2736
2752
|
return addHeapObject(ret);
|
|
2737
2753
|
};
|
|
2738
|
-
imports.wbg.
|
|
2739
|
-
const ret =
|
|
2754
|
+
imports.wbg.__wbg_wasmnft_new = function(arg0) {
|
|
2755
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2740
2756
|
return addHeapObject(ret);
|
|
2741
2757
|
};
|
|
2742
2758
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
@@ -2752,7 +2768,11 @@ function __wbg_get_imports() {
|
|
|
2752
2768
|
const ret = getObject(arg0) in getObject(arg1);
|
|
2753
2769
|
return ret;
|
|
2754
2770
|
};
|
|
2755
|
-
imports.wbg.
|
|
2771
|
+
imports.wbg.__wbg_wasmhop_new = function(arg0) {
|
|
2772
|
+
const ret = WasmHop.__wrap(arg0);
|
|
2773
|
+
return addHeapObject(ret);
|
|
2774
|
+
};
|
|
2775
|
+
imports.wbg.__wbg_flushdata_92ac04166c91a15f = function(arg0, arg1) {
|
|
2756
2776
|
let deferred0_0;
|
|
2757
2777
|
let deferred0_1;
|
|
2758
2778
|
try {
|
|
@@ -2763,7 +2783,7 @@ function __wbg_get_imports() {
|
|
|
2763
2783
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2764
2784
|
}
|
|
2765
2785
|
};
|
|
2766
|
-
imports.wbg.
|
|
2786
|
+
imports.wbg.__wbg_readvalue_90364f7b3d978c70 = function() { return handleError(function (arg0, arg1) {
|
|
2767
2787
|
let deferred0_0;
|
|
2768
2788
|
let deferred0_1;
|
|
2769
2789
|
try {
|
|
@@ -2775,13 +2795,13 @@ function __wbg_get_imports() {
|
|
|
2775
2795
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2776
2796
|
}
|
|
2777
2797
|
}, arguments) };
|
|
2778
|
-
imports.wbg.
|
|
2798
|
+
imports.wbg.__wbg_loadwallet_7bf0714d74ae58ca = function() {
|
|
2779
2799
|
MsgHandler.load_wallet();
|
|
2780
2800
|
};
|
|
2781
|
-
imports.wbg.
|
|
2801
|
+
imports.wbg.__wbg_savewallet_aad7aa23a6e3d3ea = function() {
|
|
2782
2802
|
MsgHandler.save_wallet();
|
|
2783
2803
|
};
|
|
2784
|
-
imports.wbg.
|
|
2804
|
+
imports.wbg.__wbg_writevalue_434a56c8c755c7f7 = function(arg0, arg1, arg2) {
|
|
2785
2805
|
let deferred0_0;
|
|
2786
2806
|
let deferred0_1;
|
|
2787
2807
|
try {
|
|
@@ -2792,7 +2812,7 @@ function __wbg_get_imports() {
|
|
|
2792
2812
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2793
2813
|
}
|
|
2794
2814
|
};
|
|
2795
|
-
imports.wbg.
|
|
2815
|
+
imports.wbg.__wbg_appendvalue_ef25445ea7aa5547 = function(arg0, arg1, arg2) {
|
|
2796
2816
|
let deferred0_0;
|
|
2797
2817
|
let deferred0_1;
|
|
2798
2818
|
try {
|
|
@@ -2803,7 +2823,7 @@ function __wbg_get_imports() {
|
|
|
2803
2823
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2804
2824
|
}
|
|
2805
2825
|
};
|
|
2806
|
-
imports.wbg.
|
|
2826
|
+
imports.wbg.__wbg_removevalue_1ab6adf3d478d47d = function() { return handleError(function (arg0, arg1) {
|
|
2807
2827
|
let deferred0_0;
|
|
2808
2828
|
let deferred0_1;
|
|
2809
2829
|
try {
|
|
@@ -2815,10 +2835,10 @@ function __wbg_get_imports() {
|
|
|
2815
2835
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2816
2836
|
}
|
|
2817
2837
|
}, arguments) };
|
|
2818
|
-
imports.wbg.
|
|
2838
|
+
imports.wbg.__wbg_sendmessage_fd89fdcc65002061 = function(arg0, arg1) {
|
|
2819
2839
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2820
2840
|
};
|
|
2821
|
-
imports.wbg.
|
|
2841
|
+
imports.wbg.__wbg_connecttopeer_21362060cef5eda3 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2822
2842
|
let deferred0_0;
|
|
2823
2843
|
let deferred0_1;
|
|
2824
2844
|
try {
|
|
@@ -2830,13 +2850,13 @@ function __wbg_get_imports() {
|
|
|
2830
2850
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2831
2851
|
}
|
|
2832
2852
|
}, arguments) };
|
|
2833
|
-
imports.wbg.
|
|
2853
|
+
imports.wbg.__wbg_getmyservices_85df9f926e3733e1 = function() {
|
|
2834
2854
|
const ret = MsgHandler.get_my_services();
|
|
2835
2855
|
_assertClass(ret, WasmPeerServiceList);
|
|
2836
2856
|
var ptr1 = ret.__destroy_into_raw();
|
|
2837
2857
|
return ptr1;
|
|
2838
2858
|
};
|
|
2839
|
-
imports.wbg.
|
|
2859
|
+
imports.wbg.__wbg_isexistingfile_0975acb4bc37b526 = function() { return handleError(function (arg0, arg1) {
|
|
2840
2860
|
let deferred0_0;
|
|
2841
2861
|
let deferred0_1;
|
|
2842
2862
|
try {
|
|
@@ -2848,27 +2868,27 @@ function __wbg_get_imports() {
|
|
|
2848
2868
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2849
2869
|
}
|
|
2850
2870
|
}, arguments) };
|
|
2851
|
-
imports.wbg.
|
|
2871
|
+
imports.wbg.__wbg_processapicall_ab9e5e388fee9a7b = function(arg0, arg1, arg2) {
|
|
2852
2872
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2853
2873
|
};
|
|
2854
|
-
imports.wbg.
|
|
2874
|
+
imports.wbg.__wbg_processapierror_11e0e60273b467f8 = function(arg0, arg1, arg2) {
|
|
2855
2875
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2856
2876
|
};
|
|
2857
|
-
imports.wbg.
|
|
2877
|
+
imports.wbg.__wbg_processapisuccess_43ffc82b662c3d70 = function(arg0, arg1, arg2) {
|
|
2858
2878
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2859
2879
|
};
|
|
2860
|
-
imports.wbg.
|
|
2880
|
+
imports.wbg.__wbg_sendmessagetoall_834ce6b1ee6e2349 = function(arg0, arg1) {
|
|
2861
2881
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2862
2882
|
};
|
|
2863
|
-
imports.wbg.
|
|
2883
|
+
imports.wbg.__wbg_disconnectfrompeer_5d4d86a9711934ce = function() { return handleError(function (arg0) {
|
|
2864
2884
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2865
2885
|
return addHeapObject(ret);
|
|
2866
2886
|
}, arguments) };
|
|
2867
|
-
imports.wbg.
|
|
2887
|
+
imports.wbg.__wbg_loadblockfilelist_9b0508c4d8f1ec39 = function() { return handleError(function () {
|
|
2868
2888
|
const ret = MsgHandler.load_block_file_list();
|
|
2869
2889
|
return addHeapObject(ret);
|
|
2870
2890
|
}, arguments) };
|
|
2871
|
-
imports.wbg.
|
|
2891
|
+
imports.wbg.__wbg_sendinterfaceevent_1e00e3d559fe276c = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2872
2892
|
let deferred0_0;
|
|
2873
2893
|
let deferred0_1;
|
|
2874
2894
|
let deferred1_0;
|
|
@@ -2884,7 +2904,7 @@ function __wbg_get_imports() {
|
|
|
2884
2904
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2885
2905
|
}
|
|
2886
2906
|
};
|
|
2887
|
-
imports.wbg.
|
|
2907
|
+
imports.wbg.__wbg_sendblocksuccess_83826df6b037c48f = function(arg0, arg1, arg2) {
|
|
2888
2908
|
let deferred0_0;
|
|
2889
2909
|
let deferred0_1;
|
|
2890
2910
|
try {
|
|
@@ -2895,10 +2915,10 @@ function __wbg_get_imports() {
|
|
|
2895
2915
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2896
2916
|
}
|
|
2897
2917
|
};
|
|
2898
|
-
imports.wbg.
|
|
2918
|
+
imports.wbg.__wbg_sendwalletupdate_4283d7e6007f33e3 = function() {
|
|
2899
2919
|
MsgHandler.send_wallet_update();
|
|
2900
2920
|
};
|
|
2901
|
-
imports.wbg.
|
|
2921
|
+
imports.wbg.__wbg_sendnewversionalert_cda1bd8ae6aa0de4 = function(arg0, arg1, arg2) {
|
|
2902
2922
|
let deferred0_0;
|
|
2903
2923
|
let deferred0_1;
|
|
2904
2924
|
try {
|
|
@@ -2909,13 +2929,13 @@ function __wbg_get_imports() {
|
|
|
2909
2929
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2910
2930
|
}
|
|
2911
2931
|
};
|
|
2912
|
-
imports.wbg.
|
|
2932
|
+
imports.wbg.__wbg_sendblockfetchstatusevent_71e04f3cc7b890cc = function(arg0) {
|
|
2913
2933
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2914
2934
|
};
|
|
2915
|
-
imports.wbg.
|
|
2935
|
+
imports.wbg.__wbg_sendnewchaindetectedevent_23c4451d625b4e58 = function() {
|
|
2916
2936
|
MsgHandler.send_new_chain_detected_event();
|
|
2917
2937
|
};
|
|
2918
|
-
imports.wbg.
|
|
2938
|
+
imports.wbg.__wbg_fetchblockfrompeer_581983083ea4d34b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2919
2939
|
let deferred0_0;
|
|
2920
2940
|
let deferred0_1;
|
|
2921
2941
|
try {
|
|
@@ -2927,7 +2947,7 @@ function __wbg_get_imports() {
|
|
|
2927
2947
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2928
2948
|
}
|
|
2929
2949
|
}, arguments) };
|
|
2930
|
-
imports.wbg.
|
|
2950
|
+
imports.wbg.__wbg_ensuredirectoryexists_555fd844c3406afb = function() { return handleError(function (arg0, arg1) {
|
|
2931
2951
|
let deferred0_0;
|
|
2932
2952
|
let deferred0_1;
|
|
2933
2953
|
try {
|
|
@@ -2938,6 +2958,14 @@ function __wbg_get_imports() {
|
|
|
2938
2958
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2939
2959
|
}
|
|
2940
2960
|
}, arguments) };
|
|
2961
|
+
imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2962
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
2963
|
+
return addHeapObject(ret);
|
|
2964
|
+
};
|
|
2965
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2966
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2967
|
+
return addHeapObject(ret);
|
|
2968
|
+
};
|
|
2941
2969
|
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2942
2970
|
const ret = getObject(arg0) == getObject(arg1);
|
|
2943
2971
|
return ret;
|
|
@@ -3185,7 +3213,7 @@ function __wbg_get_imports() {
|
|
|
3185
3213
|
const a = state0.a;
|
|
3186
3214
|
state0.a = 0;
|
|
3187
3215
|
try {
|
|
3188
|
-
return
|
|
3216
|
+
return __wbg_adapter_410(a, state0.b, arg0, arg1);
|
|
3189
3217
|
} finally {
|
|
3190
3218
|
state0.a = a;
|
|
3191
3219
|
}
|
|
@@ -3246,8 +3274,8 @@ function __wbg_get_imports() {
|
|
|
3246
3274
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
3247
3275
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
3248
3276
|
};
|
|
3249
|
-
imports.wbg.
|
|
3250
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3277
|
+
imports.wbg.__wbindgen_closure_wrapper1559 = function(arg0, arg1, arg2) {
|
|
3278
|
+
const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
|
|
3251
3279
|
return addHeapObject(ret);
|
|
3252
3280
|
};
|
|
3253
3281
|
|