saito-wasm 0.2.164 → 0.2.166
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 +5 -2
- package/package.json +1 -1
- package/pkg/node/index.d.ts +142 -135
- package/pkg/node/index.js +325 -313
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +112 -111
- package/pkg/node/package.json +1 -1
- package/pkg/web/index.d.ts +254 -246
- package/pkg/web/index.js +322 -310
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +112 -111
- package/pkg/web/package.json +1 -1
- /package/pkg/node/snippets/{saito-wasm-21975b2e7dbeb5a0 → saito-wasm-083e81febfc0ef0c}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-21975b2e7dbeb5a0 → saito-wasm-083e81febfc0ef0c}/js/msg_handler.js +0 -0
package/pkg/node/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-
|
|
4
|
+
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-083e81febfc0ef0c/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
7
|
const heap = new Array(128).fill(undefined);
|
|
@@ -24,15 +24,6 @@ function takeObject(idx) {
|
|
|
24
24
|
return ret;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function addHeapObject(obj) {
|
|
28
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
29
|
-
const idx = heap_next;
|
|
30
|
-
heap_next = heap[idx];
|
|
31
|
-
|
|
32
|
-
heap[idx] = obj;
|
|
33
|
-
return idx;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
27
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
37
28
|
|
|
38
29
|
cachedTextDecoder.decode();
|
|
@@ -51,6 +42,15 @@ function getStringFromWasm0(ptr, len) {
|
|
|
51
42
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
52
43
|
}
|
|
53
44
|
|
|
45
|
+
function addHeapObject(obj) {
|
|
46
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
47
|
+
const idx = heap_next;
|
|
48
|
+
heap_next = heap[idx];
|
|
49
|
+
|
|
50
|
+
heap[idx] = obj;
|
|
51
|
+
return idx;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
55
55
|
|
|
56
56
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -225,7 +225,15 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
225
225
|
return real;
|
|
226
226
|
}
|
|
227
227
|
function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
228
|
-
wasm.
|
|
228
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h18f9d53151d93e96(arg0, arg1, addHeapObject(arg2));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
let stack_pointer = 128;
|
|
232
|
+
|
|
233
|
+
function addBorrowedObject(obj) {
|
|
234
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
235
|
+
heap[--stack_pointer] = obj;
|
|
236
|
+
return stack_pointer;
|
|
229
237
|
}
|
|
230
238
|
|
|
231
239
|
function _assertClass(instance, klass) {
|
|
@@ -235,108 +243,106 @@ function _assertClass(instance, klass) {
|
|
|
235
243
|
return instance.ptr;
|
|
236
244
|
}
|
|
237
245
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
246
|
+
function handleError(f, args) {
|
|
247
|
+
try {
|
|
248
|
+
return f.apply(this, args);
|
|
249
|
+
} catch (e) {
|
|
250
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
251
|
+
}
|
|
244
252
|
}
|
|
245
253
|
/**
|
|
246
|
-
* @
|
|
247
|
-
* @returns {string}
|
|
254
|
+
* @returns {Promise<string>}
|
|
248
255
|
*/
|
|
249
|
-
module.exports.
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
253
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
254
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
255
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
256
|
-
if (r2) {
|
|
257
|
-
throw takeObject(r1);
|
|
258
|
-
}
|
|
259
|
-
return takeObject(r0);
|
|
260
|
-
} finally {
|
|
261
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
262
|
-
}
|
|
256
|
+
module.exports.get_congestion_stats = function() {
|
|
257
|
+
const ret = wasm.get_congestion_stats();
|
|
258
|
+
return takeObject(ret);
|
|
263
259
|
};
|
|
264
260
|
|
|
265
261
|
/**
|
|
266
|
-
* @param {
|
|
262
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
267
263
|
* @returns {Promise<void>}
|
|
268
264
|
*/
|
|
269
|
-
module.exports.
|
|
270
|
-
|
|
265
|
+
module.exports.update_from_balance_snapshot = function(snapshot) {
|
|
266
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
267
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
268
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
271
269
|
return takeObject(ret);
|
|
272
270
|
};
|
|
273
271
|
|
|
274
272
|
/**
|
|
275
|
-
* @
|
|
276
|
-
* @returns {Promise<Array<any>>}
|
|
273
|
+
* @returns {Promise<void>}
|
|
277
274
|
*/
|
|
278
|
-
module.exports.
|
|
279
|
-
const ret = wasm.
|
|
275
|
+
module.exports.disable_producing_blocks_by_timer = function() {
|
|
276
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
280
277
|
return takeObject(ret);
|
|
281
278
|
};
|
|
282
279
|
|
|
283
280
|
/**
|
|
284
281
|
* @returns {Promise<string>}
|
|
285
282
|
*/
|
|
286
|
-
module.exports.
|
|
287
|
-
const ret = wasm.
|
|
283
|
+
module.exports.get_stats = function() {
|
|
284
|
+
const ret = wasm.get_stats();
|
|
288
285
|
return takeObject(ret);
|
|
289
286
|
};
|
|
290
287
|
|
|
291
288
|
/**
|
|
292
|
-
* @param {
|
|
293
|
-
* @returns {Promise<
|
|
289
|
+
* @param {string} public_key
|
|
290
|
+
* @returns {Promise<Array<any>>}
|
|
294
291
|
*/
|
|
295
|
-
module.exports.
|
|
296
|
-
const ret = wasm.
|
|
292
|
+
module.exports.get_account_slips = function(public_key) {
|
|
293
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
297
294
|
return takeObject(ret);
|
|
298
295
|
};
|
|
299
296
|
|
|
300
297
|
/**
|
|
301
|
-
* @
|
|
298
|
+
* @param {bigint} num
|
|
299
|
+
* @param {bigint} deposit
|
|
300
|
+
* @param {Uint8Array} tx_msg
|
|
301
|
+
* @param {bigint} fee
|
|
302
|
+
* @param {string} recipient_public_key
|
|
303
|
+
* @param {string} nft_type
|
|
304
|
+
* @returns {Promise<WasmTransaction>}
|
|
302
305
|
*/
|
|
303
|
-
module.exports.
|
|
304
|
-
const ret = wasm.
|
|
306
|
+
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
307
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
305
308
|
return takeObject(ret);
|
|
306
309
|
};
|
|
307
310
|
|
|
308
311
|
/**
|
|
309
|
-
* @param {Uint8Array} buffer
|
|
310
|
-
* @param {number} msg_index
|
|
311
312
|
* @param {bigint} peer_index
|
|
312
313
|
* @returns {Promise<void>}
|
|
313
314
|
*/
|
|
314
|
-
module.exports.
|
|
315
|
-
const ret = wasm.
|
|
315
|
+
module.exports.remove_stun_peer = function(peer_index) {
|
|
316
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
316
317
|
return takeObject(ret);
|
|
317
318
|
};
|
|
318
319
|
|
|
319
320
|
/**
|
|
320
|
-
* @
|
|
321
|
-
* @param {string} public_key
|
|
322
|
-
* @returns {Promise<void>}
|
|
321
|
+
* @returns {Promise<any>}
|
|
323
322
|
*/
|
|
324
|
-
module.exports.
|
|
325
|
-
const ret = wasm.
|
|
323
|
+
module.exports.get_confirmations = function() {
|
|
324
|
+
const ret = wasm.get_confirmations();
|
|
326
325
|
return takeObject(ret);
|
|
327
326
|
};
|
|
328
327
|
|
|
329
328
|
/**
|
|
330
|
-
* @param {
|
|
331
|
-
* @param {bigint} block_id
|
|
332
|
-
* @param {bigint} peer_index
|
|
329
|
+
* @param {bigint} current_time
|
|
333
330
|
* @returns {Promise<void>}
|
|
334
331
|
*/
|
|
335
|
-
module.exports.
|
|
336
|
-
const ret = wasm.
|
|
332
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
333
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
337
334
|
return takeObject(ret);
|
|
338
335
|
};
|
|
339
336
|
|
|
337
|
+
/**
|
|
338
|
+
* @param {string} key
|
|
339
|
+
* @returns {boolean}
|
|
340
|
+
*/
|
|
341
|
+
module.exports.is_valid_public_key = function(key) {
|
|
342
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
343
|
+
return ret !== 0;
|
|
344
|
+
};
|
|
345
|
+
|
|
340
346
|
/**
|
|
341
347
|
* @param {string} config_json
|
|
342
348
|
* @param {string} private_key
|
|
@@ -351,31 +357,27 @@ module.exports.initialize = function(config_json, private_key, log_level_num, ha
|
|
|
351
357
|
};
|
|
352
358
|
|
|
353
359
|
/**
|
|
354
|
-
* @param {
|
|
355
|
-
* @
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* @returns {Promise<Array<any>>}
|
|
360
|
+
* @param {bigint} amt
|
|
361
|
+
* @param {string} slip1_utxo_key
|
|
362
|
+
* @param {string} slip2_utxo_key
|
|
363
|
+
* @param {string} slip3_utxo_key
|
|
364
|
+
* @param {string} recipient_public_key
|
|
365
|
+
* @param {Uint8Array} tx_msg
|
|
366
|
+
* @returns {Promise<WasmTransaction>}
|
|
364
367
|
*/
|
|
365
|
-
module.exports.
|
|
366
|
-
const ret = wasm.
|
|
368
|
+
module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
369
|
+
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));
|
|
367
370
|
return takeObject(ret);
|
|
368
371
|
};
|
|
369
372
|
|
|
370
373
|
/**
|
|
371
|
-
* @param {string}
|
|
372
|
-
* @param {
|
|
374
|
+
* @param {string} slip1_utxo_key
|
|
375
|
+
* @param {string} slip2_utxo_key
|
|
376
|
+
* @param {string} slip3_utxo_key
|
|
373
377
|
* @returns {Promise<WasmTransaction>}
|
|
374
378
|
*/
|
|
375
|
-
module.exports.
|
|
376
|
-
const
|
|
377
|
-
const len0 = WASM_VECTOR_LEN;
|
|
378
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
379
|
+
module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
|
|
380
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
|
|
379
381
|
return takeObject(ret);
|
|
380
382
|
};
|
|
381
383
|
|
|
@@ -388,56 +390,76 @@ module.exports.get_blockchain = function() {
|
|
|
388
390
|
};
|
|
389
391
|
|
|
390
392
|
/**
|
|
391
|
-
* @
|
|
392
|
-
* @returns {Promise<WasmBalanceSnapshot>}
|
|
393
|
+
* @returns {Promise<Array<any>>}
|
|
393
394
|
*/
|
|
394
|
-
module.exports.
|
|
395
|
-
const ret = wasm.
|
|
395
|
+
module.exports.get_mempool_txs = function() {
|
|
396
|
+
const ret = wasm.get_mempool_txs();
|
|
396
397
|
return takeObject(ret);
|
|
397
398
|
};
|
|
398
399
|
|
|
399
400
|
/**
|
|
400
|
-
* @param {
|
|
401
|
-
* @
|
|
401
|
+
* @param {string} nft_id_hex
|
|
402
|
+
* @param {Uint8Array} tx_msg
|
|
403
|
+
* @returns {Promise<WasmTransaction>}
|
|
402
404
|
*/
|
|
403
|
-
module.exports.
|
|
404
|
-
const
|
|
405
|
+
module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
|
|
406
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
407
|
+
const len0 = WASM_VECTOR_LEN;
|
|
408
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
405
409
|
return takeObject(ret);
|
|
406
410
|
};
|
|
407
411
|
|
|
408
412
|
/**
|
|
409
|
-
* @
|
|
410
|
-
* @param {Uint8Array} hash
|
|
411
|
-
* @param {bigint} block_id
|
|
412
|
-
* @param {bigint} peer_index
|
|
413
|
-
* @returns {Promise<void>}
|
|
413
|
+
* @returns {Promise<Array<any>>}
|
|
414
414
|
*/
|
|
415
|
-
module.exports.
|
|
416
|
-
const ret = wasm.
|
|
415
|
+
module.exports.get_nft_list = function() {
|
|
416
|
+
const ret = wasm.get_nft_list();
|
|
417
417
|
return takeObject(ret);
|
|
418
418
|
};
|
|
419
419
|
|
|
420
420
|
/**
|
|
421
|
-
* @returns {Promise<
|
|
421
|
+
* @returns {Promise<string>}
|
|
422
422
|
*/
|
|
423
|
-
module.exports.
|
|
424
|
-
const ret = wasm.
|
|
423
|
+
module.exports.get_latest_block_hash = function() {
|
|
424
|
+
const ret = wasm.get_latest_block_hash();
|
|
425
425
|
return takeObject(ret);
|
|
426
426
|
};
|
|
427
427
|
|
|
428
428
|
/**
|
|
429
|
-
* @
|
|
429
|
+
* @param {Uint8Array} buffer
|
|
430
|
+
* @param {string} private_key
|
|
431
|
+
* @returns {string}
|
|
430
432
|
*/
|
|
431
|
-
module.exports.
|
|
432
|
-
|
|
433
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
434
|
+
try {
|
|
435
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
436
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
437
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
438
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
439
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
440
|
+
if (r2) {
|
|
441
|
+
throw takeObject(r1);
|
|
442
|
+
}
|
|
443
|
+
return takeObject(r0);
|
|
444
|
+
} finally {
|
|
445
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* @param {bigint} peer_index
|
|
451
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
452
|
+
*/
|
|
453
|
+
module.exports.get_peer = function(peer_index) {
|
|
454
|
+
const ret = wasm.get_peer(peer_index);
|
|
433
455
|
return takeObject(ret);
|
|
434
456
|
};
|
|
435
457
|
|
|
436
458
|
/**
|
|
437
|
-
* @returns {Promise<
|
|
459
|
+
* @returns {Promise<void>}
|
|
438
460
|
*/
|
|
439
|
-
module.exports.
|
|
440
|
-
const ret = wasm.
|
|
461
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
462
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
441
463
|
return takeObject(ret);
|
|
442
464
|
};
|
|
443
465
|
|
|
@@ -449,6 +471,15 @@ module.exports.generate_private_key = function() {
|
|
|
449
471
|
return takeObject(ret);
|
|
450
472
|
};
|
|
451
473
|
|
|
474
|
+
/**
|
|
475
|
+
* @param {string} block_hash
|
|
476
|
+
* @returns {Promise<WasmBlock>}
|
|
477
|
+
*/
|
|
478
|
+
module.exports.get_block = function(block_hash) {
|
|
479
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
480
|
+
return takeObject(ret);
|
|
481
|
+
};
|
|
482
|
+
|
|
452
483
|
/**
|
|
453
484
|
* @param {Uint8Array} buffer
|
|
454
485
|
* @param {number} msg_index
|
|
@@ -461,58 +492,82 @@ module.exports.send_api_error = function(buffer, msg_index, peer_index) {
|
|
|
461
492
|
};
|
|
462
493
|
|
|
463
494
|
/**
|
|
464
|
-
* @param {
|
|
465
|
-
* @param {
|
|
466
|
-
* @param {
|
|
467
|
-
* @param {
|
|
468
|
-
* @param {number} right_count
|
|
469
|
-
* @param {Uint8Array} tx_msg
|
|
495
|
+
* @param {Array<any>} public_keys
|
|
496
|
+
* @param {BigUint64Array} amounts
|
|
497
|
+
* @param {bigint} fee
|
|
498
|
+
* @param {boolean} _force_merge
|
|
470
499
|
* @returns {Promise<WasmTransaction>}
|
|
471
500
|
*/
|
|
472
|
-
module.exports.
|
|
473
|
-
const ret = wasm.
|
|
501
|
+
module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
|
|
502
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
474
503
|
return takeObject(ret);
|
|
475
504
|
};
|
|
476
505
|
|
|
477
506
|
/**
|
|
478
|
-
* @param {
|
|
507
|
+
* @param {Uint8Array} buffer
|
|
508
|
+
* @returns {string}
|
|
509
|
+
*/
|
|
510
|
+
module.exports.hash = function(buffer) {
|
|
511
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
512
|
+
return takeObject(ret);
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* @returns {Promise<boolean>}
|
|
517
|
+
*/
|
|
518
|
+
module.exports.produce_block_with_gt = function() {
|
|
519
|
+
const ret = wasm.produce_block_with_gt();
|
|
520
|
+
return takeObject(ret);
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* @param {Uint8Array} hash
|
|
525
|
+
* @param {bigint} block_id
|
|
526
|
+
* @param {bigint} peer_index
|
|
479
527
|
* @returns {Promise<void>}
|
|
480
528
|
*/
|
|
481
|
-
module.exports.
|
|
482
|
-
|
|
483
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
484
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
529
|
+
module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
|
|
530
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
485
531
|
return takeObject(ret);
|
|
486
532
|
};
|
|
487
533
|
|
|
488
534
|
/**
|
|
489
|
-
* @param {
|
|
490
|
-
* @param {
|
|
491
|
-
* @param {
|
|
492
|
-
* @param {
|
|
493
|
-
* @
|
|
494
|
-
* @param {Uint8Array} tx_msg
|
|
495
|
-
* @returns {Promise<WasmTransaction>}
|
|
535
|
+
* @param {Uint8Array} buffer
|
|
536
|
+
* @param {Uint8Array} hash
|
|
537
|
+
* @param {bigint} block_id
|
|
538
|
+
* @param {bigint} peer_index
|
|
539
|
+
* @returns {Promise<void>}
|
|
496
540
|
*/
|
|
497
|
-
module.exports.
|
|
498
|
-
const ret = wasm.
|
|
541
|
+
module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
|
|
542
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
499
543
|
return takeObject(ret);
|
|
500
544
|
};
|
|
501
545
|
|
|
502
546
|
/**
|
|
503
|
-
* @param {
|
|
504
|
-
* @
|
|
547
|
+
* @param {number} major
|
|
548
|
+
* @param {number} minor
|
|
549
|
+
* @param {number} patch
|
|
550
|
+
* @returns {Promise<void>}
|
|
505
551
|
*/
|
|
506
|
-
module.exports.
|
|
507
|
-
const ret = wasm.
|
|
552
|
+
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
553
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
508
554
|
return takeObject(ret);
|
|
509
555
|
};
|
|
510
556
|
|
|
511
557
|
/**
|
|
512
|
-
* @returns {Promise<
|
|
558
|
+
* @returns {Promise<boolean>}
|
|
513
559
|
*/
|
|
514
|
-
module.exports.
|
|
515
|
-
const ret = wasm.
|
|
560
|
+
module.exports.produce_block_without_gt = function() {
|
|
561
|
+
const ret = wasm.produce_block_without_gt();
|
|
562
|
+
return takeObject(ret);
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* @param {bigint} threshold
|
|
567
|
+
* @returns {Promise<void>}
|
|
568
|
+
*/
|
|
569
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
570
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
516
571
|
return takeObject(ret);
|
|
517
572
|
};
|
|
518
573
|
|
|
@@ -520,49 +575,49 @@ module.exports.get_peer_stats = function() {
|
|
|
520
575
|
* @param {bigint} peer_index
|
|
521
576
|
* @returns {Promise<void>}
|
|
522
577
|
*/
|
|
523
|
-
module.exports.
|
|
524
|
-
const ret = wasm.
|
|
578
|
+
module.exports.process_peer_disconnection = function(peer_index) {
|
|
579
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
525
580
|
return takeObject(ret);
|
|
526
581
|
};
|
|
527
582
|
|
|
528
583
|
/**
|
|
529
|
-
* @param {
|
|
530
|
-
* @
|
|
584
|
+
* @param {string} public_key
|
|
585
|
+
* @param {bigint} amount
|
|
586
|
+
* @param {bigint} fee
|
|
587
|
+
* @param {boolean} force_merge
|
|
588
|
+
* @returns {Promise<WasmTransaction>}
|
|
531
589
|
*/
|
|
532
|
-
module.exports.
|
|
533
|
-
const ret = wasm.
|
|
590
|
+
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
591
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
534
592
|
return takeObject(ret);
|
|
535
593
|
};
|
|
536
594
|
|
|
537
595
|
/**
|
|
538
|
-
* @param {Array<any>}
|
|
539
|
-
* @
|
|
540
|
-
* @param {bigint} fee
|
|
541
|
-
* @param {boolean} _force_merge
|
|
542
|
-
* @returns {Promise<WasmTransaction>}
|
|
596
|
+
* @param {Array<any>} keys
|
|
597
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
543
598
|
*/
|
|
544
|
-
module.exports.
|
|
545
|
-
const ret = wasm.
|
|
599
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
600
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
546
601
|
return takeObject(ret);
|
|
547
602
|
};
|
|
548
603
|
|
|
549
604
|
/**
|
|
550
|
-
* @param {
|
|
605
|
+
* @param {Uint8Array} buffer
|
|
606
|
+
* @param {bigint} peer_index
|
|
551
607
|
* @returns {Promise<void>}
|
|
552
608
|
*/
|
|
553
|
-
module.exports.
|
|
554
|
-
const ret = wasm.
|
|
609
|
+
module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
|
|
610
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
555
611
|
return takeObject(ret);
|
|
556
612
|
};
|
|
557
613
|
|
|
558
614
|
/**
|
|
559
|
-
* @param {
|
|
560
|
-
* @param {
|
|
561
|
-
* @param {number} patch
|
|
615
|
+
* @param {bigint} peer_index
|
|
616
|
+
* @param {string} public_key
|
|
562
617
|
* @returns {Promise<void>}
|
|
563
618
|
*/
|
|
564
|
-
module.exports.
|
|
565
|
-
const ret = wasm.
|
|
619
|
+
module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
620
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
566
621
|
return takeObject(ret);
|
|
567
622
|
};
|
|
568
623
|
|
|
@@ -578,26 +633,13 @@ module.exports.send_api_success = function(buffer, msg_index, peer_index) {
|
|
|
578
633
|
};
|
|
579
634
|
|
|
580
635
|
/**
|
|
581
|
-
* @
|
|
582
|
-
* @param {string} ip
|
|
583
|
-
* @returns {Promise<void>}
|
|
636
|
+
* @returns {Promise<WasmWallet>}
|
|
584
637
|
*/
|
|
585
|
-
module.exports.
|
|
586
|
-
const ret = wasm.
|
|
638
|
+
module.exports.get_wallet = function() {
|
|
639
|
+
const ret = wasm.get_wallet();
|
|
587
640
|
return takeObject(ret);
|
|
588
641
|
};
|
|
589
642
|
|
|
590
|
-
/**
|
|
591
|
-
* @param {Uint8Array} buffer
|
|
592
|
-
* @param {string} signature
|
|
593
|
-
* @param {string} public_key
|
|
594
|
-
* @returns {boolean}
|
|
595
|
-
*/
|
|
596
|
-
module.exports.verify_signature = function(buffer, signature, public_key) {
|
|
597
|
-
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
598
|
-
return ret !== 0;
|
|
599
|
-
};
|
|
600
|
-
|
|
601
643
|
/**
|
|
602
644
|
* @returns {Promise<Array<any>>}
|
|
603
645
|
*/
|
|
@@ -608,51 +650,70 @@ module.exports.get_peers = function() {
|
|
|
608
650
|
|
|
609
651
|
/**
|
|
610
652
|
* @param {Uint8Array} buffer
|
|
653
|
+
* @param {number} msg_index
|
|
611
654
|
* @param {bigint} peer_index
|
|
612
655
|
* @returns {Promise<void>}
|
|
613
656
|
*/
|
|
614
|
-
module.exports.
|
|
615
|
-
const ret = wasm.
|
|
657
|
+
module.exports.send_api_call = function(buffer, msg_index, peer_index) {
|
|
658
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
616
659
|
return takeObject(ret);
|
|
617
660
|
};
|
|
618
661
|
|
|
619
662
|
/**
|
|
663
|
+
* @param {bigint} peer_index
|
|
664
|
+
* @param {string} ip
|
|
620
665
|
* @returns {Promise<void>}
|
|
621
666
|
*/
|
|
622
|
-
module.exports.
|
|
623
|
-
const ret = wasm.
|
|
667
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
668
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
624
669
|
return takeObject(ret);
|
|
625
670
|
};
|
|
626
671
|
|
|
627
672
|
/**
|
|
628
|
-
* @param {
|
|
629
|
-
* @
|
|
630
|
-
* @param {bigint} fee
|
|
631
|
-
* @param {boolean} force_merge
|
|
632
|
-
* @returns {Promise<WasmTransaction>}
|
|
673
|
+
* @param {WasmTransaction} tx
|
|
674
|
+
* @returns {Promise<void>}
|
|
633
675
|
*/
|
|
634
|
-
module.exports.
|
|
635
|
-
|
|
676
|
+
module.exports.propagate_transaction = function(tx) {
|
|
677
|
+
_assertClass(tx, WasmTransaction);
|
|
678
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
636
679
|
return takeObject(ret);
|
|
637
680
|
};
|
|
638
681
|
|
|
639
682
|
/**
|
|
640
683
|
* @returns {Promise<string>}
|
|
641
684
|
*/
|
|
642
|
-
module.exports.
|
|
643
|
-
const ret = wasm.
|
|
685
|
+
module.exports.get_peer_stats = function() {
|
|
686
|
+
const ret = wasm.get_peer_stats();
|
|
644
687
|
return takeObject(ret);
|
|
645
688
|
};
|
|
646
689
|
|
|
647
690
|
/**
|
|
648
691
|
* @param {Uint8Array} buffer
|
|
692
|
+
* @param {string} signature
|
|
693
|
+
* @param {string} public_key
|
|
694
|
+
* @returns {boolean}
|
|
695
|
+
*/
|
|
696
|
+
module.exports.verify_signature = function(buffer, signature, public_key) {
|
|
697
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
698
|
+
return ret !== 0;
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* @returns {Promise<bigint>}
|
|
703
|
+
*/
|
|
704
|
+
module.exports.get_next_peer_index = function() {
|
|
705
|
+
const ret = wasm.get_next_peer_index();
|
|
706
|
+
return takeObject(ret);
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
/**
|
|
649
710
|
* @param {string} private_key
|
|
650
711
|
* @returns {string}
|
|
651
712
|
*/
|
|
652
|
-
module.exports.
|
|
713
|
+
module.exports.generate_public_key = function(private_key) {
|
|
653
714
|
try {
|
|
654
715
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
655
|
-
wasm.
|
|
716
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
656
717
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
657
718
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
658
719
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -666,79 +727,30 @@ module.exports.sign_buffer = function(buffer, private_key) {
|
|
|
666
727
|
};
|
|
667
728
|
|
|
668
729
|
/**
|
|
669
|
-
* @
|
|
730
|
+
* @param {bigint} duration_in_ms
|
|
731
|
+
* @returns {Promise<void>}
|
|
670
732
|
*/
|
|
671
|
-
module.exports.
|
|
672
|
-
const ret = wasm.
|
|
733
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
734
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
673
735
|
return takeObject(ret);
|
|
674
736
|
};
|
|
675
737
|
|
|
676
738
|
/**
|
|
677
|
-
* @param {
|
|
678
|
-
* @param {
|
|
739
|
+
* @param {string} slip1_utxo_key
|
|
740
|
+
* @param {string} slip2_utxo_key
|
|
741
|
+
* @param {string} slip3_utxo_key
|
|
742
|
+
* @param {number} left_count
|
|
743
|
+
* @param {number} right_count
|
|
679
744
|
* @param {Uint8Array} tx_msg
|
|
680
|
-
* @param {bigint} fee
|
|
681
|
-
* @param {string} recipient_public_key
|
|
682
|
-
* @param {string} nft_type
|
|
683
745
|
* @returns {Promise<WasmTransaction>}
|
|
684
746
|
*/
|
|
685
|
-
module.exports.
|
|
686
|
-
const ret = wasm.
|
|
687
|
-
return takeObject(ret);
|
|
688
|
-
};
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* @returns {Promise<any>}
|
|
692
|
-
*/
|
|
693
|
-
module.exports.get_confirmations = function() {
|
|
694
|
-
const ret = wasm.get_confirmations();
|
|
695
|
-
return takeObject(ret);
|
|
696
|
-
};
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* @param {WasmTransaction} tx
|
|
700
|
-
* @returns {Promise<void>}
|
|
701
|
-
*/
|
|
702
|
-
module.exports.propagate_transaction = function(tx) {
|
|
703
|
-
_assertClass(tx, WasmTransaction);
|
|
704
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
705
|
-
return takeObject(ret);
|
|
706
|
-
};
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* @returns {Promise<string>}
|
|
710
|
-
*/
|
|
711
|
-
module.exports.get_stats = function() {
|
|
712
|
-
const ret = wasm.get_stats();
|
|
713
|
-
return takeObject(ret);
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* @param {bigint} peer_index
|
|
718
|
-
* @returns {Promise<void>}
|
|
719
|
-
*/
|
|
720
|
-
module.exports.process_peer_disconnection = function(peer_index) {
|
|
721
|
-
const ret = wasm.process_peer_disconnection(peer_index);
|
|
722
|
-
return takeObject(ret);
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
/**
|
|
726
|
-
* @returns {Promise<void>}
|
|
727
|
-
*/
|
|
728
|
-
module.exports.disable_producing_blocks_by_timer = function() {
|
|
729
|
-
const ret = wasm.disable_producing_blocks_by_timer();
|
|
747
|
+
module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
748
|
+
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));
|
|
730
749
|
return takeObject(ret);
|
|
731
750
|
};
|
|
732
751
|
|
|
733
|
-
function
|
|
734
|
-
|
|
735
|
-
return f.apply(this, args);
|
|
736
|
-
} catch (e) {
|
|
737
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
function __wbg_adapter_393(arg0, arg1, arg2, arg3) {
|
|
741
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__hbc768321d477e205(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
752
|
+
function __wbg_adapter_406(arg0, arg1, arg2, arg3) {
|
|
753
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h58ba5fc31ee09770(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
742
754
|
}
|
|
743
755
|
|
|
744
756
|
const SaitoWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2645,8 +2657,13 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
2645
2657
|
takeObject(arg0);
|
|
2646
2658
|
};
|
|
2647
2659
|
|
|
2648
|
-
module.exports.
|
|
2649
|
-
const ret =
|
|
2660
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2661
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2662
|
+
return addHeapObject(ret);
|
|
2663
|
+
};
|
|
2664
|
+
|
|
2665
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2666
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2650
2667
|
return addHeapObject(ret);
|
|
2651
2668
|
};
|
|
2652
2669
|
|
|
@@ -2655,23 +2672,23 @@ module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
|
2655
2672
|
return addHeapObject(ret);
|
|
2656
2673
|
};
|
|
2657
2674
|
|
|
2658
|
-
module.exports.
|
|
2659
|
-
const ret =
|
|
2675
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2676
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2660
2677
|
return addHeapObject(ret);
|
|
2661
2678
|
};
|
|
2662
2679
|
|
|
2663
|
-
module.exports.
|
|
2664
|
-
const ret =
|
|
2680
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2681
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2665
2682
|
return addHeapObject(ret);
|
|
2666
2683
|
};
|
|
2667
2684
|
|
|
2668
|
-
module.exports.
|
|
2669
|
-
const ret =
|
|
2685
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2686
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2670
2687
|
return addHeapObject(ret);
|
|
2671
2688
|
};
|
|
2672
2689
|
|
|
2673
|
-
module.exports.
|
|
2674
|
-
const ret =
|
|
2690
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2691
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2675
2692
|
return addHeapObject(ret);
|
|
2676
2693
|
};
|
|
2677
2694
|
|
|
@@ -2684,33 +2701,38 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
2684
2701
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2685
2702
|
};
|
|
2686
2703
|
|
|
2687
|
-
module.exports.
|
|
2688
|
-
const ret =
|
|
2704
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2705
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2689
2706
|
return addHeapObject(ret);
|
|
2690
2707
|
};
|
|
2691
2708
|
|
|
2692
|
-
module.exports.
|
|
2693
|
-
const ret =
|
|
2709
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2710
|
+
const ret = getObject(arg0);
|
|
2694
2711
|
return addHeapObject(ret);
|
|
2695
2712
|
};
|
|
2696
2713
|
|
|
2697
|
-
module.exports.
|
|
2698
|
-
const ret =
|
|
2714
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2715
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2699
2716
|
return addHeapObject(ret);
|
|
2700
2717
|
};
|
|
2701
2718
|
|
|
2702
|
-
module.exports.
|
|
2703
|
-
const ret =
|
|
2719
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2720
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2704
2721
|
return addHeapObject(ret);
|
|
2705
2722
|
};
|
|
2706
2723
|
|
|
2707
|
-
module.exports.
|
|
2708
|
-
const ret =
|
|
2724
|
+
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2725
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2709
2726
|
return addHeapObject(ret);
|
|
2710
2727
|
};
|
|
2711
2728
|
|
|
2712
|
-
module.exports.
|
|
2713
|
-
const ret =
|
|
2729
|
+
module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2730
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
2731
|
+
return addHeapObject(ret);
|
|
2732
|
+
};
|
|
2733
|
+
|
|
2734
|
+
module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
2735
|
+
const ret = WasmHop.__wrap(arg0);
|
|
2714
2736
|
return addHeapObject(ret);
|
|
2715
2737
|
};
|
|
2716
2738
|
|
|
@@ -2730,22 +2752,7 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
|
2730
2752
|
return ret;
|
|
2731
2753
|
};
|
|
2732
2754
|
|
|
2733
|
-
module.exports.
|
|
2734
|
-
const ret = WasmHop.__wrap(arg0);
|
|
2735
|
-
return addHeapObject(ret);
|
|
2736
|
-
};
|
|
2737
|
-
|
|
2738
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2739
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2740
|
-
return addHeapObject(ret);
|
|
2741
|
-
};
|
|
2742
|
-
|
|
2743
|
-
module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2744
|
-
const ret = WasmPeerService.__wrap(arg0);
|
|
2745
|
-
return addHeapObject(ret);
|
|
2746
|
-
};
|
|
2747
|
-
|
|
2748
|
-
module.exports.__wbg_flushdata_aece8dc223521e86 = function(arg0, arg1) {
|
|
2755
|
+
module.exports.__wbg_flushdata_3e493160b5623279 = function(arg0, arg1) {
|
|
2749
2756
|
let deferred0_0;
|
|
2750
2757
|
let deferred0_1;
|
|
2751
2758
|
try {
|
|
@@ -2757,7 +2764,7 @@ module.exports.__wbg_flushdata_aece8dc223521e86 = function(arg0, arg1) {
|
|
|
2757
2764
|
}
|
|
2758
2765
|
};
|
|
2759
2766
|
|
|
2760
|
-
module.exports.
|
|
2767
|
+
module.exports.__wbg_readvalue_5d0f093e1595617d = function() { return handleError(function (arg0, arg1) {
|
|
2761
2768
|
let deferred0_0;
|
|
2762
2769
|
let deferred0_1;
|
|
2763
2770
|
try {
|
|
@@ -2770,15 +2777,15 @@ module.exports.__wbg_readvalue_6b30d6a36eadedae = function() { return handleErro
|
|
|
2770
2777
|
}
|
|
2771
2778
|
}, arguments) };
|
|
2772
2779
|
|
|
2773
|
-
module.exports.
|
|
2780
|
+
module.exports.__wbg_loadwallet_59081515a24e409d = function() {
|
|
2774
2781
|
MsgHandler.load_wallet();
|
|
2775
2782
|
};
|
|
2776
2783
|
|
|
2777
|
-
module.exports.
|
|
2784
|
+
module.exports.__wbg_savewallet_86e332f8fdf6bc63 = function() {
|
|
2778
2785
|
MsgHandler.save_wallet();
|
|
2779
2786
|
};
|
|
2780
2787
|
|
|
2781
|
-
module.exports.
|
|
2788
|
+
module.exports.__wbg_writevalue_9f48cba844bce929 = function(arg0, arg1, arg2) {
|
|
2782
2789
|
let deferred0_0;
|
|
2783
2790
|
let deferred0_1;
|
|
2784
2791
|
try {
|
|
@@ -2790,7 +2797,7 @@ module.exports.__wbg_writevalue_6c5d0ae738c625fd = function(arg0, arg1, arg2) {
|
|
|
2790
2797
|
}
|
|
2791
2798
|
};
|
|
2792
2799
|
|
|
2793
|
-
module.exports.
|
|
2800
|
+
module.exports.__wbg_appendvalue_e7ab232264abb10f = function(arg0, arg1, arg2) {
|
|
2794
2801
|
let deferred0_0;
|
|
2795
2802
|
let deferred0_1;
|
|
2796
2803
|
try {
|
|
@@ -2802,7 +2809,7 @@ module.exports.__wbg_appendvalue_7a64f2b8d6b939c6 = function(arg0, arg1, arg2) {
|
|
|
2802
2809
|
}
|
|
2803
2810
|
};
|
|
2804
2811
|
|
|
2805
|
-
module.exports.
|
|
2812
|
+
module.exports.__wbg_removevalue_c5af6fcdb8e65e93 = function() { return handleError(function (arg0, arg1) {
|
|
2806
2813
|
let deferred0_0;
|
|
2807
2814
|
let deferred0_1;
|
|
2808
2815
|
try {
|
|
@@ -2815,11 +2822,11 @@ module.exports.__wbg_removevalue_fa146f87d5f18cc2 = function() { return handleEr
|
|
|
2815
2822
|
}
|
|
2816
2823
|
}, arguments) };
|
|
2817
2824
|
|
|
2818
|
-
module.exports.
|
|
2825
|
+
module.exports.__wbg_sendmessage_360fd9c5b7eb6710 = function(arg0, arg1) {
|
|
2819
2826
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2820
2827
|
};
|
|
2821
2828
|
|
|
2822
|
-
module.exports.
|
|
2829
|
+
module.exports.__wbg_connecttopeer_099b3d1c7c6e20da = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2823
2830
|
let deferred0_0;
|
|
2824
2831
|
let deferred0_1;
|
|
2825
2832
|
try {
|
|
@@ -2832,14 +2839,14 @@ module.exports.__wbg_connecttopeer_67e8d4deca7e7daf = function() { return handle
|
|
|
2832
2839
|
}
|
|
2833
2840
|
}, arguments) };
|
|
2834
2841
|
|
|
2835
|
-
module.exports.
|
|
2842
|
+
module.exports.__wbg_getmyservices_012e89506828bc2f = function() {
|
|
2836
2843
|
const ret = MsgHandler.get_my_services();
|
|
2837
2844
|
_assertClass(ret, WasmPeerServiceList);
|
|
2838
2845
|
var ptr1 = ret.__destroy_into_raw();
|
|
2839
2846
|
return ptr1;
|
|
2840
2847
|
};
|
|
2841
2848
|
|
|
2842
|
-
module.exports.
|
|
2849
|
+
module.exports.__wbg_isexistingfile_89e9eb758e45ff5e = function() { return handleError(function (arg0, arg1) {
|
|
2843
2850
|
let deferred0_0;
|
|
2844
2851
|
let deferred0_1;
|
|
2845
2852
|
try {
|
|
@@ -2852,33 +2859,33 @@ module.exports.__wbg_isexistingfile_e53dd691a0d35efd = function() { return handl
|
|
|
2852
2859
|
}
|
|
2853
2860
|
}, arguments) };
|
|
2854
2861
|
|
|
2855
|
-
module.exports.
|
|
2862
|
+
module.exports.__wbg_processapicall_06672752efc468c6 = function(arg0, arg1, arg2) {
|
|
2856
2863
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2857
2864
|
};
|
|
2858
2865
|
|
|
2859
|
-
module.exports.
|
|
2866
|
+
module.exports.__wbg_processapierror_f821f4aea886cad6 = function(arg0, arg1, arg2) {
|
|
2860
2867
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2861
2868
|
};
|
|
2862
2869
|
|
|
2863
|
-
module.exports.
|
|
2870
|
+
module.exports.__wbg_processapisuccess_b088c5350b1602ab = function(arg0, arg1, arg2) {
|
|
2864
2871
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2865
2872
|
};
|
|
2866
2873
|
|
|
2867
|
-
module.exports.
|
|
2874
|
+
module.exports.__wbg_sendmessagetoall_6fcbaa970ca58136 = function(arg0, arg1) {
|
|
2868
2875
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2869
2876
|
};
|
|
2870
2877
|
|
|
2871
|
-
module.exports.
|
|
2878
|
+
module.exports.__wbg_disconnectfrompeer_300d63aa93f61d50 = function() { return handleError(function (arg0) {
|
|
2872
2879
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2873
2880
|
return addHeapObject(ret);
|
|
2874
2881
|
}, arguments) };
|
|
2875
2882
|
|
|
2876
|
-
module.exports.
|
|
2883
|
+
module.exports.__wbg_loadblockfilelist_7ebdc6dd8988f2e9 = function() { return handleError(function () {
|
|
2877
2884
|
const ret = MsgHandler.load_block_file_list();
|
|
2878
2885
|
return addHeapObject(ret);
|
|
2879
2886
|
}, arguments) };
|
|
2880
2887
|
|
|
2881
|
-
module.exports.
|
|
2888
|
+
module.exports.__wbg_sendinterfaceevent_3091ea002268b66a = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2882
2889
|
let deferred0_0;
|
|
2883
2890
|
let deferred0_1;
|
|
2884
2891
|
let deferred1_0;
|
|
@@ -2895,7 +2902,7 @@ module.exports.__wbg_sendinterfaceevent_9ec642f87407fb57 = function(arg0, arg1,
|
|
|
2895
2902
|
}
|
|
2896
2903
|
};
|
|
2897
2904
|
|
|
2898
|
-
module.exports.
|
|
2905
|
+
module.exports.__wbg_sendblocksuccess_4076186533b0dd4b = function(arg0, arg1, arg2) {
|
|
2899
2906
|
let deferred0_0;
|
|
2900
2907
|
let deferred0_1;
|
|
2901
2908
|
try {
|
|
@@ -2907,11 +2914,11 @@ module.exports.__wbg_sendblocksuccess_8593630796d08f4a = function(arg0, arg1, ar
|
|
|
2907
2914
|
}
|
|
2908
2915
|
};
|
|
2909
2916
|
|
|
2910
|
-
module.exports.
|
|
2917
|
+
module.exports.__wbg_sendwalletupdate_a4a45445d63fa2a1 = function() {
|
|
2911
2918
|
MsgHandler.send_wallet_update();
|
|
2912
2919
|
};
|
|
2913
2920
|
|
|
2914
|
-
module.exports.
|
|
2921
|
+
module.exports.__wbg_sendnewversionalert_3ec71b6bf65d28d0 = function(arg0, arg1, arg2) {
|
|
2915
2922
|
let deferred0_0;
|
|
2916
2923
|
let deferred0_1;
|
|
2917
2924
|
try {
|
|
@@ -2923,15 +2930,15 @@ module.exports.__wbg_sendnewversionalert_90ce546ef6f38fc8 = function(arg0, arg1,
|
|
|
2923
2930
|
}
|
|
2924
2931
|
};
|
|
2925
2932
|
|
|
2926
|
-
module.exports.
|
|
2933
|
+
module.exports.__wbg_sendblockfetchstatusevent_23c7a26cfd3a5d15 = function(arg0) {
|
|
2927
2934
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2928
2935
|
};
|
|
2929
2936
|
|
|
2930
|
-
module.exports.
|
|
2937
|
+
module.exports.__wbg_sendnewchaindetectedevent_9814eea25ed127aa = function() {
|
|
2931
2938
|
MsgHandler.send_new_chain_detected_event();
|
|
2932
2939
|
};
|
|
2933
2940
|
|
|
2934
|
-
module.exports.
|
|
2941
|
+
module.exports.__wbg_fetchblockfrompeer_ab58f5ed93834e68 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2935
2942
|
let deferred0_0;
|
|
2936
2943
|
let deferred0_1;
|
|
2937
2944
|
try {
|
|
@@ -2944,7 +2951,7 @@ module.exports.__wbg_fetchblockfrompeer_e70058129ff6d454 = function() { return h
|
|
|
2944
2951
|
}
|
|
2945
2952
|
}, arguments) };
|
|
2946
2953
|
|
|
2947
|
-
module.exports.
|
|
2954
|
+
module.exports.__wbg_ensureblockdirectoryexists_e06f5acab13f0888 = function() { return handleError(function (arg0, arg1) {
|
|
2948
2955
|
let deferred0_0;
|
|
2949
2956
|
let deferred0_1;
|
|
2950
2957
|
try {
|
|
@@ -2956,6 +2963,11 @@ module.exports.__wbg_ensureblockdirectoryexists_423cb5cd137cb12e = function() {
|
|
|
2956
2963
|
}
|
|
2957
2964
|
}, arguments) };
|
|
2958
2965
|
|
|
2966
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2967
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2968
|
+
return addHeapObject(ret);
|
|
2969
|
+
};
|
|
2970
|
+
|
|
2959
2971
|
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2960
2972
|
const ret = getObject(arg0) == getObject(arg1);
|
|
2961
2973
|
return ret;
|
|
@@ -3258,7 +3270,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
|
3258
3270
|
const a = state0.a;
|
|
3259
3271
|
state0.a = 0;
|
|
3260
3272
|
try {
|
|
3261
|
-
return
|
|
3273
|
+
return __wbg_adapter_406(a, state0.b, arg0, arg1);
|
|
3262
3274
|
} finally {
|
|
3263
3275
|
state0.a = a;
|
|
3264
3276
|
}
|
|
@@ -3332,8 +3344,8 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
|
3332
3344
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
3333
3345
|
};
|
|
3334
3346
|
|
|
3335
|
-
module.exports.
|
|
3336
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3347
|
+
module.exports.__wbindgen_closure_wrapper1627 = function(arg0, arg1, arg2) {
|
|
3348
|
+
const ret = makeMutClosure(arg0, arg1, 581, __wbg_adapter_38);
|
|
3337
3349
|
return addHeapObject(ret);
|
|
3338
3350
|
};
|
|
3339
3351
|
|