saito-wasm 0.2.177 → 0.2.179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +1 -1
- package/package.json +1 -1
- package/pkg/node/index.d.ts +145 -145
- package/pkg/node/index.js +311 -311
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/package.json +1 -1
- package/pkg/web/index.d.ts +145 -145
- package/pkg/web/index.js +313 -313
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-466f9f7a003f28db → saito-wasm-cb5d42cd87cbad30}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-466f9f7a003f28db → saito-wasm-cb5d42cd87cbad30}/js/msg_handler.js +0 -0
package/pkg/web/index.js
CHANGED
|
@@ -1,7 +1,36 @@
|
|
|
1
|
-
import { MsgHandler } from './snippets/saito-wasm-
|
|
1
|
+
import { MsgHandler } from './snippets/saito-wasm-cb5d42cd87cbad30/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 addHeapObject(obj) {
|
|
14
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
15
|
+
const idx = heap_next;
|
|
16
|
+
heap_next = heap[idx];
|
|
17
|
+
|
|
18
|
+
heap[idx] = obj;
|
|
19
|
+
return idx;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function dropObject(idx) {
|
|
23
|
+
if (idx < 132) return;
|
|
24
|
+
heap[idx] = heap_next;
|
|
25
|
+
heap_next = idx;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function takeObject(idx) {
|
|
29
|
+
const ret = getObject(idx);
|
|
30
|
+
dropObject(idx);
|
|
31
|
+
return ret;
|
|
32
|
+
}
|
|
33
|
+
|
|
5
34
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
6
35
|
|
|
7
36
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
@@ -20,23 +49,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
20
49
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
21
50
|
}
|
|
22
51
|
|
|
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
52
|
let WASM_VECTOR_LEN = 0;
|
|
41
53
|
|
|
42
54
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
@@ -106,18 +118,6 @@ function getInt32Memory0() {
|
|
|
106
118
|
return cachedInt32Memory0;
|
|
107
119
|
}
|
|
108
120
|
|
|
109
|
-
function dropObject(idx) {
|
|
110
|
-
if (idx < 132) return;
|
|
111
|
-
heap[idx] = heap_next;
|
|
112
|
-
heap_next = idx;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function takeObject(idx) {
|
|
116
|
-
const ret = getObject(idx);
|
|
117
|
-
dropObject(idx);
|
|
118
|
-
return ret;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
121
|
let cachedFloat64Memory0 = null;
|
|
122
122
|
|
|
123
123
|
function getFloat64Memory0() {
|
|
@@ -233,13 +233,10 @@ function _assertClass(instance, klass) {
|
|
|
233
233
|
return instance.ptr;
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
|
-
* @
|
|
237
|
-
* @param {number} msg_index
|
|
238
|
-
* @param {bigint} peer_index
|
|
239
|
-
* @returns {Promise<void>}
|
|
236
|
+
* @returns {Promise<Array<any>>}
|
|
240
237
|
*/
|
|
241
|
-
export function
|
|
242
|
-
const ret = wasm.
|
|
238
|
+
export function get_mempool_txs() {
|
|
239
|
+
const ret = wasm.get_mempool_txs();
|
|
243
240
|
return takeObject(ret);
|
|
244
241
|
}
|
|
245
242
|
|
|
@@ -253,76 +250,57 @@ export function remove_stun_peer(peer_index) {
|
|
|
253
250
|
}
|
|
254
251
|
|
|
255
252
|
/**
|
|
256
|
-
* @
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* @param {string} key
|
|
265
|
-
* @returns {boolean}
|
|
266
|
-
*/
|
|
267
|
-
export function is_valid_public_key(key) {
|
|
268
|
-
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
269
|
-
return ret !== 0;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* @returns {Promise<boolean>}
|
|
274
|
-
*/
|
|
275
|
-
export function produce_block_without_gt() {
|
|
276
|
-
const ret = wasm.produce_block_without_gt();
|
|
277
|
-
return takeObject(ret);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* @param {number} major
|
|
282
|
-
* @param {number} minor
|
|
283
|
-
* @param {number} patch
|
|
284
|
-
* @returns {Promise<void>}
|
|
253
|
+
* @param {string} slip1_utxo_key
|
|
254
|
+
* @param {string} slip2_utxo_key
|
|
255
|
+
* @param {string} slip3_utxo_key
|
|
256
|
+
* @param {number} left_count
|
|
257
|
+
* @param {number} right_count
|
|
258
|
+
* @param {Uint8Array} tx_msg
|
|
259
|
+
* @returns {Promise<WasmTransaction>}
|
|
285
260
|
*/
|
|
286
|
-
export function
|
|
287
|
-
const ret = wasm.
|
|
261
|
+
export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
262
|
+
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));
|
|
288
263
|
return takeObject(ret);
|
|
289
264
|
}
|
|
290
265
|
|
|
291
266
|
/**
|
|
292
|
-
* @param {bigint}
|
|
267
|
+
* @param {bigint} peer_index
|
|
268
|
+
* @param {string} ip
|
|
293
269
|
* @returns {Promise<void>}
|
|
294
270
|
*/
|
|
295
|
-
export function
|
|
296
|
-
const ret = wasm.
|
|
271
|
+
export function process_new_peer(peer_index, ip) {
|
|
272
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
297
273
|
return takeObject(ret);
|
|
298
274
|
}
|
|
299
275
|
|
|
300
276
|
/**
|
|
301
|
-
* @returns {Promise<
|
|
277
|
+
* @returns {Promise<string>}
|
|
302
278
|
*/
|
|
303
|
-
export function
|
|
304
|
-
const ret = wasm.
|
|
279
|
+
export function get_stats() {
|
|
280
|
+
const ret = wasm.get_stats();
|
|
305
281
|
return takeObject(ret);
|
|
306
282
|
}
|
|
307
283
|
|
|
308
284
|
/**
|
|
309
|
-
* @param {
|
|
310
|
-
* @
|
|
285
|
+
* @param {Array<any>} public_keys
|
|
286
|
+
* @param {BigUint64Array} amounts
|
|
287
|
+
* @param {bigint} fee
|
|
288
|
+
* @param {boolean} _force_merge
|
|
289
|
+
* @returns {Promise<WasmTransaction>}
|
|
311
290
|
*/
|
|
312
|
-
export function
|
|
313
|
-
const ret = wasm.
|
|
291
|
+
export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
|
|
292
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
314
293
|
return takeObject(ret);
|
|
315
294
|
}
|
|
316
295
|
|
|
317
296
|
/**
|
|
318
|
-
* @param {Uint8Array} buffer
|
|
319
297
|
* @param {string} private_key
|
|
320
298
|
* @returns {string}
|
|
321
299
|
*/
|
|
322
|
-
export function
|
|
300
|
+
export function generate_public_key(private_key) {
|
|
323
301
|
try {
|
|
324
302
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
325
|
-
wasm.
|
|
303
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
326
304
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
327
305
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
328
306
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -336,53 +314,50 @@ export function sign_buffer(buffer, private_key) {
|
|
|
336
314
|
}
|
|
337
315
|
|
|
338
316
|
/**
|
|
339
|
-
* @param {
|
|
317
|
+
* @param {bigint} num
|
|
318
|
+
* @param {bigint} deposit
|
|
340
319
|
* @param {Uint8Array} tx_msg
|
|
320
|
+
* @param {bigint} fee
|
|
321
|
+
* @param {string} recipient_public_key
|
|
322
|
+
* @param {string} nft_type
|
|
341
323
|
* @returns {Promise<WasmTransaction>}
|
|
342
324
|
*/
|
|
343
|
-
export function
|
|
344
|
-
const
|
|
345
|
-
const len0 = WASM_VECTOR_LEN;
|
|
346
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
325
|
+
export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
326
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
347
327
|
return takeObject(ret);
|
|
348
328
|
}
|
|
349
329
|
|
|
350
330
|
/**
|
|
351
|
-
* @
|
|
352
|
-
* @param {number} msg_index
|
|
353
|
-
* @param {bigint} peer_index
|
|
354
|
-
* @returns {Promise<void>}
|
|
331
|
+
* @returns {Promise<boolean>}
|
|
355
332
|
*/
|
|
356
|
-
export function
|
|
357
|
-
const ret = wasm.
|
|
333
|
+
export function produce_block_with_gt() {
|
|
334
|
+
const ret = wasm.produce_block_with_gt();
|
|
358
335
|
return takeObject(ret);
|
|
359
336
|
}
|
|
360
337
|
|
|
361
338
|
/**
|
|
362
|
-
* @
|
|
363
|
-
* @param {string} slip2_utxo_key
|
|
364
|
-
* @param {string} slip3_utxo_key
|
|
365
|
-
* @param {Uint8Array} tx_msg
|
|
366
|
-
* @returns {Promise<WasmTransaction>}
|
|
339
|
+
* @returns {Promise<void>}
|
|
367
340
|
*/
|
|
368
|
-
export function
|
|
369
|
-
const ret = wasm.
|
|
341
|
+
export function disable_producing_blocks_by_timer() {
|
|
342
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
370
343
|
return takeObject(ret);
|
|
371
344
|
}
|
|
372
345
|
|
|
373
346
|
/**
|
|
374
|
-
* @
|
|
347
|
+
* @param {WasmTransaction} tx
|
|
348
|
+
* @returns {Promise<void>}
|
|
375
349
|
*/
|
|
376
|
-
export function
|
|
377
|
-
|
|
350
|
+
export function propagate_transaction(tx) {
|
|
351
|
+
_assertClass(tx, WasmTransaction);
|
|
352
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
378
353
|
return takeObject(ret);
|
|
379
354
|
}
|
|
380
355
|
|
|
381
356
|
/**
|
|
382
|
-
* @returns {
|
|
357
|
+
* @returns {string}
|
|
383
358
|
*/
|
|
384
|
-
export function
|
|
385
|
-
const ret = wasm.
|
|
359
|
+
export function generate_private_key() {
|
|
360
|
+
const ret = wasm.generate_private_key();
|
|
386
361
|
return takeObject(ret);
|
|
387
362
|
}
|
|
388
363
|
|
|
@@ -399,138 +374,174 @@ export function process_fetched_block(buffer, hash, block_id, peer_index) {
|
|
|
399
374
|
}
|
|
400
375
|
|
|
401
376
|
/**
|
|
402
|
-
* @param {
|
|
377
|
+
* @param {bigint} peer_index
|
|
378
|
+
* @param {string} public_key
|
|
403
379
|
* @returns {Promise<void>}
|
|
404
380
|
*/
|
|
405
|
-
export function
|
|
406
|
-
|
|
407
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
408
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
381
|
+
export function process_stun_peer(peer_index, public_key) {
|
|
382
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
409
383
|
return takeObject(ret);
|
|
410
384
|
}
|
|
411
385
|
|
|
412
386
|
/**
|
|
413
|
-
* @param {
|
|
414
|
-
* @param {string}
|
|
415
|
-
* @
|
|
387
|
+
* @param {string} slip1_utxo_key
|
|
388
|
+
* @param {string} slip2_utxo_key
|
|
389
|
+
* @param {string} slip3_utxo_key
|
|
390
|
+
* @param {Uint8Array} tx_msg
|
|
391
|
+
* @returns {Promise<WasmTransaction>}
|
|
416
392
|
*/
|
|
417
|
-
export function
|
|
418
|
-
const ret = wasm.
|
|
393
|
+
export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, tx_msg) {
|
|
394
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(tx_msg));
|
|
419
395
|
return takeObject(ret);
|
|
420
396
|
}
|
|
421
397
|
|
|
422
398
|
/**
|
|
423
|
-
* @param {
|
|
424
|
-
* @returns {Promise<
|
|
399
|
+
* @param {Array<any>} keys
|
|
400
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
425
401
|
*/
|
|
426
|
-
export function
|
|
427
|
-
const ret = wasm.
|
|
402
|
+
export function get_balance_snapshot(keys) {
|
|
403
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
428
404
|
return takeObject(ret);
|
|
429
405
|
}
|
|
430
406
|
|
|
431
407
|
/**
|
|
432
|
-
* @param {
|
|
433
|
-
* @
|
|
408
|
+
* @param {Uint8Array} buffer
|
|
409
|
+
* @param {string} private_key
|
|
410
|
+
* @returns {string}
|
|
434
411
|
*/
|
|
435
|
-
export function
|
|
436
|
-
|
|
412
|
+
export function sign_buffer(buffer, private_key) {
|
|
413
|
+
try {
|
|
414
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
415
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
416
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
417
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
418
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
419
|
+
if (r2) {
|
|
420
|
+
throw takeObject(r1);
|
|
421
|
+
}
|
|
422
|
+
return takeObject(r0);
|
|
423
|
+
} finally {
|
|
424
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* @returns {Promise<boolean>}
|
|
430
|
+
*/
|
|
431
|
+
export function produce_block_without_gt() {
|
|
432
|
+
const ret = wasm.produce_block_without_gt();
|
|
437
433
|
return takeObject(ret);
|
|
438
434
|
}
|
|
439
435
|
|
|
440
436
|
/**
|
|
437
|
+
* @param {bigint} threshold
|
|
441
438
|
* @returns {Promise<void>}
|
|
442
439
|
*/
|
|
443
|
-
export function
|
|
444
|
-
const ret = wasm.
|
|
440
|
+
export function write_issuance_file(threshold) {
|
|
441
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
445
442
|
return takeObject(ret);
|
|
446
443
|
}
|
|
447
444
|
|
|
448
445
|
/**
|
|
449
|
-
* @param {
|
|
450
|
-
* @param {
|
|
451
|
-
* @
|
|
446
|
+
* @param {string} config_json
|
|
447
|
+
* @param {string} private_key
|
|
448
|
+
* @param {number} log_level_num
|
|
449
|
+
* @param {bigint} hasten_multiplier
|
|
450
|
+
* @param {boolean} delete_old_blocks
|
|
451
|
+
* @returns {Promise<any>}
|
|
452
452
|
*/
|
|
453
|
-
export function
|
|
454
|
-
const ret = wasm.
|
|
453
|
+
export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
454
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
455
455
|
return takeObject(ret);
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
/**
|
|
459
|
-
* @
|
|
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>}
|
|
459
|
+
* @returns {Promise<Array<any>>}
|
|
466
460
|
*/
|
|
467
|
-
export function
|
|
468
|
-
const ret = wasm.
|
|
461
|
+
export function get_nft_list() {
|
|
462
|
+
const ret = wasm.get_nft_list();
|
|
469
463
|
return takeObject(ret);
|
|
470
464
|
}
|
|
471
465
|
|
|
472
466
|
/**
|
|
473
|
-
* @
|
|
474
|
-
* @returns {Promise<WasmBlock>}
|
|
467
|
+
* @returns {Promise<Array<any>>}
|
|
475
468
|
*/
|
|
476
|
-
export function
|
|
477
|
-
const ret = wasm.
|
|
469
|
+
export function get_peers() {
|
|
470
|
+
const ret = wasm.get_peers();
|
|
478
471
|
return takeObject(ret);
|
|
479
472
|
}
|
|
480
473
|
|
|
481
474
|
/**
|
|
482
|
-
* @
|
|
475
|
+
* @param {Uint8Array} hash
|
|
476
|
+
* @param {bigint} block_id
|
|
477
|
+
* @param {bigint} peer_index
|
|
478
|
+
* @returns {Promise<void>}
|
|
483
479
|
*/
|
|
484
|
-
export function
|
|
485
|
-
const ret = wasm.
|
|
480
|
+
export function process_failed_block_fetch(hash, block_id, peer_index) {
|
|
481
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
486
482
|
return takeObject(ret);
|
|
487
483
|
}
|
|
488
484
|
|
|
489
485
|
/**
|
|
486
|
+
* @param {Uint8Array} buffer
|
|
487
|
+
* @param {number} msg_index
|
|
490
488
|
* @param {bigint} peer_index
|
|
491
|
-
* @returns {Promise<
|
|
489
|
+
* @returns {Promise<void>}
|
|
492
490
|
*/
|
|
493
|
-
export function
|
|
494
|
-
const ret = wasm.
|
|
491
|
+
export function send_api_error(buffer, msg_index, peer_index) {
|
|
492
|
+
const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
|
|
493
|
+
return takeObject(ret);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @param {Uint8Array} buffer
|
|
498
|
+
* @param {bigint} peer_index
|
|
499
|
+
* @returns {Promise<void>}
|
|
500
|
+
*/
|
|
501
|
+
export function process_msg_buffer_from_peer(buffer, peer_index) {
|
|
502
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
495
503
|
return takeObject(ret);
|
|
496
504
|
}
|
|
497
505
|
|
|
498
506
|
/**
|
|
499
507
|
* @returns {Promise<string>}
|
|
500
508
|
*/
|
|
501
|
-
export function
|
|
502
|
-
const ret = wasm.
|
|
509
|
+
export function get_peer_stats() {
|
|
510
|
+
const ret = wasm.get_peer_stats();
|
|
503
511
|
return takeObject(ret);
|
|
504
512
|
}
|
|
505
513
|
|
|
506
514
|
/**
|
|
507
|
-
* @
|
|
515
|
+
* @param {bigint} amt
|
|
516
|
+
* @param {string} slip1_utxo_key
|
|
517
|
+
* @param {string} slip2_utxo_key
|
|
518
|
+
* @param {string} slip3_utxo_key
|
|
519
|
+
* @param {string} recipient_public_key
|
|
520
|
+
* @param {Uint8Array} tx_msg
|
|
521
|
+
* @returns {Promise<WasmTransaction>}
|
|
508
522
|
*/
|
|
509
|
-
export function
|
|
510
|
-
const ret = wasm.
|
|
523
|
+
export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
524
|
+
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));
|
|
511
525
|
return takeObject(ret);
|
|
512
526
|
}
|
|
513
527
|
|
|
514
528
|
/**
|
|
515
|
-
* @param {
|
|
516
|
-
* @
|
|
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>}
|
|
529
|
+
* @param {Uint8Array} buffer
|
|
530
|
+
* @returns {string}
|
|
522
531
|
*/
|
|
523
|
-
export function
|
|
524
|
-
const ret = wasm.
|
|
532
|
+
export function hash(buffer) {
|
|
533
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
525
534
|
return takeObject(ret);
|
|
526
535
|
}
|
|
527
536
|
|
|
528
537
|
/**
|
|
529
|
-
* @param {
|
|
538
|
+
* @param {Uint8Array} buffer
|
|
539
|
+
* @param {number} msg_index
|
|
540
|
+
* @param {bigint} peer_index
|
|
530
541
|
* @returns {Promise<void>}
|
|
531
542
|
*/
|
|
532
|
-
export function
|
|
533
|
-
const ret = wasm.
|
|
543
|
+
export function send_api_call(buffer, msg_index, peer_index) {
|
|
544
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
534
545
|
return takeObject(ret);
|
|
535
546
|
}
|
|
536
547
|
|
|
@@ -546,189 +557,178 @@ export function verify_signature(buffer, signature, public_key) {
|
|
|
546
557
|
}
|
|
547
558
|
|
|
548
559
|
/**
|
|
549
|
-
* @
|
|
560
|
+
* @param {bigint} peer_index
|
|
561
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
550
562
|
*/
|
|
551
|
-
export function
|
|
552
|
-
const ret = wasm.
|
|
563
|
+
export function get_peer(peer_index) {
|
|
564
|
+
const ret = wasm.get_peer(peer_index);
|
|
553
565
|
return takeObject(ret);
|
|
554
566
|
}
|
|
555
567
|
|
|
556
568
|
/**
|
|
557
569
|
* @returns {Promise<string>}
|
|
558
570
|
*/
|
|
559
|
-
export function
|
|
560
|
-
const ret = wasm.
|
|
571
|
+
export function get_congestion_stats() {
|
|
572
|
+
const ret = wasm.get_congestion_stats();
|
|
561
573
|
return takeObject(ret);
|
|
562
574
|
}
|
|
563
575
|
|
|
564
576
|
/**
|
|
577
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
565
578
|
* @returns {Promise<void>}
|
|
566
579
|
*/
|
|
567
|
-
export function
|
|
568
|
-
|
|
580
|
+
export function update_from_balance_snapshot(snapshot) {
|
|
581
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
582
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
583
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
569
584
|
return takeObject(ret);
|
|
570
585
|
}
|
|
571
586
|
|
|
572
587
|
/**
|
|
573
|
-
* @
|
|
574
|
-
* @returns {string}
|
|
588
|
+
* @returns {Promise<WasmWallet>}
|
|
575
589
|
*/
|
|
576
|
-
export function
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
580
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
581
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
582
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
583
|
-
if (r2) {
|
|
584
|
-
throw takeObject(r1);
|
|
585
|
-
}
|
|
586
|
-
return takeObject(r0);
|
|
587
|
-
} finally {
|
|
588
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
589
|
-
}
|
|
590
|
+
export function get_wallet() {
|
|
591
|
+
const ret = wasm.get_wallet();
|
|
592
|
+
return takeObject(ret);
|
|
590
593
|
}
|
|
591
594
|
|
|
592
595
|
/**
|
|
593
|
-
* @returns {Promise<
|
|
596
|
+
* @returns {Promise<WasmBlockchain>}
|
|
594
597
|
*/
|
|
595
|
-
export function
|
|
596
|
-
const ret = wasm.
|
|
598
|
+
export function get_blockchain() {
|
|
599
|
+
const ret = wasm.get_blockchain();
|
|
597
600
|
return takeObject(ret);
|
|
598
601
|
}
|
|
599
602
|
|
|
600
603
|
/**
|
|
601
|
-
* @
|
|
604
|
+
* @param {string} public_key
|
|
605
|
+
* @param {bigint} amount
|
|
606
|
+
* @param {bigint} fee
|
|
607
|
+
* @param {boolean} force_merge
|
|
608
|
+
* @returns {Promise<WasmTransaction>}
|
|
602
609
|
*/
|
|
603
|
-
export function
|
|
604
|
-
const ret = wasm.
|
|
610
|
+
export function create_transaction(public_key, amount, fee, force_merge) {
|
|
611
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
605
612
|
return takeObject(ret);
|
|
606
613
|
}
|
|
607
614
|
|
|
608
615
|
/**
|
|
609
|
-
* @returns {
|
|
616
|
+
* @returns {Promise<void>}
|
|
610
617
|
*/
|
|
611
|
-
export function
|
|
612
|
-
const ret = wasm.
|
|
618
|
+
export function start_from_received_ghost_chain() {
|
|
619
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
613
620
|
return takeObject(ret);
|
|
614
621
|
}
|
|
615
622
|
|
|
616
623
|
/**
|
|
617
|
-
* @
|
|
624
|
+
* @param {bigint} duration_in_ms
|
|
625
|
+
* @returns {Promise<void>}
|
|
618
626
|
*/
|
|
619
|
-
export function
|
|
620
|
-
const ret = wasm.
|
|
627
|
+
export function process_timer_event(duration_in_ms) {
|
|
628
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
621
629
|
return takeObject(ret);
|
|
622
630
|
}
|
|
623
631
|
|
|
624
632
|
/**
|
|
625
|
-
* @param {
|
|
626
|
-
* @
|
|
627
|
-
* @param {number} log_level_num
|
|
628
|
-
* @param {bigint} hasten_multiplier
|
|
629
|
-
* @param {boolean} delete_old_blocks
|
|
630
|
-
* @returns {Promise<any>}
|
|
633
|
+
* @param {bigint} peer_index
|
|
634
|
+
* @returns {Promise<void>}
|
|
631
635
|
*/
|
|
632
|
-
export function
|
|
633
|
-
const ret = wasm.
|
|
636
|
+
export function process_peer_disconnection(peer_index) {
|
|
637
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
634
638
|
return takeObject(ret);
|
|
635
639
|
}
|
|
636
640
|
|
|
637
641
|
/**
|
|
638
|
-
* @
|
|
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>}
|
|
642
|
+
* @returns {Promise<bigint>}
|
|
645
643
|
*/
|
|
646
|
-
export function
|
|
647
|
-
const ret = wasm.
|
|
644
|
+
export function get_next_peer_index() {
|
|
645
|
+
const ret = wasm.get_next_peer_index();
|
|
648
646
|
return takeObject(ret);
|
|
649
647
|
}
|
|
650
648
|
|
|
651
649
|
/**
|
|
652
|
-
* @param {
|
|
653
|
-
* @
|
|
650
|
+
* @param {number} major
|
|
651
|
+
* @param {number} minor
|
|
652
|
+
* @param {number} patch
|
|
653
|
+
* @returns {Promise<void>}
|
|
654
654
|
*/
|
|
655
|
-
export function
|
|
656
|
-
const ret = wasm.
|
|
655
|
+
export function set_wallet_version(major, minor, patch) {
|
|
656
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
657
657
|
return takeObject(ret);
|
|
658
658
|
}
|
|
659
659
|
|
|
660
660
|
/**
|
|
661
|
-
* @param {
|
|
662
|
-
* @returns {Promise<
|
|
661
|
+
* @param {string} block_hash
|
|
662
|
+
* @returns {Promise<WasmBlock>}
|
|
663
663
|
*/
|
|
664
|
-
export function
|
|
665
|
-
const ret = wasm.
|
|
664
|
+
export function get_block(block_hash) {
|
|
665
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
666
666
|
return takeObject(ret);
|
|
667
667
|
}
|
|
668
668
|
|
|
669
669
|
/**
|
|
670
|
-
* @param {
|
|
671
|
-
* @param {
|
|
672
|
-
* @returns {Promise<
|
|
670
|
+
* @param {string} nft_id_hex
|
|
671
|
+
* @param {Uint8Array} tx_msg
|
|
672
|
+
* @returns {Promise<WasmTransaction>}
|
|
673
673
|
*/
|
|
674
|
-
export function
|
|
675
|
-
const
|
|
674
|
+
export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
|
|
675
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
676
|
+
const len0 = WASM_VECTOR_LEN;
|
|
677
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
676
678
|
return takeObject(ret);
|
|
677
679
|
}
|
|
678
680
|
|
|
679
681
|
/**
|
|
680
|
-
* @param {
|
|
681
|
-
* @
|
|
682
|
-
* @param {bigint} peer_index
|
|
683
|
-
* @returns {Promise<void>}
|
|
682
|
+
* @param {string} key
|
|
683
|
+
* @returns {boolean}
|
|
684
684
|
*/
|
|
685
|
-
export function
|
|
686
|
-
const ret = wasm.
|
|
685
|
+
export function is_valid_public_key(key) {
|
|
686
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
687
|
+
return ret !== 0;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* @returns {Promise<string>}
|
|
692
|
+
*/
|
|
693
|
+
export function get_latest_block_hash() {
|
|
694
|
+
const ret = wasm.get_latest_block_hash();
|
|
687
695
|
return takeObject(ret);
|
|
688
696
|
}
|
|
689
697
|
|
|
690
698
|
/**
|
|
691
|
-
* @
|
|
692
|
-
* @param {BigUint64Array} amounts
|
|
693
|
-
* @param {bigint} fee
|
|
694
|
-
* @param {boolean} _force_merge
|
|
695
|
-
* @returns {Promise<WasmTransaction>}
|
|
699
|
+
* @returns {Promise<any>}
|
|
696
700
|
*/
|
|
697
|
-
export function
|
|
698
|
-
const ret = wasm.
|
|
701
|
+
export function get_confirmations() {
|
|
702
|
+
const ret = wasm.get_confirmations();
|
|
699
703
|
return takeObject(ret);
|
|
700
704
|
}
|
|
701
705
|
|
|
702
706
|
/**
|
|
703
|
-
* @param {
|
|
704
|
-
* @param {number} msg_index
|
|
705
|
-
* @param {bigint} peer_index
|
|
707
|
+
* @param {bigint} current_time
|
|
706
708
|
* @returns {Promise<void>}
|
|
707
709
|
*/
|
|
708
|
-
export function
|
|
709
|
-
const ret = wasm.
|
|
710
|
+
export function process_stat_interval(current_time) {
|
|
711
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
710
712
|
return takeObject(ret);
|
|
711
713
|
}
|
|
712
714
|
|
|
713
715
|
/**
|
|
714
716
|
* @param {string} public_key
|
|
715
|
-
* @
|
|
716
|
-
* @param {bigint} fee
|
|
717
|
-
* @param {boolean} force_merge
|
|
718
|
-
* @returns {Promise<WasmTransaction>}
|
|
717
|
+
* @returns {Promise<Array<any>>}
|
|
719
718
|
*/
|
|
720
|
-
export function
|
|
721
|
-
const ret = wasm.
|
|
719
|
+
export function get_account_slips(public_key) {
|
|
720
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
722
721
|
return takeObject(ret);
|
|
723
722
|
}
|
|
724
723
|
|
|
725
724
|
/**
|
|
726
|
-
* @param {
|
|
725
|
+
* @param {Uint8Array} buffer
|
|
726
|
+
* @param {number} msg_index
|
|
727
|
+
* @param {bigint} peer_index
|
|
727
728
|
* @returns {Promise<void>}
|
|
728
729
|
*/
|
|
729
|
-
export function
|
|
730
|
-
|
|
731
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
730
|
+
export function send_api_success(buffer, msg_index, peer_index) {
|
|
731
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
732
732
|
return takeObject(ret);
|
|
733
733
|
}
|
|
734
734
|
|
|
@@ -2697,65 +2697,65 @@ async function __wbg_load(module, imports) {
|
|
|
2697
2697
|
function __wbg_get_imports() {
|
|
2698
2698
|
const imports = {};
|
|
2699
2699
|
imports.wbg = {};
|
|
2700
|
-
imports.wbg.
|
|
2701
|
-
const ret =
|
|
2700
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
2701
|
+
const ret = getObject(arg0);
|
|
2702
2702
|
return addHeapObject(ret);
|
|
2703
2703
|
};
|
|
2704
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
2705
|
-
const obj = getObject(arg1);
|
|
2706
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2707
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2708
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2709
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2710
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2711
|
-
};
|
|
2712
2704
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
2713
2705
|
takeObject(arg0);
|
|
2714
2706
|
};
|
|
2715
|
-
imports.wbg.
|
|
2716
|
-
const ret =
|
|
2717
|
-
return addHeapObject(ret);
|
|
2718
|
-
};
|
|
2719
|
-
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2720
|
-
const ret = WasmPeer.__wrap(arg0);
|
|
2721
|
-
return addHeapObject(ret);
|
|
2722
|
-
};
|
|
2723
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2724
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
2707
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2708
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2725
2709
|
return addHeapObject(ret);
|
|
2726
2710
|
};
|
|
2727
|
-
imports.wbg.
|
|
2728
|
-
const ret =
|
|
2711
|
+
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
2712
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2729
2713
|
return addHeapObject(ret);
|
|
2730
2714
|
};
|
|
2731
|
-
imports.wbg.
|
|
2732
|
-
const ret =
|
|
2715
|
+
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
2716
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2733
2717
|
return addHeapObject(ret);
|
|
2734
2718
|
};
|
|
2735
|
-
imports.wbg.
|
|
2736
|
-
const ret =
|
|
2719
|
+
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2720
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2737
2721
|
return addHeapObject(ret);
|
|
2738
2722
|
};
|
|
2739
2723
|
imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
|
|
2740
2724
|
const ret = WasmBlockchain.__wrap(arg0);
|
|
2741
2725
|
return addHeapObject(ret);
|
|
2742
2726
|
};
|
|
2743
|
-
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
2744
|
-
const ret = WasmSlip.__wrap(arg0);
|
|
2745
|
-
return addHeapObject(ret);
|
|
2746
|
-
};
|
|
2747
2727
|
imports.wbg.__wbg_wasmnft_new = function(arg0) {
|
|
2748
2728
|
const ret = WasmNFT.__wrap(arg0);
|
|
2749
2729
|
return addHeapObject(ret);
|
|
2750
2730
|
};
|
|
2731
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2732
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2733
|
+
return addHeapObject(ret);
|
|
2734
|
+
};
|
|
2735
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
2736
|
+
const obj = getObject(arg1);
|
|
2737
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2738
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2739
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2740
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2741
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2742
|
+
};
|
|
2751
2743
|
imports.wbg.__wbg_wasmwallet_new = function(arg0) {
|
|
2752
2744
|
const ret = WasmWallet.__wrap(arg0);
|
|
2753
2745
|
return addHeapObject(ret);
|
|
2754
2746
|
};
|
|
2747
|
+
imports.wbg.__wbg_wasmblock_new = function(arg0) {
|
|
2748
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2749
|
+
return addHeapObject(ret);
|
|
2750
|
+
};
|
|
2755
2751
|
imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2756
2752
|
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2757
2753
|
return addHeapObject(ret);
|
|
2758
2754
|
};
|
|
2755
|
+
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2756
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2757
|
+
return addHeapObject(ret);
|
|
2758
|
+
};
|
|
2759
2759
|
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2760
2760
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2761
2761
|
return addHeapObject(ret);
|
|
@@ -2781,7 +2781,7 @@ function __wbg_get_imports() {
|
|
|
2781
2781
|
const ret = WasmHop.__wrap(arg0);
|
|
2782
2782
|
return addHeapObject(ret);
|
|
2783
2783
|
};
|
|
2784
|
-
imports.wbg.
|
|
2784
|
+
imports.wbg.__wbg_flushdata_57a24af0b42b2a24 = 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_eda09e3e85f91c6e = 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_b5182506283605ab = function() {
|
|
2808
2808
|
MsgHandler.load_wallet();
|
|
2809
2809
|
};
|
|
2810
|
-
imports.wbg.
|
|
2810
|
+
imports.wbg.__wbg_savewallet_1c5ab82d380b4271 = function() {
|
|
2811
2811
|
MsgHandler.save_wallet();
|
|
2812
2812
|
};
|
|
2813
|
-
imports.wbg.
|
|
2813
|
+
imports.wbg.__wbg_writevalue_d45c2dd3c8c56d4f = 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_80a14b3de2c6810c = 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_0bcbb4eb73cb550c = 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_ace5b81144243ec4 = function(arg0, arg1) {
|
|
2848
2848
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2849
2849
|
};
|
|
2850
|
-
imports.wbg.
|
|
2850
|
+
imports.wbg.__wbg_connecttopeer_718f23f2a1dad46e = 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_7c7c0312b835ecdf = 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_10384e694274432a = 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_429c448ba53022f8 = 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_481f5de5114e5c58 = 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_e7f80683c7350d70 = 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_929a50f93e17f953 = function(arg0, arg1) {
|
|
2890
2890
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2891
2891
|
};
|
|
2892
|
-
imports.wbg.
|
|
2892
|
+
imports.wbg.__wbg_disconnectfrompeer_4f6e3738fa40715a = 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_570aba530ebee4ed = 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_c21cebbf951ca686 = 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_802b9fa50313a64b = 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_636634402ee17f59 = function() {
|
|
2928
2928
|
MsgHandler.send_wallet_update();
|
|
2929
2929
|
};
|
|
2930
|
-
imports.wbg.
|
|
2930
|
+
imports.wbg.__wbg_sendnewversionalert_732df9ad6cd449c7 = 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_b001665c60100280 = function(arg0) {
|
|
2942
2942
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2943
2943
|
};
|
|
2944
|
-
imports.wbg.
|
|
2944
|
+
imports.wbg.__wbg_sendnewchaindetectedevent_5478f95c31363715 = function() {
|
|
2945
2945
|
MsgHandler.send_new_chain_detected_event();
|
|
2946
2946
|
};
|
|
2947
|
-
imports.wbg.
|
|
2947
|
+
imports.wbg.__wbg_fetchblockfrompeer_2586d36df17cd9e4 = 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_f091e82931e71635 = function() { return handleError(function (arg0, arg1) {
|
|
2960
2960
|
let deferred0_0;
|
|
2961
2961
|
let deferred0_1;
|
|
2962
2962
|
try {
|