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