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