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