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