saito-wasm 0.2.167 → 0.2.168
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 +143 -143
- package/pkg/node/index.js +329 -330
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +138 -138
- package/pkg/node/package.json +3 -3
- package/pkg/node/snippets/{saito-wasm-25d13ca010c26982 → saito-wasm-86859bf1424d0da8}/js/msg_handler.js +3 -3
- package/pkg/web/index.d.ts +283 -283
- package/pkg/web/index.js +323 -324
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +138 -138
- package/pkg/web/package.json +1 -1
- package/pkg/web/snippets/{saito-wasm-25d13ca010c26982 → saito-wasm-86859bf1424d0da8}/js/msg_handler.js +3 -3
package/pkg/web/index.js
CHANGED
|
@@ -1,42 +1,15 @@
|
|
|
1
|
-
import { MsgHandler } from './snippets/saito-wasm-
|
|
1
|
+
import { MsgHandler } from './snippets/saito-wasm-86859bf1424d0da8/js/msg_handler.js';
|
|
2
2
|
|
|
3
3
|
let wasm;
|
|
4
4
|
|
|
5
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
6
|
-
|
|
7
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
8
|
-
|
|
9
|
-
let cachedUint8Memory0 = null;
|
|
10
|
-
|
|
11
|
-
function getUint8Memory0() {
|
|
12
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
13
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
14
|
-
}
|
|
15
|
-
return cachedUint8Memory0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function getStringFromWasm0(ptr, len) {
|
|
19
|
-
ptr = ptr >>> 0;
|
|
20
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
5
|
const heap = new Array(128).fill(undefined);
|
|
24
6
|
|
|
25
7
|
heap.push(undefined, null, true, false);
|
|
26
8
|
|
|
27
|
-
let heap_next = heap.length;
|
|
28
|
-
|
|
29
|
-
function addHeapObject(obj) {
|
|
30
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
31
|
-
const idx = heap_next;
|
|
32
|
-
heap_next = heap[idx];
|
|
33
|
-
|
|
34
|
-
heap[idx] = obj;
|
|
35
|
-
return idx;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
9
|
function getObject(idx) { return heap[idx]; }
|
|
39
10
|
|
|
11
|
+
let heap_next = heap.length;
|
|
12
|
+
|
|
40
13
|
function dropObject(idx) {
|
|
41
14
|
if (idx < 132) return;
|
|
42
15
|
heap[idx] = heap_next;
|
|
@@ -49,8 +22,26 @@ function takeObject(idx) {
|
|
|
49
22
|
return ret;
|
|
50
23
|
}
|
|
51
24
|
|
|
25
|
+
function addHeapObject(obj) {
|
|
26
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
27
|
+
const idx = heap_next;
|
|
28
|
+
heap_next = heap[idx];
|
|
29
|
+
|
|
30
|
+
heap[idx] = obj;
|
|
31
|
+
return idx;
|
|
32
|
+
}
|
|
33
|
+
|
|
52
34
|
let WASM_VECTOR_LEN = 0;
|
|
53
35
|
|
|
36
|
+
let cachedUint8Memory0 = null;
|
|
37
|
+
|
|
38
|
+
function getUint8Memory0() {
|
|
39
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
40
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
41
|
+
}
|
|
42
|
+
return cachedUint8Memory0;
|
|
43
|
+
}
|
|
44
|
+
|
|
54
45
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
55
46
|
|
|
56
47
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -118,6 +109,15 @@ function getInt32Memory0() {
|
|
|
118
109
|
return cachedInt32Memory0;
|
|
119
110
|
}
|
|
120
111
|
|
|
112
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
113
|
+
|
|
114
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
115
|
+
|
|
116
|
+
function getStringFromWasm0(ptr, len) {
|
|
117
|
+
ptr = ptr >>> 0;
|
|
118
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
121
|
let cachedFloat64Memory0 = null;
|
|
122
122
|
|
|
123
123
|
function getFloat64Memory0() {
|
|
@@ -226,115 +226,104 @@ function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
|
226
226
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h18f9d53151d93e96(arg0, arg1, addHeapObject(arg2));
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
let stack_pointer = 128;
|
|
230
|
-
|
|
231
|
-
function addBorrowedObject(obj) {
|
|
232
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
233
|
-
heap[--stack_pointer] = obj;
|
|
234
|
-
return stack_pointer;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
229
|
function _assertClass(instance, klass) {
|
|
238
230
|
if (!(instance instanceof klass)) {
|
|
239
231
|
throw new Error(`expected instance of ${klass.name}`);
|
|
240
232
|
}
|
|
241
233
|
return instance.ptr;
|
|
242
234
|
}
|
|
243
|
-
|
|
244
|
-
function handleError(f, args) {
|
|
245
|
-
try {
|
|
246
|
-
return f.apply(this, args);
|
|
247
|
-
} catch (e) {
|
|
248
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
235
|
/**
|
|
252
|
-
* @returns {Promise<
|
|
236
|
+
* @returns {Promise<string>}
|
|
253
237
|
*/
|
|
254
|
-
export function
|
|
255
|
-
const ret = wasm.
|
|
238
|
+
export function get_stats() {
|
|
239
|
+
const ret = wasm.get_stats();
|
|
256
240
|
return takeObject(ret);
|
|
257
241
|
}
|
|
258
242
|
|
|
259
243
|
/**
|
|
260
|
-
* @param {
|
|
261
|
-
* @
|
|
244
|
+
* @param {string} slip1_utxo_key
|
|
245
|
+
* @param {string} slip2_utxo_key
|
|
246
|
+
* @param {string} slip3_utxo_key
|
|
247
|
+
* @returns {Promise<WasmTransaction>}
|
|
262
248
|
*/
|
|
263
|
-
export function
|
|
264
|
-
const ret = wasm.
|
|
249
|
+
export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
|
|
250
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
|
|
265
251
|
return takeObject(ret);
|
|
266
252
|
}
|
|
267
253
|
|
|
268
254
|
/**
|
|
269
|
-
* @
|
|
270
|
-
* @param {BigUint64Array} amounts
|
|
271
|
-
* @param {bigint} fee
|
|
272
|
-
* @param {boolean} _force_merge
|
|
273
|
-
* @returns {Promise<WasmTransaction>}
|
|
255
|
+
* @returns {Promise<string>}
|
|
274
256
|
*/
|
|
275
|
-
export function
|
|
276
|
-
const ret = wasm.
|
|
257
|
+
export function get_congestion_stats() {
|
|
258
|
+
const ret = wasm.get_congestion_stats();
|
|
277
259
|
return takeObject(ret);
|
|
278
260
|
}
|
|
279
261
|
|
|
280
262
|
/**
|
|
281
|
-
* @
|
|
263
|
+
* @param {bigint} threshold
|
|
264
|
+
* @returns {Promise<void>}
|
|
282
265
|
*/
|
|
283
|
-
export function
|
|
284
|
-
const ret = wasm.
|
|
266
|
+
export function write_issuance_file(threshold) {
|
|
267
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
285
268
|
return takeObject(ret);
|
|
286
269
|
}
|
|
287
270
|
|
|
288
271
|
/**
|
|
289
|
-
* @
|
|
290
|
-
* @param {number} msg_index
|
|
291
|
-
* @param {bigint} peer_index
|
|
292
|
-
* @returns {Promise<void>}
|
|
272
|
+
* @returns {Promise<string>}
|
|
293
273
|
*/
|
|
294
|
-
export function
|
|
295
|
-
const ret = wasm.
|
|
274
|
+
export function get_peer_stats() {
|
|
275
|
+
const ret = wasm.get_peer_stats();
|
|
296
276
|
return takeObject(ret);
|
|
297
277
|
}
|
|
298
278
|
|
|
299
279
|
/**
|
|
300
|
-
* @
|
|
301
|
-
* @param {number} minor
|
|
302
|
-
* @param {number} patch
|
|
303
|
-
* @returns {Promise<void>}
|
|
280
|
+
* @returns {Promise<WasmWallet>}
|
|
304
281
|
*/
|
|
305
|
-
export function
|
|
306
|
-
const ret = wasm.
|
|
282
|
+
export function get_wallet() {
|
|
283
|
+
const ret = wasm.get_wallet();
|
|
307
284
|
return takeObject(ret);
|
|
308
285
|
}
|
|
309
286
|
|
|
310
287
|
/**
|
|
311
|
-
* @param {Uint8Array} hash
|
|
312
|
-
* @param {bigint} block_id
|
|
313
288
|
* @param {bigint} peer_index
|
|
289
|
+
* @param {string} ip
|
|
314
290
|
* @returns {Promise<void>}
|
|
315
291
|
*/
|
|
316
|
-
export function
|
|
317
|
-
const ret = wasm.
|
|
292
|
+
export function process_new_peer(peer_index, ip) {
|
|
293
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
318
294
|
return takeObject(ret);
|
|
319
295
|
}
|
|
320
296
|
|
|
321
297
|
/**
|
|
322
|
-
* @param {
|
|
323
|
-
* @
|
|
298
|
+
* @param {Array<any>} public_keys
|
|
299
|
+
* @param {BigUint64Array} amounts
|
|
300
|
+
* @param {bigint} fee
|
|
301
|
+
* @param {boolean} _force_merge
|
|
302
|
+
* @returns {Promise<WasmTransaction>}
|
|
324
303
|
*/
|
|
325
|
-
export function
|
|
326
|
-
const ret = wasm.
|
|
304
|
+
export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
|
|
305
|
+
const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
|
|
327
306
|
return takeObject(ret);
|
|
328
307
|
}
|
|
329
308
|
|
|
330
309
|
/**
|
|
310
|
+
* @param {bigint} peer_index
|
|
311
|
+
* @returns {Promise<void>}
|
|
312
|
+
*/
|
|
313
|
+
export function remove_stun_peer(peer_index) {
|
|
314
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
315
|
+
return takeObject(ret);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* @param {Uint8Array} buffer
|
|
331
320
|
* @param {string} private_key
|
|
332
321
|
* @returns {string}
|
|
333
322
|
*/
|
|
334
|
-
export function
|
|
323
|
+
export function sign_buffer(buffer, private_key) {
|
|
335
324
|
try {
|
|
336
325
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
337
|
-
wasm.
|
|
326
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
338
327
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
339
328
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
340
329
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -347,124 +336,103 @@ export function generate_public_key(private_key) {
|
|
|
347
336
|
}
|
|
348
337
|
}
|
|
349
338
|
|
|
350
|
-
/**
|
|
351
|
-
* @returns {Promise<Array<any>>}
|
|
352
|
-
*/
|
|
353
|
-
export function get_nft_list() {
|
|
354
|
-
const ret = wasm.get_nft_list();
|
|
355
|
-
return takeObject(ret);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
339
|
/**
|
|
359
340
|
* @param {Uint8Array} buffer
|
|
360
|
-
* @
|
|
361
|
-
* @param {string} public_key
|
|
362
|
-
* @returns {boolean}
|
|
363
|
-
*/
|
|
364
|
-
export function verify_signature(buffer, signature, public_key) {
|
|
365
|
-
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
366
|
-
return ret !== 0;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* @returns {Promise<string>}
|
|
371
|
-
*/
|
|
372
|
-
export function get_stats() {
|
|
373
|
-
const ret = wasm.get_stats();
|
|
374
|
-
return takeObject(ret);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* @returns {Promise<any>}
|
|
341
|
+
* @returns {string}
|
|
379
342
|
*/
|
|
380
|
-
export function
|
|
381
|
-
const ret = wasm.
|
|
343
|
+
export function hash(buffer) {
|
|
344
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
382
345
|
return takeObject(ret);
|
|
383
346
|
}
|
|
384
347
|
|
|
385
348
|
/**
|
|
386
|
-
* @returns {Promise<
|
|
349
|
+
* @returns {Promise<boolean>}
|
|
387
350
|
*/
|
|
388
|
-
export function
|
|
389
|
-
const ret = wasm.
|
|
351
|
+
export function produce_block_without_gt() {
|
|
352
|
+
const ret = wasm.produce_block_without_gt();
|
|
390
353
|
return takeObject(ret);
|
|
391
354
|
}
|
|
392
355
|
|
|
393
356
|
/**
|
|
394
|
-
* @
|
|
395
|
-
* @returns {string}
|
|
357
|
+
* @returns {Promise<Array<any>>}
|
|
396
358
|
*/
|
|
397
|
-
export function
|
|
398
|
-
const ret = wasm.
|
|
359
|
+
export function get_nft_list() {
|
|
360
|
+
const ret = wasm.get_nft_list();
|
|
399
361
|
return takeObject(ret);
|
|
400
362
|
}
|
|
401
363
|
|
|
402
364
|
/**
|
|
403
|
-
* @
|
|
365
|
+
* @param {bigint} peer_index
|
|
366
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
404
367
|
*/
|
|
405
|
-
export function
|
|
406
|
-
const ret = wasm.
|
|
368
|
+
export function get_peer(peer_index) {
|
|
369
|
+
const ret = wasm.get_peer(peer_index);
|
|
407
370
|
return takeObject(ret);
|
|
408
371
|
}
|
|
409
372
|
|
|
410
373
|
/**
|
|
411
|
-
* @param {bigint}
|
|
412
|
-
* @param {string} public_key
|
|
374
|
+
* @param {bigint} duration_in_ms
|
|
413
375
|
* @returns {Promise<void>}
|
|
414
376
|
*/
|
|
415
|
-
export function
|
|
416
|
-
const ret = wasm.
|
|
377
|
+
export function process_timer_event(duration_in_ms) {
|
|
378
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
417
379
|
return takeObject(ret);
|
|
418
380
|
}
|
|
419
381
|
|
|
420
382
|
/**
|
|
421
|
-
* @returns {Promise<
|
|
383
|
+
* @returns {Promise<boolean>}
|
|
422
384
|
*/
|
|
423
|
-
export function
|
|
424
|
-
const ret = wasm.
|
|
385
|
+
export function produce_block_with_gt() {
|
|
386
|
+
const ret = wasm.produce_block_with_gt();
|
|
425
387
|
return takeObject(ret);
|
|
426
388
|
}
|
|
427
389
|
|
|
428
390
|
/**
|
|
429
|
-
* @param {
|
|
430
|
-
* @param {
|
|
431
|
-
* @
|
|
391
|
+
* @param {string} slip1_utxo_key
|
|
392
|
+
* @param {string} slip2_utxo_key
|
|
393
|
+
* @param {string} slip3_utxo_key
|
|
394
|
+
* @param {number} left_count
|
|
395
|
+
* @param {number} right_count
|
|
396
|
+
* @param {Uint8Array} tx_msg
|
|
397
|
+
* @returns {Promise<WasmTransaction>}
|
|
432
398
|
*/
|
|
433
|
-
export function
|
|
434
|
-
const ret = wasm.
|
|
399
|
+
export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
400
|
+
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));
|
|
435
401
|
return takeObject(ret);
|
|
436
402
|
}
|
|
437
403
|
|
|
438
404
|
/**
|
|
439
|
-
* @
|
|
405
|
+
* @param {bigint} current_time
|
|
406
|
+
* @returns {Promise<void>}
|
|
440
407
|
*/
|
|
441
|
-
export function
|
|
442
|
-
const ret = wasm.
|
|
408
|
+
export function process_stat_interval(current_time) {
|
|
409
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
443
410
|
return takeObject(ret);
|
|
444
411
|
}
|
|
445
412
|
|
|
446
413
|
/**
|
|
447
|
-
* @
|
|
414
|
+
* @param {bigint} peer_index
|
|
415
|
+
* @param {string} public_key
|
|
416
|
+
* @returns {Promise<void>}
|
|
448
417
|
*/
|
|
449
|
-
export function
|
|
450
|
-
const ret = wasm.
|
|
418
|
+
export function process_stun_peer(peer_index, public_key) {
|
|
419
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
451
420
|
return takeObject(ret);
|
|
452
421
|
}
|
|
453
422
|
|
|
454
423
|
/**
|
|
455
|
-
* @returns {Promise<
|
|
424
|
+
* @returns {Promise<any>}
|
|
456
425
|
*/
|
|
457
|
-
export function
|
|
458
|
-
const ret = wasm.
|
|
426
|
+
export function get_confirmations() {
|
|
427
|
+
const ret = wasm.get_confirmations();
|
|
459
428
|
return takeObject(ret);
|
|
460
429
|
}
|
|
461
430
|
|
|
462
431
|
/**
|
|
463
|
-
* @param {bigint} threshold
|
|
464
432
|
* @returns {Promise<void>}
|
|
465
433
|
*/
|
|
466
|
-
export function
|
|
467
|
-
const ret = wasm.
|
|
434
|
+
export function start_from_received_ghost_chain() {
|
|
435
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
468
436
|
return takeObject(ret);
|
|
469
437
|
}
|
|
470
438
|
|
|
@@ -480,81 +448,105 @@ export function send_api_error(buffer, msg_index, peer_index) {
|
|
|
480
448
|
}
|
|
481
449
|
|
|
482
450
|
/**
|
|
483
|
-
* @
|
|
484
|
-
* @param {Uint8Array} tx_msg
|
|
485
|
-
* @returns {Promise<WasmTransaction>}
|
|
451
|
+
* @returns {Promise<Array<any>>}
|
|
486
452
|
*/
|
|
487
|
-
export function
|
|
488
|
-
const
|
|
489
|
-
const len0 = WASM_VECTOR_LEN;
|
|
490
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
453
|
+
export function get_mempool_txs() {
|
|
454
|
+
const ret = wasm.get_mempool_txs();
|
|
491
455
|
return takeObject(ret);
|
|
492
456
|
}
|
|
493
457
|
|
|
494
458
|
/**
|
|
459
|
+
* @param {string} private_key
|
|
495
460
|
* @returns {string}
|
|
496
461
|
*/
|
|
497
|
-
export function
|
|
498
|
-
|
|
462
|
+
export function generate_public_key(private_key) {
|
|
463
|
+
try {
|
|
464
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
465
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
466
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
467
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
468
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
469
|
+
if (r2) {
|
|
470
|
+
throw takeObject(r1);
|
|
471
|
+
}
|
|
472
|
+
return takeObject(r0);
|
|
473
|
+
} finally {
|
|
474
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @param {string} config_json
|
|
480
|
+
* @param {string} private_key
|
|
481
|
+
* @param {number} log_level_num
|
|
482
|
+
* @param {bigint} hasten_multiplier
|
|
483
|
+
* @param {boolean} delete_old_blocks
|
|
484
|
+
* @returns {Promise<any>}
|
|
485
|
+
*/
|
|
486
|
+
export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
487
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
499
488
|
return takeObject(ret);
|
|
500
489
|
}
|
|
501
490
|
|
|
502
491
|
/**
|
|
492
|
+
* @param {Uint8Array} buffer
|
|
493
|
+
* @param {string} signature
|
|
494
|
+
* @param {string} public_key
|
|
495
|
+
* @returns {boolean}
|
|
496
|
+
*/
|
|
497
|
+
export function verify_signature(buffer, signature, public_key) {
|
|
498
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
499
|
+
return ret !== 0;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* @param {Uint8Array} buffer
|
|
503
504
|
* @param {bigint} peer_index
|
|
504
505
|
* @returns {Promise<void>}
|
|
505
506
|
*/
|
|
506
|
-
export function
|
|
507
|
-
const ret = wasm.
|
|
507
|
+
export function process_msg_buffer_from_peer(buffer, peer_index) {
|
|
508
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
508
509
|
return takeObject(ret);
|
|
509
510
|
}
|
|
510
511
|
|
|
511
512
|
/**
|
|
512
|
-
* @param {
|
|
513
|
-
* @
|
|
513
|
+
* @param {bigint} num
|
|
514
|
+
* @param {bigint} deposit
|
|
515
|
+
* @param {Uint8Array} tx_msg
|
|
516
|
+
* @param {bigint} fee
|
|
517
|
+
* @param {string} recipient_public_key
|
|
518
|
+
* @param {string} nft_type
|
|
519
|
+
* @returns {Promise<WasmTransaction>}
|
|
514
520
|
*/
|
|
515
|
-
export function
|
|
516
|
-
|
|
517
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
518
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
521
|
+
export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
522
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
519
523
|
return takeObject(ret);
|
|
520
524
|
}
|
|
521
525
|
|
|
522
526
|
/**
|
|
523
|
-
* @returns {Promise<
|
|
527
|
+
* @returns {Promise<WasmBlockchain>}
|
|
524
528
|
*/
|
|
525
|
-
export function
|
|
526
|
-
const ret = wasm.
|
|
529
|
+
export function get_blockchain() {
|
|
530
|
+
const ret = wasm.get_blockchain();
|
|
527
531
|
return takeObject(ret);
|
|
528
532
|
}
|
|
529
533
|
|
|
530
534
|
/**
|
|
531
|
-
* @param {Uint8Array} buffer
|
|
532
535
|
* @param {Uint8Array} hash
|
|
533
536
|
* @param {bigint} block_id
|
|
534
537
|
* @param {bigint} peer_index
|
|
535
538
|
* @returns {Promise<void>}
|
|
536
539
|
*/
|
|
537
|
-
export function
|
|
538
|
-
const ret = wasm.
|
|
539
|
-
return takeObject(ret);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* @param {string} slip1_utxo_key
|
|
544
|
-
* @param {string} slip2_utxo_key
|
|
545
|
-
* @param {string} slip3_utxo_key
|
|
546
|
-
* @returns {Promise<WasmTransaction>}
|
|
547
|
-
*/
|
|
548
|
-
export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
|
|
549
|
-
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
|
|
540
|
+
export function process_failed_block_fetch(hash, block_id, peer_index) {
|
|
541
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
550
542
|
return takeObject(ret);
|
|
551
543
|
}
|
|
552
544
|
|
|
553
545
|
/**
|
|
554
|
-
* @returns {
|
|
546
|
+
* @returns {string}
|
|
555
547
|
*/
|
|
556
|
-
export function
|
|
557
|
-
const ret = wasm.
|
|
548
|
+
export function generate_private_key() {
|
|
549
|
+
const ret = wasm.generate_private_key();
|
|
558
550
|
return takeObject(ret);
|
|
559
551
|
}
|
|
560
552
|
|
|
@@ -571,41 +563,61 @@ export function create_transaction(public_key, amount, fee, force_merge) {
|
|
|
571
563
|
}
|
|
572
564
|
|
|
573
565
|
/**
|
|
574
|
-
* @
|
|
566
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
567
|
+
* @returns {Promise<void>}
|
|
575
568
|
*/
|
|
576
|
-
export function
|
|
577
|
-
|
|
569
|
+
export function update_from_balance_snapshot(snapshot) {
|
|
570
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
571
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
572
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
578
573
|
return takeObject(ret);
|
|
579
574
|
}
|
|
580
575
|
|
|
581
576
|
/**
|
|
577
|
+
* @param {WasmTransaction} tx
|
|
582
578
|
* @returns {Promise<void>}
|
|
583
579
|
*/
|
|
584
|
-
export function
|
|
585
|
-
|
|
580
|
+
export function propagate_transaction(tx) {
|
|
581
|
+
_assertClass(tx, WasmTransaction);
|
|
582
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
586
583
|
return takeObject(ret);
|
|
587
584
|
}
|
|
588
585
|
|
|
589
586
|
/**
|
|
590
587
|
* @param {bigint} peer_index
|
|
591
|
-
* @returns {Promise<
|
|
588
|
+
* @returns {Promise<void>}
|
|
592
589
|
*/
|
|
593
|
-
export function
|
|
594
|
-
const ret = wasm.
|
|
590
|
+
export function process_peer_disconnection(peer_index) {
|
|
591
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
595
592
|
return takeObject(ret);
|
|
596
593
|
}
|
|
597
594
|
|
|
598
595
|
/**
|
|
599
|
-
* @param {
|
|
600
|
-
* @param {
|
|
601
|
-
* @param {
|
|
602
|
-
* @param {
|
|
603
|
-
* @
|
|
604
|
-
* @param {Uint8Array} tx_msg
|
|
605
|
-
* @returns {Promise<WasmTransaction>}
|
|
596
|
+
* @param {Uint8Array} buffer
|
|
597
|
+
* @param {Uint8Array} hash
|
|
598
|
+
* @param {bigint} block_id
|
|
599
|
+
* @param {bigint} peer_index
|
|
600
|
+
* @returns {Promise<void>}
|
|
606
601
|
*/
|
|
607
|
-
export function
|
|
608
|
-
const ret = wasm.
|
|
602
|
+
export function process_fetched_block(buffer, hash, block_id, peer_index) {
|
|
603
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
604
|
+
return takeObject(ret);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* @param {string} public_key
|
|
609
|
+
* @returns {Promise<Array<any>>}
|
|
610
|
+
*/
|
|
611
|
+
export function get_account_slips(public_key) {
|
|
612
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
613
|
+
return takeObject(ret);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* @returns {Promise<Array<any>>}
|
|
618
|
+
*/
|
|
619
|
+
export function get_peers() {
|
|
620
|
+
const ret = wasm.get_peers();
|
|
609
621
|
return takeObject(ret);
|
|
610
622
|
}
|
|
611
623
|
|
|
@@ -619,134 +631,121 @@ export function is_valid_public_key(key) {
|
|
|
619
631
|
}
|
|
620
632
|
|
|
621
633
|
/**
|
|
622
|
-
* @param {
|
|
623
|
-
* @returns {Promise<
|
|
634
|
+
* @param {string} block_hash
|
|
635
|
+
* @returns {Promise<WasmBlock>}
|
|
624
636
|
*/
|
|
625
|
-
export function
|
|
626
|
-
const ret = wasm.
|
|
637
|
+
export function get_block(block_hash) {
|
|
638
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
627
639
|
return takeObject(ret);
|
|
628
640
|
}
|
|
629
641
|
|
|
630
642
|
/**
|
|
631
|
-
* @
|
|
632
|
-
* @param {string} private_key
|
|
633
|
-
* @param {number} log_level_num
|
|
634
|
-
* @param {bigint} hasten_multiplier
|
|
635
|
-
* @param {boolean} delete_old_blocks
|
|
636
|
-
* @returns {Promise<any>}
|
|
643
|
+
* @returns {Promise<string>}
|
|
637
644
|
*/
|
|
638
|
-
export function
|
|
639
|
-
const ret = wasm.
|
|
645
|
+
export function get_latest_block_hash() {
|
|
646
|
+
const ret = wasm.get_latest_block_hash();
|
|
640
647
|
return takeObject(ret);
|
|
641
648
|
}
|
|
642
649
|
|
|
643
650
|
/**
|
|
651
|
+
* @param {bigint} amt
|
|
644
652
|
* @param {string} slip1_utxo_key
|
|
645
653
|
* @param {string} slip2_utxo_key
|
|
646
654
|
* @param {string} slip3_utxo_key
|
|
647
|
-
* @param {
|
|
648
|
-
* @param {number} right_count
|
|
655
|
+
* @param {string} recipient_public_key
|
|
649
656
|
* @param {Uint8Array} tx_msg
|
|
650
657
|
* @returns {Promise<WasmTransaction>}
|
|
651
658
|
*/
|
|
652
|
-
export function
|
|
653
|
-
const ret = wasm.
|
|
654
|
-
return takeObject(ret);
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* @param {Uint8Array} buffer
|
|
659
|
-
* @param {number} msg_index
|
|
660
|
-
* @param {bigint} peer_index
|
|
661
|
-
* @returns {Promise<void>}
|
|
662
|
-
*/
|
|
663
|
-
export function send_api_call(buffer, msg_index, peer_index) {
|
|
664
|
-
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
659
|
+
export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
660
|
+
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));
|
|
665
661
|
return takeObject(ret);
|
|
666
662
|
}
|
|
667
663
|
|
|
668
664
|
/**
|
|
669
|
-
* @
|
|
670
|
-
* @returns {Promise<Array<any>>}
|
|
665
|
+
* @returns {Promise<bigint>}
|
|
671
666
|
*/
|
|
672
|
-
export function
|
|
673
|
-
const ret = wasm.
|
|
667
|
+
export function get_next_peer_index() {
|
|
668
|
+
const ret = wasm.get_next_peer_index();
|
|
674
669
|
return takeObject(ret);
|
|
675
670
|
}
|
|
676
671
|
|
|
677
672
|
/**
|
|
678
|
-
* @param {WasmTransaction} tx
|
|
679
673
|
* @returns {Promise<void>}
|
|
680
674
|
*/
|
|
681
|
-
export function
|
|
682
|
-
|
|
683
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
675
|
+
export function disable_producing_blocks_by_timer() {
|
|
676
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
684
677
|
return takeObject(ret);
|
|
685
678
|
}
|
|
686
679
|
|
|
687
680
|
/**
|
|
681
|
+
* @param {Uint8Array} buffer
|
|
682
|
+
* @param {number} msg_index
|
|
688
683
|
* @param {bigint} peer_index
|
|
689
|
-
* @param {string} ip
|
|
690
684
|
* @returns {Promise<void>}
|
|
691
685
|
*/
|
|
692
|
-
export function
|
|
693
|
-
const ret = wasm.
|
|
686
|
+
export function send_api_call(buffer, msg_index, peer_index) {
|
|
687
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
694
688
|
return takeObject(ret);
|
|
695
689
|
}
|
|
696
690
|
|
|
697
691
|
/**
|
|
698
|
-
* @param {
|
|
699
|
-
* @returns {Promise<
|
|
692
|
+
* @param {Array<any>} keys
|
|
693
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
700
694
|
*/
|
|
701
|
-
export function
|
|
702
|
-
const ret = wasm.
|
|
695
|
+
export function get_balance_snapshot(keys) {
|
|
696
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
703
697
|
return takeObject(ret);
|
|
704
698
|
}
|
|
705
699
|
|
|
706
700
|
/**
|
|
701
|
+
* @param {Uint8Array} buffer
|
|
702
|
+
* @param {number} msg_index
|
|
707
703
|
* @param {bigint} peer_index
|
|
708
704
|
* @returns {Promise<void>}
|
|
709
705
|
*/
|
|
710
|
-
export function
|
|
711
|
-
const ret = wasm.
|
|
706
|
+
export function send_api_success(buffer, msg_index, peer_index) {
|
|
707
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
712
708
|
return takeObject(ret);
|
|
713
709
|
}
|
|
714
710
|
|
|
715
711
|
/**
|
|
716
|
-
* @param {
|
|
717
|
-
* @param {bigint} deposit
|
|
712
|
+
* @param {string} nft_id_hex
|
|
718
713
|
* @param {Uint8Array} tx_msg
|
|
719
|
-
* @param {bigint} fee
|
|
720
|
-
* @param {string} recipient_public_key
|
|
721
|
-
* @param {string} nft_type
|
|
722
714
|
* @returns {Promise<WasmTransaction>}
|
|
723
715
|
*/
|
|
724
|
-
export function
|
|
725
|
-
const
|
|
716
|
+
export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
|
|
717
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
718
|
+
const len0 = WASM_VECTOR_LEN;
|
|
719
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
726
720
|
return takeObject(ret);
|
|
727
721
|
}
|
|
728
722
|
|
|
729
723
|
/**
|
|
730
|
-
* @param {
|
|
731
|
-
* @param {
|
|
732
|
-
* @
|
|
724
|
+
* @param {number} major
|
|
725
|
+
* @param {number} minor
|
|
726
|
+
* @param {number} patch
|
|
727
|
+
* @returns {Promise<void>}
|
|
733
728
|
*/
|
|
734
|
-
export function
|
|
729
|
+
export function set_wallet_version(major, minor, patch) {
|
|
730
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
731
|
+
return takeObject(ret);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
function handleError(f, args) {
|
|
735
735
|
try {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
740
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
741
|
-
if (r2) {
|
|
742
|
-
throw takeObject(r1);
|
|
743
|
-
}
|
|
744
|
-
return takeObject(r0);
|
|
745
|
-
} finally {
|
|
746
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
736
|
+
return f.apply(this, args);
|
|
737
|
+
} catch (e) {
|
|
738
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
747
739
|
}
|
|
748
740
|
}
|
|
749
741
|
|
|
742
|
+
let stack_pointer = 128;
|
|
743
|
+
|
|
744
|
+
function addBorrowedObject(obj) {
|
|
745
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
746
|
+
heap[--stack_pointer] = obj;
|
|
747
|
+
return stack_pointer;
|
|
748
|
+
}
|
|
750
749
|
function __wbg_adapter_406(arg0, arg1, arg2, arg3) {
|
|
751
750
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h58ba5fc31ee09770(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
752
751
|
}
|
|
@@ -2669,8 +2668,8 @@ async function __wbg_load(module, imports) {
|
|
|
2669
2668
|
function __wbg_get_imports() {
|
|
2670
2669
|
const imports = {};
|
|
2671
2670
|
imports.wbg = {};
|
|
2672
|
-
imports.wbg.
|
|
2673
|
-
const ret =
|
|
2671
|
+
imports.wbg.__wbg_wasmwallet_new = function(arg0) {
|
|
2672
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2674
2673
|
return addHeapObject(ret);
|
|
2675
2674
|
};
|
|
2676
2675
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
@@ -2680,12 +2679,8 @@ function __wbg_get_imports() {
|
|
|
2680
2679
|
const ret = BigInt.asUintN(64, arg0);
|
|
2681
2680
|
return addHeapObject(ret);
|
|
2682
2681
|
};
|
|
2683
|
-
imports.wbg.
|
|
2684
|
-
const ret =
|
|
2685
|
-
return addHeapObject(ret);
|
|
2686
|
-
};
|
|
2687
|
-
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
2688
|
-
const ret = WasmTransaction.__wrap(arg0);
|
|
2682
|
+
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2683
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2689
2684
|
return addHeapObject(ret);
|
|
2690
2685
|
};
|
|
2691
2686
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
@@ -2696,28 +2691,20 @@ function __wbg_get_imports() {
|
|
|
2696
2691
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2697
2692
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2698
2693
|
};
|
|
2699
|
-
imports.wbg.
|
|
2700
|
-
const ret =
|
|
2701
|
-
return addHeapObject(ret);
|
|
2702
|
-
};
|
|
2703
|
-
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2704
|
-
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2705
|
-
return addHeapObject(ret);
|
|
2706
|
-
};
|
|
2707
|
-
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
2708
|
-
const ret = WasmPeer.__wrap(arg0);
|
|
2694
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
2695
|
+
const ret = getObject(arg0);
|
|
2709
2696
|
return addHeapObject(ret);
|
|
2710
2697
|
};
|
|
2711
|
-
imports.wbg.
|
|
2712
|
-
const ret =
|
|
2698
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2699
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2713
2700
|
return addHeapObject(ret);
|
|
2714
2701
|
};
|
|
2715
|
-
imports.wbg.
|
|
2716
|
-
const ret =
|
|
2702
|
+
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
2703
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2717
2704
|
return addHeapObject(ret);
|
|
2718
2705
|
};
|
|
2719
|
-
imports.wbg.
|
|
2720
|
-
const ret =
|
|
2706
|
+
imports.wbg.__wbg_wasmblock_new = function(arg0) {
|
|
2707
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2721
2708
|
return addHeapObject(ret);
|
|
2722
2709
|
};
|
|
2723
2710
|
imports.wbg.__wbg_wasmnft_new = function(arg0) {
|
|
@@ -2728,6 +2715,18 @@ function __wbg_get_imports() {
|
|
|
2728
2715
|
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2729
2716
|
return addHeapObject(ret);
|
|
2730
2717
|
};
|
|
2718
|
+
imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
|
|
2719
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2720
|
+
return addHeapObject(ret);
|
|
2721
|
+
};
|
|
2722
|
+
imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2723
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2724
|
+
return addHeapObject(ret);
|
|
2725
|
+
};
|
|
2726
|
+
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
2727
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2728
|
+
return addHeapObject(ret);
|
|
2729
|
+
};
|
|
2731
2730
|
imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2732
2731
|
const ret = WasmPeerService.__wrap(arg0);
|
|
2733
2732
|
return addHeapObject(ret);
|
|
@@ -2736,6 +2735,10 @@ function __wbg_get_imports() {
|
|
|
2736
2735
|
const ret = WasmHop.__wrap(arg0);
|
|
2737
2736
|
return addHeapObject(ret);
|
|
2738
2737
|
};
|
|
2738
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2739
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2740
|
+
return addHeapObject(ret);
|
|
2741
|
+
};
|
|
2739
2742
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
2740
2743
|
const val = getObject(arg0);
|
|
2741
2744
|
const ret = typeof(val) === 'object' && val !== null;
|
|
@@ -2749,7 +2752,7 @@ function __wbg_get_imports() {
|
|
|
2749
2752
|
const ret = getObject(arg0) in getObject(arg1);
|
|
2750
2753
|
return ret;
|
|
2751
2754
|
};
|
|
2752
|
-
imports.wbg.
|
|
2755
|
+
imports.wbg.__wbg_flushdata_808d365e0b29c0a2 = function(arg0, arg1) {
|
|
2753
2756
|
let deferred0_0;
|
|
2754
2757
|
let deferred0_1;
|
|
2755
2758
|
try {
|
|
@@ -2760,7 +2763,7 @@ function __wbg_get_imports() {
|
|
|
2760
2763
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2761
2764
|
}
|
|
2762
2765
|
};
|
|
2763
|
-
imports.wbg.
|
|
2766
|
+
imports.wbg.__wbg_readvalue_477650491ff9e695 = function() { return handleError(function (arg0, arg1) {
|
|
2764
2767
|
let deferred0_0;
|
|
2765
2768
|
let deferred0_1;
|
|
2766
2769
|
try {
|
|
@@ -2772,13 +2775,13 @@ function __wbg_get_imports() {
|
|
|
2772
2775
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2773
2776
|
}
|
|
2774
2777
|
}, arguments) };
|
|
2775
|
-
imports.wbg.
|
|
2778
|
+
imports.wbg.__wbg_loadwallet_1fe5d48fd952ef73 = function() {
|
|
2776
2779
|
MsgHandler.load_wallet();
|
|
2777
2780
|
};
|
|
2778
|
-
imports.wbg.
|
|
2781
|
+
imports.wbg.__wbg_savewallet_b940ab300375ff10 = function() {
|
|
2779
2782
|
MsgHandler.save_wallet();
|
|
2780
2783
|
};
|
|
2781
|
-
imports.wbg.
|
|
2784
|
+
imports.wbg.__wbg_writevalue_a276627f5b0daa75 = function(arg0, arg1, arg2) {
|
|
2782
2785
|
let deferred0_0;
|
|
2783
2786
|
let deferred0_1;
|
|
2784
2787
|
try {
|
|
@@ -2789,7 +2792,7 @@ function __wbg_get_imports() {
|
|
|
2789
2792
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2790
2793
|
}
|
|
2791
2794
|
};
|
|
2792
|
-
imports.wbg.
|
|
2795
|
+
imports.wbg.__wbg_appendvalue_a0ebb6a0493e9646 = function(arg0, arg1, arg2) {
|
|
2793
2796
|
let deferred0_0;
|
|
2794
2797
|
let deferred0_1;
|
|
2795
2798
|
try {
|
|
@@ -2800,7 +2803,7 @@ function __wbg_get_imports() {
|
|
|
2800
2803
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2801
2804
|
}
|
|
2802
2805
|
};
|
|
2803
|
-
imports.wbg.
|
|
2806
|
+
imports.wbg.__wbg_removevalue_bc2f16573f079618 = function() { return handleError(function (arg0, arg1) {
|
|
2804
2807
|
let deferred0_0;
|
|
2805
2808
|
let deferred0_1;
|
|
2806
2809
|
try {
|
|
@@ -2812,10 +2815,10 @@ function __wbg_get_imports() {
|
|
|
2812
2815
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2813
2816
|
}
|
|
2814
2817
|
}, arguments) };
|
|
2815
|
-
imports.wbg.
|
|
2818
|
+
imports.wbg.__wbg_sendmessage_cdd0bd5423f92af1 = function(arg0, arg1) {
|
|
2816
2819
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2817
2820
|
};
|
|
2818
|
-
imports.wbg.
|
|
2821
|
+
imports.wbg.__wbg_connecttopeer_736987b1f0448891 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2819
2822
|
let deferred0_0;
|
|
2820
2823
|
let deferred0_1;
|
|
2821
2824
|
try {
|
|
@@ -2827,13 +2830,13 @@ function __wbg_get_imports() {
|
|
|
2827
2830
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2828
2831
|
}
|
|
2829
2832
|
}, arguments) };
|
|
2830
|
-
imports.wbg.
|
|
2833
|
+
imports.wbg.__wbg_getmyservices_330667a8654f35a7 = function() {
|
|
2831
2834
|
const ret = MsgHandler.get_my_services();
|
|
2832
2835
|
_assertClass(ret, WasmPeerServiceList);
|
|
2833
2836
|
var ptr1 = ret.__destroy_into_raw();
|
|
2834
2837
|
return ptr1;
|
|
2835
2838
|
};
|
|
2836
|
-
imports.wbg.
|
|
2839
|
+
imports.wbg.__wbg_isexistingfile_1613c50ce134b84a = function() { return handleError(function (arg0, arg1) {
|
|
2837
2840
|
let deferred0_0;
|
|
2838
2841
|
let deferred0_1;
|
|
2839
2842
|
try {
|
|
@@ -2845,27 +2848,27 @@ function __wbg_get_imports() {
|
|
|
2845
2848
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2846
2849
|
}
|
|
2847
2850
|
}, arguments) };
|
|
2848
|
-
imports.wbg.
|
|
2851
|
+
imports.wbg.__wbg_processapicall_dbf1c9f895fcb1cd = function(arg0, arg1, arg2) {
|
|
2849
2852
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2850
2853
|
};
|
|
2851
|
-
imports.wbg.
|
|
2854
|
+
imports.wbg.__wbg_processapierror_595ac1369f5acea7 = function(arg0, arg1, arg2) {
|
|
2852
2855
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2853
2856
|
};
|
|
2854
|
-
imports.wbg.
|
|
2857
|
+
imports.wbg.__wbg_processapisuccess_695629f3f7756a39 = function(arg0, arg1, arg2) {
|
|
2855
2858
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2856
2859
|
};
|
|
2857
|
-
imports.wbg.
|
|
2860
|
+
imports.wbg.__wbg_sendmessagetoall_e023831c7abb9bd3 = function(arg0, arg1) {
|
|
2858
2861
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2859
2862
|
};
|
|
2860
|
-
imports.wbg.
|
|
2863
|
+
imports.wbg.__wbg_disconnectfrompeer_b547175d81b1476c = function() { return handleError(function (arg0) {
|
|
2861
2864
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2862
2865
|
return addHeapObject(ret);
|
|
2863
2866
|
}, arguments) };
|
|
2864
|
-
imports.wbg.
|
|
2867
|
+
imports.wbg.__wbg_loadblockfilelist_75f095d9dae692ce = function() { return handleError(function () {
|
|
2865
2868
|
const ret = MsgHandler.load_block_file_list();
|
|
2866
2869
|
return addHeapObject(ret);
|
|
2867
2870
|
}, arguments) };
|
|
2868
|
-
imports.wbg.
|
|
2871
|
+
imports.wbg.__wbg_sendinterfaceevent_00bfe127965dc99e = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2869
2872
|
let deferred0_0;
|
|
2870
2873
|
let deferred0_1;
|
|
2871
2874
|
let deferred1_0;
|
|
@@ -2881,7 +2884,7 @@ function __wbg_get_imports() {
|
|
|
2881
2884
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2882
2885
|
}
|
|
2883
2886
|
};
|
|
2884
|
-
imports.wbg.
|
|
2887
|
+
imports.wbg.__wbg_sendblocksuccess_63460f2639b4b899 = function(arg0, arg1, arg2) {
|
|
2885
2888
|
let deferred0_0;
|
|
2886
2889
|
let deferred0_1;
|
|
2887
2890
|
try {
|
|
@@ -2892,10 +2895,10 @@ function __wbg_get_imports() {
|
|
|
2892
2895
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2893
2896
|
}
|
|
2894
2897
|
};
|
|
2895
|
-
imports.wbg.
|
|
2898
|
+
imports.wbg.__wbg_sendwalletupdate_3ef24be988fc4dd1 = function() {
|
|
2896
2899
|
MsgHandler.send_wallet_update();
|
|
2897
2900
|
};
|
|
2898
|
-
imports.wbg.
|
|
2901
|
+
imports.wbg.__wbg_sendnewversionalert_e45716b22ec97837 = function(arg0, arg1, arg2) {
|
|
2899
2902
|
let deferred0_0;
|
|
2900
2903
|
let deferred0_1;
|
|
2901
2904
|
try {
|
|
@@ -2906,13 +2909,13 @@ function __wbg_get_imports() {
|
|
|
2906
2909
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2907
2910
|
}
|
|
2908
2911
|
};
|
|
2909
|
-
imports.wbg.
|
|
2912
|
+
imports.wbg.__wbg_sendblockfetchstatusevent_cf674bcce95292a6 = function(arg0) {
|
|
2910
2913
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2911
2914
|
};
|
|
2912
|
-
imports.wbg.
|
|
2915
|
+
imports.wbg.__wbg_sendnewchaindetectedevent_502482fa170b328f = function() {
|
|
2913
2916
|
MsgHandler.send_new_chain_detected_event();
|
|
2914
2917
|
};
|
|
2915
|
-
imports.wbg.
|
|
2918
|
+
imports.wbg.__wbg_fetchblockfrompeer_5132eaf236da1718 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2916
2919
|
let deferred0_0;
|
|
2917
2920
|
let deferred0_1;
|
|
2918
2921
|
try {
|
|
@@ -2924,21 +2927,17 @@ function __wbg_get_imports() {
|
|
|
2924
2927
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2925
2928
|
}
|
|
2926
2929
|
}, arguments) };
|
|
2927
|
-
imports.wbg.
|
|
2930
|
+
imports.wbg.__wbg_ensuredirectoryexists_491b0c004ede35e8 = function() { return handleError(function (arg0, arg1) {
|
|
2928
2931
|
let deferred0_0;
|
|
2929
2932
|
let deferred0_1;
|
|
2930
2933
|
try {
|
|
2931
2934
|
deferred0_0 = arg0;
|
|
2932
2935
|
deferred0_1 = arg1;
|
|
2933
|
-
MsgHandler.
|
|
2936
|
+
MsgHandler.ensure_directory_exists(getStringFromWasm0(arg0, arg1));
|
|
2934
2937
|
} finally {
|
|
2935
2938
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2936
2939
|
}
|
|
2937
2940
|
}, arguments) };
|
|
2938
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2939
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2940
|
-
return addHeapObject(ret);
|
|
2941
|
-
};
|
|
2942
2941
|
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2943
2942
|
const ret = getObject(arg0) == getObject(arg1);
|
|
2944
2943
|
return ret;
|
|
@@ -3247,8 +3246,8 @@ function __wbg_get_imports() {
|
|
|
3247
3246
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
3248
3247
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
3249
3248
|
};
|
|
3250
|
-
imports.wbg.
|
|
3251
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3249
|
+
imports.wbg.__wbindgen_closure_wrapper1558 = function(arg0, arg1, arg2) {
|
|
3250
|
+
const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
|
|
3252
3251
|
return addHeapObject(ret);
|
|
3253
3252
|
};
|
|
3254
3253
|
|