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