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/node/index.js
CHANGED
|
@@ -1,44 +1,17 @@
|
|
|
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 {
|
|
6
|
-
|
|
7
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
8
|
-
|
|
9
|
-
cachedTextDecoder.decode();
|
|
10
|
-
|
|
11
|
-
let cachedUint8Memory0 = null;
|
|
12
|
-
|
|
13
|
-
function getUint8Memory0() {
|
|
14
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
15
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
16
|
-
}
|
|
17
|
-
return cachedUint8Memory0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function getStringFromWasm0(ptr, len) {
|
|
21
|
-
ptr = ptr >>> 0;
|
|
22
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
23
|
-
}
|
|
4
|
+
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-86859bf1424d0da8/js/msg_handler.js`);
|
|
5
|
+
const { TextEncoder, TextDecoder } = require(`util`);
|
|
24
6
|
|
|
25
7
|
const heap = new Array(128).fill(undefined);
|
|
26
8
|
|
|
27
9
|
heap.push(undefined, null, true, false);
|
|
28
10
|
|
|
29
|
-
let heap_next = heap.length;
|
|
30
|
-
|
|
31
|
-
function addHeapObject(obj) {
|
|
32
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
33
|
-
const idx = heap_next;
|
|
34
|
-
heap_next = heap[idx];
|
|
35
|
-
|
|
36
|
-
heap[idx] = obj;
|
|
37
|
-
return idx;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
11
|
function getObject(idx) { return heap[idx]; }
|
|
41
12
|
|
|
13
|
+
let heap_next = heap.length;
|
|
14
|
+
|
|
42
15
|
function dropObject(idx) {
|
|
43
16
|
if (idx < 132) return;
|
|
44
17
|
heap[idx] = heap_next;
|
|
@@ -51,8 +24,26 @@ function takeObject(idx) {
|
|
|
51
24
|
return ret;
|
|
52
25
|
}
|
|
53
26
|
|
|
27
|
+
function addHeapObject(obj) {
|
|
28
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
29
|
+
const idx = heap_next;
|
|
30
|
+
heap_next = heap[idx];
|
|
31
|
+
|
|
32
|
+
heap[idx] = obj;
|
|
33
|
+
return idx;
|
|
34
|
+
}
|
|
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,115 +228,104 @@ 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
|
-
* @returns {Promise<
|
|
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
|
-
const ret = wasm.
|
|
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));
|
|
267
253
|
return takeObject(ret);
|
|
268
254
|
};
|
|
269
255
|
|
|
270
256
|
/**
|
|
271
|
-
* @
|
|
272
|
-
* @param {BigUint64Array} amounts
|
|
273
|
-
* @param {bigint} fee
|
|
274
|
-
* @param {boolean} _force_merge
|
|
275
|
-
* @returns {Promise<WasmTransaction>}
|
|
257
|
+
* @returns {Promise<string>}
|
|
276
258
|
*/
|
|
277
|
-
module.exports.
|
|
278
|
-
const ret = wasm.
|
|
259
|
+
module.exports.get_congestion_stats = function() {
|
|
260
|
+
const ret = wasm.get_congestion_stats();
|
|
279
261
|
return takeObject(ret);
|
|
280
262
|
};
|
|
281
263
|
|
|
282
264
|
/**
|
|
283
|
-
* @
|
|
265
|
+
* @param {bigint} threshold
|
|
266
|
+
* @returns {Promise<void>}
|
|
284
267
|
*/
|
|
285
|
-
module.exports.
|
|
286
|
-
const ret = wasm.
|
|
268
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
269
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
287
270
|
return takeObject(ret);
|
|
288
271
|
};
|
|
289
272
|
|
|
290
273
|
/**
|
|
291
|
-
* @
|
|
292
|
-
* @param {number} msg_index
|
|
293
|
-
* @param {bigint} peer_index
|
|
294
|
-
* @returns {Promise<void>}
|
|
274
|
+
* @returns {Promise<string>}
|
|
295
275
|
*/
|
|
296
|
-
module.exports.
|
|
297
|
-
const ret = wasm.
|
|
276
|
+
module.exports.get_peer_stats = function() {
|
|
277
|
+
const ret = wasm.get_peer_stats();
|
|
298
278
|
return takeObject(ret);
|
|
299
279
|
};
|
|
300
280
|
|
|
301
281
|
/**
|
|
302
|
-
* @
|
|
303
|
-
* @param {number} minor
|
|
304
|
-
* @param {number} patch
|
|
305
|
-
* @returns {Promise<void>}
|
|
282
|
+
* @returns {Promise<WasmWallet>}
|
|
306
283
|
*/
|
|
307
|
-
module.exports.
|
|
308
|
-
const ret = wasm.
|
|
284
|
+
module.exports.get_wallet = function() {
|
|
285
|
+
const ret = wasm.get_wallet();
|
|
309
286
|
return takeObject(ret);
|
|
310
287
|
};
|
|
311
288
|
|
|
312
289
|
/**
|
|
313
|
-
* @param {Uint8Array} hash
|
|
314
|
-
* @param {bigint} block_id
|
|
315
290
|
* @param {bigint} peer_index
|
|
291
|
+
* @param {string} ip
|
|
316
292
|
* @returns {Promise<void>}
|
|
317
293
|
*/
|
|
318
|
-
module.exports.
|
|
319
|
-
const ret = wasm.
|
|
294
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
295
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
320
296
|
return takeObject(ret);
|
|
321
297
|
};
|
|
322
298
|
|
|
323
299
|
/**
|
|
324
|
-
* @param {
|
|
325
|
-
* @
|
|
300
|
+
* @param {Array<any>} public_keys
|
|
301
|
+
* @param {BigUint64Array} amounts
|
|
302
|
+
* @param {bigint} fee
|
|
303
|
+
* @param {boolean} _force_merge
|
|
304
|
+
* @returns {Promise<WasmTransaction>}
|
|
326
305
|
*/
|
|
327
|
-
module.exports.
|
|
328
|
-
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);
|
|
329
308
|
return takeObject(ret);
|
|
330
309
|
};
|
|
331
310
|
|
|
332
311
|
/**
|
|
312
|
+
* @param {bigint} peer_index
|
|
313
|
+
* @returns {Promise<void>}
|
|
314
|
+
*/
|
|
315
|
+
module.exports.remove_stun_peer = function(peer_index) {
|
|
316
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
317
|
+
return takeObject(ret);
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @param {Uint8Array} buffer
|
|
333
322
|
* @param {string} private_key
|
|
334
323
|
* @returns {string}
|
|
335
324
|
*/
|
|
336
|
-
module.exports.
|
|
325
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
337
326
|
try {
|
|
338
327
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
339
|
-
wasm.
|
|
328
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
340
329
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
341
330
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
342
331
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -349,124 +338,103 @@ module.exports.generate_public_key = function(private_key) {
|
|
|
349
338
|
}
|
|
350
339
|
};
|
|
351
340
|
|
|
352
|
-
/**
|
|
353
|
-
* @returns {Promise<Array<any>>}
|
|
354
|
-
*/
|
|
355
|
-
module.exports.get_nft_list = function() {
|
|
356
|
-
const ret = wasm.get_nft_list();
|
|
357
|
-
return takeObject(ret);
|
|
358
|
-
};
|
|
359
|
-
|
|
360
341
|
/**
|
|
361
342
|
* @param {Uint8Array} buffer
|
|
362
|
-
* @
|
|
363
|
-
* @param {string} public_key
|
|
364
|
-
* @returns {boolean}
|
|
365
|
-
*/
|
|
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();
|
|
376
|
-
return takeObject(ret);
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* @returns {Promise<any>}
|
|
343
|
+
* @returns {string}
|
|
381
344
|
*/
|
|
382
|
-
module.exports.
|
|
383
|
-
const ret = wasm.
|
|
345
|
+
module.exports.hash = function(buffer) {
|
|
346
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
384
347
|
return takeObject(ret);
|
|
385
348
|
};
|
|
386
349
|
|
|
387
350
|
/**
|
|
388
|
-
* @returns {Promise<
|
|
351
|
+
* @returns {Promise<boolean>}
|
|
389
352
|
*/
|
|
390
|
-
module.exports.
|
|
391
|
-
const ret = wasm.
|
|
353
|
+
module.exports.produce_block_without_gt = function() {
|
|
354
|
+
const ret = wasm.produce_block_without_gt();
|
|
392
355
|
return takeObject(ret);
|
|
393
356
|
};
|
|
394
357
|
|
|
395
358
|
/**
|
|
396
|
-
* @
|
|
397
|
-
* @returns {string}
|
|
359
|
+
* @returns {Promise<Array<any>>}
|
|
398
360
|
*/
|
|
399
|
-
module.exports.
|
|
400
|
-
const ret = wasm.
|
|
361
|
+
module.exports.get_nft_list = function() {
|
|
362
|
+
const ret = wasm.get_nft_list();
|
|
401
363
|
return takeObject(ret);
|
|
402
364
|
};
|
|
403
365
|
|
|
404
366
|
/**
|
|
405
|
-
* @
|
|
367
|
+
* @param {bigint} peer_index
|
|
368
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
406
369
|
*/
|
|
407
|
-
module.exports.
|
|
408
|
-
const ret = wasm.
|
|
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
|
-
* @param {bigint}
|
|
414
|
-
* @param {string} public_key
|
|
376
|
+
* @param {bigint} duration_in_ms
|
|
415
377
|
* @returns {Promise<void>}
|
|
416
378
|
*/
|
|
417
|
-
module.exports.
|
|
418
|
-
const ret = wasm.
|
|
379
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
380
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
419
381
|
return takeObject(ret);
|
|
420
382
|
};
|
|
421
383
|
|
|
422
384
|
/**
|
|
423
|
-
* @returns {Promise<
|
|
385
|
+
* @returns {Promise<boolean>}
|
|
424
386
|
*/
|
|
425
|
-
module.exports.
|
|
426
|
-
const ret = wasm.
|
|
387
|
+
module.exports.produce_block_with_gt = function() {
|
|
388
|
+
const ret = wasm.produce_block_with_gt();
|
|
427
389
|
return takeObject(ret);
|
|
428
390
|
};
|
|
429
391
|
|
|
430
392
|
/**
|
|
431
|
-
* @param {
|
|
432
|
-
* @param {
|
|
433
|
-
* @
|
|
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>}
|
|
434
400
|
*/
|
|
435
|
-
module.exports.
|
|
436
|
-
const ret = wasm.
|
|
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));
|
|
437
403
|
return takeObject(ret);
|
|
438
404
|
};
|
|
439
405
|
|
|
440
406
|
/**
|
|
441
|
-
* @
|
|
407
|
+
* @param {bigint} current_time
|
|
408
|
+
* @returns {Promise<void>}
|
|
442
409
|
*/
|
|
443
|
-
module.exports.
|
|
444
|
-
const ret = wasm.
|
|
410
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
411
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
445
412
|
return takeObject(ret);
|
|
446
413
|
};
|
|
447
414
|
|
|
448
415
|
/**
|
|
449
|
-
* @
|
|
416
|
+
* @param {bigint} peer_index
|
|
417
|
+
* @param {string} public_key
|
|
418
|
+
* @returns {Promise<void>}
|
|
450
419
|
*/
|
|
451
|
-
module.exports.
|
|
452
|
-
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));
|
|
453
422
|
return takeObject(ret);
|
|
454
423
|
};
|
|
455
424
|
|
|
456
425
|
/**
|
|
457
|
-
* @returns {Promise<
|
|
426
|
+
* @returns {Promise<any>}
|
|
458
427
|
*/
|
|
459
|
-
module.exports.
|
|
460
|
-
const ret = wasm.
|
|
428
|
+
module.exports.get_confirmations = function() {
|
|
429
|
+
const ret = wasm.get_confirmations();
|
|
461
430
|
return takeObject(ret);
|
|
462
431
|
};
|
|
463
432
|
|
|
464
433
|
/**
|
|
465
|
-
* @param {bigint} threshold
|
|
466
434
|
* @returns {Promise<void>}
|
|
467
435
|
*/
|
|
468
|
-
module.exports.
|
|
469
|
-
const ret = wasm.
|
|
436
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
437
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
470
438
|
return takeObject(ret);
|
|
471
439
|
};
|
|
472
440
|
|
|
@@ -482,81 +450,105 @@ module.exports.send_api_error = function(buffer, msg_index, peer_index) {
|
|
|
482
450
|
};
|
|
483
451
|
|
|
484
452
|
/**
|
|
485
|
-
* @
|
|
486
|
-
* @param {Uint8Array} tx_msg
|
|
487
|
-
* @returns {Promise<WasmTransaction>}
|
|
453
|
+
* @returns {Promise<Array<any>>}
|
|
488
454
|
*/
|
|
489
|
-
module.exports.
|
|
490
|
-
const
|
|
491
|
-
const len0 = WASM_VECTOR_LEN;
|
|
492
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
455
|
+
module.exports.get_mempool_txs = function() {
|
|
456
|
+
const ret = wasm.get_mempool_txs();
|
|
493
457
|
return takeObject(ret);
|
|
494
458
|
};
|
|
495
459
|
|
|
496
460
|
/**
|
|
461
|
+
* @param {string} private_key
|
|
497
462
|
* @returns {string}
|
|
498
463
|
*/
|
|
499
|
-
module.exports.
|
|
500
|
-
|
|
501
|
-
|
|
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
|
+
}
|
|
502
478
|
};
|
|
503
479
|
|
|
504
480
|
/**
|
|
505
|
-
* @param {
|
|
506
|
-
* @
|
|
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>}
|
|
507
487
|
*/
|
|
508
|
-
module.exports.
|
|
509
|
-
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);
|
|
510
490
|
return takeObject(ret);
|
|
511
491
|
};
|
|
512
492
|
|
|
513
493
|
/**
|
|
514
|
-
* @param {
|
|
494
|
+
* @param {Uint8Array} buffer
|
|
495
|
+
* @param {string} signature
|
|
496
|
+
* @param {string} public_key
|
|
497
|
+
* @returns {boolean}
|
|
498
|
+
*/
|
|
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;
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* @param {Uint8Array} buffer
|
|
506
|
+
* @param {bigint} peer_index
|
|
515
507
|
* @returns {Promise<void>}
|
|
516
508
|
*/
|
|
517
|
-
module.exports.
|
|
518
|
-
|
|
519
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
520
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
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);
|
|
521
511
|
return takeObject(ret);
|
|
522
512
|
};
|
|
523
513
|
|
|
524
514
|
/**
|
|
525
|
-
* @
|
|
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>}
|
|
526
522
|
*/
|
|
527
|
-
module.exports.
|
|
528
|
-
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));
|
|
529
525
|
return takeObject(ret);
|
|
530
526
|
};
|
|
531
527
|
|
|
532
528
|
/**
|
|
533
|
-
* @
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
* @returns {Promise<void>}
|
|
538
|
-
*/
|
|
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);
|
|
529
|
+
* @returns {Promise<WasmBlockchain>}
|
|
530
|
+
*/
|
|
531
|
+
module.exports.get_blockchain = function() {
|
|
532
|
+
const ret = wasm.get_blockchain();
|
|
541
533
|
return takeObject(ret);
|
|
542
534
|
};
|
|
543
535
|
|
|
544
536
|
/**
|
|
545
|
-
* @param {
|
|
546
|
-
* @param {
|
|
547
|
-
* @param {
|
|
548
|
-
* @returns {Promise<
|
|
537
|
+
* @param {Uint8Array} hash
|
|
538
|
+
* @param {bigint} block_id
|
|
539
|
+
* @param {bigint} peer_index
|
|
540
|
+
* @returns {Promise<void>}
|
|
549
541
|
*/
|
|
550
|
-
module.exports.
|
|
551
|
-
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);
|
|
552
544
|
return takeObject(ret);
|
|
553
545
|
};
|
|
554
546
|
|
|
555
547
|
/**
|
|
556
|
-
* @returns {
|
|
548
|
+
* @returns {string}
|
|
557
549
|
*/
|
|
558
|
-
module.exports.
|
|
559
|
-
const ret = wasm.
|
|
550
|
+
module.exports.generate_private_key = function() {
|
|
551
|
+
const ret = wasm.generate_private_key();
|
|
560
552
|
return takeObject(ret);
|
|
561
553
|
};
|
|
562
554
|
|
|
@@ -573,41 +565,61 @@ module.exports.create_transaction = function(public_key, amount, fee, force_merg
|
|
|
573
565
|
};
|
|
574
566
|
|
|
575
567
|
/**
|
|
576
|
-
* @
|
|
568
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
569
|
+
* @returns {Promise<void>}
|
|
577
570
|
*/
|
|
578
|
-
module.exports.
|
|
579
|
-
|
|
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);
|
|
580
575
|
return takeObject(ret);
|
|
581
576
|
};
|
|
582
577
|
|
|
583
578
|
/**
|
|
579
|
+
* @param {WasmTransaction} tx
|
|
584
580
|
* @returns {Promise<void>}
|
|
585
581
|
*/
|
|
586
|
-
module.exports.
|
|
587
|
-
|
|
582
|
+
module.exports.propagate_transaction = function(tx) {
|
|
583
|
+
_assertClass(tx, WasmTransaction);
|
|
584
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
588
585
|
return takeObject(ret);
|
|
589
586
|
};
|
|
590
587
|
|
|
591
588
|
/**
|
|
592
589
|
* @param {bigint} peer_index
|
|
593
|
-
* @returns {Promise<
|
|
590
|
+
* @returns {Promise<void>}
|
|
594
591
|
*/
|
|
595
|
-
module.exports.
|
|
596
|
-
const ret = wasm.
|
|
592
|
+
module.exports.process_peer_disconnection = function(peer_index) {
|
|
593
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
597
594
|
return takeObject(ret);
|
|
598
595
|
};
|
|
599
596
|
|
|
600
597
|
/**
|
|
601
|
-
* @param {
|
|
602
|
-
* @param {
|
|
603
|
-
* @param {
|
|
604
|
-
* @param {
|
|
605
|
-
* @
|
|
606
|
-
* @param {Uint8Array} tx_msg
|
|
607
|
-
* @returns {Promise<WasmTransaction>}
|
|
598
|
+
* @param {Uint8Array} buffer
|
|
599
|
+
* @param {Uint8Array} hash
|
|
600
|
+
* @param {bigint} block_id
|
|
601
|
+
* @param {bigint} peer_index
|
|
602
|
+
* @returns {Promise<void>}
|
|
608
603
|
*/
|
|
609
|
-
module.exports.
|
|
610
|
-
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);
|
|
606
|
+
return takeObject(ret);
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* @param {string} public_key
|
|
611
|
+
* @returns {Promise<Array<any>>}
|
|
612
|
+
*/
|
|
613
|
+
module.exports.get_account_slips = function(public_key) {
|
|
614
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
615
|
+
return takeObject(ret);
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* @returns {Promise<Array<any>>}
|
|
620
|
+
*/
|
|
621
|
+
module.exports.get_peers = function() {
|
|
622
|
+
const ret = wasm.get_peers();
|
|
611
623
|
return takeObject(ret);
|
|
612
624
|
};
|
|
613
625
|
|
|
@@ -621,134 +633,121 @@ module.exports.is_valid_public_key = function(key) {
|
|
|
621
633
|
};
|
|
622
634
|
|
|
623
635
|
/**
|
|
624
|
-
* @param {
|
|
625
|
-
* @returns {Promise<
|
|
636
|
+
* @param {string} block_hash
|
|
637
|
+
* @returns {Promise<WasmBlock>}
|
|
626
638
|
*/
|
|
627
|
-
module.exports.
|
|
628
|
-
const ret = wasm.
|
|
639
|
+
module.exports.get_block = function(block_hash) {
|
|
640
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
629
641
|
return takeObject(ret);
|
|
630
642
|
};
|
|
631
643
|
|
|
632
644
|
/**
|
|
633
|
-
* @
|
|
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>}
|
|
645
|
+
* @returns {Promise<string>}
|
|
639
646
|
*/
|
|
640
|
-
module.exports.
|
|
641
|
-
const ret = wasm.
|
|
647
|
+
module.exports.get_latest_block_hash = function() {
|
|
648
|
+
const ret = wasm.get_latest_block_hash();
|
|
642
649
|
return takeObject(ret);
|
|
643
650
|
};
|
|
644
651
|
|
|
645
652
|
/**
|
|
653
|
+
* @param {bigint} amt
|
|
646
654
|
* @param {string} slip1_utxo_key
|
|
647
655
|
* @param {string} slip2_utxo_key
|
|
648
656
|
* @param {string} slip3_utxo_key
|
|
649
|
-
* @param {
|
|
650
|
-
* @param {number} right_count
|
|
657
|
+
* @param {string} recipient_public_key
|
|
651
658
|
* @param {Uint8Array} tx_msg
|
|
652
659
|
* @returns {Promise<WasmTransaction>}
|
|
653
660
|
*/
|
|
654
|
-
module.exports.
|
|
655
|
-
const ret = wasm.
|
|
656
|
-
return takeObject(ret);
|
|
657
|
-
};
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* @param {Uint8Array} buffer
|
|
661
|
-
* @param {number} msg_index
|
|
662
|
-
* @param {bigint} peer_index
|
|
663
|
-
* @returns {Promise<void>}
|
|
664
|
-
*/
|
|
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);
|
|
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));
|
|
667
663
|
return takeObject(ret);
|
|
668
664
|
};
|
|
669
665
|
|
|
670
666
|
/**
|
|
671
|
-
* @
|
|
672
|
-
* @returns {Promise<Array<any>>}
|
|
667
|
+
* @returns {Promise<bigint>}
|
|
673
668
|
*/
|
|
674
|
-
module.exports.
|
|
675
|
-
const ret = wasm.
|
|
669
|
+
module.exports.get_next_peer_index = function() {
|
|
670
|
+
const ret = wasm.get_next_peer_index();
|
|
676
671
|
return takeObject(ret);
|
|
677
672
|
};
|
|
678
673
|
|
|
679
674
|
/**
|
|
680
|
-
* @param {WasmTransaction} tx
|
|
681
675
|
* @returns {Promise<void>}
|
|
682
676
|
*/
|
|
683
|
-
module.exports.
|
|
684
|
-
|
|
685
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
677
|
+
module.exports.disable_producing_blocks_by_timer = function() {
|
|
678
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
686
679
|
return takeObject(ret);
|
|
687
680
|
};
|
|
688
681
|
|
|
689
682
|
/**
|
|
683
|
+
* @param {Uint8Array} buffer
|
|
684
|
+
* @param {number} msg_index
|
|
690
685
|
* @param {bigint} peer_index
|
|
691
|
-
* @param {string} ip
|
|
692
686
|
* @returns {Promise<void>}
|
|
693
687
|
*/
|
|
694
|
-
module.exports.
|
|
695
|
-
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);
|
|
696
690
|
return takeObject(ret);
|
|
697
691
|
};
|
|
698
692
|
|
|
699
693
|
/**
|
|
700
|
-
* @param {
|
|
701
|
-
* @returns {Promise<
|
|
694
|
+
* @param {Array<any>} keys
|
|
695
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
702
696
|
*/
|
|
703
|
-
module.exports.
|
|
704
|
-
const ret = wasm.
|
|
697
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
698
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
705
699
|
return takeObject(ret);
|
|
706
700
|
};
|
|
707
701
|
|
|
708
702
|
/**
|
|
703
|
+
* @param {Uint8Array} buffer
|
|
704
|
+
* @param {number} msg_index
|
|
709
705
|
* @param {bigint} peer_index
|
|
710
706
|
* @returns {Promise<void>}
|
|
711
707
|
*/
|
|
712
|
-
module.exports.
|
|
713
|
-
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);
|
|
714
710
|
return takeObject(ret);
|
|
715
711
|
};
|
|
716
712
|
|
|
717
713
|
/**
|
|
718
|
-
* @param {
|
|
719
|
-
* @param {bigint} deposit
|
|
714
|
+
* @param {string} nft_id_hex
|
|
720
715
|
* @param {Uint8Array} tx_msg
|
|
721
|
-
* @param {bigint} fee
|
|
722
|
-
* @param {string} recipient_public_key
|
|
723
|
-
* @param {string} nft_type
|
|
724
716
|
* @returns {Promise<WasmTransaction>}
|
|
725
717
|
*/
|
|
726
|
-
module.exports.
|
|
727
|
-
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));
|
|
728
722
|
return takeObject(ret);
|
|
729
723
|
};
|
|
730
724
|
|
|
731
725
|
/**
|
|
732
|
-
* @param {
|
|
733
|
-
* @param {
|
|
734
|
-
* @
|
|
726
|
+
* @param {number} major
|
|
727
|
+
* @param {number} minor
|
|
728
|
+
* @param {number} patch
|
|
729
|
+
* @returns {Promise<void>}
|
|
735
730
|
*/
|
|
736
|
-
module.exports.
|
|
731
|
+
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
732
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
733
|
+
return takeObject(ret);
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
function handleError(f, args) {
|
|
737
737
|
try {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
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
|
+
return f.apply(this, args);
|
|
739
|
+
} catch (e) {
|
|
740
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
749
741
|
}
|
|
750
|
-
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
let stack_pointer = 128;
|
|
751
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,8 +2652,8 @@ class WasmWalletSlip {
|
|
|
2653
2652
|
}
|
|
2654
2653
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2655
2654
|
|
|
2656
|
-
module.exports.
|
|
2657
|
-
const ret =
|
|
2655
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2656
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2658
2657
|
return addHeapObject(ret);
|
|
2659
2658
|
};
|
|
2660
2659
|
|
|
@@ -2667,13 +2666,8 @@ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
|
2667
2666
|
return addHeapObject(ret);
|
|
2668
2667
|
};
|
|
2669
2668
|
|
|
2670
|
-
module.exports.
|
|
2671
|
-
const ret =
|
|
2672
|
-
return addHeapObject(ret);
|
|
2673
|
-
};
|
|
2674
|
-
|
|
2675
|
-
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2676
|
-
const ret = WasmTransaction.__wrap(arg0);
|
|
2669
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2670
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2677
2671
|
return addHeapObject(ret);
|
|
2678
2672
|
};
|
|
2679
2673
|
|
|
@@ -2686,43 +2680,48 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
2686
2680
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2687
2681
|
};
|
|
2688
2682
|
|
|
2689
|
-
module.exports.
|
|
2690
|
-
const ret =
|
|
2683
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2684
|
+
const ret = getObject(arg0);
|
|
2691
2685
|
return addHeapObject(ret);
|
|
2692
2686
|
};
|
|
2693
2687
|
|
|
2694
|
-
module.exports.
|
|
2695
|
-
const ret =
|
|
2688
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2689
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2696
2690
|
return addHeapObject(ret);
|
|
2697
2691
|
};
|
|
2698
2692
|
|
|
2699
|
-
module.exports.
|
|
2700
|
-
const ret =
|
|
2693
|
+
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2694
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2701
2695
|
return addHeapObject(ret);
|
|
2702
2696
|
};
|
|
2703
2697
|
|
|
2704
|
-
module.exports.
|
|
2705
|
-
const ret =
|
|
2698
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2699
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2706
2700
|
return addHeapObject(ret);
|
|
2707
2701
|
};
|
|
2708
2702
|
|
|
2709
|
-
module.exports.
|
|
2710
|
-
const ret =
|
|
2703
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2704
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2711
2705
|
return addHeapObject(ret);
|
|
2712
2706
|
};
|
|
2713
2707
|
|
|
2714
|
-
module.exports.
|
|
2715
|
-
const ret =
|
|
2708
|
+
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2709
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2716
2710
|
return addHeapObject(ret);
|
|
2717
2711
|
};
|
|
2718
2712
|
|
|
2719
|
-
module.exports.
|
|
2720
|
-
const ret =
|
|
2713
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2714
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2721
2715
|
return addHeapObject(ret);
|
|
2722
2716
|
};
|
|
2723
2717
|
|
|
2724
|
-
module.exports.
|
|
2725
|
-
const ret =
|
|
2718
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2719
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2720
|
+
return addHeapObject(ret);
|
|
2721
|
+
};
|
|
2722
|
+
|
|
2723
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2724
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2726
2725
|
return addHeapObject(ret);
|
|
2727
2726
|
};
|
|
2728
2727
|
|
|
@@ -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_2c769b019d5f1e66 = 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_19e0ac3170ed6477 = 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_2f493d22dc09e6f5 = 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_720c0ca8080d6eac = 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_215faba975f5b863 = 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_6940934591bed84e = 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_7f4f0c51bececaa6 = 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_9c79439340b79f8e = 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_1c721c4150775963 = 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_fa5e1d7df7e1161b = 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_d09e3f0752b33dd5 = 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
|
|