saito-wasm 0.2.177 → 0.2.178
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 +324 -324
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +155 -155
- package/pkg/web/index.js +322 -322
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/package.json +1 -1
- /package/pkg/node/snippets/{saito-wasm-466f9f7a003f28db → saito-wasm-aa917f543b5208b0}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-466f9f7a003f28db → saito-wasm-aa917f543b5208b0}/js/msg_handler.js +0 -0
package/pkg/node/index.js
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
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-aa917f543b5208b0/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 dropObject(idx) {
|
|
16
|
+
if (idx < 132) return;
|
|
17
|
+
heap[idx] = heap_next;
|
|
18
|
+
heap_next = idx;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function takeObject(idx) {
|
|
22
|
+
const ret = getObject(idx);
|
|
23
|
+
dropObject(idx);
|
|
24
|
+
return ret;
|
|
25
|
+
}
|
|
26
|
+
|
|
7
27
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
8
28
|
|
|
9
29
|
cachedTextDecoder.decode();
|
|
@@ -22,12 +42,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
22
42
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
23
43
|
}
|
|
24
44
|
|
|
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
45
|
function addHeapObject(obj) {
|
|
32
46
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
33
47
|
const idx = heap_next;
|
|
@@ -37,8 +51,6 @@ function addHeapObject(obj) {
|
|
|
37
51
|
return idx;
|
|
38
52
|
}
|
|
39
53
|
|
|
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,189 +235,177 @@ function _assertClass(instance, klass) {
|
|
|
235
235
|
return instance.ptr;
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
|
-
* @param {
|
|
239
|
-
* @param {number} msg_index
|
|
240
|
-
* @param {bigint} peer_index
|
|
238
|
+
* @param {bigint} threshold
|
|
241
239
|
* @returns {Promise<void>}
|
|
242
240
|
*/
|
|
243
|
-
module.exports.
|
|
244
|
-
const ret = wasm.
|
|
241
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
242
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
245
243
|
return takeObject(ret);
|
|
246
244
|
};
|
|
247
245
|
|
|
248
246
|
/**
|
|
249
|
-
* @param {bigint}
|
|
250
|
-
* @
|
|
247
|
+
* @param {bigint} num
|
|
248
|
+
* @param {bigint} deposit
|
|
249
|
+
* @param {Uint8Array} tx_msg
|
|
250
|
+
* @param {bigint} fee
|
|
251
|
+
* @param {string} recipient_public_key
|
|
252
|
+
* @param {string} nft_type
|
|
253
|
+
* @returns {Promise<WasmTransaction>}
|
|
251
254
|
*/
|
|
252
|
-
module.exports.
|
|
253
|
-
const ret = wasm.
|
|
255
|
+
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
256
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
254
257
|
return takeObject(ret);
|
|
255
258
|
};
|
|
256
259
|
|
|
257
260
|
/**
|
|
258
|
-
* @returns {Promise<
|
|
261
|
+
* @returns {Promise<boolean>}
|
|
259
262
|
*/
|
|
260
|
-
module.exports.
|
|
261
|
-
const ret = wasm.
|
|
263
|
+
module.exports.produce_block_with_gt = function() {
|
|
264
|
+
const ret = wasm.produce_block_with_gt();
|
|
262
265
|
return takeObject(ret);
|
|
263
266
|
};
|
|
264
267
|
|
|
265
268
|
/**
|
|
266
|
-
* @param {
|
|
267
|
-
* @returns {
|
|
269
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
270
|
+
* @returns {Promise<void>}
|
|
268
271
|
*/
|
|
269
|
-
module.exports.
|
|
270
|
-
|
|
271
|
-
|
|
272
|
+
module.exports.update_from_balance_snapshot = function(snapshot) {
|
|
273
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
274
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
275
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
276
|
+
return takeObject(ret);
|
|
272
277
|
};
|
|
273
278
|
|
|
274
279
|
/**
|
|
275
|
-
* @returns {Promise<
|
|
280
|
+
* @returns {Promise<WasmWallet>}
|
|
276
281
|
*/
|
|
277
|
-
module.exports.
|
|
278
|
-
const ret = wasm.
|
|
282
|
+
module.exports.get_wallet = function() {
|
|
283
|
+
const ret = wasm.get_wallet();
|
|
279
284
|
return takeObject(ret);
|
|
280
285
|
};
|
|
281
286
|
|
|
282
287
|
/**
|
|
283
|
-
* @param {
|
|
284
|
-
* @param {
|
|
285
|
-
* @param {
|
|
288
|
+
* @param {Uint8Array} hash
|
|
289
|
+
* @param {bigint} block_id
|
|
290
|
+
* @param {bigint} peer_index
|
|
286
291
|
* @returns {Promise<void>}
|
|
287
292
|
*/
|
|
288
|
-
module.exports.
|
|
289
|
-
const ret = wasm.
|
|
293
|
+
module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
|
|
294
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
290
295
|
return takeObject(ret);
|
|
291
296
|
};
|
|
292
297
|
|
|
293
298
|
/**
|
|
294
|
-
* @param {
|
|
299
|
+
* @param {Uint8Array} buffer
|
|
300
|
+
* @param {number} msg_index
|
|
301
|
+
* @param {bigint} peer_index
|
|
295
302
|
* @returns {Promise<void>}
|
|
296
303
|
*/
|
|
297
|
-
module.exports.
|
|
298
|
-
const ret = wasm.
|
|
304
|
+
module.exports.send_api_success = function(buffer, msg_index, peer_index) {
|
|
305
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
299
306
|
return takeObject(ret);
|
|
300
307
|
};
|
|
301
308
|
|
|
302
309
|
/**
|
|
303
|
-
* @
|
|
310
|
+
* @param {Array<any>} public_keys
|
|
311
|
+
* @param {BigUint64Array} amounts
|
|
312
|
+
* @param {bigint} fee
|
|
313
|
+
* @param {boolean} _force_merge
|
|
314
|
+
* @returns {Promise<WasmTransaction>}
|
|
304
315
|
*/
|
|
305
|
-
module.exports.
|
|
306
|
-
const ret = wasm.
|
|
316
|
+
module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
|
|
317
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
307
318
|
return takeObject(ret);
|
|
308
319
|
};
|
|
309
320
|
|
|
310
321
|
/**
|
|
311
|
-
* @
|
|
312
|
-
* @returns {Promise<Array<any>>}
|
|
322
|
+
* @returns {string}
|
|
313
323
|
*/
|
|
314
|
-
module.exports.
|
|
315
|
-
const ret = wasm.
|
|
324
|
+
module.exports.generate_private_key = function() {
|
|
325
|
+
const ret = wasm.generate_private_key();
|
|
316
326
|
return takeObject(ret);
|
|
317
327
|
};
|
|
318
328
|
|
|
319
329
|
/**
|
|
320
|
-
* @
|
|
321
|
-
* @param {string} private_key
|
|
322
|
-
* @returns {string}
|
|
330
|
+
* @returns {Promise<string>}
|
|
323
331
|
*/
|
|
324
|
-
module.exports.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
328
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
329
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
330
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
331
|
-
if (r2) {
|
|
332
|
-
throw takeObject(r1);
|
|
333
|
-
}
|
|
334
|
-
return takeObject(r0);
|
|
335
|
-
} finally {
|
|
336
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
337
|
-
}
|
|
332
|
+
module.exports.get_peer_stats = function() {
|
|
333
|
+
const ret = wasm.get_peer_stats();
|
|
334
|
+
return takeObject(ret);
|
|
338
335
|
};
|
|
339
336
|
|
|
340
337
|
/**
|
|
341
|
-
* @
|
|
342
|
-
* @param {Uint8Array} tx_msg
|
|
343
|
-
* @returns {Promise<WasmTransaction>}
|
|
338
|
+
* @returns {Promise<void>}
|
|
344
339
|
*/
|
|
345
|
-
module.exports.
|
|
346
|
-
const
|
|
347
|
-
const len0 = WASM_VECTOR_LEN;
|
|
348
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
340
|
+
module.exports.disable_producing_blocks_by_timer = function() {
|
|
341
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
349
342
|
return takeObject(ret);
|
|
350
343
|
};
|
|
351
344
|
|
|
352
345
|
/**
|
|
353
346
|
* @param {Uint8Array} buffer
|
|
354
|
-
* @param {number} msg_index
|
|
355
347
|
* @param {bigint} peer_index
|
|
356
348
|
* @returns {Promise<void>}
|
|
357
349
|
*/
|
|
358
|
-
module.exports.
|
|
359
|
-
const ret = wasm.
|
|
350
|
+
module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
|
|
351
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
360
352
|
return takeObject(ret);
|
|
361
353
|
};
|
|
362
354
|
|
|
363
355
|
/**
|
|
364
|
-
* @param {
|
|
365
|
-
* @
|
|
366
|
-
* @param {string} slip3_utxo_key
|
|
367
|
-
* @param {Uint8Array} tx_msg
|
|
368
|
-
* @returns {Promise<WasmTransaction>}
|
|
356
|
+
* @param {bigint} peer_index
|
|
357
|
+
* @returns {Promise<void>}
|
|
369
358
|
*/
|
|
370
|
-
module.exports.
|
|
371
|
-
const ret = wasm.
|
|
359
|
+
module.exports.remove_stun_peer = function(peer_index) {
|
|
360
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
372
361
|
return takeObject(ret);
|
|
373
362
|
};
|
|
374
363
|
|
|
375
364
|
/**
|
|
376
|
-
* @
|
|
365
|
+
* @param {Uint8Array} buffer
|
|
366
|
+
* @param {number} msg_index
|
|
367
|
+
* @param {bigint} peer_index
|
|
368
|
+
* @returns {Promise<void>}
|
|
377
369
|
*/
|
|
378
|
-
module.exports.
|
|
379
|
-
const ret = wasm.
|
|
370
|
+
module.exports.send_api_error = function(buffer, msg_index, peer_index) {
|
|
371
|
+
const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
|
|
380
372
|
return takeObject(ret);
|
|
381
373
|
};
|
|
382
374
|
|
|
383
375
|
/**
|
|
384
|
-
* @returns {Promise<
|
|
376
|
+
* @returns {Promise<bigint>}
|
|
385
377
|
*/
|
|
386
|
-
module.exports.
|
|
387
|
-
const ret = wasm.
|
|
378
|
+
module.exports.get_next_peer_index = function() {
|
|
379
|
+
const ret = wasm.get_next_peer_index();
|
|
388
380
|
return takeObject(ret);
|
|
389
381
|
};
|
|
390
382
|
|
|
391
383
|
/**
|
|
392
|
-
* @param {
|
|
393
|
-
* @
|
|
394
|
-
* @param {bigint} block_id
|
|
395
|
-
* @param {bigint} peer_index
|
|
396
|
-
* @returns {Promise<void>}
|
|
384
|
+
* @param {string} block_hash
|
|
385
|
+
* @returns {Promise<WasmBlock>}
|
|
397
386
|
*/
|
|
398
|
-
module.exports.
|
|
399
|
-
const ret = wasm.
|
|
387
|
+
module.exports.get_block = function(block_hash) {
|
|
388
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
400
389
|
return takeObject(ret);
|
|
401
390
|
};
|
|
402
391
|
|
|
403
392
|
/**
|
|
404
|
-
* @
|
|
405
|
-
* @returns {Promise<void>}
|
|
393
|
+
* @returns {Promise<string>}
|
|
406
394
|
*/
|
|
407
|
-
module.exports.
|
|
408
|
-
|
|
409
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
410
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
395
|
+
module.exports.get_congestion_stats = function() {
|
|
396
|
+
const ret = wasm.get_congestion_stats();
|
|
411
397
|
return takeObject(ret);
|
|
412
398
|
};
|
|
413
399
|
|
|
414
400
|
/**
|
|
415
|
-
* @param {
|
|
416
|
-
* @param {
|
|
417
|
-
* @returns {Promise<
|
|
401
|
+
* @param {string} nft_id_hex
|
|
402
|
+
* @param {Uint8Array} tx_msg
|
|
403
|
+
* @returns {Promise<WasmTransaction>}
|
|
418
404
|
*/
|
|
419
|
-
module.exports.
|
|
420
|
-
const
|
|
405
|
+
module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
|
|
406
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
407
|
+
const len0 = WASM_VECTOR_LEN;
|
|
408
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
421
409
|
return takeObject(ret);
|
|
422
410
|
};
|
|
423
411
|
|
|
@@ -431,306 +419,318 @@ module.exports.process_peer_disconnection = function(peer_index) {
|
|
|
431
419
|
};
|
|
432
420
|
|
|
433
421
|
/**
|
|
434
|
-
* @param {
|
|
422
|
+
* @param {WasmTransaction} tx
|
|
435
423
|
* @returns {Promise<void>}
|
|
436
424
|
*/
|
|
437
|
-
module.exports.
|
|
438
|
-
|
|
425
|
+
module.exports.propagate_transaction = function(tx) {
|
|
426
|
+
_assertClass(tx, WasmTransaction);
|
|
427
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
439
428
|
return takeObject(ret);
|
|
440
429
|
};
|
|
441
430
|
|
|
442
431
|
/**
|
|
443
|
-
* @
|
|
432
|
+
* @param {string} public_key
|
|
433
|
+
* @param {bigint} amount
|
|
434
|
+
* @param {bigint} fee
|
|
435
|
+
* @param {boolean} force_merge
|
|
436
|
+
* @returns {Promise<WasmTransaction>}
|
|
444
437
|
*/
|
|
445
|
-
module.exports.
|
|
446
|
-
const ret = wasm.
|
|
438
|
+
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
439
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
447
440
|
return takeObject(ret);
|
|
448
441
|
};
|
|
449
442
|
|
|
450
443
|
/**
|
|
451
|
-
* @
|
|
452
|
-
* @param {bigint} peer_index
|
|
453
|
-
* @returns {Promise<void>}
|
|
444
|
+
* @returns {Promise<any>}
|
|
454
445
|
*/
|
|
455
|
-
module.exports.
|
|
456
|
-
const ret = wasm.
|
|
446
|
+
module.exports.get_confirmations = function() {
|
|
447
|
+
const ret = wasm.get_confirmations();
|
|
457
448
|
return takeObject(ret);
|
|
458
449
|
};
|
|
459
450
|
|
|
460
451
|
/**
|
|
461
|
-
* @param {bigint}
|
|
462
|
-
* @param {string}
|
|
463
|
-
* @
|
|
464
|
-
* @param {string} slip3_utxo_key
|
|
465
|
-
* @param {string} recipient_public_key
|
|
466
|
-
* @param {Uint8Array} tx_msg
|
|
467
|
-
* @returns {Promise<WasmTransaction>}
|
|
452
|
+
* @param {bigint} peer_index
|
|
453
|
+
* @param {string} public_key
|
|
454
|
+
* @returns {Promise<void>}
|
|
468
455
|
*/
|
|
469
|
-
module.exports.
|
|
470
|
-
const ret = wasm.
|
|
456
|
+
module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
457
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
471
458
|
return takeObject(ret);
|
|
472
459
|
};
|
|
473
460
|
|
|
474
461
|
/**
|
|
475
|
-
* @param {string}
|
|
476
|
-
* @returns {
|
|
462
|
+
* @param {string} private_key
|
|
463
|
+
* @returns {string}
|
|
477
464
|
*/
|
|
478
|
-
module.exports.
|
|
479
|
-
|
|
480
|
-
|
|
465
|
+
module.exports.generate_public_key = function(private_key) {
|
|
466
|
+
try {
|
|
467
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
468
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
469
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
470
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
471
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
472
|
+
if (r2) {
|
|
473
|
+
throw takeObject(r1);
|
|
474
|
+
}
|
|
475
|
+
return takeObject(r0);
|
|
476
|
+
} finally {
|
|
477
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
478
|
+
}
|
|
481
479
|
};
|
|
482
480
|
|
|
483
481
|
/**
|
|
484
|
-
* @
|
|
482
|
+
* @param {Uint8Array} buffer
|
|
483
|
+
* @param {string} signature
|
|
484
|
+
* @param {string} public_key
|
|
485
|
+
* @returns {boolean}
|
|
485
486
|
*/
|
|
486
|
-
module.exports.
|
|
487
|
-
const ret = wasm.
|
|
488
|
-
return
|
|
487
|
+
module.exports.verify_signature = function(buffer, signature, public_key) {
|
|
488
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
489
|
+
return ret !== 0;
|
|
489
490
|
};
|
|
490
491
|
|
|
491
492
|
/**
|
|
492
|
-
* @param {
|
|
493
|
-
* @
|
|
493
|
+
* @param {Uint8Array} buffer
|
|
494
|
+
* @param {string} private_key
|
|
495
|
+
* @returns {string}
|
|
494
496
|
*/
|
|
495
|
-
module.exports.
|
|
496
|
-
|
|
497
|
-
|
|
497
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
498
|
+
try {
|
|
499
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
500
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
501
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
502
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
503
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
504
|
+
if (r2) {
|
|
505
|
+
throw takeObject(r1);
|
|
506
|
+
}
|
|
507
|
+
return takeObject(r0);
|
|
508
|
+
} finally {
|
|
509
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
510
|
+
}
|
|
498
511
|
};
|
|
499
512
|
|
|
500
513
|
/**
|
|
501
|
-
* @returns {Promise<
|
|
514
|
+
* @returns {Promise<Array<any>>}
|
|
502
515
|
*/
|
|
503
|
-
module.exports.
|
|
504
|
-
const ret = wasm.
|
|
516
|
+
module.exports.get_peers = function() {
|
|
517
|
+
const ret = wasm.get_peers();
|
|
505
518
|
return takeObject(ret);
|
|
506
519
|
};
|
|
507
520
|
|
|
508
521
|
/**
|
|
509
|
-
* @
|
|
522
|
+
* @param {bigint} peer_index
|
|
523
|
+
* @param {string} ip
|
|
524
|
+
* @returns {Promise<void>}
|
|
510
525
|
*/
|
|
511
|
-
module.exports.
|
|
512
|
-
const ret = wasm.
|
|
526
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
527
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
513
528
|
return takeObject(ret);
|
|
514
529
|
};
|
|
515
530
|
|
|
516
531
|
/**
|
|
517
|
-
* @param {string}
|
|
518
|
-
* @param {string}
|
|
519
|
-
* @param {
|
|
520
|
-
* @param {
|
|
521
|
-
* @param {
|
|
522
|
-
* @
|
|
523
|
-
* @returns {Promise<WasmTransaction>}
|
|
532
|
+
* @param {string} config_json
|
|
533
|
+
* @param {string} private_key
|
|
534
|
+
* @param {number} log_level_num
|
|
535
|
+
* @param {bigint} hasten_multiplier
|
|
536
|
+
* @param {boolean} delete_old_blocks
|
|
537
|
+
* @returns {Promise<any>}
|
|
524
538
|
*/
|
|
525
|
-
module.exports.
|
|
526
|
-
const ret = wasm.
|
|
539
|
+
module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
540
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
527
541
|
return takeObject(ret);
|
|
528
542
|
};
|
|
529
543
|
|
|
530
544
|
/**
|
|
531
|
-
* @param {
|
|
532
|
-
* @returns {Promise<
|
|
545
|
+
* @param {Array<any>} keys
|
|
546
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
533
547
|
*/
|
|
534
|
-
module.exports.
|
|
535
|
-
const ret = wasm.
|
|
548
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
549
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
536
550
|
return takeObject(ret);
|
|
537
551
|
};
|
|
538
552
|
|
|
539
553
|
/**
|
|
540
554
|
* @param {Uint8Array} buffer
|
|
541
|
-
* @param {
|
|
542
|
-
* @param {
|
|
543
|
-
* @returns {
|
|
555
|
+
* @param {number} msg_index
|
|
556
|
+
* @param {bigint} peer_index
|
|
557
|
+
* @returns {Promise<void>}
|
|
544
558
|
*/
|
|
545
|
-
module.exports.
|
|
546
|
-
const ret = wasm.
|
|
547
|
-
return ret
|
|
559
|
+
module.exports.send_api_call = function(buffer, msg_index, peer_index) {
|
|
560
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
561
|
+
return takeObject(ret);
|
|
548
562
|
};
|
|
549
563
|
|
|
550
564
|
/**
|
|
551
|
-
* @returns {Promise<
|
|
565
|
+
* @returns {Promise<string>}
|
|
552
566
|
*/
|
|
553
|
-
module.exports.
|
|
554
|
-
const ret = wasm.
|
|
567
|
+
module.exports.get_latest_block_hash = function() {
|
|
568
|
+
const ret = wasm.get_latest_block_hash();
|
|
555
569
|
return takeObject(ret);
|
|
556
570
|
};
|
|
557
571
|
|
|
558
572
|
/**
|
|
559
|
-
* @
|
|
573
|
+
* @param {bigint} peer_index
|
|
574
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
560
575
|
*/
|
|
561
|
-
module.exports.
|
|
562
|
-
const ret = wasm.
|
|
576
|
+
module.exports.get_peer = function(peer_index) {
|
|
577
|
+
const ret = wasm.get_peer(peer_index);
|
|
563
578
|
return takeObject(ret);
|
|
564
579
|
};
|
|
565
580
|
|
|
566
581
|
/**
|
|
582
|
+
* @param {bigint} current_time
|
|
567
583
|
* @returns {Promise<void>}
|
|
568
584
|
*/
|
|
569
|
-
module.exports.
|
|
570
|
-
const ret = wasm.
|
|
585
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
586
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
571
587
|
return takeObject(ret);
|
|
572
588
|
};
|
|
573
589
|
|
|
574
590
|
/**
|
|
575
|
-
* @param {string}
|
|
576
|
-
* @
|
|
591
|
+
* @param {string} slip1_utxo_key
|
|
592
|
+
* @param {string} slip2_utxo_key
|
|
593
|
+
* @param {string} slip3_utxo_key
|
|
594
|
+
* @param {Uint8Array} tx_msg
|
|
595
|
+
* @returns {Promise<WasmTransaction>}
|
|
577
596
|
*/
|
|
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
|
-
}
|
|
597
|
+
module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, tx_msg) {
|
|
598
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(tx_msg));
|
|
599
|
+
return takeObject(ret);
|
|
592
600
|
};
|
|
593
601
|
|
|
594
602
|
/**
|
|
595
|
-
* @returns {Promise<
|
|
603
|
+
* @returns {Promise<string>}
|
|
596
604
|
*/
|
|
597
|
-
module.exports.
|
|
598
|
-
const ret = wasm.
|
|
605
|
+
module.exports.get_stats = function() {
|
|
606
|
+
const ret = wasm.get_stats();
|
|
599
607
|
return takeObject(ret);
|
|
600
608
|
};
|
|
601
609
|
|
|
602
610
|
/**
|
|
603
|
-
* @
|
|
611
|
+
* @param {Uint8Array} buffer
|
|
612
|
+
* @param {Uint8Array} hash
|
|
613
|
+
* @param {bigint} block_id
|
|
614
|
+
* @param {bigint} peer_index
|
|
615
|
+
* @returns {Promise<void>}
|
|
604
616
|
*/
|
|
605
|
-
module.exports.
|
|
606
|
-
const ret = wasm.
|
|
617
|
+
module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
|
|
618
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
607
619
|
return takeObject(ret);
|
|
608
620
|
};
|
|
609
621
|
|
|
610
622
|
/**
|
|
611
|
-
* @
|
|
623
|
+
* @param {string} public_key
|
|
624
|
+
* @returns {Promise<Array<any>>}
|
|
612
625
|
*/
|
|
613
|
-
module.exports.
|
|
614
|
-
const ret = wasm.
|
|
626
|
+
module.exports.get_account_slips = function(public_key) {
|
|
627
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
615
628
|
return takeObject(ret);
|
|
616
629
|
};
|
|
617
630
|
|
|
618
631
|
/**
|
|
619
|
-
* @
|
|
632
|
+
* @param {Uint8Array} buffer
|
|
633
|
+
* @returns {string}
|
|
620
634
|
*/
|
|
621
|
-
module.exports.
|
|
622
|
-
const ret = wasm.
|
|
635
|
+
module.exports.hash = function(buffer) {
|
|
636
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
623
637
|
return takeObject(ret);
|
|
624
638
|
};
|
|
625
639
|
|
|
626
640
|
/**
|
|
627
|
-
* @
|
|
628
|
-
* @param {string} private_key
|
|
629
|
-
* @param {number} log_level_num
|
|
630
|
-
* @param {bigint} hasten_multiplier
|
|
631
|
-
* @param {boolean} delete_old_blocks
|
|
632
|
-
* @returns {Promise<any>}
|
|
641
|
+
* @returns {Promise<WasmBlockchain>}
|
|
633
642
|
*/
|
|
634
|
-
module.exports.
|
|
635
|
-
const ret = wasm.
|
|
643
|
+
module.exports.get_blockchain = function() {
|
|
644
|
+
const ret = wasm.get_blockchain();
|
|
636
645
|
return takeObject(ret);
|
|
637
646
|
};
|
|
638
647
|
|
|
639
648
|
/**
|
|
640
|
-
* @param {bigint}
|
|
641
|
-
* @param {
|
|
642
|
-
* @param {
|
|
643
|
-
* @param {
|
|
649
|
+
* @param {bigint} amt
|
|
650
|
+
* @param {string} slip1_utxo_key
|
|
651
|
+
* @param {string} slip2_utxo_key
|
|
652
|
+
* @param {string} slip3_utxo_key
|
|
644
653
|
* @param {string} recipient_public_key
|
|
645
|
-
* @param {
|
|
654
|
+
* @param {Uint8Array} tx_msg
|
|
646
655
|
* @returns {Promise<WasmTransaction>}
|
|
647
656
|
*/
|
|
648
|
-
module.exports.
|
|
649
|
-
const ret = wasm.
|
|
657
|
+
module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
658
|
+
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));
|
|
650
659
|
return takeObject(ret);
|
|
651
660
|
};
|
|
652
661
|
|
|
653
662
|
/**
|
|
654
|
-
* @
|
|
655
|
-
* @returns {string}
|
|
663
|
+
* @returns {Promise<Array<any>>}
|
|
656
664
|
*/
|
|
657
|
-
module.exports.
|
|
658
|
-
const ret = wasm.
|
|
665
|
+
module.exports.get_nft_list = function() {
|
|
666
|
+
const ret = wasm.get_nft_list();
|
|
659
667
|
return takeObject(ret);
|
|
660
668
|
};
|
|
661
669
|
|
|
662
670
|
/**
|
|
663
|
-
* @param {
|
|
664
|
-
* @
|
|
671
|
+
* @param {number} major
|
|
672
|
+
* @param {number} minor
|
|
673
|
+
* @param {number} patch
|
|
674
|
+
* @returns {Promise<void>}
|
|
665
675
|
*/
|
|
666
|
-
module.exports.
|
|
667
|
-
const ret = wasm.
|
|
676
|
+
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
677
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
668
678
|
return takeObject(ret);
|
|
669
679
|
};
|
|
670
680
|
|
|
671
681
|
/**
|
|
672
|
-
* @
|
|
673
|
-
* @param {string} ip
|
|
674
|
-
* @returns {Promise<void>}
|
|
682
|
+
* @returns {Promise<boolean>}
|
|
675
683
|
*/
|
|
676
|
-
module.exports.
|
|
677
|
-
const ret = wasm.
|
|
684
|
+
module.exports.produce_block_without_gt = function() {
|
|
685
|
+
const ret = wasm.produce_block_without_gt();
|
|
678
686
|
return takeObject(ret);
|
|
679
687
|
};
|
|
680
688
|
|
|
681
689
|
/**
|
|
682
|
-
* @param {
|
|
683
|
-
* @param {
|
|
684
|
-
* @param {
|
|
685
|
-
* @
|
|
690
|
+
* @param {string} slip1_utxo_key
|
|
691
|
+
* @param {string} slip2_utxo_key
|
|
692
|
+
* @param {string} slip3_utxo_key
|
|
693
|
+
* @param {number} left_count
|
|
694
|
+
* @param {number} right_count
|
|
695
|
+
* @param {Uint8Array} tx_msg
|
|
696
|
+
* @returns {Promise<WasmTransaction>}
|
|
686
697
|
*/
|
|
687
|
-
module.exports.
|
|
688
|
-
const ret = wasm.
|
|
698
|
+
module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
699
|
+
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));
|
|
689
700
|
return takeObject(ret);
|
|
690
701
|
};
|
|
691
702
|
|
|
692
703
|
/**
|
|
693
|
-
* @param {
|
|
694
|
-
* @
|
|
695
|
-
* @param {bigint} fee
|
|
696
|
-
* @param {boolean} _force_merge
|
|
697
|
-
* @returns {Promise<WasmTransaction>}
|
|
704
|
+
* @param {bigint} duration_in_ms
|
|
705
|
+
* @returns {Promise<void>}
|
|
698
706
|
*/
|
|
699
|
-
module.exports.
|
|
700
|
-
const ret = wasm.
|
|
707
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
708
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
701
709
|
return takeObject(ret);
|
|
702
710
|
};
|
|
703
711
|
|
|
704
712
|
/**
|
|
705
|
-
* @param {
|
|
706
|
-
* @
|
|
707
|
-
* @param {bigint} peer_index
|
|
708
|
-
* @returns {Promise<void>}
|
|
713
|
+
* @param {string} key
|
|
714
|
+
* @returns {boolean}
|
|
709
715
|
*/
|
|
710
|
-
module.exports.
|
|
711
|
-
const ret = wasm.
|
|
712
|
-
return
|
|
716
|
+
module.exports.is_valid_public_key = function(key) {
|
|
717
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
718
|
+
return ret !== 0;
|
|
713
719
|
};
|
|
714
720
|
|
|
715
721
|
/**
|
|
716
|
-
* @
|
|
717
|
-
* @param {bigint} amount
|
|
718
|
-
* @param {bigint} fee
|
|
719
|
-
* @param {boolean} force_merge
|
|
720
|
-
* @returns {Promise<WasmTransaction>}
|
|
722
|
+
* @returns {Promise<void>}
|
|
721
723
|
*/
|
|
722
|
-
module.exports.
|
|
723
|
-
const ret = wasm.
|
|
724
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
725
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
724
726
|
return takeObject(ret);
|
|
725
727
|
};
|
|
726
728
|
|
|
727
729
|
/**
|
|
728
|
-
* @
|
|
729
|
-
* @returns {Promise<void>}
|
|
730
|
+
* @returns {Promise<Array<any>>}
|
|
730
731
|
*/
|
|
731
|
-
module.exports.
|
|
732
|
-
|
|
733
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
732
|
+
module.exports.get_mempool_txs = function() {
|
|
733
|
+
const ret = wasm.get_mempool_txs();
|
|
734
734
|
return takeObject(ret);
|
|
735
735
|
};
|
|
736
736
|
|
|
@@ -2681,22 +2681,18 @@ class WasmWalletSlip {
|
|
|
2681
2681
|
}
|
|
2682
2682
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2683
2683
|
|
|
2684
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2685
|
+
takeObject(arg0);
|
|
2686
|
+
};
|
|
2687
|
+
|
|
2684
2688
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2685
2689
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
2686
2690
|
return addHeapObject(ret);
|
|
2687
2691
|
};
|
|
2688
2692
|
|
|
2689
|
-
module.exports.
|
|
2690
|
-
const
|
|
2691
|
-
|
|
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
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2699
|
-
takeObject(arg0);
|
|
2693
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2694
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2695
|
+
return addHeapObject(ret);
|
|
2700
2696
|
};
|
|
2701
2697
|
|
|
2702
2698
|
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
@@ -2704,23 +2700,27 @@ module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
|
2704
2700
|
return addHeapObject(ret);
|
|
2705
2701
|
};
|
|
2706
2702
|
|
|
2707
|
-
module.exports.
|
|
2708
|
-
const ret =
|
|
2703
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2704
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2709
2705
|
return addHeapObject(ret);
|
|
2710
2706
|
};
|
|
2711
2707
|
|
|
2712
|
-
module.exports.
|
|
2713
|
-
const
|
|
2714
|
-
|
|
2708
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2709
|
+
const obj = getObject(arg1);
|
|
2710
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2711
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2712
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2713
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2714
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2715
2715
|
};
|
|
2716
2716
|
|
|
2717
|
-
module.exports.
|
|
2718
|
-
const ret =
|
|
2717
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2718
|
+
const ret = getObject(arg0);
|
|
2719
2719
|
return addHeapObject(ret);
|
|
2720
2720
|
};
|
|
2721
2721
|
|
|
2722
|
-
module.exports.
|
|
2723
|
-
const ret =
|
|
2722
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2723
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2724
2724
|
return addHeapObject(ret);
|
|
2725
2725
|
};
|
|
2726
2726
|
|
|
@@ -2729,28 +2729,28 @@ module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
|
2729
2729
|
return addHeapObject(ret);
|
|
2730
2730
|
};
|
|
2731
2731
|
|
|
2732
|
-
module.exports.
|
|
2733
|
-
const ret =
|
|
2732
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2733
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2734
2734
|
return addHeapObject(ret);
|
|
2735
2735
|
};
|
|
2736
2736
|
|
|
2737
|
-
module.exports.
|
|
2738
|
-
const ret =
|
|
2737
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2738
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2739
2739
|
return addHeapObject(ret);
|
|
2740
2740
|
};
|
|
2741
2741
|
|
|
2742
|
-
module.exports.
|
|
2743
|
-
const ret =
|
|
2742
|
+
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2743
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2744
2744
|
return addHeapObject(ret);
|
|
2745
2745
|
};
|
|
2746
2746
|
|
|
2747
|
-
module.exports.
|
|
2748
|
-
const ret =
|
|
2747
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2748
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2749
2749
|
return addHeapObject(ret);
|
|
2750
2750
|
};
|
|
2751
2751
|
|
|
2752
|
-
module.exports.
|
|
2753
|
-
const ret =
|
|
2752
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2753
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2754
2754
|
return addHeapObject(ret);
|
|
2755
2755
|
};
|
|
2756
2756
|
|
|
@@ -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_e19f8531f715563c = 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_d3282c9c5d63c751 = 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_f66232ebdacd134c = function() {
|
|
2814
2814
|
MsgHandler.load_wallet();
|
|
2815
2815
|
};
|
|
2816
2816
|
|
|
2817
|
-
module.exports.
|
|
2817
|
+
module.exports.__wbg_savewallet_900c6615a7c444ff = function() {
|
|
2818
2818
|
MsgHandler.save_wallet();
|
|
2819
2819
|
};
|
|
2820
2820
|
|
|
2821
|
-
module.exports.
|
|
2821
|
+
module.exports.__wbg_writevalue_55ad59a477682cf4 = 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_9bad2e39591861df = 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_0829d7a3fdf241e8 = 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_8bfa28cc4629d485 = function(arg0, arg1) {
|
|
2859
2859
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2860
2860
|
};
|
|
2861
2861
|
|
|
2862
|
-
module.exports.
|
|
2862
|
+
module.exports.__wbg_connecttopeer_a97abb6ea54e73f4 = 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_0af92500fd842b5c = 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_c5074d5d9ae77250 = 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_447fe8b16543cfe2 = 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_ae6a7accec497e67 = 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_55add6554d3b2fbf = 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_9db2f0f8745a3b61 = 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_93f8374a739a911c = 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_909ff75cd1004eec = 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_7045bede3f7d75b1 = 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_4a65fd07f3e613ab = 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_4622857ac663a957 = function() {
|
|
2951
2951
|
MsgHandler.send_wallet_update();
|
|
2952
2952
|
};
|
|
2953
2953
|
|
|
2954
|
-
module.exports.
|
|
2954
|
+
module.exports.__wbg_sendnewversionalert_e01dcdcfd2560293 = 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_4e05211bffe95385 = 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_9db9e5dcd7e122b8 = function() {
|
|
2971
2971
|
MsgHandler.send_new_chain_detected_event();
|
|
2972
2972
|
};
|
|
2973
2973
|
|
|
2974
|
-
module.exports.
|
|
2974
|
+
module.exports.__wbg_fetchblockfrompeer_7f0851a8d64bfa82 = 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_6bfc5f098f9a291d = function() { return handleError(function (arg0, arg1) {
|
|
2988
2988
|
let deferred0_0;
|
|
2989
2989
|
let deferred0_1;
|
|
2990
2990
|
try {
|