saito-wasm 0.2.179 → 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 +141 -141
- package/pkg/node/index.js +339 -338
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +114 -114
- package/pkg/node/package.json +1 -1
- package/pkg/web/index.d.ts +255 -255
- package/pkg/web/index.js +331 -330
- 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-cb5d42cd87cbad30 → saito-wasm-f4f63644dad58d74}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-cb5d42cd87cbad30 → 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);
|
|
@@ -12,15 +12,6 @@ function getObject(idx) { return heap[idx]; }
|
|
|
12
12
|
|
|
13
13
|
let heap_next = heap.length;
|
|
14
14
|
|
|
15
|
-
function addHeapObject(obj) {
|
|
16
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
17
|
-
const idx = heap_next;
|
|
18
|
-
heap_next = heap[idx];
|
|
19
|
-
|
|
20
|
-
heap[idx] = obj;
|
|
21
|
-
return idx;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
15
|
function dropObject(idx) {
|
|
25
16
|
if (idx < 132) return;
|
|
26
17
|
heap[idx] = heap_next;
|
|
@@ -33,6 +24,15 @@ function takeObject(idx) {
|
|
|
33
24
|
return ret;
|
|
34
25
|
}
|
|
35
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
36
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
37
37
|
|
|
38
38
|
cachedTextDecoder.decode();
|
|
@@ -228,58 +228,64 @@ 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
|
}
|
|
245
|
+
|
|
246
|
+
let stack_pointer = 128;
|
|
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
|
+
}
|
|
237
253
|
/**
|
|
238
|
-
* @returns {
|
|
254
|
+
* @returns {string}
|
|
239
255
|
*/
|
|
240
|
-
module.exports.
|
|
241
|
-
const ret = wasm.
|
|
256
|
+
module.exports.generate_private_key = function() {
|
|
257
|
+
const ret = wasm.generate_private_key();
|
|
242
258
|
return takeObject(ret);
|
|
243
259
|
};
|
|
244
260
|
|
|
245
261
|
/**
|
|
246
262
|
* @param {bigint} peer_index
|
|
263
|
+
* @param {string} ip
|
|
247
264
|
* @returns {Promise<void>}
|
|
248
265
|
*/
|
|
249
|
-
module.exports.
|
|
250
|
-
const ret = wasm.
|
|
251
|
-
return takeObject(ret);
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* @param {string} slip1_utxo_key
|
|
256
|
-
* @param {string} slip2_utxo_key
|
|
257
|
-
* @param {string} slip3_utxo_key
|
|
258
|
-
* @param {number} left_count
|
|
259
|
-
* @param {number} right_count
|
|
260
|
-
* @param {Uint8Array} tx_msg
|
|
261
|
-
* @returns {Promise<WasmTransaction>}
|
|
262
|
-
*/
|
|
263
|
-
module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
264
|
-
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));
|
|
266
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
267
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
265
268
|
return takeObject(ret);
|
|
266
269
|
};
|
|
267
270
|
|
|
268
271
|
/**
|
|
269
272
|
* @param {bigint} peer_index
|
|
270
|
-
* @param {string} ip
|
|
271
273
|
* @returns {Promise<void>}
|
|
272
274
|
*/
|
|
273
|
-
module.exports.
|
|
274
|
-
const ret = wasm.
|
|
275
|
+
module.exports.remove_stun_peer = function(peer_index) {
|
|
276
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
275
277
|
return takeObject(ret);
|
|
276
278
|
};
|
|
277
279
|
|
|
278
280
|
/**
|
|
279
|
-
* @
|
|
281
|
+
* @param {string} nft_id_hex
|
|
282
|
+
* @param {Uint8Array} tx_msg
|
|
283
|
+
* @returns {Promise<WasmTransaction>}
|
|
280
284
|
*/
|
|
281
|
-
module.exports.
|
|
282
|
-
const
|
|
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));
|
|
283
289
|
return takeObject(ret);
|
|
284
290
|
};
|
|
285
291
|
|
|
@@ -296,36 +302,31 @@ module.exports.create_transaction_with_multiple_payments = function(public_keys,
|
|
|
296
302
|
};
|
|
297
303
|
|
|
298
304
|
/**
|
|
299
|
-
* @param {
|
|
300
|
-
* @returns {
|
|
305
|
+
* @param {bigint} peer_index
|
|
306
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
301
307
|
*/
|
|
302
|
-
module.exports.
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
306
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
307
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
308
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
309
|
-
if (r2) {
|
|
310
|
-
throw takeObject(r1);
|
|
311
|
-
}
|
|
312
|
-
return takeObject(r0);
|
|
313
|
-
} finally {
|
|
314
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
315
|
-
}
|
|
308
|
+
module.exports.get_peer = function(peer_index) {
|
|
309
|
+
const ret = wasm.get_peer(peer_index);
|
|
310
|
+
return takeObject(ret);
|
|
316
311
|
};
|
|
317
312
|
|
|
318
313
|
/**
|
|
319
|
-
* @
|
|
320
|
-
|
|
321
|
-
|
|
314
|
+
* @returns {Promise<string>}
|
|
315
|
+
*/
|
|
316
|
+
module.exports.get_stats = function() {
|
|
317
|
+
const ret = wasm.get_stats();
|
|
318
|
+
return takeObject(ret);
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @param {string} public_key
|
|
323
|
+
* @param {bigint} amount
|
|
322
324
|
* @param {bigint} fee
|
|
323
|
-
* @param {
|
|
324
|
-
* @param {string} nft_type
|
|
325
|
+
* @param {boolean} force_merge
|
|
325
326
|
* @returns {Promise<WasmTransaction>}
|
|
326
327
|
*/
|
|
327
|
-
module.exports.
|
|
328
|
-
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);
|
|
329
330
|
return takeObject(ret);
|
|
330
331
|
};
|
|
331
332
|
|
|
@@ -338,130 +339,120 @@ module.exports.produce_block_with_gt = function() {
|
|
|
338
339
|
};
|
|
339
340
|
|
|
340
341
|
/**
|
|
341
|
-
* @returns {Promise<
|
|
342
|
+
* @returns {Promise<WasmBlockchain>}
|
|
342
343
|
*/
|
|
343
|
-
module.exports.
|
|
344
|
-
const ret = wasm.
|
|
344
|
+
module.exports.get_blockchain = function() {
|
|
345
|
+
const ret = wasm.get_blockchain();
|
|
345
346
|
return takeObject(ret);
|
|
346
347
|
};
|
|
347
348
|
|
|
348
349
|
/**
|
|
349
|
-
* @
|
|
350
|
-
* @returns {Promise<void>}
|
|
350
|
+
* @returns {Promise<string>}
|
|
351
351
|
*/
|
|
352
|
-
module.exports.
|
|
353
|
-
|
|
354
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
352
|
+
module.exports.get_peer_stats = function() {
|
|
353
|
+
const ret = wasm.get_peer_stats();
|
|
355
354
|
return takeObject(ret);
|
|
356
355
|
};
|
|
357
356
|
|
|
358
357
|
/**
|
|
359
|
-
* @returns {
|
|
358
|
+
* @returns {Promise<boolean>}
|
|
360
359
|
*/
|
|
361
|
-
module.exports.
|
|
362
|
-
const ret = wasm.
|
|
360
|
+
module.exports.produce_block_without_gt = function() {
|
|
361
|
+
const ret = wasm.produce_block_without_gt();
|
|
363
362
|
return takeObject(ret);
|
|
364
363
|
};
|
|
365
364
|
|
|
366
365
|
/**
|
|
367
|
-
* @param {
|
|
368
|
-
* @param {
|
|
369
|
-
* @param {
|
|
370
|
-
* @param {bigint} peer_index
|
|
366
|
+
* @param {number} major
|
|
367
|
+
* @param {number} minor
|
|
368
|
+
* @param {number} patch
|
|
371
369
|
* @returns {Promise<void>}
|
|
372
370
|
*/
|
|
373
|
-
module.exports.
|
|
374
|
-
const ret = wasm.
|
|
371
|
+
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
372
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
375
373
|
return takeObject(ret);
|
|
376
374
|
};
|
|
377
375
|
|
|
378
376
|
/**
|
|
379
|
-
* @
|
|
380
|
-
* @param {string} public_key
|
|
381
|
-
* @returns {Promise<void>}
|
|
377
|
+
* @returns {Promise<Array<any>>}
|
|
382
378
|
*/
|
|
383
|
-
module.exports.
|
|
384
|
-
const ret = wasm.
|
|
379
|
+
module.exports.get_mempool_txs = function() {
|
|
380
|
+
const ret = wasm.get_mempool_txs();
|
|
385
381
|
return takeObject(ret);
|
|
386
382
|
};
|
|
387
383
|
|
|
388
384
|
/**
|
|
389
|
-
* @param {string}
|
|
390
|
-
* @
|
|
391
|
-
* @param {string} slip3_utxo_key
|
|
392
|
-
* @param {Uint8Array} tx_msg
|
|
393
|
-
* @returns {Promise<WasmTransaction>}
|
|
385
|
+
* @param {string} public_key
|
|
386
|
+
* @returns {Promise<Array<any>>}
|
|
394
387
|
*/
|
|
395
|
-
module.exports.
|
|
396
|
-
const ret = wasm.
|
|
388
|
+
module.exports.get_account_slips = function(public_key) {
|
|
389
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
397
390
|
return takeObject(ret);
|
|
398
391
|
};
|
|
399
392
|
|
|
400
393
|
/**
|
|
401
|
-
* @param {
|
|
402
|
-
* @
|
|
394
|
+
* @param {bigint} peer_index
|
|
395
|
+
* @param {string} public_key
|
|
396
|
+
* @returns {Promise<void>}
|
|
403
397
|
*/
|
|
404
|
-
module.exports.
|
|
405
|
-
const ret = wasm.
|
|
398
|
+
module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
399
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
406
400
|
return takeObject(ret);
|
|
407
401
|
};
|
|
408
402
|
|
|
409
403
|
/**
|
|
410
|
-
* @param {Uint8Array}
|
|
411
|
-
* @param {
|
|
412
|
-
* @
|
|
404
|
+
* @param {Uint8Array} hash
|
|
405
|
+
* @param {bigint} block_id
|
|
406
|
+
* @param {bigint} peer_index
|
|
407
|
+
* @returns {Promise<void>}
|
|
413
408
|
*/
|
|
414
|
-
module.exports.
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
418
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
419
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
420
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
421
|
-
if (r2) {
|
|
422
|
-
throw takeObject(r1);
|
|
423
|
-
}
|
|
424
|
-
return takeObject(r0);
|
|
425
|
-
} finally {
|
|
426
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
427
|
-
}
|
|
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);
|
|
411
|
+
return takeObject(ret);
|
|
428
412
|
};
|
|
429
413
|
|
|
430
414
|
/**
|
|
431
|
-
* @
|
|
415
|
+
* @param {Uint8Array} buffer
|
|
416
|
+
* @param {number} msg_index
|
|
417
|
+
* @param {bigint} peer_index
|
|
418
|
+
* @returns {Promise<void>}
|
|
432
419
|
*/
|
|
433
|
-
module.exports.
|
|
434
|
-
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);
|
|
435
422
|
return takeObject(ret);
|
|
436
423
|
};
|
|
437
424
|
|
|
438
425
|
/**
|
|
439
|
-
* @param {
|
|
426
|
+
* @param {Uint8Array} buffer
|
|
427
|
+
* @param {number} msg_index
|
|
428
|
+
* @param {bigint} peer_index
|
|
440
429
|
* @returns {Promise<void>}
|
|
441
430
|
*/
|
|
442
|
-
module.exports.
|
|
443
|
-
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);
|
|
444
433
|
return takeObject(ret);
|
|
445
434
|
};
|
|
446
435
|
|
|
447
436
|
/**
|
|
448
|
-
* @param {
|
|
449
|
-
* @
|
|
450
|
-
* @param {number} log_level_num
|
|
451
|
-
* @param {bigint} hasten_multiplier
|
|
452
|
-
* @param {boolean} delete_old_blocks
|
|
453
|
-
* @returns {Promise<any>}
|
|
437
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
438
|
+
* @returns {Promise<void>}
|
|
454
439
|
*/
|
|
455
|
-
module.exports.
|
|
456
|
-
|
|
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);
|
|
457
444
|
return takeObject(ret);
|
|
458
445
|
};
|
|
459
446
|
|
|
460
447
|
/**
|
|
461
|
-
* @
|
|
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>}
|
|
462
453
|
*/
|
|
463
|
-
module.exports.
|
|
464
|
-
const ret = wasm.
|
|
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));
|
|
465
456
|
return takeObject(ret);
|
|
466
457
|
};
|
|
467
458
|
|
|
@@ -474,57 +465,55 @@ module.exports.get_peers = function() {
|
|
|
474
465
|
};
|
|
475
466
|
|
|
476
467
|
/**
|
|
477
|
-
* @param {
|
|
478
|
-
* @param {
|
|
479
|
-
* @param {
|
|
480
|
-
* @
|
|
468
|
+
* @param {string} slip1_utxo_key
|
|
469
|
+
* @param {string} slip2_utxo_key
|
|
470
|
+
* @param {string} slip3_utxo_key
|
|
471
|
+
* @param {number} left_count
|
|
472
|
+
* @param {number} right_count
|
|
473
|
+
* @param {Uint8Array} tx_msg
|
|
474
|
+
* @returns {Promise<WasmTransaction>}
|
|
481
475
|
*/
|
|
482
|
-
module.exports.
|
|
483
|
-
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));
|
|
484
478
|
return takeObject(ret);
|
|
485
479
|
};
|
|
486
480
|
|
|
487
481
|
/**
|
|
488
|
-
* @param {
|
|
489
|
-
* @param {number} msg_index
|
|
490
|
-
* @param {bigint} peer_index
|
|
482
|
+
* @param {bigint} current_time
|
|
491
483
|
* @returns {Promise<void>}
|
|
492
484
|
*/
|
|
493
|
-
module.exports.
|
|
494
|
-
const ret = wasm.
|
|
485
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
486
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
495
487
|
return takeObject(ret);
|
|
496
488
|
};
|
|
497
489
|
|
|
498
490
|
/**
|
|
499
|
-
* @param {
|
|
500
|
-
* @param {bigint} peer_index
|
|
491
|
+
* @param {bigint} threshold
|
|
501
492
|
* @returns {Promise<void>}
|
|
502
493
|
*/
|
|
503
|
-
module.exports.
|
|
504
|
-
const ret = wasm.
|
|
494
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
495
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
505
496
|
return takeObject(ret);
|
|
506
497
|
};
|
|
507
498
|
|
|
508
499
|
/**
|
|
509
|
-
* @
|
|
500
|
+
* @param {string} key
|
|
501
|
+
* @returns {boolean}
|
|
510
502
|
*/
|
|
511
|
-
module.exports.
|
|
512
|
-
const ret = wasm.
|
|
513
|
-
return
|
|
503
|
+
module.exports.is_valid_public_key = function(key) {
|
|
504
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
505
|
+
return ret !== 0;
|
|
514
506
|
};
|
|
515
507
|
|
|
516
508
|
/**
|
|
517
|
-
* @param {
|
|
518
|
-
* @param {string}
|
|
519
|
-
* @param {string}
|
|
520
|
-
* @
|
|
521
|
-
* @param {string} recipient_public_key
|
|
522
|
-
* @param {Uint8Array} tx_msg
|
|
523
|
-
* @returns {Promise<WasmTransaction>}
|
|
509
|
+
* @param {Uint8Array} buffer
|
|
510
|
+
* @param {string} signature
|
|
511
|
+
* @param {string} public_key
|
|
512
|
+
* @returns {boolean}
|
|
524
513
|
*/
|
|
525
|
-
module.exports.
|
|
526
|
-
const ret = wasm.
|
|
527
|
-
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;
|
|
528
517
|
};
|
|
529
518
|
|
|
530
519
|
/**
|
|
@@ -537,218 +526,230 @@ module.exports.hash = function(buffer) {
|
|
|
537
526
|
};
|
|
538
527
|
|
|
539
528
|
/**
|
|
540
|
-
* @
|
|
541
|
-
* @param {number} msg_index
|
|
542
|
-
* @param {bigint} peer_index
|
|
543
|
-
* @returns {Promise<void>}
|
|
529
|
+
* @returns {Promise<any>}
|
|
544
530
|
*/
|
|
545
|
-
module.exports.
|
|
546
|
-
const ret = wasm.
|
|
531
|
+
module.exports.get_confirmations = function() {
|
|
532
|
+
const ret = wasm.get_confirmations();
|
|
547
533
|
return takeObject(ret);
|
|
548
534
|
};
|
|
549
535
|
|
|
550
536
|
/**
|
|
551
|
-
* @
|
|
552
|
-
* @param {string} signature
|
|
553
|
-
* @param {string} public_key
|
|
554
|
-
* @returns {boolean}
|
|
537
|
+
* @returns {Promise<string>}
|
|
555
538
|
*/
|
|
556
|
-
module.exports.
|
|
557
|
-
const ret = wasm.
|
|
558
|
-
return ret
|
|
539
|
+
module.exports.get_congestion_stats = function() {
|
|
540
|
+
const ret = wasm.get_congestion_stats();
|
|
541
|
+
return takeObject(ret);
|
|
559
542
|
};
|
|
560
543
|
|
|
561
544
|
/**
|
|
545
|
+
* @param {Uint8Array} buffer
|
|
562
546
|
* @param {bigint} peer_index
|
|
563
|
-
* @returns {Promise<
|
|
547
|
+
* @returns {Promise<void>}
|
|
564
548
|
*/
|
|
565
|
-
module.exports.
|
|
566
|
-
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);
|
|
567
551
|
return takeObject(ret);
|
|
568
552
|
};
|
|
569
553
|
|
|
570
554
|
/**
|
|
571
|
-
* @returns {Promise<
|
|
555
|
+
* @returns {Promise<void>}
|
|
572
556
|
*/
|
|
573
|
-
module.exports.
|
|
574
|
-
const ret = wasm.
|
|
557
|
+
module.exports.disable_producing_blocks_by_timer = function() {
|
|
558
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
575
559
|
return takeObject(ret);
|
|
576
560
|
};
|
|
577
561
|
|
|
578
562
|
/**
|
|
579
|
-
* @param {
|
|
580
|
-
* @returns {Promise<
|
|
563
|
+
* @param {Array<any>} keys
|
|
564
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
581
565
|
*/
|
|
582
|
-
module.exports.
|
|
583
|
-
|
|
584
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
585
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
566
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
567
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
586
568
|
return takeObject(ret);
|
|
587
569
|
};
|
|
588
570
|
|
|
589
571
|
/**
|
|
590
|
-
* @
|
|
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
|
|
578
|
+
* @returns {Promise<WasmTransaction>}
|
|
591
579
|
*/
|
|
592
|
-
module.exports.
|
|
593
|
-
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));
|
|
594
582
|
return takeObject(ret);
|
|
595
583
|
};
|
|
596
584
|
|
|
597
585
|
/**
|
|
598
|
-
* @returns {Promise<
|
|
586
|
+
* @returns {Promise<void>}
|
|
599
587
|
*/
|
|
600
|
-
module.exports.
|
|
601
|
-
const ret = wasm.
|
|
588
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
589
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
602
590
|
return takeObject(ret);
|
|
603
591
|
};
|
|
604
592
|
|
|
605
593
|
/**
|
|
606
|
-
* @param {
|
|
607
|
-
* @
|
|
608
|
-
* @param {bigint} fee
|
|
609
|
-
* @param {boolean} force_merge
|
|
610
|
-
* @returns {Promise<WasmTransaction>}
|
|
594
|
+
* @param {bigint} peer_index
|
|
595
|
+
* @returns {Promise<void>}
|
|
611
596
|
*/
|
|
612
|
-
module.exports.
|
|
613
|
-
const ret = wasm.
|
|
597
|
+
module.exports.process_peer_disconnection = function(peer_index) {
|
|
598
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
614
599
|
return takeObject(ret);
|
|
615
600
|
};
|
|
616
601
|
|
|
617
602
|
/**
|
|
603
|
+
* @param {WasmTransaction} tx
|
|
618
604
|
* @returns {Promise<void>}
|
|
619
605
|
*/
|
|
620
|
-
module.exports.
|
|
621
|
-
|
|
606
|
+
module.exports.propagate_transaction = function(tx) {
|
|
607
|
+
_assertClass(tx, WasmTransaction);
|
|
608
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
622
609
|
return takeObject(ret);
|
|
623
610
|
};
|
|
624
611
|
|
|
625
612
|
/**
|
|
626
|
-
* @param {
|
|
613
|
+
* @param {Uint8Array} buffer
|
|
614
|
+
* @param {Uint8Array} hash
|
|
615
|
+
* @param {bigint} block_id
|
|
616
|
+
* @param {bigint} peer_index
|
|
627
617
|
* @returns {Promise<void>}
|
|
628
618
|
*/
|
|
629
|
-
module.exports.
|
|
630
|
-
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);
|
|
631
621
|
return takeObject(ret);
|
|
632
622
|
};
|
|
633
623
|
|
|
634
624
|
/**
|
|
635
|
-
* @param {bigint}
|
|
636
|
-
* @
|
|
625
|
+
* @param {bigint} num
|
|
626
|
+
* @param {bigint} deposit
|
|
627
|
+
* @param {Uint8Array} tx_msg
|
|
628
|
+
* @param {bigint} fee
|
|
629
|
+
* @param {string} recipient_public_key
|
|
630
|
+
* @param {string} nft_type
|
|
631
|
+
* @returns {Promise<WasmTransaction>}
|
|
637
632
|
*/
|
|
638
|
-
module.exports.
|
|
639
|
-
const ret = wasm.
|
|
633
|
+
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
634
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
640
635
|
return takeObject(ret);
|
|
641
636
|
};
|
|
642
637
|
|
|
643
638
|
/**
|
|
644
|
-
* @returns {Promise<
|
|
639
|
+
* @returns {Promise<string>}
|
|
645
640
|
*/
|
|
646
|
-
module.exports.
|
|
647
|
-
const ret = wasm.
|
|
641
|
+
module.exports.get_latest_block_hash = function() {
|
|
642
|
+
const ret = wasm.get_latest_block_hash();
|
|
648
643
|
return takeObject(ret);
|
|
649
644
|
};
|
|
650
645
|
|
|
651
646
|
/**
|
|
652
|
-
* @param {
|
|
653
|
-
* @
|
|
654
|
-
* @param {number} patch
|
|
655
|
-
* @returns {Promise<void>}
|
|
647
|
+
* @param {string} private_key
|
|
648
|
+
* @returns {string}
|
|
656
649
|
*/
|
|
657
|
-
module.exports.
|
|
658
|
-
|
|
659
|
-
|
|
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
|
+
}
|
|
660
664
|
};
|
|
661
665
|
|
|
662
666
|
/**
|
|
663
|
-
* @param {
|
|
664
|
-
* @
|
|
667
|
+
* @param {Uint8Array} buffer
|
|
668
|
+
* @param {number} msg_index
|
|
669
|
+
* @param {bigint} peer_index
|
|
670
|
+
* @returns {Promise<void>}
|
|
665
671
|
*/
|
|
666
|
-
module.exports.
|
|
667
|
-
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);
|
|
668
674
|
return takeObject(ret);
|
|
669
675
|
};
|
|
670
676
|
|
|
671
677
|
/**
|
|
672
|
-
* @
|
|
673
|
-
* @param {Uint8Array} tx_msg
|
|
674
|
-
* @returns {Promise<WasmTransaction>}
|
|
678
|
+
* @returns {Promise<WasmWallet>}
|
|
675
679
|
*/
|
|
676
|
-
module.exports.
|
|
677
|
-
const
|
|
678
|
-
const len0 = WASM_VECTOR_LEN;
|
|
679
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
680
|
+
module.exports.get_wallet = function() {
|
|
681
|
+
const ret = wasm.get_wallet();
|
|
680
682
|
return takeObject(ret);
|
|
681
683
|
};
|
|
682
684
|
|
|
683
685
|
/**
|
|
684
|
-
* @param {string}
|
|
685
|
-
* @
|
|
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>}
|
|
686
692
|
*/
|
|
687
|
-
module.exports.
|
|
688
|
-
const ret = wasm.
|
|
689
|
-
return ret
|
|
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);
|
|
690
696
|
};
|
|
691
697
|
|
|
692
698
|
/**
|
|
693
|
-
* @
|
|
699
|
+
* @param {bigint} duration_in_ms
|
|
700
|
+
* @returns {Promise<void>}
|
|
694
701
|
*/
|
|
695
|
-
module.exports.
|
|
696
|
-
const ret = wasm.
|
|
702
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
703
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
697
704
|
return takeObject(ret);
|
|
698
705
|
};
|
|
699
706
|
|
|
700
707
|
/**
|
|
701
|
-
* @
|
|
708
|
+
* @param {Uint8Array} buffer
|
|
709
|
+
* @param {string} private_key
|
|
710
|
+
* @returns {string}
|
|
702
711
|
*/
|
|
703
|
-
module.exports.
|
|
704
|
-
|
|
705
|
-
|
|
712
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
713
|
+
try {
|
|
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);
|
|
725
|
+
}
|
|
706
726
|
};
|
|
707
727
|
|
|
708
728
|
/**
|
|
709
|
-
* @
|
|
710
|
-
* @returns {Promise<void>}
|
|
729
|
+
* @returns {Promise<bigint>}
|
|
711
730
|
*/
|
|
712
|
-
module.exports.
|
|
713
|
-
const ret = wasm.
|
|
731
|
+
module.exports.get_next_peer_index = function() {
|
|
732
|
+
const ret = wasm.get_next_peer_index();
|
|
714
733
|
return takeObject(ret);
|
|
715
734
|
};
|
|
716
735
|
|
|
717
736
|
/**
|
|
718
|
-
* @param {string} public_key
|
|
719
737
|
* @returns {Promise<Array<any>>}
|
|
720
738
|
*/
|
|
721
|
-
module.exports.
|
|
722
|
-
const ret = wasm.
|
|
739
|
+
module.exports.get_nft_list = function() {
|
|
740
|
+
const ret = wasm.get_nft_list();
|
|
723
741
|
return takeObject(ret);
|
|
724
742
|
};
|
|
725
743
|
|
|
726
744
|
/**
|
|
727
|
-
* @param {
|
|
728
|
-
* @
|
|
729
|
-
* @param {bigint} peer_index
|
|
730
|
-
* @returns {Promise<void>}
|
|
745
|
+
* @param {string} block_hash
|
|
746
|
+
* @returns {Promise<WasmBlock>}
|
|
731
747
|
*/
|
|
732
|
-
module.exports.
|
|
733
|
-
const ret = wasm.
|
|
748
|
+
module.exports.get_block = function(block_hash) {
|
|
749
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
734
750
|
return takeObject(ret);
|
|
735
751
|
};
|
|
736
752
|
|
|
737
|
-
function handleError(f, args) {
|
|
738
|
-
try {
|
|
739
|
-
return f.apply(this, args);
|
|
740
|
-
} catch (e) {
|
|
741
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
let stack_pointer = 128;
|
|
746
|
-
|
|
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
|
}
|
|
@@ -2681,13 +2682,18 @@ class WasmWalletSlip {
|
|
|
2681
2682
|
}
|
|
2682
2683
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2683
2684
|
|
|
2684
|
-
module.exports.
|
|
2685
|
-
|
|
2685
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2686
|
+
takeObject(arg0);
|
|
2687
|
+
};
|
|
2688
|
+
|
|
2689
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2690
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2686
2691
|
return addHeapObject(ret);
|
|
2687
2692
|
};
|
|
2688
2693
|
|
|
2689
|
-
module.exports.
|
|
2690
|
-
|
|
2694
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2695
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2696
|
+
return addHeapObject(ret);
|
|
2691
2697
|
};
|
|
2692
2698
|
|
|
2693
2699
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
@@ -2700,31 +2706,11 @@ module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
|
2700
2706
|
return addHeapObject(ret);
|
|
2701
2707
|
};
|
|
2702
2708
|
|
|
2703
|
-
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2704
|
-
const ret = WasmSlip.__wrap(arg0);
|
|
2705
|
-
return addHeapObject(ret);
|
|
2706
|
-
};
|
|
2707
|
-
|
|
2708
2709
|
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2709
2710
|
const ret = WasmPeer.__wrap(arg0);
|
|
2710
2711
|
return addHeapObject(ret);
|
|
2711
2712
|
};
|
|
2712
2713
|
|
|
2713
|
-
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2714
|
-
const ret = WasmBlockchain.__wrap(arg0);
|
|
2715
|
-
return addHeapObject(ret);
|
|
2716
|
-
};
|
|
2717
|
-
|
|
2718
|
-
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2719
|
-
const ret = WasmNFT.__wrap(arg0);
|
|
2720
|
-
return addHeapObject(ret);
|
|
2721
|
-
};
|
|
2722
|
-
|
|
2723
|
-
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2724
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
2725
|
-
return addHeapObject(ret);
|
|
2726
|
-
};
|
|
2727
|
-
|
|
2728
2714
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2729
2715
|
const obj = getObject(arg1);
|
|
2730
2716
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -2739,53 +2725,42 @@ module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
|
2739
2725
|
return addHeapObject(ret);
|
|
2740
2726
|
};
|
|
2741
2727
|
|
|
2742
|
-
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2743
|
-
const ret = WasmBlock.__wrap(arg0);
|
|
2744
|
-
return addHeapObject(ret);
|
|
2745
|
-
};
|
|
2746
|
-
|
|
2747
2728
|
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2748
2729
|
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2749
2730
|
return addHeapObject(ret);
|
|
2750
2731
|
};
|
|
2751
2732
|
|
|
2752
|
-
module.exports.
|
|
2753
|
-
const ret =
|
|
2733
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2734
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2754
2735
|
return addHeapObject(ret);
|
|
2755
2736
|
};
|
|
2756
2737
|
|
|
2757
|
-
module.exports.
|
|
2758
|
-
const ret =
|
|
2738
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2739
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2759
2740
|
return addHeapObject(ret);
|
|
2760
2741
|
};
|
|
2761
2742
|
|
|
2762
|
-
module.exports.
|
|
2763
|
-
const ret =
|
|
2743
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2744
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2764
2745
|
return addHeapObject(ret);
|
|
2765
2746
|
};
|
|
2766
2747
|
|
|
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;
|
|
2748
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2749
|
+
const ret = getObject(arg0);
|
|
2750
|
+
return addHeapObject(ret);
|
|
2776
2751
|
};
|
|
2777
2752
|
|
|
2778
|
-
module.exports.
|
|
2779
|
-
const ret =
|
|
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_57a24af0b42b2a24 = 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_eda09e3e85f91c6e = 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_d45c2dd3c8c56d4f = 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_80a14b3de2c6810c = 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_0bcbb4eb73cb550c = 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_718f23f2a1dad46e = 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_10384e694274432a = 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_c21cebbf951ca686 = 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_802b9fa50313a64b = 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_732df9ad6cd449c7 = 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_2586d36df17cd9e4 = 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_f091e82931e71635 = 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;
|
|
@@ -3372,8 +3373,8 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
|
3372
3373
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
3373
3374
|
};
|
|
3374
3375
|
|
|
3375
|
-
module.exports.
|
|
3376
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3376
|
+
module.exports.__wbindgen_closure_wrapper1616 = function(arg0, arg1, arg2) {
|
|
3377
|
+
const ret = makeMutClosure(arg0, arg1, 596, __wbg_adapter_38);
|
|
3377
3378
|
return addHeapObject(ret);
|
|
3378
3379
|
};
|
|
3379
3380
|
|