saito-wasm 0.2.180 → 0.2.181
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 +155 -155
- package/pkg/node/index.js +338 -337
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +114 -114
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +271 -271
- package/pkg/web/index.js +328 -327
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +114 -114
- package/pkg/web/package.json +1 -1
- /package/pkg/node/snippets/{saito-wasm-572c1aae3abbfe8d → saito-wasm-f4f63644dad58d74}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-572c1aae3abbfe8d → saito-wasm-f4f63644dad58d74}/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-f4f63644dad58d74/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
7
|
const heap = new Array(128).fill(undefined);
|
|
@@ -228,42 +228,28 @@ function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
|
228
228
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0f20d323127f6aa2(arg0, arg1, addHeapObject(arg2));
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
+
function handleError(f, args) {
|
|
232
|
+
try {
|
|
233
|
+
return f.apply(this, args);
|
|
234
|
+
} catch (e) {
|
|
235
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
231
239
|
function _assertClass(instance, klass) {
|
|
232
240
|
if (!(instance instanceof klass)) {
|
|
233
241
|
throw new Error(`expected instance of ${klass.name}`);
|
|
234
242
|
}
|
|
235
243
|
return instance.ptr;
|
|
236
244
|
}
|
|
237
|
-
/**
|
|
238
|
-
* @param {Uint8Array} buffer
|
|
239
|
-
* @param {string} private_key
|
|
240
|
-
* @returns {string}
|
|
241
|
-
*/
|
|
242
|
-
module.exports.sign_buffer = function(buffer, private_key) {
|
|
243
|
-
try {
|
|
244
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
245
|
-
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
246
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
247
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
248
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
249
|
-
if (r2) {
|
|
250
|
-
throw takeObject(r1);
|
|
251
|
-
}
|
|
252
|
-
return takeObject(r0);
|
|
253
|
-
} finally {
|
|
254
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
245
|
|
|
258
|
-
|
|
259
|
-
* @param {bigint} peer_index
|
|
260
|
-
* @returns {Promise<WasmPeer | undefined>}
|
|
261
|
-
*/
|
|
262
|
-
module.exports.get_peer = function(peer_index) {
|
|
263
|
-
const ret = wasm.get_peer(peer_index);
|
|
264
|
-
return takeObject(ret);
|
|
265
|
-
};
|
|
246
|
+
let stack_pointer = 128;
|
|
266
247
|
|
|
248
|
+
function addBorrowedObject(obj) {
|
|
249
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
250
|
+
heap[--stack_pointer] = obj;
|
|
251
|
+
return stack_pointer;
|
|
252
|
+
}
|
|
267
253
|
/**
|
|
268
254
|
* @returns {string}
|
|
269
255
|
*/
|
|
@@ -273,403 +259,365 @@ module.exports.generate_private_key = function() {
|
|
|
273
259
|
};
|
|
274
260
|
|
|
275
261
|
/**
|
|
276
|
-
* @
|
|
262
|
+
* @param {bigint} peer_index
|
|
263
|
+
* @param {string} ip
|
|
264
|
+
* @returns {Promise<void>}
|
|
277
265
|
*/
|
|
278
|
-
module.exports.
|
|
279
|
-
const ret = wasm.
|
|
266
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
267
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
280
268
|
return takeObject(ret);
|
|
281
269
|
};
|
|
282
270
|
|
|
283
271
|
/**
|
|
284
|
-
* @param {
|
|
285
|
-
* @returns {Promise<
|
|
272
|
+
* @param {bigint} peer_index
|
|
273
|
+
* @returns {Promise<void>}
|
|
286
274
|
*/
|
|
287
|
-
module.exports.
|
|
288
|
-
const ret = wasm.
|
|
275
|
+
module.exports.remove_stun_peer = function(peer_index) {
|
|
276
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
289
277
|
return takeObject(ret);
|
|
290
278
|
};
|
|
291
279
|
|
|
292
280
|
/**
|
|
293
|
-
* @param {string}
|
|
294
|
-
* @
|
|
281
|
+
* @param {string} nft_id_hex
|
|
282
|
+
* @param {Uint8Array} tx_msg
|
|
283
|
+
* @returns {Promise<WasmTransaction>}
|
|
295
284
|
*/
|
|
296
|
-
module.exports.
|
|
297
|
-
const
|
|
298
|
-
|
|
285
|
+
module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
|
|
286
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
287
|
+
const len0 = WASM_VECTOR_LEN;
|
|
288
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
289
|
+
return takeObject(ret);
|
|
299
290
|
};
|
|
300
291
|
|
|
301
292
|
/**
|
|
302
|
-
* @param {
|
|
303
|
-
* @param {
|
|
304
|
-
* @param {
|
|
305
|
-
* @
|
|
293
|
+
* @param {Array<any>} public_keys
|
|
294
|
+
* @param {BigUint64Array} amounts
|
|
295
|
+
* @param {bigint} fee
|
|
296
|
+
* @param {boolean} _force_merge
|
|
297
|
+
* @returns {Promise<WasmTransaction>}
|
|
306
298
|
*/
|
|
307
|
-
module.exports.
|
|
308
|
-
const ret = wasm.
|
|
309
|
-
return ret
|
|
299
|
+
module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
|
|
300
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
301
|
+
return takeObject(ret);
|
|
310
302
|
};
|
|
311
303
|
|
|
312
304
|
/**
|
|
313
|
-
* @
|
|
305
|
+
* @param {bigint} peer_index
|
|
306
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
314
307
|
*/
|
|
315
|
-
module.exports.
|
|
316
|
-
const ret = wasm.
|
|
308
|
+
module.exports.get_peer = function(peer_index) {
|
|
309
|
+
const ret = wasm.get_peer(peer_index);
|
|
317
310
|
return takeObject(ret);
|
|
318
311
|
};
|
|
319
312
|
|
|
320
313
|
/**
|
|
321
|
-
* @
|
|
322
|
-
* @param {number} msg_index
|
|
323
|
-
* @param {bigint} peer_index
|
|
324
|
-
* @returns {Promise<void>}
|
|
314
|
+
* @returns {Promise<string>}
|
|
325
315
|
*/
|
|
326
|
-
module.exports.
|
|
327
|
-
const ret = wasm.
|
|
316
|
+
module.exports.get_stats = function() {
|
|
317
|
+
const ret = wasm.get_stats();
|
|
328
318
|
return takeObject(ret);
|
|
329
319
|
};
|
|
330
320
|
|
|
331
321
|
/**
|
|
332
|
-
* @
|
|
322
|
+
* @param {string} public_key
|
|
323
|
+
* @param {bigint} amount
|
|
324
|
+
* @param {bigint} fee
|
|
325
|
+
* @param {boolean} force_merge
|
|
326
|
+
* @returns {Promise<WasmTransaction>}
|
|
333
327
|
*/
|
|
334
|
-
module.exports.
|
|
335
|
-
const ret = wasm.
|
|
328
|
+
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
329
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
336
330
|
return takeObject(ret);
|
|
337
331
|
};
|
|
338
332
|
|
|
339
333
|
/**
|
|
340
|
-
* @
|
|
341
|
-
* @param {Uint8Array} hash
|
|
342
|
-
* @param {bigint} block_id
|
|
343
|
-
* @param {bigint} peer_index
|
|
344
|
-
* @returns {Promise<void>}
|
|
334
|
+
* @returns {Promise<boolean>}
|
|
345
335
|
*/
|
|
346
|
-
module.exports.
|
|
347
|
-
const ret = wasm.
|
|
336
|
+
module.exports.produce_block_with_gt = function() {
|
|
337
|
+
const ret = wasm.produce_block_with_gt();
|
|
348
338
|
return takeObject(ret);
|
|
349
339
|
};
|
|
350
340
|
|
|
351
341
|
/**
|
|
352
|
-
* @returns {Promise<
|
|
342
|
+
* @returns {Promise<WasmBlockchain>}
|
|
353
343
|
*/
|
|
354
|
-
module.exports.
|
|
355
|
-
const ret = wasm.
|
|
344
|
+
module.exports.get_blockchain = function() {
|
|
345
|
+
const ret = wasm.get_blockchain();
|
|
356
346
|
return takeObject(ret);
|
|
357
347
|
};
|
|
358
348
|
|
|
359
349
|
/**
|
|
360
350
|
* @returns {Promise<string>}
|
|
361
351
|
*/
|
|
362
|
-
module.exports.
|
|
363
|
-
const ret = wasm.
|
|
352
|
+
module.exports.get_peer_stats = function() {
|
|
353
|
+
const ret = wasm.get_peer_stats();
|
|
364
354
|
return takeObject(ret);
|
|
365
355
|
};
|
|
366
356
|
|
|
367
357
|
/**
|
|
368
|
-
* @
|
|
369
|
-
* @param {string} ip
|
|
370
|
-
* @returns {Promise<void>}
|
|
358
|
+
* @returns {Promise<boolean>}
|
|
371
359
|
*/
|
|
372
|
-
module.exports.
|
|
373
|
-
const ret = wasm.
|
|
360
|
+
module.exports.produce_block_without_gt = function() {
|
|
361
|
+
const ret = wasm.produce_block_without_gt();
|
|
374
362
|
return takeObject(ret);
|
|
375
363
|
};
|
|
376
364
|
|
|
377
365
|
/**
|
|
378
|
-
* @param {
|
|
366
|
+
* @param {number} major
|
|
367
|
+
* @param {number} minor
|
|
368
|
+
* @param {number} patch
|
|
379
369
|
* @returns {Promise<void>}
|
|
380
370
|
*/
|
|
381
|
-
module.exports.
|
|
382
|
-
const ret = wasm.
|
|
371
|
+
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
372
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
383
373
|
return takeObject(ret);
|
|
384
374
|
};
|
|
385
375
|
|
|
386
376
|
/**
|
|
387
|
-
* @
|
|
388
|
-
* @param {BigUint64Array} amounts
|
|
389
|
-
* @param {bigint} fee
|
|
390
|
-
* @param {boolean} _force_merge
|
|
391
|
-
* @returns {Promise<WasmTransaction>}
|
|
377
|
+
* @returns {Promise<Array<any>>}
|
|
392
378
|
*/
|
|
393
|
-
module.exports.
|
|
394
|
-
const ret = wasm.
|
|
379
|
+
module.exports.get_mempool_txs = function() {
|
|
380
|
+
const ret = wasm.get_mempool_txs();
|
|
395
381
|
return takeObject(ret);
|
|
396
382
|
};
|
|
397
383
|
|
|
398
384
|
/**
|
|
385
|
+
* @param {string} public_key
|
|
399
386
|
* @returns {Promise<Array<any>>}
|
|
400
387
|
*/
|
|
401
|
-
module.exports.
|
|
402
|
-
const ret = wasm.
|
|
388
|
+
module.exports.get_account_slips = function(public_key) {
|
|
389
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
403
390
|
return takeObject(ret);
|
|
404
391
|
};
|
|
405
392
|
|
|
406
393
|
/**
|
|
407
|
-
* @param {
|
|
394
|
+
* @param {bigint} peer_index
|
|
395
|
+
* @param {string} public_key
|
|
408
396
|
* @returns {Promise<void>}
|
|
409
397
|
*/
|
|
410
|
-
module.exports.
|
|
411
|
-
|
|
412
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
413
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
398
|
+
module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
399
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
414
400
|
return takeObject(ret);
|
|
415
401
|
};
|
|
416
402
|
|
|
417
403
|
/**
|
|
418
|
-
* @
|
|
404
|
+
* @param {Uint8Array} hash
|
|
405
|
+
* @param {bigint} block_id
|
|
406
|
+
* @param {bigint} peer_index
|
|
407
|
+
* @returns {Promise<void>}
|
|
419
408
|
*/
|
|
420
|
-
module.exports.
|
|
421
|
-
const ret = wasm.
|
|
409
|
+
module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
|
|
410
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
422
411
|
return takeObject(ret);
|
|
423
412
|
};
|
|
424
413
|
|
|
425
414
|
/**
|
|
426
|
-
* @param {
|
|
427
|
-
* @param {number}
|
|
428
|
-
* @param {
|
|
415
|
+
* @param {Uint8Array} buffer
|
|
416
|
+
* @param {number} msg_index
|
|
417
|
+
* @param {bigint} peer_index
|
|
429
418
|
* @returns {Promise<void>}
|
|
430
419
|
*/
|
|
431
|
-
module.exports.
|
|
432
|
-
const ret = wasm.
|
|
420
|
+
module.exports.send_api_call = function(buffer, msg_index, peer_index) {
|
|
421
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
433
422
|
return takeObject(ret);
|
|
434
423
|
};
|
|
435
424
|
|
|
436
425
|
/**
|
|
426
|
+
* @param {Uint8Array} buffer
|
|
427
|
+
* @param {number} msg_index
|
|
428
|
+
* @param {bigint} peer_index
|
|
437
429
|
* @returns {Promise<void>}
|
|
438
430
|
*/
|
|
439
|
-
module.exports.
|
|
440
|
-
const ret = wasm.
|
|
431
|
+
module.exports.send_api_error = function(buffer, msg_index, peer_index) {
|
|
432
|
+
const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
|
|
441
433
|
return takeObject(ret);
|
|
442
434
|
};
|
|
443
435
|
|
|
444
436
|
/**
|
|
445
|
-
* @
|
|
437
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
438
|
+
* @returns {Promise<void>}
|
|
446
439
|
*/
|
|
447
|
-
module.exports.
|
|
448
|
-
|
|
440
|
+
module.exports.update_from_balance_snapshot = function(snapshot) {
|
|
441
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
442
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
443
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
449
444
|
return takeObject(ret);
|
|
450
445
|
};
|
|
451
446
|
|
|
452
447
|
/**
|
|
453
|
-
* @param {string}
|
|
454
|
-
* @
|
|
448
|
+
* @param {string} slip1_utxo_key
|
|
449
|
+
* @param {string} slip2_utxo_key
|
|
450
|
+
* @param {string} slip3_utxo_key
|
|
451
|
+
* @param {Uint8Array} tx_msg
|
|
452
|
+
* @returns {Promise<WasmTransaction>}
|
|
455
453
|
*/
|
|
456
|
-
module.exports.
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
460
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
461
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
462
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
463
|
-
if (r2) {
|
|
464
|
-
throw takeObject(r1);
|
|
465
|
-
}
|
|
466
|
-
return takeObject(r0);
|
|
467
|
-
} finally {
|
|
468
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
469
|
-
}
|
|
454
|
+
module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, tx_msg) {
|
|
455
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(tx_msg));
|
|
456
|
+
return takeObject(ret);
|
|
470
457
|
};
|
|
471
458
|
|
|
472
459
|
/**
|
|
473
|
-
* @
|
|
474
|
-
* @param {number} msg_index
|
|
475
|
-
* @param {bigint} peer_index
|
|
476
|
-
* @returns {Promise<void>}
|
|
460
|
+
* @returns {Promise<Array<any>>}
|
|
477
461
|
*/
|
|
478
|
-
module.exports.
|
|
479
|
-
const ret = wasm.
|
|
462
|
+
module.exports.get_peers = function() {
|
|
463
|
+
const ret = wasm.get_peers();
|
|
480
464
|
return takeObject(ret);
|
|
481
465
|
};
|
|
482
466
|
|
|
483
467
|
/**
|
|
484
|
-
* @param {bigint} amt
|
|
485
468
|
* @param {string} slip1_utxo_key
|
|
486
469
|
* @param {string} slip2_utxo_key
|
|
487
470
|
* @param {string} slip3_utxo_key
|
|
488
|
-
* @param {
|
|
471
|
+
* @param {number} left_count
|
|
472
|
+
* @param {number} right_count
|
|
489
473
|
* @param {Uint8Array} tx_msg
|
|
490
474
|
* @returns {Promise<WasmTransaction>}
|
|
491
475
|
*/
|
|
492
|
-
module.exports.
|
|
493
|
-
const ret = wasm.
|
|
476
|
+
module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
477
|
+
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));
|
|
494
478
|
return takeObject(ret);
|
|
495
479
|
};
|
|
496
480
|
|
|
497
481
|
/**
|
|
498
|
-
* @param {bigint}
|
|
499
|
-
* @param {string} public_key
|
|
482
|
+
* @param {bigint} current_time
|
|
500
483
|
* @returns {Promise<void>}
|
|
501
484
|
*/
|
|
502
|
-
module.exports.
|
|
503
|
-
const ret = wasm.
|
|
485
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
486
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
504
487
|
return takeObject(ret);
|
|
505
488
|
};
|
|
506
489
|
|
|
507
490
|
/**
|
|
508
|
-
* @param {
|
|
509
|
-
* @param {bigint} block_id
|
|
510
|
-
* @param {bigint} peer_index
|
|
491
|
+
* @param {bigint} threshold
|
|
511
492
|
* @returns {Promise<void>}
|
|
512
493
|
*/
|
|
513
|
-
module.exports.
|
|
514
|
-
const ret = wasm.
|
|
494
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
495
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
515
496
|
return takeObject(ret);
|
|
516
497
|
};
|
|
517
498
|
|
|
518
499
|
/**
|
|
519
|
-
* @param {
|
|
520
|
-
* @returns {
|
|
500
|
+
* @param {string} key
|
|
501
|
+
* @returns {boolean}
|
|
521
502
|
*/
|
|
522
|
-
module.exports.
|
|
523
|
-
const ret = wasm.
|
|
524
|
-
return
|
|
503
|
+
module.exports.is_valid_public_key = function(key) {
|
|
504
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
505
|
+
return ret !== 0;
|
|
525
506
|
};
|
|
526
507
|
|
|
527
508
|
/**
|
|
528
509
|
* @param {Uint8Array} buffer
|
|
529
|
-
* @param {
|
|
530
|
-
* @
|
|
510
|
+
* @param {string} signature
|
|
511
|
+
* @param {string} public_key
|
|
512
|
+
* @returns {boolean}
|
|
531
513
|
*/
|
|
532
|
-
module.exports.
|
|
533
|
-
const ret = wasm.
|
|
534
|
-
return
|
|
514
|
+
module.exports.verify_signature = function(buffer, signature, public_key) {
|
|
515
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
516
|
+
return ret !== 0;
|
|
535
517
|
};
|
|
536
518
|
|
|
537
519
|
/**
|
|
538
|
-
* @param {
|
|
539
|
-
* @returns {
|
|
520
|
+
* @param {Uint8Array} buffer
|
|
521
|
+
* @returns {string}
|
|
540
522
|
*/
|
|
541
|
-
module.exports.
|
|
542
|
-
const ret = wasm.
|
|
523
|
+
module.exports.hash = function(buffer) {
|
|
524
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
543
525
|
return takeObject(ret);
|
|
544
526
|
};
|
|
545
527
|
|
|
546
528
|
/**
|
|
547
|
-
* @param {string} config_json
|
|
548
|
-
* @param {string} private_key
|
|
549
|
-
* @param {number} log_level_num
|
|
550
|
-
* @param {bigint} hasten_multiplier
|
|
551
|
-
* @param {boolean} delete_old_blocks
|
|
552
529
|
* @returns {Promise<any>}
|
|
553
530
|
*/
|
|
554
|
-
module.exports.
|
|
555
|
-
const ret = wasm.
|
|
556
|
-
return takeObject(ret);
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* @returns {Promise<boolean>}
|
|
561
|
-
*/
|
|
562
|
-
module.exports.produce_block_with_gt = function() {
|
|
563
|
-
const ret = wasm.produce_block_with_gt();
|
|
564
|
-
return takeObject(ret);
|
|
565
|
-
};
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* @returns {Promise<WasmWallet>}
|
|
569
|
-
*/
|
|
570
|
-
module.exports.get_wallet = function() {
|
|
571
|
-
const ret = wasm.get_wallet();
|
|
531
|
+
module.exports.get_confirmations = function() {
|
|
532
|
+
const ret = wasm.get_confirmations();
|
|
572
533
|
return takeObject(ret);
|
|
573
534
|
};
|
|
574
535
|
|
|
575
536
|
/**
|
|
576
|
-
* @returns {Promise<
|
|
537
|
+
* @returns {Promise<string>}
|
|
577
538
|
*/
|
|
578
|
-
module.exports.
|
|
579
|
-
const ret = wasm.
|
|
539
|
+
module.exports.get_congestion_stats = function() {
|
|
540
|
+
const ret = wasm.get_congestion_stats();
|
|
580
541
|
return takeObject(ret);
|
|
581
542
|
};
|
|
582
543
|
|
|
583
544
|
/**
|
|
584
|
-
* @param {
|
|
545
|
+
* @param {Uint8Array} buffer
|
|
546
|
+
* @param {bigint} peer_index
|
|
585
547
|
* @returns {Promise<void>}
|
|
586
548
|
*/
|
|
587
|
-
module.exports.
|
|
588
|
-
const ret = wasm.
|
|
549
|
+
module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
|
|
550
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
589
551
|
return takeObject(ret);
|
|
590
552
|
};
|
|
591
553
|
|
|
592
554
|
/**
|
|
593
|
-
* @param {WasmTransaction} tx
|
|
594
555
|
* @returns {Promise<void>}
|
|
595
556
|
*/
|
|
596
|
-
module.exports.
|
|
597
|
-
|
|
598
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
599
|
-
return takeObject(ret);
|
|
600
|
-
};
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* @param {Uint8Array} buffer
|
|
604
|
-
* @returns {string}
|
|
605
|
-
*/
|
|
606
|
-
module.exports.hash = function(buffer) {
|
|
607
|
-
const ret = wasm.hash(addHeapObject(buffer));
|
|
557
|
+
module.exports.disable_producing_blocks_by_timer = function() {
|
|
558
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
608
559
|
return takeObject(ret);
|
|
609
560
|
};
|
|
610
561
|
|
|
611
562
|
/**
|
|
612
|
-
* @param {
|
|
613
|
-
* @
|
|
614
|
-
* @param {bigint} peer_index
|
|
615
|
-
* @returns {Promise<void>}
|
|
563
|
+
* @param {Array<any>} keys
|
|
564
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
616
565
|
*/
|
|
617
|
-
module.exports.
|
|
618
|
-
const ret = wasm.
|
|
566
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
567
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
619
568
|
return takeObject(ret);
|
|
620
569
|
};
|
|
621
570
|
|
|
622
571
|
/**
|
|
623
|
-
* @param {
|
|
624
|
-
* @param {
|
|
625
|
-
* @param {
|
|
626
|
-
* @param {
|
|
572
|
+
* @param {bigint} amt
|
|
573
|
+
* @param {string} slip1_utxo_key
|
|
574
|
+
* @param {string} slip2_utxo_key
|
|
575
|
+
* @param {string} slip3_utxo_key
|
|
576
|
+
* @param {string} recipient_public_key
|
|
577
|
+
* @param {Uint8Array} tx_msg
|
|
627
578
|
* @returns {Promise<WasmTransaction>}
|
|
628
579
|
*/
|
|
629
|
-
module.exports.
|
|
630
|
-
const ret = wasm.
|
|
580
|
+
module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
581
|
+
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));
|
|
631
582
|
return takeObject(ret);
|
|
632
583
|
};
|
|
633
584
|
|
|
634
585
|
/**
|
|
635
|
-
* @returns {Promise<
|
|
586
|
+
* @returns {Promise<void>}
|
|
636
587
|
*/
|
|
637
|
-
module.exports.
|
|
638
|
-
const ret = wasm.
|
|
588
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
589
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
639
590
|
return takeObject(ret);
|
|
640
591
|
};
|
|
641
592
|
|
|
642
593
|
/**
|
|
643
|
-
* @param {
|
|
644
|
-
* @
|
|
645
|
-
* @returns {Promise<WasmTransaction>}
|
|
594
|
+
* @param {bigint} peer_index
|
|
595
|
+
* @returns {Promise<void>}
|
|
646
596
|
*/
|
|
647
|
-
module.exports.
|
|
648
|
-
const
|
|
649
|
-
const len0 = WASM_VECTOR_LEN;
|
|
650
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
597
|
+
module.exports.process_peer_disconnection = function(peer_index) {
|
|
598
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
651
599
|
return takeObject(ret);
|
|
652
600
|
};
|
|
653
601
|
|
|
654
602
|
/**
|
|
655
|
-
* @
|
|
603
|
+
* @param {WasmTransaction} tx
|
|
604
|
+
* @returns {Promise<void>}
|
|
656
605
|
*/
|
|
657
|
-
module.exports.
|
|
658
|
-
|
|
606
|
+
module.exports.propagate_transaction = function(tx) {
|
|
607
|
+
_assertClass(tx, WasmTransaction);
|
|
608
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
659
609
|
return takeObject(ret);
|
|
660
610
|
};
|
|
661
611
|
|
|
662
612
|
/**
|
|
663
|
-
* @param {
|
|
664
|
-
* @param {
|
|
665
|
-
* @param {
|
|
666
|
-
* @param {
|
|
667
|
-
* @
|
|
668
|
-
* @param {Uint8Array} tx_msg
|
|
669
|
-
* @returns {Promise<WasmTransaction>}
|
|
613
|
+
* @param {Uint8Array} buffer
|
|
614
|
+
* @param {Uint8Array} hash
|
|
615
|
+
* @param {bigint} block_id
|
|
616
|
+
* @param {bigint} peer_index
|
|
617
|
+
* @returns {Promise<void>}
|
|
670
618
|
*/
|
|
671
|
-
module.exports.
|
|
672
|
-
const ret = wasm.
|
|
619
|
+
module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
|
|
620
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
673
621
|
return takeObject(ret);
|
|
674
622
|
};
|
|
675
623
|
|
|
@@ -688,67 +636,120 @@ module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, re
|
|
|
688
636
|
};
|
|
689
637
|
|
|
690
638
|
/**
|
|
691
|
-
* @
|
|
692
|
-
* @param {string} slip2_utxo_key
|
|
693
|
-
* @param {string} slip3_utxo_key
|
|
694
|
-
* @param {Uint8Array} tx_msg
|
|
695
|
-
* @returns {Promise<WasmTransaction>}
|
|
639
|
+
* @returns {Promise<string>}
|
|
696
640
|
*/
|
|
697
|
-
module.exports.
|
|
698
|
-
const ret = wasm.
|
|
641
|
+
module.exports.get_latest_block_hash = function() {
|
|
642
|
+
const ret = wasm.get_latest_block_hash();
|
|
699
643
|
return takeObject(ret);
|
|
700
644
|
};
|
|
701
645
|
|
|
702
646
|
/**
|
|
703
|
-
* @param {string}
|
|
704
|
-
* @returns {
|
|
647
|
+
* @param {string} private_key
|
|
648
|
+
* @returns {string}
|
|
705
649
|
*/
|
|
706
|
-
module.exports.
|
|
707
|
-
|
|
708
|
-
|
|
650
|
+
module.exports.generate_public_key = function(private_key) {
|
|
651
|
+
try {
|
|
652
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
653
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
654
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
655
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
656
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
657
|
+
if (r2) {
|
|
658
|
+
throw takeObject(r1);
|
|
659
|
+
}
|
|
660
|
+
return takeObject(r0);
|
|
661
|
+
} finally {
|
|
662
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
663
|
+
}
|
|
709
664
|
};
|
|
710
665
|
|
|
711
666
|
/**
|
|
712
|
-
* @param {
|
|
667
|
+
* @param {Uint8Array} buffer
|
|
668
|
+
* @param {number} msg_index
|
|
669
|
+
* @param {bigint} peer_index
|
|
713
670
|
* @returns {Promise<void>}
|
|
714
671
|
*/
|
|
715
|
-
module.exports.
|
|
716
|
-
const ret = wasm.
|
|
672
|
+
module.exports.send_api_success = function(buffer, msg_index, peer_index) {
|
|
673
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
717
674
|
return takeObject(ret);
|
|
718
675
|
};
|
|
719
676
|
|
|
720
677
|
/**
|
|
721
|
-
* @returns {Promise<
|
|
678
|
+
* @returns {Promise<WasmWallet>}
|
|
722
679
|
*/
|
|
723
|
-
module.exports.
|
|
724
|
-
const ret = wasm.
|
|
680
|
+
module.exports.get_wallet = function() {
|
|
681
|
+
const ret = wasm.get_wallet();
|
|
725
682
|
return takeObject(ret);
|
|
726
683
|
};
|
|
727
684
|
|
|
728
685
|
/**
|
|
729
|
-
* @param {
|
|
686
|
+
* @param {string} config_json
|
|
687
|
+
* @param {string} private_key
|
|
688
|
+
* @param {number} log_level_num
|
|
689
|
+
* @param {bigint} hasten_multiplier
|
|
690
|
+
* @param {boolean} delete_old_blocks
|
|
691
|
+
* @returns {Promise<any>}
|
|
692
|
+
*/
|
|
693
|
+
module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
694
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
695
|
+
return takeObject(ret);
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* @param {bigint} duration_in_ms
|
|
730
700
|
* @returns {Promise<void>}
|
|
731
701
|
*/
|
|
732
|
-
module.exports.
|
|
733
|
-
const ret = wasm.
|
|
702
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
703
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
734
704
|
return takeObject(ret);
|
|
735
705
|
};
|
|
736
706
|
|
|
737
|
-
|
|
707
|
+
/**
|
|
708
|
+
* @param {Uint8Array} buffer
|
|
709
|
+
* @param {string} private_key
|
|
710
|
+
* @returns {string}
|
|
711
|
+
*/
|
|
712
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
738
713
|
try {
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
714
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
715
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
716
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
717
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
718
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
719
|
+
if (r2) {
|
|
720
|
+
throw takeObject(r1);
|
|
721
|
+
}
|
|
722
|
+
return takeObject(r0);
|
|
723
|
+
} finally {
|
|
724
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
742
725
|
}
|
|
743
|
-
}
|
|
726
|
+
};
|
|
744
727
|
|
|
745
|
-
|
|
728
|
+
/**
|
|
729
|
+
* @returns {Promise<bigint>}
|
|
730
|
+
*/
|
|
731
|
+
module.exports.get_next_peer_index = function() {
|
|
732
|
+
const ret = wasm.get_next_peer_index();
|
|
733
|
+
return takeObject(ret);
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* @returns {Promise<Array<any>>}
|
|
738
|
+
*/
|
|
739
|
+
module.exports.get_nft_list = function() {
|
|
740
|
+
const ret = wasm.get_nft_list();
|
|
741
|
+
return takeObject(ret);
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* @param {string} block_hash
|
|
746
|
+
* @returns {Promise<WasmBlock>}
|
|
747
|
+
*/
|
|
748
|
+
module.exports.get_block = function(block_hash) {
|
|
749
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
750
|
+
return takeObject(ret);
|
|
751
|
+
};
|
|
746
752
|
|
|
747
|
-
function addBorrowedObject(obj) {
|
|
748
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
749
|
-
heap[--stack_pointer] = obj;
|
|
750
|
-
return stack_pointer;
|
|
751
|
-
}
|
|
752
753
|
function __wbg_adapter_454(arg0, arg1, arg2, arg3) {
|
|
753
754
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h67b6352f6b82f267(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
754
755
|
}
|
|
@@ -2685,8 +2686,8 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
2685
2686
|
takeObject(arg0);
|
|
2686
2687
|
};
|
|
2687
2688
|
|
|
2688
|
-
module.exports.
|
|
2689
|
-
const ret =
|
|
2689
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2690
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2690
2691
|
return addHeapObject(ret);
|
|
2691
2692
|
};
|
|
2692
2693
|
|
|
@@ -2700,28 +2701,13 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
|
2700
2701
|
return addHeapObject(ret);
|
|
2701
2702
|
};
|
|
2702
2703
|
|
|
2703
|
-
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2704
|
-
const ret = WasmWallet.__wrap(arg0);
|
|
2705
|
-
return addHeapObject(ret);
|
|
2706
|
-
};
|
|
2707
|
-
|
|
2708
|
-
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2709
|
-
const ret = WasmPeer.__wrap(arg0);
|
|
2710
|
-
return addHeapObject(ret);
|
|
2711
|
-
};
|
|
2712
|
-
|
|
2713
|
-
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2714
|
-
const ret = WasmBlock.__wrap(arg0);
|
|
2715
|
-
return addHeapObject(ret);
|
|
2716
|
-
};
|
|
2717
|
-
|
|
2718
2704
|
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2719
2705
|
const ret = WasmTransaction.__wrap(arg0);
|
|
2720
2706
|
return addHeapObject(ret);
|
|
2721
2707
|
};
|
|
2722
2708
|
|
|
2723
|
-
module.exports.
|
|
2724
|
-
const ret =
|
|
2709
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2710
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2725
2711
|
return addHeapObject(ret);
|
|
2726
2712
|
};
|
|
2727
2713
|
|
|
@@ -2734,58 +2720,47 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
2734
2720
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2735
2721
|
};
|
|
2736
2722
|
|
|
2737
|
-
module.exports.
|
|
2738
|
-
const ret =
|
|
2723
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2724
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2739
2725
|
return addHeapObject(ret);
|
|
2740
2726
|
};
|
|
2741
2727
|
|
|
2742
|
-
module.exports.
|
|
2743
|
-
const ret =
|
|
2728
|
+
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2729
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2744
2730
|
return addHeapObject(ret);
|
|
2745
2731
|
};
|
|
2746
2732
|
|
|
2747
|
-
module.exports.
|
|
2748
|
-
const ret =
|
|
2733
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2734
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2749
2735
|
return addHeapObject(ret);
|
|
2750
2736
|
};
|
|
2751
2737
|
|
|
2752
|
-
module.exports.
|
|
2753
|
-
const ret =
|
|
2738
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2739
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2754
2740
|
return addHeapObject(ret);
|
|
2755
2741
|
};
|
|
2756
2742
|
|
|
2757
|
-
module.exports.
|
|
2758
|
-
const ret =
|
|
2743
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2744
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2759
2745
|
return addHeapObject(ret);
|
|
2760
2746
|
};
|
|
2761
2747
|
|
|
2762
|
-
module.exports.
|
|
2763
|
-
const ret =
|
|
2748
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2749
|
+
const ret = getObject(arg0);
|
|
2764
2750
|
return addHeapObject(ret);
|
|
2765
2751
|
};
|
|
2766
2752
|
|
|
2767
|
-
module.exports.
|
|
2768
|
-
const
|
|
2769
|
-
|
|
2770
|
-
return ret;
|
|
2771
|
-
};
|
|
2772
|
-
|
|
2773
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2774
|
-
const ret = getObject(arg0) === undefined;
|
|
2775
|
-
return ret;
|
|
2776
|
-
};
|
|
2777
|
-
|
|
2778
|
-
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
2779
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
2780
|
-
return ret;
|
|
2753
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2754
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2755
|
+
return addHeapObject(ret);
|
|
2781
2756
|
};
|
|
2782
2757
|
|
|
2783
|
-
module.exports.
|
|
2784
|
-
const ret =
|
|
2758
|
+
module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2759
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
2785
2760
|
return addHeapObject(ret);
|
|
2786
2761
|
};
|
|
2787
2762
|
|
|
2788
|
-
module.exports.
|
|
2763
|
+
module.exports.__wbg_flushdata_959afdb00fed879c = function(arg0, arg1) {
|
|
2789
2764
|
let deferred0_0;
|
|
2790
2765
|
let deferred0_1;
|
|
2791
2766
|
try {
|
|
@@ -2797,7 +2772,7 @@ module.exports.__wbg_flushdata_8a3be53f8be8f226 = function(arg0, arg1) {
|
|
|
2797
2772
|
}
|
|
2798
2773
|
};
|
|
2799
2774
|
|
|
2800
|
-
module.exports.
|
|
2775
|
+
module.exports.__wbg_readvalue_ea1167df5f332782 = function() { return handleError(function (arg0, arg1) {
|
|
2801
2776
|
let deferred0_0;
|
|
2802
2777
|
let deferred0_1;
|
|
2803
2778
|
try {
|
|
@@ -2810,15 +2785,15 @@ module.exports.__wbg_readvalue_f8e3c605b6013fe7 = function() { return handleErro
|
|
|
2810
2785
|
}
|
|
2811
2786
|
}, arguments) };
|
|
2812
2787
|
|
|
2813
|
-
module.exports.
|
|
2788
|
+
module.exports.__wbg_loadwallet_395dfbc45ae2aaf0 = function() {
|
|
2814
2789
|
MsgHandler.load_wallet();
|
|
2815
2790
|
};
|
|
2816
2791
|
|
|
2817
|
-
module.exports.
|
|
2792
|
+
module.exports.__wbg_savewallet_2f07cd5cab536147 = function() {
|
|
2818
2793
|
MsgHandler.save_wallet();
|
|
2819
2794
|
};
|
|
2820
2795
|
|
|
2821
|
-
module.exports.
|
|
2796
|
+
module.exports.__wbg_writevalue_3af441dae37fc973 = function(arg0, arg1, arg2) {
|
|
2822
2797
|
let deferred0_0;
|
|
2823
2798
|
let deferred0_1;
|
|
2824
2799
|
try {
|
|
@@ -2830,7 +2805,7 @@ module.exports.__wbg_writevalue_1599a6bbe5b9fcba = function(arg0, arg1, arg2) {
|
|
|
2830
2805
|
}
|
|
2831
2806
|
};
|
|
2832
2807
|
|
|
2833
|
-
module.exports.
|
|
2808
|
+
module.exports.__wbg_appendvalue_2b22bd5343efc7c2 = function(arg0, arg1, arg2) {
|
|
2834
2809
|
let deferred0_0;
|
|
2835
2810
|
let deferred0_1;
|
|
2836
2811
|
try {
|
|
@@ -2842,7 +2817,7 @@ module.exports.__wbg_appendvalue_2602f3dff3c02ed3 = function(arg0, arg1, arg2) {
|
|
|
2842
2817
|
}
|
|
2843
2818
|
};
|
|
2844
2819
|
|
|
2845
|
-
module.exports.
|
|
2820
|
+
module.exports.__wbg_removevalue_69013304fe546803 = function() { return handleError(function (arg0, arg1) {
|
|
2846
2821
|
let deferred0_0;
|
|
2847
2822
|
let deferred0_1;
|
|
2848
2823
|
try {
|
|
@@ -2855,11 +2830,11 @@ module.exports.__wbg_removevalue_864a1ee43137bd0c = function() { return handleEr
|
|
|
2855
2830
|
}
|
|
2856
2831
|
}, arguments) };
|
|
2857
2832
|
|
|
2858
|
-
module.exports.
|
|
2833
|
+
module.exports.__wbg_sendmessage_7c26f1bbbed9e46f = function(arg0, arg1) {
|
|
2859
2834
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2860
2835
|
};
|
|
2861
2836
|
|
|
2862
|
-
module.exports.
|
|
2837
|
+
module.exports.__wbg_connecttopeer_79cdb3724b71d924 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2863
2838
|
let deferred0_0;
|
|
2864
2839
|
let deferred0_1;
|
|
2865
2840
|
try {
|
|
@@ -2872,14 +2847,14 @@ module.exports.__wbg_connecttopeer_c5deae2cdbdb9f5d = function() { return handle
|
|
|
2872
2847
|
}
|
|
2873
2848
|
}, arguments) };
|
|
2874
2849
|
|
|
2875
|
-
module.exports.
|
|
2850
|
+
module.exports.__wbg_getmyservices_a79be7195bd7d49f = function() {
|
|
2876
2851
|
const ret = MsgHandler.get_my_services();
|
|
2877
2852
|
_assertClass(ret, WasmPeerServiceList);
|
|
2878
2853
|
var ptr1 = ret.__destroy_into_raw();
|
|
2879
2854
|
return ptr1;
|
|
2880
2855
|
};
|
|
2881
2856
|
|
|
2882
|
-
module.exports.
|
|
2857
|
+
module.exports.__wbg_isexistingfile_bffa862b84480286 = function() { return handleError(function (arg0, arg1) {
|
|
2883
2858
|
let deferred0_0;
|
|
2884
2859
|
let deferred0_1;
|
|
2885
2860
|
try {
|
|
@@ -2892,33 +2867,33 @@ module.exports.__wbg_isexistingfile_0099b8b5ea955d68 = function() { return handl
|
|
|
2892
2867
|
}
|
|
2893
2868
|
}, arguments) };
|
|
2894
2869
|
|
|
2895
|
-
module.exports.
|
|
2870
|
+
module.exports.__wbg_processapicall_5367cc54306e9ccc = function(arg0, arg1, arg2) {
|
|
2896
2871
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2897
2872
|
};
|
|
2898
2873
|
|
|
2899
|
-
module.exports.
|
|
2874
|
+
module.exports.__wbg_processapierror_e0b780889405b986 = function(arg0, arg1, arg2) {
|
|
2900
2875
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2901
2876
|
};
|
|
2902
2877
|
|
|
2903
|
-
module.exports.
|
|
2878
|
+
module.exports.__wbg_processapisuccess_25c8ef9b4d599f7e = function(arg0, arg1, arg2) {
|
|
2904
2879
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2905
2880
|
};
|
|
2906
2881
|
|
|
2907
|
-
module.exports.
|
|
2882
|
+
module.exports.__wbg_sendmessagetoall_b1e4b08013617c3e = function(arg0, arg1) {
|
|
2908
2883
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2909
2884
|
};
|
|
2910
2885
|
|
|
2911
|
-
module.exports.
|
|
2886
|
+
module.exports.__wbg_disconnectfrompeer_ad36a1191cdd63d9 = function() { return handleError(function (arg0) {
|
|
2912
2887
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2913
2888
|
return addHeapObject(ret);
|
|
2914
2889
|
}, arguments) };
|
|
2915
2890
|
|
|
2916
|
-
module.exports.
|
|
2891
|
+
module.exports.__wbg_loadblockfilelist_0b20ccd3a40cc11e = function() { return handleError(function () {
|
|
2917
2892
|
const ret = MsgHandler.load_block_file_list();
|
|
2918
2893
|
return addHeapObject(ret);
|
|
2919
2894
|
}, arguments) };
|
|
2920
2895
|
|
|
2921
|
-
module.exports.
|
|
2896
|
+
module.exports.__wbg_sendinterfaceevent_1bf1119883a70f22 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2922
2897
|
let deferred0_0;
|
|
2923
2898
|
let deferred0_1;
|
|
2924
2899
|
let deferred1_0;
|
|
@@ -2935,7 +2910,7 @@ module.exports.__wbg_sendinterfaceevent_ea3b82df825804d3 = function(arg0, arg1,
|
|
|
2935
2910
|
}
|
|
2936
2911
|
};
|
|
2937
2912
|
|
|
2938
|
-
module.exports.
|
|
2913
|
+
module.exports.__wbg_sendblocksuccess_c442d2ce9efb1187 = function(arg0, arg1, arg2) {
|
|
2939
2914
|
let deferred0_0;
|
|
2940
2915
|
let deferred0_1;
|
|
2941
2916
|
try {
|
|
@@ -2947,11 +2922,11 @@ module.exports.__wbg_sendblocksuccess_3f6c6666f1c6ce59 = function(arg0, arg1, ar
|
|
|
2947
2922
|
}
|
|
2948
2923
|
};
|
|
2949
2924
|
|
|
2950
|
-
module.exports.
|
|
2925
|
+
module.exports.__wbg_sendwalletupdate_66ded07a4706255d = function() {
|
|
2951
2926
|
MsgHandler.send_wallet_update();
|
|
2952
2927
|
};
|
|
2953
2928
|
|
|
2954
|
-
module.exports.
|
|
2929
|
+
module.exports.__wbg_sendnewversionalert_9dac92e834ff2f84 = function(arg0, arg1, arg2) {
|
|
2955
2930
|
let deferred0_0;
|
|
2956
2931
|
let deferred0_1;
|
|
2957
2932
|
try {
|
|
@@ -2963,15 +2938,15 @@ module.exports.__wbg_sendnewversionalert_011ddf281aa4b239 = function(arg0, arg1,
|
|
|
2963
2938
|
}
|
|
2964
2939
|
};
|
|
2965
2940
|
|
|
2966
|
-
module.exports.
|
|
2941
|
+
module.exports.__wbg_sendblockfetchstatusevent_635077591c78fdf6 = function(arg0) {
|
|
2967
2942
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2968
2943
|
};
|
|
2969
2944
|
|
|
2970
|
-
module.exports.
|
|
2945
|
+
module.exports.__wbg_sendnewchaindetectedevent_321961fd17df51e4 = function() {
|
|
2971
2946
|
MsgHandler.send_new_chain_detected_event();
|
|
2972
2947
|
};
|
|
2973
2948
|
|
|
2974
|
-
module.exports.
|
|
2949
|
+
module.exports.__wbg_fetchblockfrompeer_7a7842160f45322b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2975
2950
|
let deferred0_0;
|
|
2976
2951
|
let deferred0_1;
|
|
2977
2952
|
try {
|
|
@@ -2984,7 +2959,7 @@ module.exports.__wbg_fetchblockfrompeer_68ea2e6049430713 = function() { return h
|
|
|
2984
2959
|
}
|
|
2985
2960
|
}, arguments) };
|
|
2986
2961
|
|
|
2987
|
-
module.exports.
|
|
2962
|
+
module.exports.__wbg_ensuredirectoryexists_ace1c9a1ec876037 = function() { return handleError(function (arg0, arg1) {
|
|
2988
2963
|
let deferred0_0;
|
|
2989
2964
|
let deferred0_1;
|
|
2990
2965
|
try {
|
|
@@ -2996,6 +2971,32 @@ module.exports.__wbg_ensuredirectoryexists_c993e374fac2a231 = function() { retur
|
|
|
2996
2971
|
}
|
|
2997
2972
|
}, arguments) };
|
|
2998
2973
|
|
|
2974
|
+
module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
2975
|
+
const ret = WasmHop.__wrap(arg0);
|
|
2976
|
+
return addHeapObject(ret);
|
|
2977
|
+
};
|
|
2978
|
+
|
|
2979
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2980
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2981
|
+
return addHeapObject(ret);
|
|
2982
|
+
};
|
|
2983
|
+
|
|
2984
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
2985
|
+
const val = getObject(arg0);
|
|
2986
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2987
|
+
return ret;
|
|
2988
|
+
};
|
|
2989
|
+
|
|
2990
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2991
|
+
const ret = getObject(arg0) === undefined;
|
|
2992
|
+
return ret;
|
|
2993
|
+
};
|
|
2994
|
+
|
|
2995
|
+
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
2996
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
2997
|
+
return ret;
|
|
2998
|
+
};
|
|
2999
|
+
|
|
2999
3000
|
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
3000
3001
|
const ret = getObject(arg0) == getObject(arg1);
|
|
3001
3002
|
return ret;
|
|
@@ -3373,7 +3374,7 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
|
3373
3374
|
};
|
|
3374
3375
|
|
|
3375
3376
|
module.exports.__wbindgen_closure_wrapper1616 = function(arg0, arg1, arg2) {
|
|
3376
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3377
|
+
const ret = makeMutClosure(arg0, arg1, 596, __wbg_adapter_38);
|
|
3377
3378
|
return addHeapObject(ret);
|
|
3378
3379
|
};
|
|
3379
3380
|
|