saito-wasm 0.2.177 → 0.2.179
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 +145 -145
- package/pkg/node/index.js +311 -311
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/package.json +1 -1
- package/pkg/web/index.d.ts +145 -145
- package/pkg/web/index.js +313 -313
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-466f9f7a003f28db → saito-wasm-cb5d42cd87cbad30}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-466f9f7a003f28db → saito-wasm-cb5d42cd87cbad30}/js/msg_handler.js +0 -0
package/pkg/node/index.js
CHANGED
|
@@ -1,9 +1,38 @@
|
|
|
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-cb5d42cd87cbad30/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
+
const heap = new Array(128).fill(undefined);
|
|
8
|
+
|
|
9
|
+
heap.push(undefined, null, true, false);
|
|
10
|
+
|
|
11
|
+
function getObject(idx) { return heap[idx]; }
|
|
12
|
+
|
|
13
|
+
let heap_next = heap.length;
|
|
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
|
+
function dropObject(idx) {
|
|
25
|
+
if (idx < 132) return;
|
|
26
|
+
heap[idx] = heap_next;
|
|
27
|
+
heap_next = idx;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function takeObject(idx) {
|
|
31
|
+
const ret = getObject(idx);
|
|
32
|
+
dropObject(idx);
|
|
33
|
+
return ret;
|
|
34
|
+
}
|
|
35
|
+
|
|
7
36
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
8
37
|
|
|
9
38
|
cachedTextDecoder.decode();
|
|
@@ -22,23 +51,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
22
51
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
23
52
|
}
|
|
24
53
|
|
|
25
|
-
const heap = new Array(128).fill(undefined);
|
|
26
|
-
|
|
27
|
-
heap.push(undefined, null, true, false);
|
|
28
|
-
|
|
29
|
-
let heap_next = heap.length;
|
|
30
|
-
|
|
31
|
-
function addHeapObject(obj) {
|
|
32
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
33
|
-
const idx = heap_next;
|
|
34
|
-
heap_next = heap[idx];
|
|
35
|
-
|
|
36
|
-
heap[idx] = obj;
|
|
37
|
-
return idx;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function getObject(idx) { return heap[idx]; }
|
|
41
|
-
|
|
42
54
|
let WASM_VECTOR_LEN = 0;
|
|
43
55
|
|
|
44
56
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -108,18 +120,6 @@ function getInt32Memory0() {
|
|
|
108
120
|
return cachedInt32Memory0;
|
|
109
121
|
}
|
|
110
122
|
|
|
111
|
-
function dropObject(idx) {
|
|
112
|
-
if (idx < 132) return;
|
|
113
|
-
heap[idx] = heap_next;
|
|
114
|
-
heap_next = idx;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function takeObject(idx) {
|
|
118
|
-
const ret = getObject(idx);
|
|
119
|
-
dropObject(idx);
|
|
120
|
-
return ret;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
123
|
let cachedFloat64Memory0 = null;
|
|
124
124
|
|
|
125
125
|
function getFloat64Memory0() {
|
|
@@ -235,13 +235,10 @@ function _assertClass(instance, klass) {
|
|
|
235
235
|
return instance.ptr;
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
|
-
* @
|
|
239
|
-
* @param {number} msg_index
|
|
240
|
-
* @param {bigint} peer_index
|
|
241
|
-
* @returns {Promise<void>}
|
|
238
|
+
* @returns {Promise<Array<any>>}
|
|
242
239
|
*/
|
|
243
|
-
module.exports.
|
|
244
|
-
const ret = wasm.
|
|
240
|
+
module.exports.get_mempool_txs = function() {
|
|
241
|
+
const ret = wasm.get_mempool_txs();
|
|
245
242
|
return takeObject(ret);
|
|
246
243
|
};
|
|
247
244
|
|
|
@@ -255,76 +252,57 @@ module.exports.remove_stun_peer = function(peer_index) {
|
|
|
255
252
|
};
|
|
256
253
|
|
|
257
254
|
/**
|
|
258
|
-
* @
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* @param {string} key
|
|
267
|
-
* @returns {boolean}
|
|
268
|
-
*/
|
|
269
|
-
module.exports.is_valid_public_key = function(key) {
|
|
270
|
-
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
271
|
-
return ret !== 0;
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* @returns {Promise<boolean>}
|
|
276
|
-
*/
|
|
277
|
-
module.exports.produce_block_without_gt = function() {
|
|
278
|
-
const ret = wasm.produce_block_without_gt();
|
|
279
|
-
return takeObject(ret);
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @param {number} major
|
|
284
|
-
* @param {number} minor
|
|
285
|
-
* @param {number} patch
|
|
286
|
-
* @returns {Promise<void>}
|
|
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>}
|
|
287
262
|
*/
|
|
288
|
-
module.exports.
|
|
289
|
-
const ret = wasm.
|
|
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));
|
|
290
265
|
return takeObject(ret);
|
|
291
266
|
};
|
|
292
267
|
|
|
293
268
|
/**
|
|
294
|
-
* @param {bigint}
|
|
269
|
+
* @param {bigint} peer_index
|
|
270
|
+
* @param {string} ip
|
|
295
271
|
* @returns {Promise<void>}
|
|
296
272
|
*/
|
|
297
|
-
module.exports.
|
|
298
|
-
const ret = wasm.
|
|
273
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
274
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
299
275
|
return takeObject(ret);
|
|
300
276
|
};
|
|
301
277
|
|
|
302
278
|
/**
|
|
303
|
-
* @returns {Promise<
|
|
279
|
+
* @returns {Promise<string>}
|
|
304
280
|
*/
|
|
305
|
-
module.exports.
|
|
306
|
-
const ret = wasm.
|
|
281
|
+
module.exports.get_stats = function() {
|
|
282
|
+
const ret = wasm.get_stats();
|
|
307
283
|
return takeObject(ret);
|
|
308
284
|
};
|
|
309
285
|
|
|
310
286
|
/**
|
|
311
|
-
* @param {
|
|
312
|
-
* @
|
|
287
|
+
* @param {Array<any>} public_keys
|
|
288
|
+
* @param {BigUint64Array} amounts
|
|
289
|
+
* @param {bigint} fee
|
|
290
|
+
* @param {boolean} _force_merge
|
|
291
|
+
* @returns {Promise<WasmTransaction>}
|
|
313
292
|
*/
|
|
314
|
-
module.exports.
|
|
315
|
-
const ret = wasm.
|
|
293
|
+
module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
|
|
294
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
316
295
|
return takeObject(ret);
|
|
317
296
|
};
|
|
318
297
|
|
|
319
298
|
/**
|
|
320
|
-
* @param {Uint8Array} buffer
|
|
321
299
|
* @param {string} private_key
|
|
322
300
|
* @returns {string}
|
|
323
301
|
*/
|
|
324
|
-
module.exports.
|
|
302
|
+
module.exports.generate_public_key = function(private_key) {
|
|
325
303
|
try {
|
|
326
304
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
327
|
-
wasm.
|
|
305
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
328
306
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
329
307
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
330
308
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -338,53 +316,50 @@ module.exports.sign_buffer = function(buffer, private_key) {
|
|
|
338
316
|
};
|
|
339
317
|
|
|
340
318
|
/**
|
|
341
|
-
* @param {
|
|
319
|
+
* @param {bigint} num
|
|
320
|
+
* @param {bigint} deposit
|
|
342
321
|
* @param {Uint8Array} tx_msg
|
|
322
|
+
* @param {bigint} fee
|
|
323
|
+
* @param {string} recipient_public_key
|
|
324
|
+
* @param {string} nft_type
|
|
343
325
|
* @returns {Promise<WasmTransaction>}
|
|
344
326
|
*/
|
|
345
|
-
module.exports.
|
|
346
|
-
const
|
|
347
|
-
const len0 = WASM_VECTOR_LEN;
|
|
348
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
327
|
+
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
328
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
349
329
|
return takeObject(ret);
|
|
350
330
|
};
|
|
351
331
|
|
|
352
332
|
/**
|
|
353
|
-
* @
|
|
354
|
-
* @param {number} msg_index
|
|
355
|
-
* @param {bigint} peer_index
|
|
356
|
-
* @returns {Promise<void>}
|
|
333
|
+
* @returns {Promise<boolean>}
|
|
357
334
|
*/
|
|
358
|
-
module.exports.
|
|
359
|
-
const ret = wasm.
|
|
335
|
+
module.exports.produce_block_with_gt = function() {
|
|
336
|
+
const ret = wasm.produce_block_with_gt();
|
|
360
337
|
return takeObject(ret);
|
|
361
338
|
};
|
|
362
339
|
|
|
363
340
|
/**
|
|
364
|
-
* @
|
|
365
|
-
* @param {string} slip2_utxo_key
|
|
366
|
-
* @param {string} slip3_utxo_key
|
|
367
|
-
* @param {Uint8Array} tx_msg
|
|
368
|
-
* @returns {Promise<WasmTransaction>}
|
|
341
|
+
* @returns {Promise<void>}
|
|
369
342
|
*/
|
|
370
|
-
module.exports.
|
|
371
|
-
const ret = wasm.
|
|
343
|
+
module.exports.disable_producing_blocks_by_timer = function() {
|
|
344
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
372
345
|
return takeObject(ret);
|
|
373
346
|
};
|
|
374
347
|
|
|
375
348
|
/**
|
|
376
|
-
* @
|
|
349
|
+
* @param {WasmTransaction} tx
|
|
350
|
+
* @returns {Promise<void>}
|
|
377
351
|
*/
|
|
378
|
-
module.exports.
|
|
379
|
-
|
|
352
|
+
module.exports.propagate_transaction = function(tx) {
|
|
353
|
+
_assertClass(tx, WasmTransaction);
|
|
354
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
380
355
|
return takeObject(ret);
|
|
381
356
|
};
|
|
382
357
|
|
|
383
358
|
/**
|
|
384
|
-
* @returns {
|
|
359
|
+
* @returns {string}
|
|
385
360
|
*/
|
|
386
|
-
module.exports.
|
|
387
|
-
const ret = wasm.
|
|
361
|
+
module.exports.generate_private_key = function() {
|
|
362
|
+
const ret = wasm.generate_private_key();
|
|
388
363
|
return takeObject(ret);
|
|
389
364
|
};
|
|
390
365
|
|
|
@@ -401,138 +376,174 @@ module.exports.process_fetched_block = function(buffer, hash, block_id, peer_ind
|
|
|
401
376
|
};
|
|
402
377
|
|
|
403
378
|
/**
|
|
404
|
-
* @param {
|
|
379
|
+
* @param {bigint} peer_index
|
|
380
|
+
* @param {string} public_key
|
|
405
381
|
* @returns {Promise<void>}
|
|
406
382
|
*/
|
|
407
|
-
module.exports.
|
|
408
|
-
|
|
409
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
410
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
383
|
+
module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
384
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
411
385
|
return takeObject(ret);
|
|
412
386
|
};
|
|
413
387
|
|
|
414
388
|
/**
|
|
415
|
-
* @param {
|
|
416
|
-
* @param {string}
|
|
417
|
-
* @
|
|
389
|
+
* @param {string} slip1_utxo_key
|
|
390
|
+
* @param {string} slip2_utxo_key
|
|
391
|
+
* @param {string} slip3_utxo_key
|
|
392
|
+
* @param {Uint8Array} tx_msg
|
|
393
|
+
* @returns {Promise<WasmTransaction>}
|
|
418
394
|
*/
|
|
419
|
-
module.exports.
|
|
420
|
-
const ret = wasm.
|
|
395
|
+
module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, tx_msg) {
|
|
396
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(tx_msg));
|
|
421
397
|
return takeObject(ret);
|
|
422
398
|
};
|
|
423
399
|
|
|
424
400
|
/**
|
|
425
|
-
* @param {
|
|
426
|
-
* @returns {Promise<
|
|
401
|
+
* @param {Array<any>} keys
|
|
402
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
427
403
|
*/
|
|
428
|
-
module.exports.
|
|
429
|
-
const ret = wasm.
|
|
404
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
405
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
430
406
|
return takeObject(ret);
|
|
431
407
|
};
|
|
432
408
|
|
|
433
409
|
/**
|
|
434
|
-
* @param {
|
|
435
|
-
* @
|
|
410
|
+
* @param {Uint8Array} buffer
|
|
411
|
+
* @param {string} private_key
|
|
412
|
+
* @returns {string}
|
|
436
413
|
*/
|
|
437
|
-
module.exports.
|
|
438
|
-
|
|
414
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
415
|
+
try {
|
|
416
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
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
|
+
}
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* @returns {Promise<boolean>}
|
|
432
|
+
*/
|
|
433
|
+
module.exports.produce_block_without_gt = function() {
|
|
434
|
+
const ret = wasm.produce_block_without_gt();
|
|
439
435
|
return takeObject(ret);
|
|
440
436
|
};
|
|
441
437
|
|
|
442
438
|
/**
|
|
439
|
+
* @param {bigint} threshold
|
|
443
440
|
* @returns {Promise<void>}
|
|
444
441
|
*/
|
|
445
|
-
module.exports.
|
|
446
|
-
const ret = wasm.
|
|
442
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
443
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
447
444
|
return takeObject(ret);
|
|
448
445
|
};
|
|
449
446
|
|
|
450
447
|
/**
|
|
451
|
-
* @param {
|
|
452
|
-
* @param {
|
|
453
|
-
* @
|
|
448
|
+
* @param {string} config_json
|
|
449
|
+
* @param {string} private_key
|
|
450
|
+
* @param {number} log_level_num
|
|
451
|
+
* @param {bigint} hasten_multiplier
|
|
452
|
+
* @param {boolean} delete_old_blocks
|
|
453
|
+
* @returns {Promise<any>}
|
|
454
454
|
*/
|
|
455
|
-
module.exports.
|
|
456
|
-
const ret = wasm.
|
|
455
|
+
module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
456
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
457
457
|
return takeObject(ret);
|
|
458
458
|
};
|
|
459
459
|
|
|
460
460
|
/**
|
|
461
|
-
* @
|
|
462
|
-
* @param {string} slip1_utxo_key
|
|
463
|
-
* @param {string} slip2_utxo_key
|
|
464
|
-
* @param {string} slip3_utxo_key
|
|
465
|
-
* @param {string} recipient_public_key
|
|
466
|
-
* @param {Uint8Array} tx_msg
|
|
467
|
-
* @returns {Promise<WasmTransaction>}
|
|
461
|
+
* @returns {Promise<Array<any>>}
|
|
468
462
|
*/
|
|
469
|
-
module.exports.
|
|
470
|
-
const ret = wasm.
|
|
463
|
+
module.exports.get_nft_list = function() {
|
|
464
|
+
const ret = wasm.get_nft_list();
|
|
471
465
|
return takeObject(ret);
|
|
472
466
|
};
|
|
473
467
|
|
|
474
468
|
/**
|
|
475
|
-
* @
|
|
476
|
-
* @returns {Promise<WasmBlock>}
|
|
469
|
+
* @returns {Promise<Array<any>>}
|
|
477
470
|
*/
|
|
478
|
-
module.exports.
|
|
479
|
-
const ret = wasm.
|
|
471
|
+
module.exports.get_peers = function() {
|
|
472
|
+
const ret = wasm.get_peers();
|
|
480
473
|
return takeObject(ret);
|
|
481
474
|
};
|
|
482
475
|
|
|
483
476
|
/**
|
|
484
|
-
* @
|
|
477
|
+
* @param {Uint8Array} hash
|
|
478
|
+
* @param {bigint} block_id
|
|
479
|
+
* @param {bigint} peer_index
|
|
480
|
+
* @returns {Promise<void>}
|
|
485
481
|
*/
|
|
486
|
-
module.exports.
|
|
487
|
-
const ret = wasm.
|
|
482
|
+
module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
|
|
483
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
488
484
|
return takeObject(ret);
|
|
489
485
|
};
|
|
490
486
|
|
|
491
487
|
/**
|
|
488
|
+
* @param {Uint8Array} buffer
|
|
489
|
+
* @param {number} msg_index
|
|
492
490
|
* @param {bigint} peer_index
|
|
493
|
-
* @returns {Promise<
|
|
491
|
+
* @returns {Promise<void>}
|
|
494
492
|
*/
|
|
495
|
-
module.exports.
|
|
496
|
-
const ret = wasm.
|
|
493
|
+
module.exports.send_api_error = function(buffer, msg_index, peer_index) {
|
|
494
|
+
const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
|
|
497
495
|
return takeObject(ret);
|
|
498
496
|
};
|
|
499
497
|
|
|
500
498
|
/**
|
|
501
|
-
* @
|
|
499
|
+
* @param {Uint8Array} buffer
|
|
500
|
+
* @param {bigint} peer_index
|
|
501
|
+
* @returns {Promise<void>}
|
|
502
502
|
*/
|
|
503
|
-
module.exports.
|
|
504
|
-
const ret = wasm.
|
|
503
|
+
module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
|
|
504
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
505
505
|
return takeObject(ret);
|
|
506
506
|
};
|
|
507
507
|
|
|
508
508
|
/**
|
|
509
|
-
* @returns {Promise<
|
|
509
|
+
* @returns {Promise<string>}
|
|
510
510
|
*/
|
|
511
|
-
module.exports.
|
|
512
|
-
const ret = wasm.
|
|
511
|
+
module.exports.get_peer_stats = function() {
|
|
512
|
+
const ret = wasm.get_peer_stats();
|
|
513
513
|
return takeObject(ret);
|
|
514
514
|
};
|
|
515
515
|
|
|
516
516
|
/**
|
|
517
|
+
* @param {bigint} amt
|
|
517
518
|
* @param {string} slip1_utxo_key
|
|
518
519
|
* @param {string} slip2_utxo_key
|
|
519
520
|
* @param {string} slip3_utxo_key
|
|
520
|
-
* @param {
|
|
521
|
-
* @param {number} right_count
|
|
521
|
+
* @param {string} recipient_public_key
|
|
522
522
|
* @param {Uint8Array} tx_msg
|
|
523
523
|
* @returns {Promise<WasmTransaction>}
|
|
524
524
|
*/
|
|
525
|
-
module.exports.
|
|
526
|
-
const ret = wasm.
|
|
525
|
+
module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
526
|
+
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));
|
|
527
|
+
return takeObject(ret);
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* @param {Uint8Array} buffer
|
|
532
|
+
* @returns {string}
|
|
533
|
+
*/
|
|
534
|
+
module.exports.hash = function(buffer) {
|
|
535
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
527
536
|
return takeObject(ret);
|
|
528
537
|
};
|
|
529
538
|
|
|
530
539
|
/**
|
|
531
|
-
* @param {
|
|
540
|
+
* @param {Uint8Array} buffer
|
|
541
|
+
* @param {number} msg_index
|
|
542
|
+
* @param {bigint} peer_index
|
|
532
543
|
* @returns {Promise<void>}
|
|
533
544
|
*/
|
|
534
|
-
module.exports.
|
|
535
|
-
const ret = wasm.
|
|
545
|
+
module.exports.send_api_call = function(buffer, msg_index, peer_index) {
|
|
546
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
536
547
|
return takeObject(ret);
|
|
537
548
|
};
|
|
538
549
|
|
|
@@ -548,189 +559,178 @@ module.exports.verify_signature = function(buffer, signature, public_key) {
|
|
|
548
559
|
};
|
|
549
560
|
|
|
550
561
|
/**
|
|
551
|
-
* @
|
|
562
|
+
* @param {bigint} peer_index
|
|
563
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
552
564
|
*/
|
|
553
|
-
module.exports.
|
|
554
|
-
const ret = wasm.
|
|
565
|
+
module.exports.get_peer = function(peer_index) {
|
|
566
|
+
const ret = wasm.get_peer(peer_index);
|
|
555
567
|
return takeObject(ret);
|
|
556
568
|
};
|
|
557
569
|
|
|
558
570
|
/**
|
|
559
571
|
* @returns {Promise<string>}
|
|
560
572
|
*/
|
|
561
|
-
module.exports.
|
|
562
|
-
const ret = wasm.
|
|
573
|
+
module.exports.get_congestion_stats = function() {
|
|
574
|
+
const ret = wasm.get_congestion_stats();
|
|
563
575
|
return takeObject(ret);
|
|
564
576
|
};
|
|
565
577
|
|
|
566
578
|
/**
|
|
579
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
567
580
|
* @returns {Promise<void>}
|
|
568
581
|
*/
|
|
569
|
-
module.exports.
|
|
570
|
-
|
|
582
|
+
module.exports.update_from_balance_snapshot = function(snapshot) {
|
|
583
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
584
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
585
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
571
586
|
return takeObject(ret);
|
|
572
587
|
};
|
|
573
588
|
|
|
574
589
|
/**
|
|
575
|
-
* @
|
|
576
|
-
* @returns {string}
|
|
590
|
+
* @returns {Promise<WasmWallet>}
|
|
577
591
|
*/
|
|
578
|
-
module.exports.
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
582
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
583
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
584
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
585
|
-
if (r2) {
|
|
586
|
-
throw takeObject(r1);
|
|
587
|
-
}
|
|
588
|
-
return takeObject(r0);
|
|
589
|
-
} finally {
|
|
590
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
591
|
-
}
|
|
592
|
+
module.exports.get_wallet = function() {
|
|
593
|
+
const ret = wasm.get_wallet();
|
|
594
|
+
return takeObject(ret);
|
|
592
595
|
};
|
|
593
596
|
|
|
594
597
|
/**
|
|
595
|
-
* @returns {Promise<
|
|
598
|
+
* @returns {Promise<WasmBlockchain>}
|
|
596
599
|
*/
|
|
597
|
-
module.exports.
|
|
598
|
-
const ret = wasm.
|
|
600
|
+
module.exports.get_blockchain = function() {
|
|
601
|
+
const ret = wasm.get_blockchain();
|
|
599
602
|
return takeObject(ret);
|
|
600
603
|
};
|
|
601
604
|
|
|
602
605
|
/**
|
|
603
|
-
* @
|
|
606
|
+
* @param {string} public_key
|
|
607
|
+
* @param {bigint} amount
|
|
608
|
+
* @param {bigint} fee
|
|
609
|
+
* @param {boolean} force_merge
|
|
610
|
+
* @returns {Promise<WasmTransaction>}
|
|
604
611
|
*/
|
|
605
|
-
module.exports.
|
|
606
|
-
const ret = wasm.
|
|
612
|
+
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
613
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
607
614
|
return takeObject(ret);
|
|
608
615
|
};
|
|
609
616
|
|
|
610
617
|
/**
|
|
611
|
-
* @returns {
|
|
618
|
+
* @returns {Promise<void>}
|
|
612
619
|
*/
|
|
613
|
-
module.exports.
|
|
614
|
-
const ret = wasm.
|
|
620
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
621
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
615
622
|
return takeObject(ret);
|
|
616
623
|
};
|
|
617
624
|
|
|
618
625
|
/**
|
|
619
|
-
* @
|
|
626
|
+
* @param {bigint} duration_in_ms
|
|
627
|
+
* @returns {Promise<void>}
|
|
620
628
|
*/
|
|
621
|
-
module.exports.
|
|
622
|
-
const ret = wasm.
|
|
629
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
630
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
623
631
|
return takeObject(ret);
|
|
624
632
|
};
|
|
625
633
|
|
|
626
634
|
/**
|
|
627
|
-
* @param {
|
|
628
|
-
* @
|
|
629
|
-
* @param {number} log_level_num
|
|
630
|
-
* @param {bigint} hasten_multiplier
|
|
631
|
-
* @param {boolean} delete_old_blocks
|
|
632
|
-
* @returns {Promise<any>}
|
|
635
|
+
* @param {bigint} peer_index
|
|
636
|
+
* @returns {Promise<void>}
|
|
633
637
|
*/
|
|
634
|
-
module.exports.
|
|
635
|
-
const ret = wasm.
|
|
638
|
+
module.exports.process_peer_disconnection = function(peer_index) {
|
|
639
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
636
640
|
return takeObject(ret);
|
|
637
641
|
};
|
|
638
642
|
|
|
639
643
|
/**
|
|
640
|
-
* @
|
|
641
|
-
* @param {bigint} deposit
|
|
642
|
-
* @param {Uint8Array} tx_msg
|
|
643
|
-
* @param {bigint} fee
|
|
644
|
-
* @param {string} recipient_public_key
|
|
645
|
-
* @param {string} nft_type
|
|
646
|
-
* @returns {Promise<WasmTransaction>}
|
|
644
|
+
* @returns {Promise<bigint>}
|
|
647
645
|
*/
|
|
648
|
-
module.exports.
|
|
649
|
-
const ret = wasm.
|
|
646
|
+
module.exports.get_next_peer_index = function() {
|
|
647
|
+
const ret = wasm.get_next_peer_index();
|
|
650
648
|
return takeObject(ret);
|
|
651
649
|
};
|
|
652
650
|
|
|
653
651
|
/**
|
|
654
|
-
* @param {
|
|
655
|
-
* @
|
|
652
|
+
* @param {number} major
|
|
653
|
+
* @param {number} minor
|
|
654
|
+
* @param {number} patch
|
|
655
|
+
* @returns {Promise<void>}
|
|
656
656
|
*/
|
|
657
|
-
module.exports.
|
|
658
|
-
const ret = wasm.
|
|
657
|
+
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
658
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
659
659
|
return takeObject(ret);
|
|
660
660
|
};
|
|
661
661
|
|
|
662
662
|
/**
|
|
663
|
-
* @param {
|
|
664
|
-
* @returns {Promise<
|
|
663
|
+
* @param {string} block_hash
|
|
664
|
+
* @returns {Promise<WasmBlock>}
|
|
665
665
|
*/
|
|
666
|
-
module.exports.
|
|
667
|
-
const ret = wasm.
|
|
666
|
+
module.exports.get_block = function(block_hash) {
|
|
667
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
668
668
|
return takeObject(ret);
|
|
669
669
|
};
|
|
670
670
|
|
|
671
671
|
/**
|
|
672
|
-
* @param {
|
|
673
|
-
* @param {
|
|
674
|
-
* @returns {Promise<
|
|
672
|
+
* @param {string} nft_id_hex
|
|
673
|
+
* @param {Uint8Array} tx_msg
|
|
674
|
+
* @returns {Promise<WasmTransaction>}
|
|
675
675
|
*/
|
|
676
|
-
module.exports.
|
|
677
|
-
const
|
|
676
|
+
module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
|
|
677
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
678
|
+
const len0 = WASM_VECTOR_LEN;
|
|
679
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
678
680
|
return takeObject(ret);
|
|
679
681
|
};
|
|
680
682
|
|
|
681
683
|
/**
|
|
682
|
-
* @param {
|
|
683
|
-
* @
|
|
684
|
-
* @param {bigint} peer_index
|
|
685
|
-
* @returns {Promise<void>}
|
|
684
|
+
* @param {string} key
|
|
685
|
+
* @returns {boolean}
|
|
686
686
|
*/
|
|
687
|
-
module.exports.
|
|
688
|
-
const ret = wasm.
|
|
687
|
+
module.exports.is_valid_public_key = function(key) {
|
|
688
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
689
|
+
return ret !== 0;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* @returns {Promise<string>}
|
|
694
|
+
*/
|
|
695
|
+
module.exports.get_latest_block_hash = function() {
|
|
696
|
+
const ret = wasm.get_latest_block_hash();
|
|
689
697
|
return takeObject(ret);
|
|
690
698
|
};
|
|
691
699
|
|
|
692
700
|
/**
|
|
693
|
-
* @
|
|
694
|
-
* @param {BigUint64Array} amounts
|
|
695
|
-
* @param {bigint} fee
|
|
696
|
-
* @param {boolean} _force_merge
|
|
697
|
-
* @returns {Promise<WasmTransaction>}
|
|
701
|
+
* @returns {Promise<any>}
|
|
698
702
|
*/
|
|
699
|
-
module.exports.
|
|
700
|
-
const ret = wasm.
|
|
703
|
+
module.exports.get_confirmations = function() {
|
|
704
|
+
const ret = wasm.get_confirmations();
|
|
701
705
|
return takeObject(ret);
|
|
702
706
|
};
|
|
703
707
|
|
|
704
708
|
/**
|
|
705
|
-
* @param {
|
|
706
|
-
* @param {number} msg_index
|
|
707
|
-
* @param {bigint} peer_index
|
|
709
|
+
* @param {bigint} current_time
|
|
708
710
|
* @returns {Promise<void>}
|
|
709
711
|
*/
|
|
710
|
-
module.exports.
|
|
711
|
-
const ret = wasm.
|
|
712
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
713
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
712
714
|
return takeObject(ret);
|
|
713
715
|
};
|
|
714
716
|
|
|
715
717
|
/**
|
|
716
718
|
* @param {string} public_key
|
|
717
|
-
* @
|
|
718
|
-
* @param {bigint} fee
|
|
719
|
-
* @param {boolean} force_merge
|
|
720
|
-
* @returns {Promise<WasmTransaction>}
|
|
719
|
+
* @returns {Promise<Array<any>>}
|
|
721
720
|
*/
|
|
722
|
-
module.exports.
|
|
723
|
-
const ret = wasm.
|
|
721
|
+
module.exports.get_account_slips = function(public_key) {
|
|
722
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
724
723
|
return takeObject(ret);
|
|
725
724
|
};
|
|
726
725
|
|
|
727
726
|
/**
|
|
728
|
-
* @param {
|
|
727
|
+
* @param {Uint8Array} buffer
|
|
728
|
+
* @param {number} msg_index
|
|
729
|
+
* @param {bigint} peer_index
|
|
729
730
|
* @returns {Promise<void>}
|
|
730
731
|
*/
|
|
731
|
-
module.exports.
|
|
732
|
-
|
|
733
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
732
|
+
module.exports.send_api_success = function(buffer, msg_index, peer_index) {
|
|
733
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
734
734
|
return takeObject(ret);
|
|
735
735
|
};
|
|
736
736
|
|
|
@@ -2681,71 +2681,66 @@ class WasmWalletSlip {
|
|
|
2681
2681
|
}
|
|
2682
2682
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2683
2683
|
|
|
2684
|
-
module.exports.
|
|
2685
|
-
const ret =
|
|
2684
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2685
|
+
const ret = getObject(arg0);
|
|
2686
2686
|
return addHeapObject(ret);
|
|
2687
2687
|
};
|
|
2688
2688
|
|
|
2689
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2690
|
-
const obj = getObject(arg1);
|
|
2691
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2692
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2693
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2694
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2695
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2696
|
-
};
|
|
2697
|
-
|
|
2698
2689
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2699
2690
|
takeObject(arg0);
|
|
2700
2691
|
};
|
|
2701
2692
|
|
|
2702
|
-
module.exports.
|
|
2703
|
-
const ret =
|
|
2693
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2694
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2704
2695
|
return addHeapObject(ret);
|
|
2705
2696
|
};
|
|
2706
2697
|
|
|
2707
|
-
module.exports.
|
|
2708
|
-
const ret =
|
|
2698
|
+
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2699
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2709
2700
|
return addHeapObject(ret);
|
|
2710
2701
|
};
|
|
2711
2702
|
|
|
2712
|
-
module.exports.
|
|
2713
|
-
const ret =
|
|
2703
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2704
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2714
2705
|
return addHeapObject(ret);
|
|
2715
2706
|
};
|
|
2716
2707
|
|
|
2717
|
-
module.exports.
|
|
2718
|
-
const ret =
|
|
2708
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2709
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2719
2710
|
return addHeapObject(ret);
|
|
2720
2711
|
};
|
|
2721
2712
|
|
|
2722
|
-
module.exports.
|
|
2723
|
-
const ret =
|
|
2713
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2714
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2724
2715
|
return addHeapObject(ret);
|
|
2725
2716
|
};
|
|
2726
2717
|
|
|
2727
|
-
module.exports.
|
|
2728
|
-
const ret =
|
|
2718
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2719
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2729
2720
|
return addHeapObject(ret);
|
|
2730
2721
|
};
|
|
2731
2722
|
|
|
2732
|
-
module.exports.
|
|
2733
|
-
const ret =
|
|
2723
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2724
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2734
2725
|
return addHeapObject(ret);
|
|
2735
2726
|
};
|
|
2736
2727
|
|
|
2737
|
-
module.exports.
|
|
2738
|
-
const
|
|
2739
|
-
|
|
2728
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2729
|
+
const obj = getObject(arg1);
|
|
2730
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2731
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2732
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2733
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2734
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2740
2735
|
};
|
|
2741
2736
|
|
|
2742
|
-
module.exports.
|
|
2743
|
-
const ret =
|
|
2737
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2738
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2744
2739
|
return addHeapObject(ret);
|
|
2745
2740
|
};
|
|
2746
2741
|
|
|
2747
|
-
module.exports.
|
|
2748
|
-
const ret =
|
|
2742
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2743
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2749
2744
|
return addHeapObject(ret);
|
|
2750
2745
|
};
|
|
2751
2746
|
|
|
@@ -2754,6 +2749,11 @@ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
|
2754
2749
|
return addHeapObject(ret);
|
|
2755
2750
|
};
|
|
2756
2751
|
|
|
2752
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2753
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2754
|
+
return addHeapObject(ret);
|
|
2755
|
+
};
|
|
2756
|
+
|
|
2757
2757
|
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2758
2758
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2759
2759
|
return addHeapObject(ret);
|
|
@@ -2785,7 +2785,7 @@ module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
|
2785
2785
|
return addHeapObject(ret);
|
|
2786
2786
|
};
|
|
2787
2787
|
|
|
2788
|
-
module.exports.
|
|
2788
|
+
module.exports.__wbg_flushdata_57a24af0b42b2a24 = function(arg0, arg1) {
|
|
2789
2789
|
let deferred0_0;
|
|
2790
2790
|
let deferred0_1;
|
|
2791
2791
|
try {
|
|
@@ -2797,7 +2797,7 @@ module.exports.__wbg_flushdata_fe8f2b14acc9b24d = function(arg0, arg1) {
|
|
|
2797
2797
|
}
|
|
2798
2798
|
};
|
|
2799
2799
|
|
|
2800
|
-
module.exports.
|
|
2800
|
+
module.exports.__wbg_readvalue_eda09e3e85f91c6e = function() { return handleError(function (arg0, arg1) {
|
|
2801
2801
|
let deferred0_0;
|
|
2802
2802
|
let deferred0_1;
|
|
2803
2803
|
try {
|
|
@@ -2810,15 +2810,15 @@ module.exports.__wbg_readvalue_d64cea469f05b942 = function() { return handleErro
|
|
|
2810
2810
|
}
|
|
2811
2811
|
}, arguments) };
|
|
2812
2812
|
|
|
2813
|
-
module.exports.
|
|
2813
|
+
module.exports.__wbg_loadwallet_b5182506283605ab = function() {
|
|
2814
2814
|
MsgHandler.load_wallet();
|
|
2815
2815
|
};
|
|
2816
2816
|
|
|
2817
|
-
module.exports.
|
|
2817
|
+
module.exports.__wbg_savewallet_1c5ab82d380b4271 = function() {
|
|
2818
2818
|
MsgHandler.save_wallet();
|
|
2819
2819
|
};
|
|
2820
2820
|
|
|
2821
|
-
module.exports.
|
|
2821
|
+
module.exports.__wbg_writevalue_d45c2dd3c8c56d4f = function(arg0, arg1, arg2) {
|
|
2822
2822
|
let deferred0_0;
|
|
2823
2823
|
let deferred0_1;
|
|
2824
2824
|
try {
|
|
@@ -2830,7 +2830,7 @@ module.exports.__wbg_writevalue_32ec94b797810683 = function(arg0, arg1, arg2) {
|
|
|
2830
2830
|
}
|
|
2831
2831
|
};
|
|
2832
2832
|
|
|
2833
|
-
module.exports.
|
|
2833
|
+
module.exports.__wbg_appendvalue_80a14b3de2c6810c = function(arg0, arg1, arg2) {
|
|
2834
2834
|
let deferred0_0;
|
|
2835
2835
|
let deferred0_1;
|
|
2836
2836
|
try {
|
|
@@ -2842,7 +2842,7 @@ module.exports.__wbg_appendvalue_f7131aa8b22d0eaf = function(arg0, arg1, arg2) {
|
|
|
2842
2842
|
}
|
|
2843
2843
|
};
|
|
2844
2844
|
|
|
2845
|
-
module.exports.
|
|
2845
|
+
module.exports.__wbg_removevalue_0bcbb4eb73cb550c = function() { return handleError(function (arg0, arg1) {
|
|
2846
2846
|
let deferred0_0;
|
|
2847
2847
|
let deferred0_1;
|
|
2848
2848
|
try {
|
|
@@ -2855,11 +2855,11 @@ module.exports.__wbg_removevalue_9b8aebaa72738b75 = function() { return handleEr
|
|
|
2855
2855
|
}
|
|
2856
2856
|
}, arguments) };
|
|
2857
2857
|
|
|
2858
|
-
module.exports.
|
|
2858
|
+
module.exports.__wbg_sendmessage_ace5b81144243ec4 = function(arg0, arg1) {
|
|
2859
2859
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2860
2860
|
};
|
|
2861
2861
|
|
|
2862
|
-
module.exports.
|
|
2862
|
+
module.exports.__wbg_connecttopeer_718f23f2a1dad46e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2863
2863
|
let deferred0_0;
|
|
2864
2864
|
let deferred0_1;
|
|
2865
2865
|
try {
|
|
@@ -2872,14 +2872,14 @@ module.exports.__wbg_connecttopeer_eaf6ce31754ad986 = function() { return handle
|
|
|
2872
2872
|
}
|
|
2873
2873
|
}, arguments) };
|
|
2874
2874
|
|
|
2875
|
-
module.exports.
|
|
2875
|
+
module.exports.__wbg_getmyservices_7c7c0312b835ecdf = function() {
|
|
2876
2876
|
const ret = MsgHandler.get_my_services();
|
|
2877
2877
|
_assertClass(ret, WasmPeerServiceList);
|
|
2878
2878
|
var ptr1 = ret.__destroy_into_raw();
|
|
2879
2879
|
return ptr1;
|
|
2880
2880
|
};
|
|
2881
2881
|
|
|
2882
|
-
module.exports.
|
|
2882
|
+
module.exports.__wbg_isexistingfile_10384e694274432a = function() { return handleError(function (arg0, arg1) {
|
|
2883
2883
|
let deferred0_0;
|
|
2884
2884
|
let deferred0_1;
|
|
2885
2885
|
try {
|
|
@@ -2892,33 +2892,33 @@ module.exports.__wbg_isexistingfile_e40370e8a861f62f = function() { return handl
|
|
|
2892
2892
|
}
|
|
2893
2893
|
}, arguments) };
|
|
2894
2894
|
|
|
2895
|
-
module.exports.
|
|
2895
|
+
module.exports.__wbg_processapicall_429c448ba53022f8 = function(arg0, arg1, arg2) {
|
|
2896
2896
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2897
2897
|
};
|
|
2898
2898
|
|
|
2899
|
-
module.exports.
|
|
2899
|
+
module.exports.__wbg_processapierror_481f5de5114e5c58 = function(arg0, arg1, arg2) {
|
|
2900
2900
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2901
2901
|
};
|
|
2902
2902
|
|
|
2903
|
-
module.exports.
|
|
2903
|
+
module.exports.__wbg_processapisuccess_e7f80683c7350d70 = function(arg0, arg1, arg2) {
|
|
2904
2904
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2905
2905
|
};
|
|
2906
2906
|
|
|
2907
|
-
module.exports.
|
|
2907
|
+
module.exports.__wbg_sendmessagetoall_929a50f93e17f953 = function(arg0, arg1) {
|
|
2908
2908
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2909
2909
|
};
|
|
2910
2910
|
|
|
2911
|
-
module.exports.
|
|
2911
|
+
module.exports.__wbg_disconnectfrompeer_4f6e3738fa40715a = function() { return handleError(function (arg0) {
|
|
2912
2912
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2913
2913
|
return addHeapObject(ret);
|
|
2914
2914
|
}, arguments) };
|
|
2915
2915
|
|
|
2916
|
-
module.exports.
|
|
2916
|
+
module.exports.__wbg_loadblockfilelist_570aba530ebee4ed = function() { return handleError(function () {
|
|
2917
2917
|
const ret = MsgHandler.load_block_file_list();
|
|
2918
2918
|
return addHeapObject(ret);
|
|
2919
2919
|
}, arguments) };
|
|
2920
2920
|
|
|
2921
|
-
module.exports.
|
|
2921
|
+
module.exports.__wbg_sendinterfaceevent_c21cebbf951ca686 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2922
2922
|
let deferred0_0;
|
|
2923
2923
|
let deferred0_1;
|
|
2924
2924
|
let deferred1_0;
|
|
@@ -2935,7 +2935,7 @@ module.exports.__wbg_sendinterfaceevent_3dca7509961c850b = function(arg0, arg1,
|
|
|
2935
2935
|
}
|
|
2936
2936
|
};
|
|
2937
2937
|
|
|
2938
|
-
module.exports.
|
|
2938
|
+
module.exports.__wbg_sendblocksuccess_802b9fa50313a64b = function(arg0, arg1, arg2) {
|
|
2939
2939
|
let deferred0_0;
|
|
2940
2940
|
let deferred0_1;
|
|
2941
2941
|
try {
|
|
@@ -2947,11 +2947,11 @@ module.exports.__wbg_sendblocksuccess_1ce7c0c7e5070778 = function(arg0, arg1, ar
|
|
|
2947
2947
|
}
|
|
2948
2948
|
};
|
|
2949
2949
|
|
|
2950
|
-
module.exports.
|
|
2950
|
+
module.exports.__wbg_sendwalletupdate_636634402ee17f59 = function() {
|
|
2951
2951
|
MsgHandler.send_wallet_update();
|
|
2952
2952
|
};
|
|
2953
2953
|
|
|
2954
|
-
module.exports.
|
|
2954
|
+
module.exports.__wbg_sendnewversionalert_732df9ad6cd449c7 = function(arg0, arg1, arg2) {
|
|
2955
2955
|
let deferred0_0;
|
|
2956
2956
|
let deferred0_1;
|
|
2957
2957
|
try {
|
|
@@ -2963,15 +2963,15 @@ module.exports.__wbg_sendnewversionalert_8b31deb2b86f3516 = function(arg0, arg1,
|
|
|
2963
2963
|
}
|
|
2964
2964
|
};
|
|
2965
2965
|
|
|
2966
|
-
module.exports.
|
|
2966
|
+
module.exports.__wbg_sendblockfetchstatusevent_b001665c60100280 = function(arg0) {
|
|
2967
2967
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2968
2968
|
};
|
|
2969
2969
|
|
|
2970
|
-
module.exports.
|
|
2970
|
+
module.exports.__wbg_sendnewchaindetectedevent_5478f95c31363715 = function() {
|
|
2971
2971
|
MsgHandler.send_new_chain_detected_event();
|
|
2972
2972
|
};
|
|
2973
2973
|
|
|
2974
|
-
module.exports.
|
|
2974
|
+
module.exports.__wbg_fetchblockfrompeer_2586d36df17cd9e4 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2975
2975
|
let deferred0_0;
|
|
2976
2976
|
let deferred0_1;
|
|
2977
2977
|
try {
|
|
@@ -2984,7 +2984,7 @@ module.exports.__wbg_fetchblockfrompeer_dbbd33e8b8a662e1 = function() { return h
|
|
|
2984
2984
|
}
|
|
2985
2985
|
}, arguments) };
|
|
2986
2986
|
|
|
2987
|
-
module.exports.
|
|
2987
|
+
module.exports.__wbg_ensuredirectoryexists_f091e82931e71635 = function() { return handleError(function (arg0, arg1) {
|
|
2988
2988
|
let deferred0_0;
|
|
2989
2989
|
let deferred0_1;
|
|
2990
2990
|
try {
|