saito-wasm 0.2.161 → 0.2.163
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 +262 -262
- package/pkg/node/index.js +1141 -1142
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +216 -216
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +477 -477
- package/pkg/web/index.js +1128 -1129
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +216 -216
- package/pkg/web/package.json +1 -1
- /package/pkg/node/snippets/{saito-wasm-7abf862820f718f5 → saito-wasm-e8d94f6fc48cc1ba}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-7abf862820f718f5 → saito-wasm-e8d94f6fc48cc1ba}/js/msg_handler.js +0 -0
package/pkg/node/index.js
CHANGED
|
@@ -1,32 +1,28 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-
|
|
4
|
+
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-e8d94f6fc48cc1ba/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const heap = new Array(128).fill(undefined);
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
heap.push(undefined, null, true, false);
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function getObject(idx) { return heap[idx]; }
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
15
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
16
|
-
}
|
|
17
|
-
return cachedUint8Memory0;
|
|
18
|
-
}
|
|
13
|
+
let heap_next = heap.length;
|
|
19
14
|
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
function dropObject(idx) {
|
|
16
|
+
if (idx < 132) return;
|
|
17
|
+
heap[idx] = heap_next;
|
|
18
|
+
heap_next = idx;
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
function takeObject(idx) {
|
|
22
|
+
const ret = getObject(idx);
|
|
23
|
+
dropObject(idx);
|
|
24
|
+
return ret;
|
|
25
|
+
}
|
|
30
26
|
|
|
31
27
|
function addHeapObject(obj) {
|
|
32
28
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
@@ -37,18 +33,22 @@ function addHeapObject(obj) {
|
|
|
37
33
|
return idx;
|
|
38
34
|
}
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
cachedTextDecoder.decode();
|
|
39
|
+
|
|
40
|
+
let cachedUint8Memory0 = null;
|
|
41
|
+
|
|
42
|
+
function getUint8Memory0() {
|
|
43
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
44
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
45
|
+
}
|
|
46
|
+
return cachedUint8Memory0;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return ret;
|
|
49
|
+
function getStringFromWasm0(ptr, len) {
|
|
50
|
+
ptr = ptr >>> 0;
|
|
51
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
@@ -225,15 +225,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
225
225
|
return real;
|
|
226
226
|
}
|
|
227
227
|
function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
228
|
-
wasm.
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
let stack_pointer = 128;
|
|
232
|
-
|
|
233
|
-
function addBorrowedObject(obj) {
|
|
234
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
235
|
-
heap[--stack_pointer] = obj;
|
|
236
|
-
return stack_pointer;
|
|
228
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf760697bf54687ef(arg0, arg1, addHeapObject(arg2));
|
|
237
229
|
}
|
|
238
230
|
|
|
239
231
|
function _assertClass(instance, klass) {
|
|
@@ -243,35 +235,43 @@ function _assertClass(instance, klass) {
|
|
|
243
235
|
return instance.ptr;
|
|
244
236
|
}
|
|
245
237
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
238
|
+
let stack_pointer = 128;
|
|
239
|
+
|
|
240
|
+
function addBorrowedObject(obj) {
|
|
241
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
242
|
+
heap[--stack_pointer] = obj;
|
|
243
|
+
return stack_pointer;
|
|
252
244
|
}
|
|
253
245
|
/**
|
|
254
|
-
* @param {
|
|
255
|
-
* @
|
|
256
|
-
* @param {number} log_level_num
|
|
257
|
-
* @param {bigint} hasten_multiplier
|
|
258
|
-
* @param {boolean} delete_old_blocks
|
|
259
|
-
* @returns {Promise<any>}
|
|
246
|
+
* @param {bigint} peer_index
|
|
247
|
+
* @returns {Promise<void>}
|
|
260
248
|
*/
|
|
261
|
-
module.exports.
|
|
262
|
-
const ret = wasm.
|
|
249
|
+
module.exports.remove_stun_peer = function(peer_index) {
|
|
250
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
263
251
|
return takeObject(ret);
|
|
264
252
|
};
|
|
265
253
|
|
|
266
254
|
/**
|
|
267
|
-
* @param {
|
|
268
|
-
* @param {
|
|
269
|
-
* @param {
|
|
270
|
-
* @param {
|
|
255
|
+
* @param {bigint} amt
|
|
256
|
+
* @param {string} slip1_utxo_key
|
|
257
|
+
* @param {string} slip2_utxo_key
|
|
258
|
+
* @param {string} slip3_utxo_key
|
|
259
|
+
* @param {string} recipient_public_key
|
|
260
|
+
* @param {Uint8Array} tx_msg
|
|
271
261
|
* @returns {Promise<WasmTransaction>}
|
|
272
262
|
*/
|
|
273
|
-
module.exports.
|
|
274
|
-
const ret = wasm.
|
|
263
|
+
module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
264
|
+
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));
|
|
265
|
+
return takeObject(ret);
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @param {bigint} peer_index
|
|
270
|
+
* @param {string} ip
|
|
271
|
+
* @returns {Promise<void>}
|
|
272
|
+
*/
|
|
273
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
274
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
275
275
|
return takeObject(ret);
|
|
276
276
|
};
|
|
277
277
|
|
|
@@ -288,101 +288,99 @@ module.exports.create_transaction_with_multiple_payments = function(public_keys,
|
|
|
288
288
|
};
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
|
-
* @param {
|
|
292
|
-
* @param {
|
|
293
|
-
* @param {
|
|
294
|
-
* @param {bigint}
|
|
295
|
-
* @param {
|
|
296
|
-
* @
|
|
297
|
-
* @returns {Promise<WasmTransaction>}
|
|
291
|
+
* @param {string} config_json
|
|
292
|
+
* @param {string} private_key
|
|
293
|
+
* @param {number} log_level_num
|
|
294
|
+
* @param {bigint} hasten_multiplier
|
|
295
|
+
* @param {boolean} delete_old_blocks
|
|
296
|
+
* @returns {Promise<any>}
|
|
298
297
|
*/
|
|
299
|
-
module.exports.
|
|
300
|
-
const ret = wasm.
|
|
298
|
+
module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
299
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
301
300
|
return takeObject(ret);
|
|
302
301
|
};
|
|
303
302
|
|
|
304
303
|
/**
|
|
305
|
-
* @
|
|
306
|
-
* @param {string} slip1_utxo_key
|
|
307
|
-
* @param {string} slip2_utxo_key
|
|
308
|
-
* @param {string} slip3_utxo_key
|
|
309
|
-
* @param {string} recipient_public_key
|
|
310
|
-
* @param {Uint8Array} tx_msg
|
|
311
|
-
* @returns {Promise<WasmTransaction>}
|
|
304
|
+
* @returns {Promise<void>}
|
|
312
305
|
*/
|
|
313
|
-
module.exports.
|
|
314
|
-
const ret = wasm.
|
|
306
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
307
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
315
308
|
return takeObject(ret);
|
|
316
309
|
};
|
|
317
310
|
|
|
318
311
|
/**
|
|
319
|
-
* @param {
|
|
320
|
-
* @param {
|
|
321
|
-
* @param {
|
|
322
|
-
* @
|
|
323
|
-
* @param {number} right_count
|
|
324
|
-
* @param {Uint8Array} tx_msg
|
|
325
|
-
* @returns {Promise<WasmTransaction>}
|
|
312
|
+
* @param {Uint8Array} hash
|
|
313
|
+
* @param {bigint} block_id
|
|
314
|
+
* @param {bigint} peer_index
|
|
315
|
+
* @returns {Promise<void>}
|
|
326
316
|
*/
|
|
327
|
-
module.exports.
|
|
328
|
-
const ret = wasm.
|
|
317
|
+
module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
|
|
318
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
329
319
|
return takeObject(ret);
|
|
330
320
|
};
|
|
331
321
|
|
|
332
322
|
/**
|
|
333
|
-
* @param {string}
|
|
334
|
-
* @param {
|
|
323
|
+
* @param {string} public_key
|
|
324
|
+
* @param {bigint} amount
|
|
325
|
+
* @param {bigint} fee
|
|
326
|
+
* @param {boolean} force_merge
|
|
335
327
|
* @returns {Promise<WasmTransaction>}
|
|
336
328
|
*/
|
|
337
|
-
module.exports.
|
|
338
|
-
const
|
|
339
|
-
const len0 = WASM_VECTOR_LEN;
|
|
340
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
329
|
+
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
330
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
341
331
|
return takeObject(ret);
|
|
342
332
|
};
|
|
343
333
|
|
|
344
334
|
/**
|
|
345
|
-
* @
|
|
335
|
+
* @param {Uint8Array} buffer
|
|
336
|
+
* @param {number} msg_index
|
|
337
|
+
* @param {bigint} peer_index
|
|
338
|
+
* @returns {Promise<void>}
|
|
346
339
|
*/
|
|
347
|
-
module.exports.
|
|
348
|
-
const ret = wasm.
|
|
340
|
+
module.exports.send_api_success = function(buffer, msg_index, peer_index) {
|
|
341
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
349
342
|
return takeObject(ret);
|
|
350
343
|
};
|
|
351
344
|
|
|
352
345
|
/**
|
|
353
|
-
* @
|
|
346
|
+
* @param {bigint} threshold
|
|
347
|
+
* @returns {Promise<void>}
|
|
354
348
|
*/
|
|
355
|
-
module.exports.
|
|
356
|
-
const ret = wasm.
|
|
349
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
350
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
357
351
|
return takeObject(ret);
|
|
358
352
|
};
|
|
359
353
|
|
|
360
354
|
/**
|
|
361
|
-
* @
|
|
362
|
-
* @returns {Promise<WasmBlock>}
|
|
355
|
+
* @returns {Promise<Array<any>>}
|
|
363
356
|
*/
|
|
364
|
-
module.exports.
|
|
365
|
-
const ret = wasm.
|
|
357
|
+
module.exports.get_peers = function() {
|
|
358
|
+
const ret = wasm.get_peers();
|
|
366
359
|
return takeObject(ret);
|
|
367
360
|
};
|
|
368
361
|
|
|
369
362
|
/**
|
|
370
|
-
* @param {bigint}
|
|
371
|
-
* @param {
|
|
372
|
-
* @
|
|
363
|
+
* @param {bigint} num
|
|
364
|
+
* @param {bigint} deposit
|
|
365
|
+
* @param {Uint8Array} tx_msg
|
|
366
|
+
* @param {bigint} fee
|
|
367
|
+
* @param {string} recipient_public_key
|
|
368
|
+
* @param {string} nft_type
|
|
369
|
+
* @returns {Promise<WasmTransaction>}
|
|
373
370
|
*/
|
|
374
|
-
module.exports.
|
|
375
|
-
const ret = wasm.
|
|
371
|
+
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
372
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
376
373
|
return takeObject(ret);
|
|
377
374
|
};
|
|
378
375
|
|
|
379
376
|
/**
|
|
380
|
-
* @param {
|
|
381
|
-
* @param {string} public_key
|
|
377
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
382
378
|
* @returns {Promise<void>}
|
|
383
379
|
*/
|
|
384
|
-
module.exports.
|
|
385
|
-
|
|
380
|
+
module.exports.update_from_balance_snapshot = function(snapshot) {
|
|
381
|
+
_assertClass(snapshot, WasmBalanceSnapshot);
|
|
382
|
+
var ptr0 = snapshot.__destroy_into_raw();
|
|
383
|
+
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
386
384
|
return takeObject(ret);
|
|
387
385
|
};
|
|
388
386
|
|
|
@@ -390,97 +388,81 @@ module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
|
390
388
|
* @param {bigint} peer_index
|
|
391
389
|
* @returns {Promise<void>}
|
|
392
390
|
*/
|
|
393
|
-
module.exports.
|
|
394
|
-
const ret = wasm.
|
|
395
|
-
return takeObject(ret);
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* @returns {Promise<bigint>}
|
|
400
|
-
*/
|
|
401
|
-
module.exports.get_next_peer_index = function() {
|
|
402
|
-
const ret = wasm.get_next_peer_index();
|
|
391
|
+
module.exports.process_peer_disconnection = function(peer_index) {
|
|
392
|
+
const ret = wasm.process_peer_disconnection(peer_index);
|
|
403
393
|
return takeObject(ret);
|
|
404
394
|
};
|
|
405
395
|
|
|
406
396
|
/**
|
|
407
|
-
* @
|
|
408
|
-
* @returns {Promise<void>}
|
|
397
|
+
* @returns {Promise<any>}
|
|
409
398
|
*/
|
|
410
|
-
module.exports.
|
|
411
|
-
const ret = wasm.
|
|
399
|
+
module.exports.get_confirmations = function() {
|
|
400
|
+
const ret = wasm.get_confirmations();
|
|
412
401
|
return takeObject(ret);
|
|
413
402
|
};
|
|
414
403
|
|
|
415
404
|
/**
|
|
416
405
|
* @param {Uint8Array} buffer
|
|
417
|
-
* @
|
|
418
|
-
* @returns {Promise<void>}
|
|
406
|
+
* @returns {string}
|
|
419
407
|
*/
|
|
420
|
-
module.exports.
|
|
421
|
-
const ret = wasm.
|
|
408
|
+
module.exports.hash = function(buffer) {
|
|
409
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
422
410
|
return takeObject(ret);
|
|
423
411
|
};
|
|
424
412
|
|
|
425
413
|
/**
|
|
426
|
-
* @
|
|
427
|
-
* @param {Uint8Array} hash
|
|
428
|
-
* @param {bigint} block_id
|
|
429
|
-
* @param {bigint} peer_index
|
|
430
|
-
* @returns {Promise<void>}
|
|
414
|
+
* @returns {Promise<bigint>}
|
|
431
415
|
*/
|
|
432
|
-
module.exports.
|
|
433
|
-
const ret = wasm.
|
|
416
|
+
module.exports.get_next_peer_index = function() {
|
|
417
|
+
const ret = wasm.get_next_peer_index();
|
|
434
418
|
return takeObject(ret);
|
|
435
419
|
};
|
|
436
420
|
|
|
437
421
|
/**
|
|
438
|
-
* @
|
|
439
|
-
* @param {bigint} block_id
|
|
440
|
-
* @param {bigint} peer_index
|
|
441
|
-
* @returns {Promise<void>}
|
|
422
|
+
* @returns {Promise<string>}
|
|
442
423
|
*/
|
|
443
|
-
module.exports.
|
|
444
|
-
const ret = wasm.
|
|
424
|
+
module.exports.get_peer_stats = function() {
|
|
425
|
+
const ret = wasm.get_peer_stats();
|
|
445
426
|
return takeObject(ret);
|
|
446
427
|
};
|
|
447
428
|
|
|
448
429
|
/**
|
|
449
|
-
* @param {
|
|
450
|
-
* @returns {
|
|
430
|
+
* @param {string} key
|
|
431
|
+
* @returns {boolean}
|
|
451
432
|
*/
|
|
452
|
-
module.exports.
|
|
453
|
-
const ret = wasm.
|
|
454
|
-
return
|
|
433
|
+
module.exports.is_valid_public_key = function(key) {
|
|
434
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
435
|
+
return ret !== 0;
|
|
455
436
|
};
|
|
456
437
|
|
|
457
438
|
/**
|
|
458
|
-
* @param {
|
|
459
|
-
* @
|
|
439
|
+
* @param {string} nft_id_hex
|
|
440
|
+
* @param {Uint8Array} tx_msg
|
|
441
|
+
* @returns {Promise<WasmTransaction>}
|
|
460
442
|
*/
|
|
461
|
-
module.exports.
|
|
462
|
-
const
|
|
443
|
+
module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
|
|
444
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
445
|
+
const len0 = WASM_VECTOR_LEN;
|
|
446
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
463
447
|
return takeObject(ret);
|
|
464
448
|
};
|
|
465
449
|
|
|
466
450
|
/**
|
|
467
|
-
* @
|
|
468
|
-
* @returns {string}
|
|
451
|
+
* @returns {Promise<boolean>}
|
|
469
452
|
*/
|
|
470
|
-
module.exports.
|
|
471
|
-
const ret = wasm.
|
|
453
|
+
module.exports.produce_block_with_gt = function() {
|
|
454
|
+
const ret = wasm.produce_block_with_gt();
|
|
472
455
|
return takeObject(ret);
|
|
473
456
|
};
|
|
474
457
|
|
|
475
458
|
/**
|
|
476
|
-
* @param {Uint8Array} buffer
|
|
477
459
|
* @param {string} private_key
|
|
478
460
|
* @returns {string}
|
|
479
461
|
*/
|
|
480
|
-
module.exports.
|
|
462
|
+
module.exports.generate_public_key = function(private_key) {
|
|
481
463
|
try {
|
|
482
464
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
483
|
-
wasm.
|
|
465
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
484
466
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
485
467
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
486
468
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -494,97 +476,85 @@ module.exports.sign_buffer = function(buffer, private_key) {
|
|
|
494
476
|
};
|
|
495
477
|
|
|
496
478
|
/**
|
|
497
|
-
* @
|
|
498
|
-
* @param {string} signature
|
|
499
|
-
* @param {string} public_key
|
|
500
|
-
* @returns {boolean}
|
|
479
|
+
* @returns {Promise<WasmBlockchain>}
|
|
501
480
|
*/
|
|
502
|
-
module.exports.
|
|
503
|
-
const ret = wasm.
|
|
504
|
-
return ret
|
|
481
|
+
module.exports.get_blockchain = function() {
|
|
482
|
+
const ret = wasm.get_blockchain();
|
|
483
|
+
return takeObject(ret);
|
|
505
484
|
};
|
|
506
485
|
|
|
507
486
|
/**
|
|
508
|
-
* @
|
|
487
|
+
* @param {bigint} peer_index
|
|
488
|
+
* @param {string} public_key
|
|
489
|
+
* @returns {Promise<void>}
|
|
509
490
|
*/
|
|
510
|
-
module.exports.
|
|
511
|
-
const ret = wasm.
|
|
491
|
+
module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
492
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
512
493
|
return takeObject(ret);
|
|
513
494
|
};
|
|
514
495
|
|
|
515
496
|
/**
|
|
516
|
-
* @param {
|
|
517
|
-
* @
|
|
497
|
+
* @param {Uint8Array} buffer
|
|
498
|
+
* @param {string} signature
|
|
499
|
+
* @param {string} public_key
|
|
500
|
+
* @returns {boolean}
|
|
518
501
|
*/
|
|
519
|
-
module.exports.
|
|
520
|
-
const ret = wasm.
|
|
521
|
-
return
|
|
502
|
+
module.exports.verify_signature = function(buffer, signature, public_key) {
|
|
503
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
504
|
+
return ret !== 0;
|
|
522
505
|
};
|
|
523
506
|
|
|
524
507
|
/**
|
|
525
|
-
* @
|
|
526
|
-
* @returns {Promise<Array<any>>}
|
|
508
|
+
* @returns {Promise<string>}
|
|
527
509
|
*/
|
|
528
|
-
module.exports.
|
|
529
|
-
const ret = wasm.
|
|
510
|
+
module.exports.get_congestion_stats = function() {
|
|
511
|
+
const ret = wasm.get_congestion_stats();
|
|
530
512
|
return takeObject(ret);
|
|
531
513
|
};
|
|
532
514
|
|
|
533
515
|
/**
|
|
534
|
-
* @
|
|
535
|
-
* @returns {Promise<WasmBalanceSnapshot>}
|
|
516
|
+
* @returns {Promise<Array<any>>}
|
|
536
517
|
*/
|
|
537
|
-
module.exports.
|
|
538
|
-
const ret = wasm.
|
|
518
|
+
module.exports.get_nft_list = function() {
|
|
519
|
+
const ret = wasm.get_nft_list();
|
|
539
520
|
return takeObject(ret);
|
|
540
521
|
};
|
|
541
522
|
|
|
542
523
|
/**
|
|
543
|
-
* @param {
|
|
524
|
+
* @param {Uint8Array} buffer
|
|
525
|
+
* @param {number} msg_index
|
|
526
|
+
* @param {bigint} peer_index
|
|
544
527
|
* @returns {Promise<void>}
|
|
545
528
|
*/
|
|
546
|
-
module.exports.
|
|
547
|
-
|
|
548
|
-
var ptr0 = snapshot.__destroy_into_raw();
|
|
549
|
-
const ret = wasm.update_from_balance_snapshot(ptr0);
|
|
529
|
+
module.exports.send_api_call = function(buffer, msg_index, peer_index) {
|
|
530
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
550
531
|
return takeObject(ret);
|
|
551
532
|
};
|
|
552
533
|
|
|
553
534
|
/**
|
|
554
|
-
* @
|
|
535
|
+
* @param {WasmTransaction} tx
|
|
536
|
+
* @returns {Promise<void>}
|
|
555
537
|
*/
|
|
556
|
-
module.exports.
|
|
557
|
-
|
|
538
|
+
module.exports.propagate_transaction = function(tx) {
|
|
539
|
+
_assertClass(tx, WasmTransaction);
|
|
540
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
558
541
|
return takeObject(ret);
|
|
559
542
|
};
|
|
560
543
|
|
|
561
544
|
/**
|
|
562
|
-
* @param {string}
|
|
563
|
-
* @returns {
|
|
545
|
+
* @param {string} public_key
|
|
546
|
+
* @returns {Promise<Array<any>>}
|
|
564
547
|
*/
|
|
565
|
-
module.exports.
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
569
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
570
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
571
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
572
|
-
if (r2) {
|
|
573
|
-
throw takeObject(r1);
|
|
574
|
-
}
|
|
575
|
-
return takeObject(r0);
|
|
576
|
-
} finally {
|
|
577
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
578
|
-
}
|
|
548
|
+
module.exports.get_account_slips = function(public_key) {
|
|
549
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
550
|
+
return takeObject(ret);
|
|
579
551
|
};
|
|
580
552
|
|
|
581
553
|
/**
|
|
582
|
-
* @
|
|
583
|
-
* @returns {Promise<void>}
|
|
554
|
+
* @returns {Promise<boolean>}
|
|
584
555
|
*/
|
|
585
|
-
module.exports.
|
|
586
|
-
|
|
587
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
556
|
+
module.exports.produce_block_without_gt = function() {
|
|
557
|
+
const ret = wasm.produce_block_without_gt();
|
|
588
558
|
return takeObject(ret);
|
|
589
559
|
};
|
|
590
560
|
|
|
@@ -594,152 +564,181 @@ module.exports.propagate_transaction = function(tx) {
|
|
|
594
564
|
* @param {bigint} peer_index
|
|
595
565
|
* @returns {Promise<void>}
|
|
596
566
|
*/
|
|
597
|
-
module.exports.
|
|
598
|
-
const ret = wasm.
|
|
567
|
+
module.exports.send_api_error = function(buffer, msg_index, peer_index) {
|
|
568
|
+
const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
|
|
599
569
|
return takeObject(ret);
|
|
600
570
|
};
|
|
601
571
|
|
|
602
572
|
/**
|
|
603
|
-
* @param {
|
|
604
|
-
* @param {number} msg_index
|
|
605
|
-
* @param {bigint} peer_index
|
|
573
|
+
* @param {bigint} current_time
|
|
606
574
|
* @returns {Promise<void>}
|
|
607
575
|
*/
|
|
608
|
-
module.exports.
|
|
609
|
-
const ret = wasm.
|
|
576
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
577
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
610
578
|
return takeObject(ret);
|
|
611
579
|
};
|
|
612
580
|
|
|
613
581
|
/**
|
|
614
|
-
* @param {
|
|
615
|
-
* @param {
|
|
616
|
-
* @param {
|
|
617
|
-
* @
|
|
582
|
+
* @param {string} slip1_utxo_key
|
|
583
|
+
* @param {string} slip2_utxo_key
|
|
584
|
+
* @param {string} slip3_utxo_key
|
|
585
|
+
* @param {number} left_count
|
|
586
|
+
* @param {number} right_count
|
|
587
|
+
* @param {Uint8Array} tx_msg
|
|
588
|
+
* @returns {Promise<WasmTransaction>}
|
|
618
589
|
*/
|
|
619
|
-
module.exports.
|
|
620
|
-
const ret = wasm.
|
|
590
|
+
module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
591
|
+
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));
|
|
621
592
|
return takeObject(ret);
|
|
622
593
|
};
|
|
623
594
|
|
|
624
595
|
/**
|
|
625
|
-
* @returns {Promise<
|
|
596
|
+
* @returns {Promise<string>}
|
|
626
597
|
*/
|
|
627
|
-
module.exports.
|
|
628
|
-
const ret = wasm.
|
|
598
|
+
module.exports.get_latest_block_hash = function() {
|
|
599
|
+
const ret = wasm.get_latest_block_hash();
|
|
629
600
|
return takeObject(ret);
|
|
630
601
|
};
|
|
631
602
|
|
|
632
603
|
/**
|
|
633
|
-
* @returns {Promise<
|
|
604
|
+
* @returns {Promise<string>}
|
|
634
605
|
*/
|
|
635
|
-
module.exports.
|
|
636
|
-
const ret = wasm.
|
|
606
|
+
module.exports.get_stats = function() {
|
|
607
|
+
const ret = wasm.get_stats();
|
|
637
608
|
return takeObject(ret);
|
|
638
609
|
};
|
|
639
610
|
|
|
640
611
|
/**
|
|
641
|
-
* @
|
|
612
|
+
* @param {Array<any>} keys
|
|
613
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
642
614
|
*/
|
|
643
|
-
module.exports.
|
|
644
|
-
const ret = wasm.
|
|
615
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
616
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
645
617
|
return takeObject(ret);
|
|
646
618
|
};
|
|
647
619
|
|
|
648
620
|
/**
|
|
649
|
-
* @param {number} major
|
|
650
|
-
* @param {number} minor
|
|
651
|
-
* @param {number} patch
|
|
652
621
|
* @returns {Promise<void>}
|
|
653
622
|
*/
|
|
654
|
-
module.exports.
|
|
655
|
-
const ret = wasm.
|
|
623
|
+
module.exports.disable_producing_blocks_by_timer = function() {
|
|
624
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
656
625
|
return takeObject(ret);
|
|
657
626
|
};
|
|
658
627
|
|
|
659
628
|
/**
|
|
660
|
-
* @
|
|
661
|
-
* @returns {boolean}
|
|
629
|
+
* @returns {string}
|
|
662
630
|
*/
|
|
663
|
-
module.exports.
|
|
664
|
-
const ret = wasm.
|
|
665
|
-
return ret
|
|
631
|
+
module.exports.generate_private_key = function() {
|
|
632
|
+
const ret = wasm.generate_private_key();
|
|
633
|
+
return takeObject(ret);
|
|
666
634
|
};
|
|
667
635
|
|
|
668
636
|
/**
|
|
669
|
-
* @param {
|
|
670
|
-
* @returns {Promise<
|
|
637
|
+
* @param {string} block_hash
|
|
638
|
+
* @returns {Promise<WasmBlock>}
|
|
671
639
|
*/
|
|
672
|
-
module.exports.
|
|
673
|
-
const ret = wasm.
|
|
640
|
+
module.exports.get_block = function(block_hash) {
|
|
641
|
+
const ret = wasm.get_block(addHeapObject(block_hash));
|
|
674
642
|
return takeObject(ret);
|
|
675
643
|
};
|
|
676
644
|
|
|
677
645
|
/**
|
|
646
|
+
* @param {bigint} duration_in_ms
|
|
678
647
|
* @returns {Promise<void>}
|
|
679
648
|
*/
|
|
680
|
-
module.exports.
|
|
681
|
-
const ret = wasm.
|
|
649
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
650
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
682
651
|
return takeObject(ret);
|
|
683
652
|
};
|
|
684
653
|
|
|
685
654
|
/**
|
|
686
|
-
* @returns {Promise<
|
|
655
|
+
* @returns {Promise<WasmWallet>}
|
|
687
656
|
*/
|
|
688
|
-
module.exports.
|
|
689
|
-
const ret = wasm.
|
|
657
|
+
module.exports.get_wallet = function() {
|
|
658
|
+
const ret = wasm.get_wallet();
|
|
690
659
|
return takeObject(ret);
|
|
691
660
|
};
|
|
692
661
|
|
|
693
662
|
/**
|
|
694
|
-
* @
|
|
663
|
+
* @param {Uint8Array} buffer
|
|
664
|
+
* @param {bigint} peer_index
|
|
665
|
+
* @returns {Promise<void>}
|
|
695
666
|
*/
|
|
696
|
-
module.exports.
|
|
697
|
-
const ret = wasm.
|
|
667
|
+
module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
|
|
668
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
698
669
|
return takeObject(ret);
|
|
699
670
|
};
|
|
700
671
|
|
|
701
672
|
/**
|
|
702
|
-
* @returns {Promise<
|
|
673
|
+
* @returns {Promise<Array<any>>}
|
|
703
674
|
*/
|
|
704
|
-
module.exports.
|
|
705
|
-
const ret = wasm.
|
|
675
|
+
module.exports.get_mempool_txs = function() {
|
|
676
|
+
const ret = wasm.get_mempool_txs();
|
|
706
677
|
return takeObject(ret);
|
|
707
678
|
};
|
|
708
679
|
|
|
709
680
|
/**
|
|
710
|
-
* @
|
|
681
|
+
* @param {number} major
|
|
682
|
+
* @param {number} minor
|
|
683
|
+
* @param {number} patch
|
|
684
|
+
* @returns {Promise<void>}
|
|
711
685
|
*/
|
|
712
|
-
module.exports.
|
|
713
|
-
const ret = wasm.
|
|
686
|
+
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
687
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
714
688
|
return takeObject(ret);
|
|
715
689
|
};
|
|
716
690
|
|
|
717
691
|
/**
|
|
718
|
-
* @
|
|
692
|
+
* @param {Uint8Array} buffer
|
|
693
|
+
* @param {string} private_key
|
|
694
|
+
* @returns {string}
|
|
719
695
|
*/
|
|
720
|
-
module.exports.
|
|
721
|
-
|
|
722
|
-
|
|
696
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
697
|
+
try {
|
|
698
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
699
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
700
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
701
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
702
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
703
|
+
if (r2) {
|
|
704
|
+
throw takeObject(r1);
|
|
705
|
+
}
|
|
706
|
+
return takeObject(r0);
|
|
707
|
+
} finally {
|
|
708
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
709
|
+
}
|
|
723
710
|
};
|
|
724
711
|
|
|
725
712
|
/**
|
|
726
|
-
* @
|
|
713
|
+
* @param {bigint} peer_index
|
|
714
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
727
715
|
*/
|
|
728
|
-
module.exports.
|
|
729
|
-
const ret = wasm.
|
|
716
|
+
module.exports.get_peer = function(peer_index) {
|
|
717
|
+
const ret = wasm.get_peer(peer_index);
|
|
730
718
|
return takeObject(ret);
|
|
731
719
|
};
|
|
732
720
|
|
|
733
721
|
/**
|
|
722
|
+
* @param {Uint8Array} buffer
|
|
723
|
+
* @param {Uint8Array} hash
|
|
724
|
+
* @param {bigint} block_id
|
|
725
|
+
* @param {bigint} peer_index
|
|
734
726
|
* @returns {Promise<void>}
|
|
735
727
|
*/
|
|
736
|
-
module.exports.
|
|
737
|
-
const ret = wasm.
|
|
728
|
+
module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
|
|
729
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
738
730
|
return takeObject(ret);
|
|
739
731
|
};
|
|
740
732
|
|
|
741
|
-
function
|
|
742
|
-
|
|
733
|
+
function handleError(f, args) {
|
|
734
|
+
try {
|
|
735
|
+
return f.apply(this, args);
|
|
736
|
+
} catch (e) {
|
|
737
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
function __wbg_adapter_393(arg0, arg1, arg2, arg3) {
|
|
741
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hbc768321d477e205(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
743
742
|
}
|
|
744
743
|
|
|
745
744
|
const SaitoWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -790,20 +789,6 @@ class WasmBalanceSnapshot {
|
|
|
790
789
|
wasm.__wbg_wasmbalancesnapshot_free(ptr);
|
|
791
790
|
}
|
|
792
791
|
/**
|
|
793
|
-
* @returns {string}
|
|
794
|
-
*/
|
|
795
|
-
get_file_name() {
|
|
796
|
-
const ret = wasm.wasmbalancesnapshot_get_file_name(this.__wbg_ptr);
|
|
797
|
-
return takeObject(ret);
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* @returns {Array<any>}
|
|
801
|
-
*/
|
|
802
|
-
get_entries() {
|
|
803
|
-
const ret = wasm.wasmbalancesnapshot_get_entries(this.__wbg_ptr);
|
|
804
|
-
return takeObject(ret);
|
|
805
|
-
}
|
|
806
|
-
/**
|
|
807
792
|
* @param {string} str
|
|
808
793
|
* @returns {WasmBalanceSnapshot}
|
|
809
794
|
*/
|
|
@@ -823,6 +808,20 @@ class WasmBalanceSnapshot {
|
|
|
823
808
|
}
|
|
824
809
|
}
|
|
825
810
|
/**
|
|
811
|
+
* @returns {Array<any>}
|
|
812
|
+
*/
|
|
813
|
+
get_entries() {
|
|
814
|
+
const ret = wasm.wasmbalancesnapshot_get_entries(this.__wbg_ptr);
|
|
815
|
+
return takeObject(ret);
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* @returns {string}
|
|
819
|
+
*/
|
|
820
|
+
get_file_name() {
|
|
821
|
+
const ret = wasm.wasmbalancesnapshot_get_file_name(this.__wbg_ptr);
|
|
822
|
+
return takeObject(ret);
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
826
825
|
* @returns {string}
|
|
827
826
|
*/
|
|
828
827
|
to_string() {
|
|
@@ -859,45 +858,10 @@ class WasmBlock {
|
|
|
859
858
|
wasm.__wbg_wasmblock_free(ptr);
|
|
860
859
|
}
|
|
861
860
|
/**
|
|
862
|
-
*/
|
|
863
|
-
constructor() {
|
|
864
|
-
const ret = wasm.wasmblock_new();
|
|
865
|
-
this.__wbg_ptr = ret >>> 0;
|
|
866
|
-
return this;
|
|
867
|
-
}
|
|
868
|
-
/**
|
|
869
|
-
* @returns {Array<any>}
|
|
870
|
-
*/
|
|
871
|
-
get transactions() {
|
|
872
|
-
const ret = wasm.wasmblock_get_transactions(this.__wbg_ptr);
|
|
873
|
-
return takeObject(ret);
|
|
874
|
-
}
|
|
875
|
-
/**
|
|
876
861
|
* @returns {bigint}
|
|
877
862
|
*/
|
|
878
|
-
get
|
|
879
|
-
const ret = wasm.
|
|
880
|
-
return BigInt.asUintN(64, ret);
|
|
881
|
-
}
|
|
882
|
-
/**
|
|
883
|
-
* @returns {bigint}
|
|
884
|
-
*/
|
|
885
|
-
get burnfee() {
|
|
886
|
-
const ret = wasm.wasmblock_burnfee(this.__wbg_ptr);
|
|
887
|
-
return BigInt.asUintN(64, ret);
|
|
888
|
-
}
|
|
889
|
-
/**
|
|
890
|
-
* @returns {bigint}
|
|
891
|
-
*/
|
|
892
|
-
get total_fees() {
|
|
893
|
-
const ret = wasm.wasmblock_total_fees(this.__wbg_ptr);
|
|
894
|
-
return BigInt.asUintN(64, ret);
|
|
895
|
-
}
|
|
896
|
-
/**
|
|
897
|
-
* @returns {bigint}
|
|
898
|
-
*/
|
|
899
|
-
get total_fees_cumulative() {
|
|
900
|
-
const ret = wasm.wasmblock_total_fees_cumulative(this.__wbg_ptr);
|
|
863
|
+
get avg_income() {
|
|
864
|
+
const ret = wasm.wasmblock_avg_income(this.__wbg_ptr);
|
|
901
865
|
return BigInt.asUintN(64, ret);
|
|
902
866
|
}
|
|
903
867
|
/**
|
|
@@ -910,57 +874,69 @@ class WasmBlock {
|
|
|
910
874
|
/**
|
|
911
875
|
* @returns {bigint}
|
|
912
876
|
*/
|
|
913
|
-
get
|
|
914
|
-
const ret = wasm.
|
|
877
|
+
get total_fees() {
|
|
878
|
+
const ret = wasm.wasmblock_total_fees(this.__wbg_ptr);
|
|
915
879
|
return BigInt.asUintN(64, ret);
|
|
916
880
|
}
|
|
917
881
|
/**
|
|
918
882
|
* @returns {bigint}
|
|
919
883
|
*/
|
|
920
|
-
get
|
|
921
|
-
const ret = wasm.
|
|
884
|
+
get total_work() {
|
|
885
|
+
const ret = wasm.wasmblock_total_work(this.__wbg_ptr);
|
|
922
886
|
return BigInt.asUintN(64, ret);
|
|
923
887
|
}
|
|
924
888
|
/**
|
|
925
|
-
* @
|
|
889
|
+
* @param {Uint8Array} buffer
|
|
890
|
+
* @returns {any}
|
|
926
891
|
*/
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
892
|
+
deserialize(buffer) {
|
|
893
|
+
try {
|
|
894
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
895
|
+
wasm.wasmblock_deserialize(retptr, this.__wbg_ptr, addHeapObject(buffer));
|
|
896
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
897
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
898
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
899
|
+
if (r2) {
|
|
900
|
+
throw takeObject(r1);
|
|
901
|
+
}
|
|
902
|
+
return takeObject(r0);
|
|
903
|
+
} finally {
|
|
904
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
905
|
+
}
|
|
930
906
|
}
|
|
931
907
|
/**
|
|
932
908
|
* @returns {string}
|
|
933
909
|
*/
|
|
934
|
-
get
|
|
935
|
-
const ret = wasm.
|
|
910
|
+
get creator() {
|
|
911
|
+
const ret = wasm.wasmblock_get_creator(this.__wbg_ptr);
|
|
936
912
|
return takeObject(ret);
|
|
937
913
|
}
|
|
938
914
|
/**
|
|
939
|
-
* @
|
|
915
|
+
* @param {string} key
|
|
940
916
|
*/
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
return BigInt.asUintN(64, ret);
|
|
917
|
+
set creator(key) {
|
|
918
|
+
wasm.wasmblock_set_creator(this.__wbg_ptr, addHeapObject(key));
|
|
944
919
|
}
|
|
945
920
|
/**
|
|
946
921
|
* @returns {bigint}
|
|
947
922
|
*/
|
|
948
|
-
get
|
|
949
|
-
const ret = wasm.
|
|
923
|
+
get fee_per_byte() {
|
|
924
|
+
const ret = wasm.wasmblock_fee_per_byte(this.__wbg_ptr);
|
|
950
925
|
return BigInt.asUintN(64, ret);
|
|
951
926
|
}
|
|
952
927
|
/**
|
|
953
|
-
* @returns {
|
|
928
|
+
* @returns {boolean}
|
|
954
929
|
*/
|
|
955
|
-
get
|
|
956
|
-
const ret = wasm.
|
|
957
|
-
return
|
|
930
|
+
get force_loaded() {
|
|
931
|
+
const ret = wasm.wasmblock_force_loaded(this.__wbg_ptr);
|
|
932
|
+
return ret !== 0;
|
|
958
933
|
}
|
|
959
934
|
/**
|
|
960
|
-
* @
|
|
935
|
+
* @returns {string}
|
|
961
936
|
*/
|
|
962
|
-
|
|
963
|
-
wasm.
|
|
937
|
+
get file_name() {
|
|
938
|
+
const ret = wasm.wasmblock_get_file_name(this.__wbg_ptr);
|
|
939
|
+
return takeObject(ret);
|
|
964
940
|
}
|
|
965
941
|
/**
|
|
966
942
|
* @returns {bigint}
|
|
@@ -976,49 +952,53 @@ class WasmBlock {
|
|
|
976
952
|
wasm.wasmblock_set_timestamp(this.__wbg_ptr, timestamp);
|
|
977
953
|
}
|
|
978
954
|
/**
|
|
979
|
-
* @returns {
|
|
955
|
+
* @returns {bigint}
|
|
980
956
|
*/
|
|
981
|
-
get
|
|
982
|
-
const ret = wasm.
|
|
983
|
-
return
|
|
957
|
+
get avg_payout_atr() {
|
|
958
|
+
const ret = wasm.wasmblock_avg_payout_atr(this.__wbg_ptr);
|
|
959
|
+
return BigInt.asUintN(64, ret);
|
|
984
960
|
}
|
|
985
961
|
/**
|
|
986
|
-
* @
|
|
962
|
+
* @returns {bigint}
|
|
987
963
|
*/
|
|
988
|
-
|
|
989
|
-
wasm.
|
|
964
|
+
get avg_total_fees() {
|
|
965
|
+
const ret = wasm.wasmblock_avg_income(this.__wbg_ptr);
|
|
966
|
+
return BigInt.asUintN(64, ret);
|
|
990
967
|
}
|
|
991
968
|
/**
|
|
992
|
-
* @
|
|
969
|
+
* @returns {bigint}
|
|
993
970
|
*/
|
|
994
|
-
|
|
995
|
-
wasm.
|
|
971
|
+
get total_fees_atr() {
|
|
972
|
+
const ret = wasm.wasmblock_total_fees_atr(this.__wbg_ptr);
|
|
973
|
+
return BigInt.asUintN(64, ret);
|
|
996
974
|
}
|
|
997
975
|
/**
|
|
998
|
-
* @returns {
|
|
976
|
+
* @returns {bigint}
|
|
999
977
|
*/
|
|
1000
|
-
get
|
|
1001
|
-
const ret = wasm.
|
|
1002
|
-
return
|
|
978
|
+
get total_fees_new() {
|
|
979
|
+
const ret = wasm.wasmblock_total_fees_new(this.__wbg_ptr);
|
|
980
|
+
return BigInt.asUintN(64, ret);
|
|
1003
981
|
}
|
|
1004
982
|
/**
|
|
1005
|
-
* @
|
|
983
|
+
* @param {Array<any>} keylist
|
|
984
|
+
* @returns {boolean}
|
|
1006
985
|
*/
|
|
1007
|
-
|
|
1008
|
-
const ret = wasm.
|
|
1009
|
-
return ret;
|
|
986
|
+
has_keylist_txs(keylist) {
|
|
987
|
+
const ret = wasm.wasmblock_has_keylist_txs(this.__wbg_ptr, addHeapObject(keylist));
|
|
988
|
+
return ret !== 0;
|
|
1010
989
|
}
|
|
1011
990
|
/**
|
|
1012
|
-
* @
|
|
991
|
+
* @returns {bigint}
|
|
1013
992
|
*/
|
|
1014
|
-
|
|
1015
|
-
wasm.
|
|
993
|
+
get avg_fee_per_byte() {
|
|
994
|
+
const ret = wasm.wasmblock_avg_fee_per_byte(this.__wbg_ptr);
|
|
995
|
+
return BigInt.asUintN(64, ret);
|
|
1016
996
|
}
|
|
1017
997
|
/**
|
|
1018
|
-
* @returns {
|
|
998
|
+
* @returns {Array<any>}
|
|
1019
999
|
*/
|
|
1020
|
-
get
|
|
1021
|
-
const ret = wasm.
|
|
1000
|
+
get transactions() {
|
|
1001
|
+
const ret = wasm.wasmblock_get_transactions(this.__wbg_ptr);
|
|
1022
1002
|
return takeObject(ret);
|
|
1023
1003
|
}
|
|
1024
1004
|
/**
|
|
@@ -1029,109 +1009,82 @@ class WasmBlock {
|
|
|
1029
1009
|
return ret !== 0;
|
|
1030
1010
|
}
|
|
1031
1011
|
/**
|
|
1032
|
-
* @returns {boolean}
|
|
1033
|
-
*/
|
|
1034
|
-
get force_loaded() {
|
|
1035
|
-
const ret = wasm.wasmblock_force_loaded(this.__wbg_ptr);
|
|
1036
|
-
return ret !== 0;
|
|
1037
|
-
}
|
|
1038
|
-
/**
|
|
1039
1012
|
* @returns {string}
|
|
1040
1013
|
*/
|
|
1041
|
-
get
|
|
1042
|
-
const ret = wasm.
|
|
1014
|
+
get rebroadcast_hash() {
|
|
1015
|
+
const ret = wasm.wasmblock_rebroadcast_hash(this.__wbg_ptr);
|
|
1043
1016
|
return takeObject(ret);
|
|
1044
1017
|
}
|
|
1045
1018
|
/**
|
|
1046
|
-
* @returns {
|
|
1019
|
+
* @returns {bigint}
|
|
1047
1020
|
*/
|
|
1048
|
-
|
|
1049
|
-
const ret = wasm.
|
|
1050
|
-
return
|
|
1021
|
+
get total_payout_atr() {
|
|
1022
|
+
const ret = wasm.wasmblock_total_payout_atr(this.__wbg_ptr);
|
|
1023
|
+
return BigInt.asUintN(64, ret);
|
|
1051
1024
|
}
|
|
1052
1025
|
/**
|
|
1053
|
-
* @
|
|
1054
|
-
* @returns {any}
|
|
1026
|
+
* @returns {bigint}
|
|
1055
1027
|
*/
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
wasm.wasmblock_deserialize(retptr, this.__wbg_ptr, addHeapObject(buffer));
|
|
1060
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1061
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1062
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
1063
|
-
if (r2) {
|
|
1064
|
-
throw takeObject(r1);
|
|
1065
|
-
}
|
|
1066
|
-
return takeObject(r0);
|
|
1067
|
-
} finally {
|
|
1068
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1069
|
-
}
|
|
1028
|
+
get avg_payout_mining() {
|
|
1029
|
+
const ret = wasm.wasmblock_avg_payout_mining(this.__wbg_ptr);
|
|
1030
|
+
return BigInt.asUintN(64, ret);
|
|
1070
1031
|
}
|
|
1071
1032
|
/**
|
|
1072
|
-
* @param {Array<any>} keylist
|
|
1073
1033
|
* @returns {boolean}
|
|
1074
1034
|
*/
|
|
1075
|
-
|
|
1076
|
-
const ret = wasm.
|
|
1035
|
+
get has_golden_ticket() {
|
|
1036
|
+
const ret = wasm.wasmblock_has_golden_ticket(this.__wbg_ptr);
|
|
1077
1037
|
return ret !== 0;
|
|
1078
1038
|
}
|
|
1079
1039
|
/**
|
|
1080
|
-
* @param {Array<any>} keylist
|
|
1081
|
-
* @returns {WasmBlock}
|
|
1082
|
-
*/
|
|
1083
|
-
generate_lite_block(keylist) {
|
|
1084
|
-
const ret = wasm.wasmblock_generate_lite_block(this.__wbg_ptr, addHeapObject(keylist));
|
|
1085
|
-
return WasmBlock.__wrap(ret);
|
|
1086
|
-
}
|
|
1087
|
-
/**
|
|
1088
1040
|
* @returns {bigint}
|
|
1089
1041
|
*/
|
|
1090
|
-
get
|
|
1091
|
-
const ret = wasm.
|
|
1042
|
+
get avg_payout_routing() {
|
|
1043
|
+
const ret = wasm.wasmblock_avg_payout_routing(this.__wbg_ptr);
|
|
1092
1044
|
return BigInt.asUintN(64, ret);
|
|
1093
1045
|
}
|
|
1094
1046
|
/**
|
|
1095
1047
|
* @returns {bigint}
|
|
1096
1048
|
*/
|
|
1097
|
-
get
|
|
1098
|
-
const ret = wasm.
|
|
1049
|
+
get avg_total_fees_atr() {
|
|
1050
|
+
const ret = wasm.wasmblock_avg_total_fees_atr(this.__wbg_ptr);
|
|
1099
1051
|
return BigInt.asUintN(64, ret);
|
|
1100
1052
|
}
|
|
1101
1053
|
/**
|
|
1102
1054
|
* @returns {bigint}
|
|
1103
1055
|
*/
|
|
1104
|
-
get
|
|
1105
|
-
const ret = wasm.
|
|
1056
|
+
get avg_total_fees_new() {
|
|
1057
|
+
const ret = wasm.wasmblock_avg_total_fees_new(this.__wbg_ptr);
|
|
1106
1058
|
return BigInt.asUintN(64, ret);
|
|
1107
1059
|
}
|
|
1108
1060
|
/**
|
|
1109
1061
|
* @returns {bigint}
|
|
1110
1062
|
*/
|
|
1111
|
-
get
|
|
1112
|
-
const ret = wasm.
|
|
1063
|
+
get avg_payout_treasury() {
|
|
1064
|
+
const ret = wasm.wasmblock_avg_payout_treasury(this.__wbg_ptr);
|
|
1113
1065
|
return BigInt.asUintN(64, ret);
|
|
1114
1066
|
}
|
|
1115
1067
|
/**
|
|
1116
|
-
* @
|
|
1068
|
+
* @param {Array<any>} keylist
|
|
1069
|
+
* @returns {WasmBlock}
|
|
1117
1070
|
*/
|
|
1118
|
-
|
|
1119
|
-
const ret = wasm.
|
|
1120
|
-
return
|
|
1071
|
+
generate_lite_block(keylist) {
|
|
1072
|
+
const ret = wasm.wasmblock_generate_lite_block(this.__wbg_ptr, addHeapObject(keylist));
|
|
1073
|
+
return WasmBlock.__wrap(ret);
|
|
1121
1074
|
}
|
|
1122
1075
|
/**
|
|
1123
1076
|
* @returns {bigint}
|
|
1124
1077
|
*/
|
|
1125
|
-
get
|
|
1126
|
-
const ret = wasm.
|
|
1078
|
+
get golden_ticket_index() {
|
|
1079
|
+
const ret = wasm.wasmblock_golden_ticket_index(this.__wbg_ptr);
|
|
1127
1080
|
return BigInt.asUintN(64, ret);
|
|
1128
1081
|
}
|
|
1129
1082
|
/**
|
|
1130
|
-
* @returns {
|
|
1083
|
+
* @returns {boolean}
|
|
1131
1084
|
*/
|
|
1132
|
-
get
|
|
1133
|
-
const ret = wasm.
|
|
1134
|
-
return
|
|
1085
|
+
get has_fee_transaction() {
|
|
1086
|
+
const ret = wasm.wasmblock_has_fee_transaction(this.__wbg_ptr);
|
|
1087
|
+
return ret !== 0;
|
|
1135
1088
|
}
|
|
1136
1089
|
/**
|
|
1137
1090
|
* @returns {bigint}
|
|
@@ -1143,72 +1096,85 @@ class WasmBlock {
|
|
|
1143
1096
|
/**
|
|
1144
1097
|
* @returns {bigint}
|
|
1145
1098
|
*/
|
|
1146
|
-
get
|
|
1147
|
-
const ret = wasm.
|
|
1099
|
+
get avg_payout_graveyard() {
|
|
1100
|
+
const ret = wasm.wasmblock_avg_payout_graveyard(this.__wbg_ptr);
|
|
1148
1101
|
return BigInt.asUintN(64, ret);
|
|
1149
1102
|
}
|
|
1150
1103
|
/**
|
|
1151
1104
|
* @returns {bigint}
|
|
1152
1105
|
*/
|
|
1153
|
-
get
|
|
1154
|
-
const ret = wasm.
|
|
1106
|
+
get total_payout_routing() {
|
|
1107
|
+
const ret = wasm.wasmblock_total_payout_routing(this.__wbg_ptr);
|
|
1155
1108
|
return BigInt.asUintN(64, ret);
|
|
1156
1109
|
}
|
|
1157
1110
|
/**
|
|
1158
1111
|
* @returns {bigint}
|
|
1159
1112
|
*/
|
|
1160
|
-
get
|
|
1161
|
-
const ret = wasm.
|
|
1113
|
+
get fee_transaction_index() {
|
|
1114
|
+
const ret = wasm.wasmblock_fee_transaction_index(this.__wbg_ptr);
|
|
1162
1115
|
return BigInt.asUintN(64, ret);
|
|
1163
1116
|
}
|
|
1164
1117
|
/**
|
|
1165
1118
|
* @returns {bigint}
|
|
1166
1119
|
*/
|
|
1167
|
-
get
|
|
1168
|
-
const ret = wasm.
|
|
1120
|
+
get previous_block_unpaid() {
|
|
1121
|
+
const ret = wasm.wasmblock_previous_block_unpaid(this.__wbg_ptr);
|
|
1169
1122
|
return BigInt.asUintN(64, ret);
|
|
1170
1123
|
}
|
|
1171
1124
|
/**
|
|
1172
1125
|
* @returns {bigint}
|
|
1173
1126
|
*/
|
|
1174
|
-
get
|
|
1175
|
-
const ret = wasm.
|
|
1127
|
+
get total_fees_cumulative() {
|
|
1128
|
+
const ret = wasm.wasmblock_total_fees_cumulative(this.__wbg_ptr);
|
|
1176
1129
|
return BigInt.asUintN(64, ret);
|
|
1177
1130
|
}
|
|
1178
1131
|
/**
|
|
1179
1132
|
* @returns {bigint}
|
|
1180
1133
|
*/
|
|
1181
|
-
get
|
|
1182
|
-
const ret = wasm.
|
|
1134
|
+
get total_payout_treasury() {
|
|
1135
|
+
const ret = wasm.wasmblock_total_payout_treasury(this.__wbg_ptr);
|
|
1183
1136
|
return BigInt.asUintN(64, ret);
|
|
1184
1137
|
}
|
|
1185
1138
|
/**
|
|
1186
1139
|
* @returns {bigint}
|
|
1187
1140
|
*/
|
|
1188
|
-
get
|
|
1189
|
-
const ret = wasm.
|
|
1141
|
+
get total_payout_graveyard() {
|
|
1142
|
+
const ret = wasm.wasmblock_total_payout_graveyard(this.__wbg_ptr);
|
|
1190
1143
|
return BigInt.asUintN(64, ret);
|
|
1191
1144
|
}
|
|
1192
1145
|
/**
|
|
1193
|
-
* @returns {
|
|
1146
|
+
* @returns {string}
|
|
1194
1147
|
*/
|
|
1195
|
-
get
|
|
1196
|
-
const ret = wasm.
|
|
1197
|
-
return
|
|
1148
|
+
get previous_block_hash() {
|
|
1149
|
+
const ret = wasm.wasmblock_get_previous_block_hash(this.__wbg_ptr);
|
|
1150
|
+
return takeObject(ret);
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* @returns {boolean}
|
|
1154
|
+
*/
|
|
1155
|
+
get has_staking_transaction() {
|
|
1156
|
+
const ret = wasm.wasmblock_has_staking_transaction(this.__wbg_ptr);
|
|
1157
|
+
return ret !== 0;
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* @param {string} hash
|
|
1161
|
+
*/
|
|
1162
|
+
set previous_block_hash(hash) {
|
|
1163
|
+
wasm.wasmblock_set_previous_block_hash(this.__wbg_ptr, addHeapObject(hash));
|
|
1198
1164
|
}
|
|
1199
1165
|
/**
|
|
1200
1166
|
* @returns {bigint}
|
|
1201
1167
|
*/
|
|
1202
|
-
get
|
|
1203
|
-
const ret = wasm.
|
|
1168
|
+
get total_rebroadcast_nolan() {
|
|
1169
|
+
const ret = wasm.wasmblock_total_rebroadcast_nolan(this.__wbg_ptr);
|
|
1204
1170
|
return BigInt.asUintN(64, ret);
|
|
1205
1171
|
}
|
|
1206
1172
|
/**
|
|
1207
|
-
* @returns {
|
|
1173
|
+
* @returns {bigint}
|
|
1208
1174
|
*/
|
|
1209
|
-
get
|
|
1210
|
-
const ret = wasm.
|
|
1211
|
-
return ret
|
|
1175
|
+
get total_rebroadcast_slips() {
|
|
1176
|
+
const ret = wasm.wasmblock_total_rebroadcast_slips(this.__wbg_ptr);
|
|
1177
|
+
return BigInt.asUintN(64, ret);
|
|
1212
1178
|
}
|
|
1213
1179
|
/**
|
|
1214
1180
|
* @returns {boolean}
|
|
@@ -1225,47 +1191,80 @@ class WasmBlock {
|
|
|
1225
1191
|
return BigInt.asUintN(64, ret);
|
|
1226
1192
|
}
|
|
1227
1193
|
/**
|
|
1228
|
-
* @returns {
|
|
1194
|
+
* @returns {bigint}
|
|
1229
1195
|
*/
|
|
1230
|
-
get
|
|
1231
|
-
const ret = wasm.
|
|
1232
|
-
return ret
|
|
1196
|
+
get avg_nolan_rebroadcast_per_block() {
|
|
1197
|
+
const ret = wasm.wasmblock_avg_nolan_rebroadcast_per_block(this.__wbg_ptr);
|
|
1198
|
+
return BigInt.asUintN(64, ret);
|
|
1233
1199
|
}
|
|
1234
1200
|
/**
|
|
1235
|
-
* @returns {boolean}
|
|
1236
1201
|
*/
|
|
1237
|
-
|
|
1238
|
-
const ret = wasm.
|
|
1239
|
-
|
|
1202
|
+
constructor() {
|
|
1203
|
+
const ret = wasm.wasmblock_new();
|
|
1204
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1205
|
+
return this;
|
|
1240
1206
|
}
|
|
1241
1207
|
/**
|
|
1242
1208
|
* @returns {bigint}
|
|
1243
1209
|
*/
|
|
1244
|
-
get
|
|
1245
|
-
const ret = wasm.
|
|
1210
|
+
get id() {
|
|
1211
|
+
const ret = wasm.wasmblock_get_id(this.__wbg_ptr);
|
|
1246
1212
|
return BigInt.asUintN(64, ret);
|
|
1247
1213
|
}
|
|
1248
1214
|
/**
|
|
1215
|
+
* @param {bigint} id
|
|
1216
|
+
*/
|
|
1217
|
+
set id(id) {
|
|
1218
|
+
wasm.wasmblock_set_id(this.__wbg_ptr, id);
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1249
1221
|
* @returns {bigint}
|
|
1250
1222
|
*/
|
|
1251
|
-
get
|
|
1252
|
-
const ret = wasm.
|
|
1223
|
+
get burnfee() {
|
|
1224
|
+
const ret = wasm.wasmblock_burnfee(this.__wbg_ptr);
|
|
1253
1225
|
return BigInt.asUintN(64, ret);
|
|
1254
1226
|
}
|
|
1255
1227
|
/**
|
|
1228
|
+
* @returns {string}
|
|
1229
|
+
*/
|
|
1230
|
+
get hash() {
|
|
1231
|
+
const ret = wasm.wasmblock_get_hash(this.__wbg_ptr);
|
|
1232
|
+
return takeObject(ret);
|
|
1233
|
+
}
|
|
1234
|
+
/**
|
|
1235
|
+
* @returns {number}
|
|
1236
|
+
*/
|
|
1237
|
+
get type() {
|
|
1238
|
+
const ret = wasm.wasmblock_get_type(this.__wbg_ptr);
|
|
1239
|
+
return ret;
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* @param {number} t
|
|
1243
|
+
*/
|
|
1244
|
+
set type(t) {
|
|
1245
|
+
wasm.wasmblock_set_type(this.__wbg_ptr, t);
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1256
1248
|
* @returns {bigint}
|
|
1257
1249
|
*/
|
|
1258
|
-
get
|
|
1259
|
-
const ret = wasm.
|
|
1250
|
+
get treasury() {
|
|
1251
|
+
const ret = wasm.wasmblock_treasury(this.__wbg_ptr);
|
|
1260
1252
|
return BigInt.asUintN(64, ret);
|
|
1261
1253
|
}
|
|
1262
1254
|
/**
|
|
1263
1255
|
* @returns {bigint}
|
|
1264
1256
|
*/
|
|
1265
|
-
get
|
|
1266
|
-
const ret = wasm.
|
|
1257
|
+
get graveyard() {
|
|
1258
|
+
const ret = wasm.wasmblock_graveyard(this.__wbg_ptr);
|
|
1267
1259
|
return BigInt.asUintN(64, ret);
|
|
1268
1260
|
}
|
|
1261
|
+
/**
|
|
1262
|
+
* @returns {Uint8Array}
|
|
1263
|
+
*/
|
|
1264
|
+
serialize() {
|
|
1265
|
+
const ret = wasm.wasmblock_serialize(this.__wbg_ptr);
|
|
1266
|
+
return takeObject(ret);
|
|
1267
|
+
}
|
|
1269
1268
|
}
|
|
1270
1269
|
module.exports.WasmBlock = WasmBlock;
|
|
1271
1270
|
|
|
@@ -1296,10 +1295,33 @@ class WasmBlockchain {
|
|
|
1296
1295
|
wasm.__wbg_wasmblockchain_free(ptr);
|
|
1297
1296
|
}
|
|
1298
1297
|
/**
|
|
1299
|
-
* @returns {Promise<
|
|
1298
|
+
* @returns {Promise<string>}
|
|
1299
|
+
*/
|
|
1300
|
+
get_fork_id() {
|
|
1301
|
+
const ret = wasm.wasmblockchain_get_fork_id(this.__wbg_ptr);
|
|
1302
|
+
return takeObject(ret);
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* @param {string} hash
|
|
1306
|
+
* @returns {Promise<void>}
|
|
1307
|
+
*/
|
|
1308
|
+
set_fork_id(hash) {
|
|
1309
|
+
const ret = wasm.wasmblockchain_set_fork_id(this.__wbg_ptr, addHeapObject(hash));
|
|
1310
|
+
return takeObject(ret);
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* @param {bigint} block_id
|
|
1314
|
+
* @returns {Promise<Array<any>>}
|
|
1315
|
+
*/
|
|
1316
|
+
get_hashes_at_id(block_id) {
|
|
1317
|
+
const ret = wasm.wasmblockchain_get_hashes_at_id(this.__wbg_ptr, block_id);
|
|
1318
|
+
return takeObject(ret);
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* @returns {Promise<bigint>}
|
|
1300
1322
|
*/
|
|
1301
|
-
|
|
1302
|
-
const ret = wasm.
|
|
1323
|
+
get_last_burnfee() {
|
|
1324
|
+
const ret = wasm.wasmblockchain_get_last_burnfee(this.__wbg_ptr);
|
|
1303
1325
|
return takeObject(ret);
|
|
1304
1326
|
}
|
|
1305
1327
|
/**
|
|
@@ -1310,18 +1332,20 @@ class WasmBlockchain {
|
|
|
1310
1332
|
return takeObject(ret);
|
|
1311
1333
|
}
|
|
1312
1334
|
/**
|
|
1313
|
-
* @
|
|
1335
|
+
* @param {Function} reorg_cb
|
|
1336
|
+
* @param {Function} add_block_cb
|
|
1337
|
+
* @param {Function} confirm_cb
|
|
1338
|
+
* @returns {Promise<void>}
|
|
1314
1339
|
*/
|
|
1315
|
-
|
|
1316
|
-
const ret = wasm.
|
|
1340
|
+
register_callback(reorg_cb, add_block_cb, confirm_cb) {
|
|
1341
|
+
const ret = wasm.wasmblockchain_register_callback(this.__wbg_ptr, addHeapObject(reorg_cb), addHeapObject(add_block_cb), addHeapObject(confirm_cb));
|
|
1317
1342
|
return takeObject(ret);
|
|
1318
1343
|
}
|
|
1319
1344
|
/**
|
|
1320
|
-
* @
|
|
1321
|
-
* @returns {Promise<string>}
|
|
1345
|
+
* @returns {Promise<bigint>}
|
|
1322
1346
|
*/
|
|
1323
|
-
|
|
1324
|
-
const ret = wasm.
|
|
1347
|
+
get_last_timestamp() {
|
|
1348
|
+
const ret = wasm.wasmblockchain_get_last_timestamp(this.__wbg_ptr);
|
|
1325
1349
|
return takeObject(ret);
|
|
1326
1350
|
}
|
|
1327
1351
|
/**
|
|
@@ -1334,8 +1358,8 @@ class WasmBlockchain {
|
|
|
1334
1358
|
/**
|
|
1335
1359
|
* @returns {Promise<bigint>}
|
|
1336
1360
|
*/
|
|
1337
|
-
|
|
1338
|
-
const ret = wasm.
|
|
1361
|
+
get_latest_block_id() {
|
|
1362
|
+
const ret = wasm.wasmblockchain_get_latest_block_id(this.__wbg_ptr);
|
|
1339
1363
|
return takeObject(ret);
|
|
1340
1364
|
}
|
|
1341
1365
|
/**
|
|
@@ -1355,44 +1379,23 @@ class WasmBlockchain {
|
|
|
1355
1379
|
/**
|
|
1356
1380
|
* @returns {Promise<bigint>}
|
|
1357
1381
|
*/
|
|
1358
|
-
|
|
1359
|
-
const ret = wasm.
|
|
1382
|
+
get_prune_after_blocks() {
|
|
1383
|
+
const ret = wasm.wasmblockchain_get_prune_after_blocks(this.__wbg_ptr);
|
|
1360
1384
|
return takeObject(ret);
|
|
1361
1385
|
}
|
|
1362
1386
|
/**
|
|
1387
|
+
* @param {bigint} id
|
|
1363
1388
|
* @returns {Promise<string>}
|
|
1364
1389
|
*/
|
|
1365
|
-
|
|
1366
|
-
const ret = wasm.
|
|
1367
|
-
return takeObject(ret);
|
|
1368
|
-
}
|
|
1369
|
-
/**
|
|
1370
|
-
* @returns {Promise<bigint>}
|
|
1371
|
-
*/
|
|
1372
|
-
get_lowest_acceptable_block_id() {
|
|
1373
|
-
const ret = wasm.wasmblockchain_get_lowest_acceptable_block_id(this.__wbg_ptr);
|
|
1390
|
+
get_longest_chain_hash_at(id) {
|
|
1391
|
+
const ret = wasm.wasmblockchain_get_longest_chain_hash_at(this.__wbg_ptr, id);
|
|
1374
1392
|
return takeObject(ret);
|
|
1375
1393
|
}
|
|
1376
1394
|
/**
|
|
1377
1395
|
* @returns {Promise<bigint>}
|
|
1378
1396
|
*/
|
|
1379
|
-
|
|
1380
|
-
const ret = wasm.
|
|
1381
|
-
return takeObject(ret);
|
|
1382
|
-
}
|
|
1383
|
-
/**
|
|
1384
|
-
* @returns {Promise<string>}
|
|
1385
|
-
*/
|
|
1386
|
-
get_fork_id() {
|
|
1387
|
-
const ret = wasm.wasmblockchain_get_fork_id(this.__wbg_ptr);
|
|
1388
|
-
return takeObject(ret);
|
|
1389
|
-
}
|
|
1390
|
-
/**
|
|
1391
|
-
* @param {string} hash
|
|
1392
|
-
* @returns {Promise<void>}
|
|
1393
|
-
*/
|
|
1394
|
-
set_fork_id(hash) {
|
|
1395
|
-
const ret = wasm.wasmblockchain_set_fork_id(this.__wbg_ptr, addHeapObject(hash));
|
|
1397
|
+
get_block_confirmation_limit() {
|
|
1398
|
+
const ret = wasm.wasmblockchain_get_block_confirmation_limit(this.__wbg_ptr);
|
|
1396
1399
|
return takeObject(ret);
|
|
1397
1400
|
}
|
|
1398
1401
|
/**
|
|
@@ -1405,14 +1408,6 @@ class WasmBlockchain {
|
|
|
1405
1408
|
}
|
|
1406
1409
|
/**
|
|
1407
1410
|
* @param {bigint} block_id
|
|
1408
|
-
* @returns {Promise<Array<any>>}
|
|
1409
|
-
*/
|
|
1410
|
-
get_hashes_at_id(block_id) {
|
|
1411
|
-
const ret = wasm.wasmblockchain_get_hashes_at_id(this.__wbg_ptr, block_id);
|
|
1412
|
-
return takeObject(ret);
|
|
1413
|
-
}
|
|
1414
|
-
/**
|
|
1415
|
-
* @param {bigint} block_id
|
|
1416
1411
|
* @returns {Promise<void>}
|
|
1417
1412
|
*/
|
|
1418
1413
|
set_safe_to_prune_transaction(block_id) {
|
|
@@ -1422,25 +1417,29 @@ class WasmBlockchain {
|
|
|
1422
1417
|
/**
|
|
1423
1418
|
* @returns {Promise<bigint>}
|
|
1424
1419
|
*/
|
|
1425
|
-
|
|
1426
|
-
const ret = wasm.
|
|
1420
|
+
get_lowest_acceptable_block_id() {
|
|
1421
|
+
const ret = wasm.wasmblockchain_get_lowest_acceptable_block_id(this.__wbg_ptr);
|
|
1427
1422
|
return takeObject(ret);
|
|
1428
1423
|
}
|
|
1429
1424
|
/**
|
|
1430
1425
|
* @returns {Promise<bigint>}
|
|
1431
1426
|
*/
|
|
1432
|
-
|
|
1433
|
-
const ret = wasm.
|
|
1427
|
+
get_lowest_acceptable_timestamp() {
|
|
1428
|
+
const ret = wasm.wasmblockchain_get_lowest_acceptable_timestamp(this.__wbg_ptr);
|
|
1429
|
+
return takeObject(ret);
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* @returns {Promise<string>}
|
|
1433
|
+
*/
|
|
1434
|
+
get_lowest_acceptable_block_hash() {
|
|
1435
|
+
const ret = wasm.wasmblockchain_get_lowest_acceptable_block_hash(this.__wbg_ptr);
|
|
1434
1436
|
return takeObject(ret);
|
|
1435
1437
|
}
|
|
1436
1438
|
/**
|
|
1437
|
-
* @param {Function} reorg_cb
|
|
1438
|
-
* @param {Function} add_block_cb
|
|
1439
|
-
* @param {Function} confirm_cb
|
|
1440
1439
|
* @returns {Promise<void>}
|
|
1441
1440
|
*/
|
|
1442
|
-
|
|
1443
|
-
const ret = wasm.
|
|
1441
|
+
reset() {
|
|
1442
|
+
const ret = wasm.wasmblockchain_reset(this.__wbg_ptr);
|
|
1444
1443
|
return takeObject(ret);
|
|
1445
1444
|
}
|
|
1446
1445
|
}
|
|
@@ -1493,53 +1492,39 @@ class WasmConsensusValues {
|
|
|
1493
1492
|
wasm.__wbg_wasmconsensusvalues_free(ptr);
|
|
1494
1493
|
}
|
|
1495
1494
|
/**
|
|
1496
|
-
* @returns {
|
|
1497
|
-
*/
|
|
1498
|
-
get it_num() {
|
|
1499
|
-
const ret = wasm.wasmconsensusvalues_it_num(this.__wbg_ptr);
|
|
1500
|
-
return ret;
|
|
1501
|
-
}
|
|
1502
|
-
/**
|
|
1503
|
-
* @returns {any}
|
|
1504
|
-
*/
|
|
1505
|
-
fee_transaction() {
|
|
1506
|
-
const ret = wasm.wasmconsensusvalues_fee_transaction(this.__wbg_ptr);
|
|
1507
|
-
return takeObject(ret);
|
|
1508
|
-
}
|
|
1509
|
-
/**
|
|
1510
|
-
* @returns {number}
|
|
1495
|
+
* @returns {bigint}
|
|
1511
1496
|
*/
|
|
1512
|
-
get
|
|
1513
|
-
const ret = wasm.
|
|
1514
|
-
return ret
|
|
1497
|
+
get avg_income() {
|
|
1498
|
+
const ret = wasm.wasmconsensusvalues_avg_income(this.__wbg_ptr);
|
|
1499
|
+
return BigInt.asUintN(64, ret);
|
|
1515
1500
|
}
|
|
1516
1501
|
/**
|
|
1517
|
-
* @returns {
|
|
1502
|
+
* @returns {bigint}
|
|
1518
1503
|
*/
|
|
1519
|
-
get
|
|
1520
|
-
const ret = wasm.
|
|
1521
|
-
return ret;
|
|
1504
|
+
get total_fees() {
|
|
1505
|
+
const ret = wasm.wasmconsensusvalues_total_fees(this.__wbg_ptr);
|
|
1506
|
+
return BigInt.asUintN(64, ret);
|
|
1522
1507
|
}
|
|
1523
1508
|
/**
|
|
1524
|
-
* @returns {
|
|
1509
|
+
* @returns {bigint}
|
|
1525
1510
|
*/
|
|
1526
|
-
get
|
|
1527
|
-
const ret = wasm.
|
|
1528
|
-
return ret
|
|
1511
|
+
get avg_total_fees() {
|
|
1512
|
+
const ret = wasm.wasmconsensusvalues_avg_income(this.__wbg_ptr);
|
|
1513
|
+
return BigInt.asUintN(64, ret);
|
|
1529
1514
|
}
|
|
1530
1515
|
/**
|
|
1531
|
-
* @returns {
|
|
1516
|
+
* @returns {any}
|
|
1532
1517
|
*/
|
|
1533
|
-
|
|
1534
|
-
const ret = wasm.
|
|
1535
|
-
return ret
|
|
1518
|
+
fee_transaction() {
|
|
1519
|
+
const ret = wasm.wasmconsensusvalues_fee_transaction(this.__wbg_ptr);
|
|
1520
|
+
return takeObject(ret);
|
|
1536
1521
|
}
|
|
1537
1522
|
/**
|
|
1538
|
-
* @returns {
|
|
1523
|
+
* @returns {string}
|
|
1539
1524
|
*/
|
|
1540
|
-
get
|
|
1541
|
-
const ret = wasm.
|
|
1542
|
-
return
|
|
1525
|
+
get rebroadcast_hash() {
|
|
1526
|
+
const ret = wasm.wasmconsensusvalues_rebroadcast_hash(this.__wbg_ptr);
|
|
1527
|
+
return takeObject(ret);
|
|
1543
1528
|
}
|
|
1544
1529
|
/**
|
|
1545
1530
|
* @returns {bigint}
|
|
@@ -1551,15 +1536,15 @@ class WasmConsensusValues {
|
|
|
1551
1536
|
/**
|
|
1552
1537
|
* @returns {bigint}
|
|
1553
1538
|
*/
|
|
1554
|
-
get
|
|
1555
|
-
const ret = wasm.
|
|
1539
|
+
get total_rebroadcast_nolan() {
|
|
1540
|
+
const ret = wasm.wasmconsensusvalues_total_rebroadcast_nolan(this.__wbg_ptr);
|
|
1556
1541
|
return BigInt.asUintN(64, ret);
|
|
1557
1542
|
}
|
|
1558
1543
|
/**
|
|
1559
1544
|
* @returns {bigint}
|
|
1560
1545
|
*/
|
|
1561
|
-
get
|
|
1562
|
-
const ret = wasm.
|
|
1546
|
+
get total_rebroadcast_slips() {
|
|
1547
|
+
const ret = wasm.wasmconsensusvalues_total_rebroadcast_slips(this.__wbg_ptr);
|
|
1563
1548
|
return BigInt.asUintN(64, ret);
|
|
1564
1549
|
}
|
|
1565
1550
|
/**
|
|
@@ -1577,25 +1562,39 @@ class WasmConsensusValues {
|
|
|
1577
1562
|
return BigInt.asUintN(64, ret);
|
|
1578
1563
|
}
|
|
1579
1564
|
/**
|
|
1580
|
-
* @returns {
|
|
1565
|
+
* @returns {number}
|
|
1581
1566
|
*/
|
|
1582
|
-
get
|
|
1583
|
-
const ret = wasm.
|
|
1584
|
-
return
|
|
1567
|
+
get ft_num() {
|
|
1568
|
+
const ret = wasm.wasmconsensusvalues_ft_num(this.__wbg_ptr);
|
|
1569
|
+
return ret;
|
|
1585
1570
|
}
|
|
1586
1571
|
/**
|
|
1587
|
-
* @returns {
|
|
1572
|
+
* @returns {number}
|
|
1588
1573
|
*/
|
|
1589
|
-
get
|
|
1590
|
-
const ret = wasm.
|
|
1591
|
-
return
|
|
1574
|
+
get it_num() {
|
|
1575
|
+
const ret = wasm.wasmconsensusvalues_it_num(this.__wbg_ptr);
|
|
1576
|
+
return ret;
|
|
1592
1577
|
}
|
|
1593
1578
|
/**
|
|
1594
|
-
* @returns {
|
|
1579
|
+
* @returns {number}
|
|
1595
1580
|
*/
|
|
1596
|
-
get
|
|
1597
|
-
const ret = wasm.
|
|
1598
|
-
return
|
|
1581
|
+
get ft_index() {
|
|
1582
|
+
const ret = wasm.wasmconsensusvalues_ft_index(this.__wbg_ptr);
|
|
1583
|
+
return ret >>> 0;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* @returns {number}
|
|
1587
|
+
*/
|
|
1588
|
+
get gt_index() {
|
|
1589
|
+
const ret = wasm.wasmconsensusvalues_gt_index(this.__wbg_ptr);
|
|
1590
|
+
return ret >>> 0;
|
|
1591
|
+
}
|
|
1592
|
+
/**
|
|
1593
|
+
* @returns {number}
|
|
1594
|
+
*/
|
|
1595
|
+
get it_index() {
|
|
1596
|
+
const ret = wasm.wasmconsensusvalues_it_index(this.__wbg_ptr);
|
|
1597
|
+
return ret >>> 0;
|
|
1599
1598
|
}
|
|
1600
1599
|
}
|
|
1601
1600
|
module.exports.WasmConsensusValues = WasmConsensusValues;
|
|
@@ -1629,12 +1628,12 @@ class WasmHop {
|
|
|
1629
1628
|
/**
|
|
1630
1629
|
* @returns {string}
|
|
1631
1630
|
*/
|
|
1632
|
-
get
|
|
1631
|
+
get to() {
|
|
1633
1632
|
let deferred1_0;
|
|
1634
1633
|
let deferred1_1;
|
|
1635
1634
|
try {
|
|
1636
1635
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1637
|
-
wasm.
|
|
1636
|
+
wasm.wasmhop_to(retptr, this.__wbg_ptr);
|
|
1638
1637
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1639
1638
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1640
1639
|
deferred1_0 = r0;
|
|
@@ -1667,12 +1666,12 @@ class WasmHop {
|
|
|
1667
1666
|
/**
|
|
1668
1667
|
* @returns {string}
|
|
1669
1668
|
*/
|
|
1670
|
-
get
|
|
1669
|
+
get from() {
|
|
1671
1670
|
let deferred1_0;
|
|
1672
1671
|
let deferred1_1;
|
|
1673
1672
|
try {
|
|
1674
1673
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1675
|
-
wasm.
|
|
1674
|
+
wasm.wasmhop_from(retptr, this.__wbg_ptr);
|
|
1676
1675
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1677
1676
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1678
1677
|
deferred1_0 = r0;
|
|
@@ -1713,11 +1712,14 @@ class WasmNFT {
|
|
|
1713
1712
|
wasm.__wbg_wasmnft_free(ptr);
|
|
1714
1713
|
}
|
|
1715
1714
|
/**
|
|
1715
|
+
* @param {Uint8Array} arr
|
|
1716
1716
|
*/
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1717
|
+
set tx_sig(arr) {
|
|
1718
|
+
try {
|
|
1719
|
+
wasm.wasmnft_set_tx_sig(this.__wbg_ptr, addBorrowedObject(arr));
|
|
1720
|
+
} finally {
|
|
1721
|
+
heap[stack_pointer++] = undefined;
|
|
1722
|
+
}
|
|
1721
1723
|
}
|
|
1722
1724
|
/**
|
|
1723
1725
|
* @returns {Uint8Array}
|
|
@@ -1727,38 +1729,49 @@ class WasmNFT {
|
|
|
1727
1729
|
return takeObject(ret);
|
|
1728
1730
|
}
|
|
1729
1731
|
/**
|
|
1730
|
-
* @param {Uint8Array} arr
|
|
1731
1732
|
*/
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
heap[stack_pointer++] = undefined;
|
|
1737
|
-
}
|
|
1733
|
+
constructor() {
|
|
1734
|
+
const ret = wasm.wasmnft_new();
|
|
1735
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1736
|
+
return this;
|
|
1738
1737
|
}
|
|
1739
1738
|
/**
|
|
1740
|
-
* @returns {
|
|
1739
|
+
* @returns {WasmSlip}
|
|
1741
1740
|
*/
|
|
1742
|
-
get
|
|
1743
|
-
const ret = wasm.
|
|
1744
|
-
return
|
|
1741
|
+
get slip1() {
|
|
1742
|
+
const ret = wasm.wasmnft_slip1(this.__wbg_ptr);
|
|
1743
|
+
return WasmSlip.__wrap(ret);
|
|
1744
|
+
}
|
|
1745
|
+
/**
|
|
1746
|
+
* @returns {WasmSlip}
|
|
1747
|
+
*/
|
|
1748
|
+
get slip2() {
|
|
1749
|
+
const ret = wasm.wasmnft_slip2(this.__wbg_ptr);
|
|
1750
|
+
return WasmSlip.__wrap(ret);
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* @returns {WasmSlip}
|
|
1754
|
+
*/
|
|
1755
|
+
get slip3() {
|
|
1756
|
+
const ret = wasm.wasmnft_slip3(this.__wbg_ptr);
|
|
1757
|
+
return WasmSlip.__wrap(ret);
|
|
1745
1758
|
}
|
|
1746
1759
|
/**
|
|
1747
1760
|
* @param {Uint8Array} arr
|
|
1748
1761
|
*/
|
|
1749
|
-
set
|
|
1762
|
+
set id(arr) {
|
|
1750
1763
|
try {
|
|
1751
|
-
wasm.
|
|
1764
|
+
wasm.wasmnft_set_id(this.__wbg_ptr, addBorrowedObject(arr));
|
|
1752
1765
|
} finally {
|
|
1753
1766
|
heap[stack_pointer++] = undefined;
|
|
1754
1767
|
}
|
|
1755
1768
|
}
|
|
1756
1769
|
/**
|
|
1757
|
-
* @returns {
|
|
1758
|
-
*/
|
|
1759
|
-
get
|
|
1760
|
-
const ret = wasm.
|
|
1761
|
-
return
|
|
1770
|
+
* @returns {Uint8Array}
|
|
1771
|
+
*/
|
|
1772
|
+
get tx_sig() {
|
|
1773
|
+
const ret = wasm.wasmnft_tx_sig(this.__wbg_ptr);
|
|
1774
|
+
return takeObject(ret);
|
|
1762
1775
|
}
|
|
1763
1776
|
/**
|
|
1764
1777
|
* @param {WasmSlip} ws
|
|
@@ -1768,13 +1781,6 @@ class WasmNFT {
|
|
|
1768
1781
|
wasm.wasmnft_set_slip1(this.__wbg_ptr, ws.__wbg_ptr);
|
|
1769
1782
|
}
|
|
1770
1783
|
/**
|
|
1771
|
-
* @returns {WasmSlip}
|
|
1772
|
-
*/
|
|
1773
|
-
get slip2() {
|
|
1774
|
-
const ret = wasm.wasmnft_slip2(this.__wbg_ptr);
|
|
1775
|
-
return WasmSlip.__wrap(ret);
|
|
1776
|
-
}
|
|
1777
|
-
/**
|
|
1778
1784
|
* @param {WasmSlip} ws
|
|
1779
1785
|
*/
|
|
1780
1786
|
set slip2(ws) {
|
|
@@ -1782,13 +1788,6 @@ class WasmNFT {
|
|
|
1782
1788
|
wasm.wasmnft_set_slip2(this.__wbg_ptr, ws.__wbg_ptr);
|
|
1783
1789
|
}
|
|
1784
1790
|
/**
|
|
1785
|
-
* @returns {WasmSlip}
|
|
1786
|
-
*/
|
|
1787
|
-
get slip3() {
|
|
1788
|
-
const ret = wasm.wasmnft_slip3(this.__wbg_ptr);
|
|
1789
|
-
return WasmSlip.__wrap(ret);
|
|
1790
|
-
}
|
|
1791
|
-
/**
|
|
1792
1791
|
* @param {WasmSlip} ws
|
|
1793
1792
|
*/
|
|
1794
1793
|
set slip3(ws) {
|
|
@@ -1827,11 +1826,19 @@ class WasmPeer {
|
|
|
1827
1826
|
/**
|
|
1828
1827
|
* @returns {string}
|
|
1829
1828
|
*/
|
|
1830
|
-
get
|
|
1831
|
-
const ret = wasm.
|
|
1829
|
+
get status() {
|
|
1830
|
+
const ret = wasm.wasmpeer_get_status(this.__wbg_ptr);
|
|
1832
1831
|
return takeObject(ret);
|
|
1833
1832
|
}
|
|
1834
1833
|
/**
|
|
1834
|
+
* @param {string} service
|
|
1835
|
+
* @returns {boolean}
|
|
1836
|
+
*/
|
|
1837
|
+
has_service(service) {
|
|
1838
|
+
const ret = wasm.wasmpeer_has_service(this.__wbg_ptr, addHeapObject(service));
|
|
1839
|
+
return ret !== 0;
|
|
1840
|
+
}
|
|
1841
|
+
/**
|
|
1835
1842
|
* @returns {Array<any>}
|
|
1836
1843
|
*/
|
|
1837
1844
|
get key_list() {
|
|
@@ -1839,19 +1846,17 @@ class WasmPeer {
|
|
|
1839
1846
|
return takeObject(ret);
|
|
1840
1847
|
}
|
|
1841
1848
|
/**
|
|
1842
|
-
* @returns {
|
|
1849
|
+
* @returns {any}
|
|
1843
1850
|
*/
|
|
1844
|
-
get
|
|
1845
|
-
const ret = wasm.
|
|
1846
|
-
return
|
|
1851
|
+
get services() {
|
|
1852
|
+
const ret = wasm.wasmpeer_get_services(this.__wbg_ptr);
|
|
1853
|
+
return takeObject(ret);
|
|
1847
1854
|
}
|
|
1848
1855
|
/**
|
|
1849
|
-
* @param {
|
|
1856
|
+
* @param {any} services
|
|
1850
1857
|
*/
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1854
|
-
return this;
|
|
1858
|
+
set services(services) {
|
|
1859
|
+
wasm.wasmpeer_set_services(this.__wbg_ptr, addHeapObject(services));
|
|
1855
1860
|
}
|
|
1856
1861
|
/**
|
|
1857
1862
|
* @returns {string}
|
|
@@ -1861,32 +1866,26 @@ class WasmPeer {
|
|
|
1861
1866
|
return takeObject(ret);
|
|
1862
1867
|
}
|
|
1863
1868
|
/**
|
|
1864
|
-
* @returns {
|
|
1865
|
-
*/
|
|
1866
|
-
get services() {
|
|
1867
|
-
const ret = wasm.wasmpeer_get_services(this.__wbg_ptr);
|
|
1868
|
-
return takeObject(ret);
|
|
1869
|
-
}
|
|
1870
|
-
/**
|
|
1871
|
-
* @param {any} services
|
|
1869
|
+
* @returns {bigint}
|
|
1872
1870
|
*/
|
|
1873
|
-
|
|
1874
|
-
wasm.
|
|
1871
|
+
get peer_index() {
|
|
1872
|
+
const ret = wasm.wasmpeer_get_peer_index(this.__wbg_ptr);
|
|
1873
|
+
return BigInt.asUintN(64, ret);
|
|
1875
1874
|
}
|
|
1876
1875
|
/**
|
|
1877
|
-
* @
|
|
1878
|
-
* @returns {boolean}
|
|
1876
|
+
* @returns {string}
|
|
1879
1877
|
*/
|
|
1880
|
-
|
|
1881
|
-
const ret = wasm.
|
|
1882
|
-
return ret
|
|
1878
|
+
get public_key() {
|
|
1879
|
+
const ret = wasm.wasmpeer_get_public_key(this.__wbg_ptr);
|
|
1880
|
+
return takeObject(ret);
|
|
1883
1881
|
}
|
|
1884
1882
|
/**
|
|
1885
|
-
* @
|
|
1883
|
+
* @param {bigint} peer_index
|
|
1886
1884
|
*/
|
|
1887
|
-
|
|
1888
|
-
const ret = wasm.
|
|
1889
|
-
|
|
1885
|
+
constructor(peer_index) {
|
|
1886
|
+
const ret = wasm.wasmpeer_new(peer_index);
|
|
1887
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1888
|
+
return this;
|
|
1890
1889
|
}
|
|
1891
1890
|
}
|
|
1892
1891
|
module.exports.WasmPeer = WasmPeer;
|
|
@@ -1918,17 +1917,17 @@ class WasmPeerService {
|
|
|
1918
1917
|
wasm.__wbg_wasmpeerservice_free(ptr);
|
|
1919
1918
|
}
|
|
1920
1919
|
/**
|
|
1920
|
+
* @returns {string}
|
|
1921
1921
|
*/
|
|
1922
|
-
|
|
1923
|
-
const ret = wasm.
|
|
1924
|
-
|
|
1925
|
-
return this;
|
|
1922
|
+
get domain() {
|
|
1923
|
+
const ret = wasm.wasmpeerservice_get_domain(this.__wbg_ptr);
|
|
1924
|
+
return takeObject(ret);
|
|
1926
1925
|
}
|
|
1927
1926
|
/**
|
|
1928
1927
|
* @param {string} value
|
|
1929
1928
|
*/
|
|
1930
|
-
set
|
|
1931
|
-
wasm.
|
|
1929
|
+
set domain(value) {
|
|
1930
|
+
wasm.wasmpeerservice_set_domain(this.__wbg_ptr, addHeapObject(value));
|
|
1932
1931
|
}
|
|
1933
1932
|
/**
|
|
1934
1933
|
* @returns {string}
|
|
@@ -1940,8 +1939,15 @@ class WasmPeerService {
|
|
|
1940
1939
|
/**
|
|
1941
1940
|
* @param {string} value
|
|
1942
1941
|
*/
|
|
1943
|
-
set
|
|
1944
|
-
wasm.
|
|
1942
|
+
set service(value) {
|
|
1943
|
+
wasm.wasmpeerservice_set_service(this.__wbg_ptr, addHeapObject(value));
|
|
1944
|
+
}
|
|
1945
|
+
/**
|
|
1946
|
+
*/
|
|
1947
|
+
constructor() {
|
|
1948
|
+
const ret = wasm.wasmpeerservice_new();
|
|
1949
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1950
|
+
return this;
|
|
1945
1951
|
}
|
|
1946
1952
|
/**
|
|
1947
1953
|
* @returns {string}
|
|
@@ -1953,15 +1959,8 @@ class WasmPeerService {
|
|
|
1953
1959
|
/**
|
|
1954
1960
|
* @param {string} value
|
|
1955
1961
|
*/
|
|
1956
|
-
set
|
|
1957
|
-
wasm.
|
|
1958
|
-
}
|
|
1959
|
-
/**
|
|
1960
|
-
* @returns {string}
|
|
1961
|
-
*/
|
|
1962
|
-
get domain() {
|
|
1963
|
-
const ret = wasm.wasmpeerservice_get_domain(this.__wbg_ptr);
|
|
1964
|
-
return takeObject(ret);
|
|
1962
|
+
set name(value) {
|
|
1963
|
+
wasm.wasmpeerservice_set_name(this.__wbg_ptr, addHeapObject(value));
|
|
1965
1964
|
}
|
|
1966
1965
|
}
|
|
1967
1966
|
module.exports.WasmPeerService = WasmPeerService;
|
|
@@ -1985,6 +1984,13 @@ class WasmPeerServiceList {
|
|
|
1985
1984
|
wasm.__wbg_wasmpeerservicelist_free(ptr);
|
|
1986
1985
|
}
|
|
1987
1986
|
/**
|
|
1987
|
+
*/
|
|
1988
|
+
constructor() {
|
|
1989
|
+
const ret = wasm.wasmpeerservicelist_new();
|
|
1990
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1991
|
+
return this;
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1988
1994
|
* @param {WasmPeerService} service
|
|
1989
1995
|
*/
|
|
1990
1996
|
push(service) {
|
|
@@ -1992,13 +1998,6 @@ class WasmPeerServiceList {
|
|
|
1992
1998
|
var ptr0 = service.__destroy_into_raw();
|
|
1993
1999
|
wasm.wasmpeerservicelist_push(this.__wbg_ptr, ptr0);
|
|
1994
2000
|
}
|
|
1995
|
-
/**
|
|
1996
|
-
*/
|
|
1997
|
-
constructor() {
|
|
1998
|
-
const ret = wasm.wasmpeerservicelist_new();
|
|
1999
|
-
this.__wbg_ptr = ret >>> 0;
|
|
2000
|
-
return this;
|
|
2001
|
-
}
|
|
2002
2001
|
}
|
|
2003
2002
|
module.exports.WasmPeerServiceList = WasmPeerServiceList;
|
|
2004
2003
|
|
|
@@ -2029,11 +2028,11 @@ class WasmSlip {
|
|
|
2029
2028
|
wasm.__wbg_wasmslip_free(ptr);
|
|
2030
2029
|
}
|
|
2031
2030
|
/**
|
|
2032
|
-
* @returns {
|
|
2031
|
+
* @returns {string}
|
|
2033
2032
|
*/
|
|
2034
|
-
get
|
|
2035
|
-
const ret = wasm.
|
|
2036
|
-
return
|
|
2033
|
+
get public_key() {
|
|
2034
|
+
const ret = wasm.wasmslip_public_key(this.__wbg_ptr);
|
|
2035
|
+
return takeObject(ret);
|
|
2037
2036
|
}
|
|
2038
2037
|
/**
|
|
2039
2038
|
* @param {bigint} amount
|
|
@@ -2044,35 +2043,40 @@ class WasmSlip {
|
|
|
2044
2043
|
/**
|
|
2045
2044
|
* @returns {number}
|
|
2046
2045
|
*/
|
|
2047
|
-
get
|
|
2048
|
-
const ret = wasm.
|
|
2046
|
+
get slip_index() {
|
|
2047
|
+
const ret = wasm.wasmslip_slip_index(this.__wbg_ptr);
|
|
2049
2048
|
return ret;
|
|
2050
2049
|
}
|
|
2051
2050
|
/**
|
|
2052
|
-
* @
|
|
2051
|
+
* @returns {bigint}
|
|
2053
2052
|
*/
|
|
2054
|
-
|
|
2055
|
-
wasm.
|
|
2053
|
+
get tx_ordinal() {
|
|
2054
|
+
const ret = wasm.wasmslip_tx_ordinal(this.__wbg_ptr);
|
|
2055
|
+
return BigInt.asUintN(64, ret);
|
|
2056
2056
|
}
|
|
2057
2057
|
/**
|
|
2058
|
-
* @
|
|
2058
|
+
* @param {bigint} id
|
|
2059
2059
|
*/
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
return takeObject(ret);
|
|
2060
|
+
set block_id(id) {
|
|
2061
|
+
wasm.wasmslip_set_block_id(this.__wbg_ptr, id);
|
|
2063
2062
|
}
|
|
2064
2063
|
/**
|
|
2065
2064
|
* @param {string} key
|
|
2066
2065
|
*/
|
|
2067
|
-
set
|
|
2068
|
-
wasm.
|
|
2066
|
+
set utxo_key(key) {
|
|
2067
|
+
wasm.wasmslip_set_utxo_key(this.__wbg_ptr, addHeapObject(key));
|
|
2069
2068
|
}
|
|
2070
2069
|
/**
|
|
2071
|
-
* @
|
|
2070
|
+
* @param {number} slip_type
|
|
2072
2071
|
*/
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2072
|
+
set slip_type(slip_type) {
|
|
2073
|
+
wasm.wasmslip_set_slip_type(this.__wbg_ptr, slip_type);
|
|
2074
|
+
}
|
|
2075
|
+
/**
|
|
2076
|
+
* @param {string} key
|
|
2077
|
+
*/
|
|
2078
|
+
set public_key(key) {
|
|
2079
|
+
wasm.wasmslip_set_public_key(this.__wbg_ptr, addHeapObject(key));
|
|
2076
2080
|
}
|
|
2077
2081
|
/**
|
|
2078
2082
|
* @param {number} index
|
|
@@ -2081,36 +2085,31 @@ class WasmSlip {
|
|
|
2081
2085
|
wasm.wasmslip_set_slip_index(this.__wbg_ptr, index);
|
|
2082
2086
|
}
|
|
2083
2087
|
/**
|
|
2084
|
-
* @
|
|
2088
|
+
* @param {bigint} ordinal
|
|
2085
2089
|
*/
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
return BigInt.asUintN(64, ret);
|
|
2090
|
+
set tx_ordinal(ordinal) {
|
|
2091
|
+
wasm.wasmslip_set_tx_ordinal(this.__wbg_ptr, ordinal);
|
|
2089
2092
|
}
|
|
2090
2093
|
/**
|
|
2091
|
-
* @param {bigint} id
|
|
2092
2094
|
*/
|
|
2093
|
-
|
|
2094
|
-
wasm.
|
|
2095
|
+
constructor() {
|
|
2096
|
+
const ret = wasm.wasmslip_new();
|
|
2097
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2098
|
+
return this;
|
|
2095
2099
|
}
|
|
2096
2100
|
/**
|
|
2097
2101
|
* @returns {bigint}
|
|
2098
2102
|
*/
|
|
2099
|
-
get
|
|
2100
|
-
const ret = wasm.
|
|
2103
|
+
get amount() {
|
|
2104
|
+
const ret = wasm.wasmslip_amount(this.__wbg_ptr);
|
|
2101
2105
|
return BigInt.asUintN(64, ret);
|
|
2102
2106
|
}
|
|
2103
2107
|
/**
|
|
2104
|
-
* @
|
|
2105
|
-
*/
|
|
2106
|
-
set tx_ordinal(ordinal) {
|
|
2107
|
-
wasm.wasmslip_set_tx_ordinal(this.__wbg_ptr, ordinal);
|
|
2108
|
-
}
|
|
2109
|
-
/**
|
|
2110
|
-
* @param {string} key
|
|
2108
|
+
* @returns {bigint}
|
|
2111
2109
|
*/
|
|
2112
|
-
|
|
2113
|
-
wasm.
|
|
2110
|
+
get block_id() {
|
|
2111
|
+
const ret = wasm.wasmslip_block_id(this.__wbg_ptr);
|
|
2112
|
+
return BigInt.asUintN(64, ret);
|
|
2114
2113
|
}
|
|
2115
2114
|
/**
|
|
2116
2115
|
* @returns {string}
|
|
@@ -2120,11 +2119,11 @@ class WasmSlip {
|
|
|
2120
2119
|
return takeObject(ret);
|
|
2121
2120
|
}
|
|
2122
2121
|
/**
|
|
2122
|
+
* @returns {number}
|
|
2123
2123
|
*/
|
|
2124
|
-
|
|
2125
|
-
const ret = wasm.
|
|
2126
|
-
|
|
2127
|
-
return this;
|
|
2124
|
+
get slip_type() {
|
|
2125
|
+
const ret = wasm.wasmslip_slip_type(this.__wbg_ptr);
|
|
2126
|
+
return ret;
|
|
2128
2127
|
}
|
|
2129
2128
|
}
|
|
2130
2129
|
module.exports.WasmSlip = WasmSlip;
|
|
@@ -2177,25 +2176,53 @@ class WasmTransaction {
|
|
|
2177
2176
|
wasm.__wbg_wasmtransaction_free(ptr);
|
|
2178
2177
|
}
|
|
2179
2178
|
/**
|
|
2179
|
+
* @returns {bigint}
|
|
2180
2180
|
*/
|
|
2181
|
-
|
|
2182
|
-
const ret = wasm.
|
|
2183
|
-
|
|
2184
|
-
return this;
|
|
2181
|
+
get total_fees() {
|
|
2182
|
+
const ret = wasm.wasmtransaction_total_fees(this.__wbg_ptr);
|
|
2183
|
+
return BigInt.asUintN(64, ret);
|
|
2185
2184
|
}
|
|
2186
2185
|
/**
|
|
2187
|
-
* @
|
|
2186
|
+
* @param {WasmSlip} slip
|
|
2188
2187
|
*/
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2188
|
+
add_to_slip(slip) {
|
|
2189
|
+
_assertClass(slip, WasmSlip);
|
|
2190
|
+
var ptr0 = slip.__destroy_into_raw();
|
|
2191
|
+
wasm.wasmtransaction_add_to_slip(this.__wbg_ptr, ptr0);
|
|
2192
2192
|
}
|
|
2193
2193
|
/**
|
|
2194
|
-
* @
|
|
2194
|
+
* @param {Uint8Array} buffer
|
|
2195
|
+
* @returns {WasmTransaction}
|
|
2195
2196
|
*/
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2197
|
+
static deserialize(buffer) {
|
|
2198
|
+
try {
|
|
2199
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2200
|
+
wasm.wasmtransaction_deserialize(retptr, addHeapObject(buffer));
|
|
2201
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2202
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2203
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
2204
|
+
if (r2) {
|
|
2205
|
+
throw takeObject(r1);
|
|
2206
|
+
}
|
|
2207
|
+
return WasmTransaction.__wrap(r0);
|
|
2208
|
+
} finally {
|
|
2209
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
/**
|
|
2213
|
+
* @param {WasmSlip} slip
|
|
2214
|
+
*/
|
|
2215
|
+
add_from_slip(slip) {
|
|
2216
|
+
_assertClass(slip, WasmSlip);
|
|
2217
|
+
var ptr0 = slip.__destroy_into_raw();
|
|
2218
|
+
wasm.wasmtransaction_add_from_slip(this.__wbg_ptr, ptr0);
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* @returns {bigint}
|
|
2222
|
+
*/
|
|
2223
|
+
get timestamp() {
|
|
2224
|
+
const ret = wasm.wasmtransaction_get_timestamp(this.__wbg_ptr);
|
|
2225
|
+
return BigInt.asUintN(64, ret);
|
|
2199
2226
|
}
|
|
2200
2227
|
/**
|
|
2201
2228
|
* @param {string} signature
|
|
@@ -2204,20 +2231,17 @@ class WasmTransaction {
|
|
|
2204
2231
|
wasm.wasmtransaction_set_signature(this.__wbg_ptr, addHeapObject(signature));
|
|
2205
2232
|
}
|
|
2206
2233
|
/**
|
|
2207
|
-
* @param {
|
|
2234
|
+
* @param {bigint} timestamp
|
|
2208
2235
|
*/
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
var ptr0 = slip.__destroy_into_raw();
|
|
2212
|
-
wasm.wasmtransaction_add_to_slip(this.__wbg_ptr, ptr0);
|
|
2236
|
+
set timestamp(timestamp) {
|
|
2237
|
+
wasm.wasmtransaction_set_timestamp(this.__wbg_ptr, timestamp);
|
|
2213
2238
|
}
|
|
2214
2239
|
/**
|
|
2215
|
-
* @
|
|
2240
|
+
* @returns {Array<any>}
|
|
2216
2241
|
*/
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
wasm.wasmtransaction_add_from_slip(this.__wbg_ptr, ptr0);
|
|
2242
|
+
get routing_path() {
|
|
2243
|
+
const ret = wasm.wasmtransaction_get_routing_path(this.__wbg_ptr);
|
|
2244
|
+
return takeObject(ret);
|
|
2221
2245
|
}
|
|
2222
2246
|
/**
|
|
2223
2247
|
* @returns {number}
|
|
@@ -2240,6 +2264,13 @@ class WasmTransaction {
|
|
|
2240
2264
|
return takeObject(ret);
|
|
2241
2265
|
}
|
|
2242
2266
|
/**
|
|
2267
|
+
*/
|
|
2268
|
+
constructor() {
|
|
2269
|
+
const ret = wasm.wasmtransaction_new();
|
|
2270
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2271
|
+
return this;
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2243
2274
|
* @returns {Array<any>}
|
|
2244
2275
|
*/
|
|
2245
2276
|
get from() {
|
|
@@ -2247,19 +2278,26 @@ class WasmTransaction {
|
|
|
2247
2278
|
return takeObject(ret);
|
|
2248
2279
|
}
|
|
2249
2280
|
/**
|
|
2281
|
+
* @returns {Promise<void>}
|
|
2282
|
+
*/
|
|
2283
|
+
sign() {
|
|
2284
|
+
const ret = wasm.wasmtransaction_sign(this.__wbg_ptr);
|
|
2285
|
+
return takeObject(ret);
|
|
2286
|
+
}
|
|
2287
|
+
/**
|
|
2250
2288
|
* @param {string} key
|
|
2251
2289
|
* @returns {boolean}
|
|
2252
2290
|
*/
|
|
2253
|
-
|
|
2254
|
-
const ret = wasm.
|
|
2291
|
+
is_to(key) {
|
|
2292
|
+
const ret = wasm.wasmtransaction_is_to(this.__wbg_ptr, addHeapObject(key));
|
|
2255
2293
|
return ret !== 0;
|
|
2256
2294
|
}
|
|
2257
2295
|
/**
|
|
2258
2296
|
* @param {string} key
|
|
2259
2297
|
* @returns {boolean}
|
|
2260
2298
|
*/
|
|
2261
|
-
|
|
2262
|
-
const ret = wasm.
|
|
2299
|
+
is_from(key) {
|
|
2300
|
+
const ret = wasm.wasmtransaction_is_from(this.__wbg_ptr, addHeapObject(key));
|
|
2263
2301
|
return ret !== 0;
|
|
2264
2302
|
}
|
|
2265
2303
|
/**
|
|
@@ -2270,32 +2308,6 @@ class WasmTransaction {
|
|
|
2270
2308
|
return takeObject(ret);
|
|
2271
2309
|
}
|
|
2272
2310
|
/**
|
|
2273
|
-
* @param {Uint8Array} buffer
|
|
2274
|
-
*/
|
|
2275
|
-
set data(buffer) {
|
|
2276
|
-
wasm.wasmtransaction_set_data(this.__wbg_ptr, addHeapObject(buffer));
|
|
2277
|
-
}
|
|
2278
|
-
/**
|
|
2279
|
-
* @returns {bigint}
|
|
2280
|
-
*/
|
|
2281
|
-
get timestamp() {
|
|
2282
|
-
const ret = wasm.wasmtransaction_get_timestamp(this.__wbg_ptr);
|
|
2283
|
-
return BigInt.asUintN(64, ret);
|
|
2284
|
-
}
|
|
2285
|
-
/**
|
|
2286
|
-
* @param {bigint} timestamp
|
|
2287
|
-
*/
|
|
2288
|
-
set timestamp(timestamp) {
|
|
2289
|
-
wasm.wasmtransaction_set_timestamp(this.__wbg_ptr, timestamp);
|
|
2290
|
-
}
|
|
2291
|
-
/**
|
|
2292
|
-
* @returns {Promise<void>}
|
|
2293
|
-
*/
|
|
2294
|
-
sign() {
|
|
2295
|
-
const ret = wasm.wasmtransaction_sign(this.__wbg_ptr);
|
|
2296
|
-
return takeObject(ret);
|
|
2297
|
-
}
|
|
2298
|
-
/**
|
|
2299
2311
|
* @returns {number}
|
|
2300
2312
|
*/
|
|
2301
2313
|
get type() {
|
|
@@ -2303,17 +2315,16 @@ class WasmTransaction {
|
|
|
2303
2315
|
return ret;
|
|
2304
2316
|
}
|
|
2305
2317
|
/**
|
|
2306
|
-
* @param {
|
|
2318
|
+
* @param {Uint8Array} buffer
|
|
2307
2319
|
*/
|
|
2308
|
-
set
|
|
2309
|
-
wasm.
|
|
2320
|
+
set data(buffer) {
|
|
2321
|
+
wasm.wasmtransaction_set_data(this.__wbg_ptr, addHeapObject(buffer));
|
|
2310
2322
|
}
|
|
2311
2323
|
/**
|
|
2312
|
-
* @
|
|
2324
|
+
* @param {number} t
|
|
2313
2325
|
*/
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
return BigInt.asUintN(64, ret);
|
|
2326
|
+
set type(t) {
|
|
2327
|
+
wasm.wasmtransaction_set_type(this.__wbg_ptr, t);
|
|
2317
2328
|
}
|
|
2318
2329
|
/**
|
|
2319
2330
|
* @returns {Uint8Array}
|
|
@@ -2323,23 +2334,11 @@ class WasmTransaction {
|
|
|
2323
2334
|
return takeObject(ret);
|
|
2324
2335
|
}
|
|
2325
2336
|
/**
|
|
2326
|
-
* @
|
|
2327
|
-
* @returns {WasmTransaction}
|
|
2337
|
+
* @returns {string}
|
|
2328
2338
|
*/
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
wasm.wasmtransaction_deserialize(retptr, addHeapObject(buffer));
|
|
2333
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2334
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2335
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
2336
|
-
if (r2) {
|
|
2337
|
-
throw takeObject(r1);
|
|
2338
|
-
}
|
|
2339
|
-
return WasmTransaction.__wrap(r0);
|
|
2340
|
-
} finally {
|
|
2341
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2342
|
-
}
|
|
2339
|
+
get signature() {
|
|
2340
|
+
const ret = wasm.wasmtransaction_signature(this.__wbg_ptr);
|
|
2341
|
+
return takeObject(ret);
|
|
2343
2342
|
}
|
|
2344
2343
|
}
|
|
2345
2344
|
module.exports.WasmTransaction = WasmTransaction;
|
|
@@ -2371,62 +2370,49 @@ class WasmWallet {
|
|
|
2371
2370
|
wasm.__wbg_wasmwallet_free(ptr);
|
|
2372
2371
|
}
|
|
2373
2372
|
/**
|
|
2374
|
-
* @returns {Promise<
|
|
2373
|
+
* @returns {Promise<bigint>}
|
|
2375
2374
|
*/
|
|
2376
|
-
|
|
2377
|
-
const ret = wasm.
|
|
2375
|
+
get_balance() {
|
|
2376
|
+
const ret = wasm.wasmwallet_get_balance(this.__wbg_ptr);
|
|
2378
2377
|
return takeObject(ret);
|
|
2379
2378
|
}
|
|
2380
2379
|
/**
|
|
2381
|
-
* @
|
|
2382
|
-
* @returns {Promise<void>}
|
|
2380
|
+
* @returns {Promise<Array<any>>}
|
|
2383
2381
|
*/
|
|
2384
|
-
|
|
2385
|
-
const ret = wasm.
|
|
2382
|
+
get_key_list() {
|
|
2383
|
+
const ret = wasm.wasmwallet_get_key_list(this.__wbg_ptr);
|
|
2386
2384
|
return takeObject(ret);
|
|
2387
2385
|
}
|
|
2388
2386
|
/**
|
|
2387
|
+
* @param {Array<any>} key_list
|
|
2389
2388
|
* @returns {Promise<void>}
|
|
2390
2389
|
*/
|
|
2391
|
-
|
|
2392
|
-
const ret = wasm.
|
|
2393
|
-
return takeObject(ret);
|
|
2394
|
-
}
|
|
2395
|
-
/**
|
|
2396
|
-
* @returns {Promise<string>}
|
|
2397
|
-
*/
|
|
2398
|
-
get_public_key() {
|
|
2399
|
-
const ret = wasm.wasmwallet_get_public_key(this.__wbg_ptr);
|
|
2390
|
+
set_key_list(key_list) {
|
|
2391
|
+
const ret = wasm.wasmwallet_set_key_list(this.__wbg_ptr, addHeapObject(key_list));
|
|
2400
2392
|
return takeObject(ret);
|
|
2401
2393
|
}
|
|
2402
2394
|
/**
|
|
2403
|
-
* @param {
|
|
2395
|
+
* @param {WasmTransaction} tx
|
|
2404
2396
|
* @returns {Promise<void>}
|
|
2405
2397
|
*/
|
|
2406
|
-
|
|
2407
|
-
|
|
2398
|
+
add_to_pending(tx) {
|
|
2399
|
+
_assertClass(tx, WasmTransaction);
|
|
2400
|
+
const ret = wasm.wasmwallet_add_to_pending(this.__wbg_ptr, tx.__wbg_ptr);
|
|
2408
2401
|
return takeObject(ret);
|
|
2409
2402
|
}
|
|
2410
2403
|
/**
|
|
2411
2404
|
* @returns {Promise<string>}
|
|
2412
2405
|
*/
|
|
2413
|
-
|
|
2414
|
-
const ret = wasm.
|
|
2406
|
+
get_public_key() {
|
|
2407
|
+
const ret = wasm.wasmwallet_get_public_key(this.__wbg_ptr);
|
|
2415
2408
|
return takeObject(ret);
|
|
2416
2409
|
}
|
|
2417
2410
|
/**
|
|
2418
2411
|
* @param {string} key
|
|
2419
2412
|
* @returns {Promise<void>}
|
|
2420
2413
|
*/
|
|
2421
|
-
|
|
2422
|
-
const ret = wasm.
|
|
2423
|
-
return takeObject(ret);
|
|
2424
|
-
}
|
|
2425
|
-
/**
|
|
2426
|
-
* @returns {Promise<bigint>}
|
|
2427
|
-
*/
|
|
2428
|
-
get_balance() {
|
|
2429
|
-
const ret = wasm.wasmwallet_get_balance(this.__wbg_ptr);
|
|
2414
|
+
set_public_key(key) {
|
|
2415
|
+
const ret = wasm.wasmwallet_set_public_key(this.__wbg_ptr, addHeapObject(key));
|
|
2430
2416
|
return takeObject(ret);
|
|
2431
2417
|
}
|
|
2432
2418
|
/**
|
|
@@ -2437,44 +2423,40 @@ class WasmWallet {
|
|
|
2437
2423
|
return takeObject(ret);
|
|
2438
2424
|
}
|
|
2439
2425
|
/**
|
|
2440
|
-
* @returns {Promise<
|
|
2426
|
+
* @returns {Promise<string>}
|
|
2441
2427
|
*/
|
|
2442
|
-
|
|
2443
|
-
const ret = wasm.
|
|
2428
|
+
get_private_key() {
|
|
2429
|
+
const ret = wasm.wasmwallet_get_private_key(this.__wbg_ptr);
|
|
2444
2430
|
return takeObject(ret);
|
|
2445
2431
|
}
|
|
2446
2432
|
/**
|
|
2447
|
-
* @param {
|
|
2433
|
+
* @param {string} key
|
|
2448
2434
|
* @returns {Promise<void>}
|
|
2449
2435
|
*/
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
var ptr0 = slip.__destroy_into_raw();
|
|
2453
|
-
const ret = wasm.wasmwallet_add_slip(this.__wbg_ptr, ptr0);
|
|
2436
|
+
set_private_key(key) {
|
|
2437
|
+
const ret = wasm.wasmwallet_set_private_key(this.__wbg_ptr, addHeapObject(key));
|
|
2454
2438
|
return takeObject(ret);
|
|
2455
2439
|
}
|
|
2456
2440
|
/**
|
|
2457
|
-
* @param {WasmTransaction} tx
|
|
2458
2441
|
* @returns {Promise<void>}
|
|
2459
2442
|
*/
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
const ret = wasm.wasmwallet_add_to_pending(this.__wbg_ptr, tx.__wbg_ptr);
|
|
2443
|
+
load() {
|
|
2444
|
+
const ret = wasm.wasmwallet_load(this.__wbg_ptr);
|
|
2463
2445
|
return takeObject(ret);
|
|
2464
2446
|
}
|
|
2465
2447
|
/**
|
|
2466
|
-
* @returns {Promise<
|
|
2448
|
+
* @returns {Promise<void>}
|
|
2467
2449
|
*/
|
|
2468
|
-
|
|
2469
|
-
const ret = wasm.
|
|
2450
|
+
save() {
|
|
2451
|
+
const ret = wasm.wasmwallet_save(this.__wbg_ptr);
|
|
2470
2452
|
return takeObject(ret);
|
|
2471
2453
|
}
|
|
2472
2454
|
/**
|
|
2473
|
-
* @param {
|
|
2455
|
+
* @param {boolean} keep_keys
|
|
2474
2456
|
* @returns {Promise<void>}
|
|
2475
2457
|
*/
|
|
2476
|
-
|
|
2477
|
-
const ret = wasm.
|
|
2458
|
+
reset(keep_keys) {
|
|
2459
|
+
const ret = wasm.wasmwallet_reset(this.__wbg_ptr, keep_keys);
|
|
2478
2460
|
return takeObject(ret);
|
|
2479
2461
|
}
|
|
2480
2462
|
/**
|
|
@@ -2499,6 +2481,23 @@ class WasmWallet {
|
|
|
2499
2481
|
const ret = wasm.wasmwallet_add_nft(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
2500
2482
|
return takeObject(ret);
|
|
2501
2483
|
}
|
|
2484
|
+
/**
|
|
2485
|
+
* @param {WasmWalletSlip} slip
|
|
2486
|
+
* @returns {Promise<void>}
|
|
2487
|
+
*/
|
|
2488
|
+
add_slip(slip) {
|
|
2489
|
+
_assertClass(slip, WasmWalletSlip);
|
|
2490
|
+
var ptr0 = slip.__destroy_into_raw();
|
|
2491
|
+
const ret = wasm.wasmwallet_add_slip(this.__wbg_ptr, ptr0);
|
|
2492
|
+
return takeObject(ret);
|
|
2493
|
+
}
|
|
2494
|
+
/**
|
|
2495
|
+
* @returns {Promise<Array<any>>}
|
|
2496
|
+
*/
|
|
2497
|
+
get_slips() {
|
|
2498
|
+
const ret = wasm.wasmwallet_get_slips(this.__wbg_ptr);
|
|
2499
|
+
return takeObject(ret);
|
|
2500
|
+
}
|
|
2502
2501
|
}
|
|
2503
2502
|
module.exports.WasmWallet = WasmWallet;
|
|
2504
2503
|
|
|
@@ -2529,19 +2528,6 @@ class WasmWalletSlip {
|
|
|
2529
2528
|
wasm.__wbg_wasmwalletslip_free(ptr);
|
|
2530
2529
|
}
|
|
2531
2530
|
/**
|
|
2532
|
-
* @returns {string}
|
|
2533
|
-
*/
|
|
2534
|
-
get_utxokey() {
|
|
2535
|
-
const ret = wasm.wasmwalletslip_get_utxokey(this.__wbg_ptr);
|
|
2536
|
-
return takeObject(ret);
|
|
2537
|
-
}
|
|
2538
|
-
/**
|
|
2539
|
-
* @param {string} key
|
|
2540
|
-
*/
|
|
2541
|
-
set_utxokey(key) {
|
|
2542
|
-
wasm.wasmwalletslip_set_utxokey(this.__wbg_ptr, addHeapObject(key));
|
|
2543
|
-
}
|
|
2544
|
-
/**
|
|
2545
2531
|
* @returns {bigint}
|
|
2546
2532
|
*/
|
|
2547
2533
|
get_amount() {
|
|
@@ -2555,6 +2541,19 @@ class WasmWalletSlip {
|
|
|
2555
2541
|
wasm.wasmslip_set_amount(this.__wbg_ptr, amount);
|
|
2556
2542
|
}
|
|
2557
2543
|
/**
|
|
2544
|
+
* @returns {string}
|
|
2545
|
+
*/
|
|
2546
|
+
get_utxokey() {
|
|
2547
|
+
const ret = wasm.wasmwalletslip_get_utxokey(this.__wbg_ptr);
|
|
2548
|
+
return takeObject(ret);
|
|
2549
|
+
}
|
|
2550
|
+
/**
|
|
2551
|
+
* @param {string} key
|
|
2552
|
+
*/
|
|
2553
|
+
set_utxokey(key) {
|
|
2554
|
+
wasm.wasmwalletslip_set_utxokey(this.__wbg_ptr, addHeapObject(key));
|
|
2555
|
+
}
|
|
2556
|
+
/**
|
|
2558
2557
|
* @returns {bigint}
|
|
2559
2558
|
*/
|
|
2560
2559
|
get_block_id() {
|
|
@@ -2568,17 +2567,17 @@ class WasmWalletSlip {
|
|
|
2568
2567
|
wasm.wasmslip_set_block_id(this.__wbg_ptr, block_id);
|
|
2569
2568
|
}
|
|
2570
2569
|
/**
|
|
2571
|
-
* @returns {
|
|
2570
|
+
* @returns {number}
|
|
2572
2571
|
*/
|
|
2573
|
-
|
|
2574
|
-
const ret = wasm.
|
|
2575
|
-
return
|
|
2572
|
+
get_slip_type() {
|
|
2573
|
+
const ret = wasm.wasmwalletslip_get_slip_type(this.__wbg_ptr);
|
|
2574
|
+
return ret;
|
|
2576
2575
|
}
|
|
2577
2576
|
/**
|
|
2578
|
-
* @param {
|
|
2577
|
+
* @param {number} slip_type
|
|
2579
2578
|
*/
|
|
2580
|
-
|
|
2581
|
-
wasm.
|
|
2579
|
+
set_slip_type(slip_type) {
|
|
2580
|
+
wasm.wasmwalletslip_set_slip_type(this.__wbg_ptr, slip_type);
|
|
2582
2581
|
}
|
|
2583
2582
|
/**
|
|
2584
2583
|
* @returns {number}
|
|
@@ -2588,23 +2587,30 @@ class WasmWalletSlip {
|
|
|
2588
2587
|
return ret;
|
|
2589
2588
|
}
|
|
2590
2589
|
/**
|
|
2590
|
+
* @returns {bigint}
|
|
2591
|
+
*/
|
|
2592
|
+
get_tx_ordinal() {
|
|
2593
|
+
const ret = wasm.wasmslip_tx_ordinal(this.__wbg_ptr);
|
|
2594
|
+
return BigInt.asUintN(64, ret);
|
|
2595
|
+
}
|
|
2596
|
+
/**
|
|
2591
2597
|
* @param {number} index
|
|
2592
2598
|
*/
|
|
2593
2599
|
set_slip_index(index) {
|
|
2594
2600
|
wasm.wasmwalletslip_set_slip_index(this.__wbg_ptr, index);
|
|
2595
2601
|
}
|
|
2596
2602
|
/**
|
|
2597
|
-
* @
|
|
2603
|
+
* @param {bigint} ordinal
|
|
2598
2604
|
*/
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
return ret !== 0;
|
|
2605
|
+
set_tx_ordinal(ordinal) {
|
|
2606
|
+
wasm.wasmslip_set_tx_ordinal(this.__wbg_ptr, ordinal);
|
|
2602
2607
|
}
|
|
2603
2608
|
/**
|
|
2604
|
-
* @param {boolean} spent
|
|
2605
2609
|
*/
|
|
2606
|
-
|
|
2607
|
-
wasm.
|
|
2610
|
+
constructor() {
|
|
2611
|
+
const ret = wasm.wasmwalletslip_new_();
|
|
2612
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2613
|
+
return this;
|
|
2608
2614
|
}
|
|
2609
2615
|
/**
|
|
2610
2616
|
* @returns {boolean}
|
|
@@ -2620,54 +2626,37 @@ class WasmWalletSlip {
|
|
|
2620
2626
|
wasm.wasmwalletslip_set_lc(this.__wbg_ptr, lc);
|
|
2621
2627
|
}
|
|
2622
2628
|
/**
|
|
2623
|
-
* @returns {
|
|
2624
|
-
*/
|
|
2625
|
-
get_slip_type() {
|
|
2626
|
-
const ret = wasm.wasmwalletslip_get_slip_type(this.__wbg_ptr);
|
|
2627
|
-
return ret;
|
|
2628
|
-
}
|
|
2629
|
-
/**
|
|
2630
|
-
* @param {number} slip_type
|
|
2629
|
+
* @returns {boolean}
|
|
2631
2630
|
*/
|
|
2632
|
-
|
|
2633
|
-
wasm.
|
|
2631
|
+
is_spent() {
|
|
2632
|
+
const ret = wasm.wasmwalletslip_is_spent(this.__wbg_ptr);
|
|
2633
|
+
return ret !== 0;
|
|
2634
2634
|
}
|
|
2635
2635
|
/**
|
|
2636
|
+
* @param {boolean} spent
|
|
2636
2637
|
*/
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
this.__wbg_ptr = ret >>> 0;
|
|
2640
|
-
return this;
|
|
2638
|
+
set_spent(spent) {
|
|
2639
|
+
wasm.wasmwalletslip_set_spent(this.__wbg_ptr, spent);
|
|
2641
2640
|
}
|
|
2642
2641
|
}
|
|
2643
2642
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2644
2643
|
|
|
2645
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2646
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2647
|
-
return addHeapObject(ret);
|
|
2648
|
-
};
|
|
2649
|
-
|
|
2650
2644
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2651
2645
|
takeObject(arg0);
|
|
2652
2646
|
};
|
|
2653
2647
|
|
|
2654
|
-
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2655
|
-
const ret = WasmTransaction.__wrap(arg0);
|
|
2656
|
-
return addHeapObject(ret);
|
|
2657
|
-
};
|
|
2658
|
-
|
|
2659
2648
|
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2660
2649
|
const ret = BigInt.asUintN(64, arg0);
|
|
2661
2650
|
return addHeapObject(ret);
|
|
2662
2651
|
};
|
|
2663
2652
|
|
|
2664
|
-
module.exports.
|
|
2665
|
-
const ret =
|
|
2653
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2654
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2666
2655
|
return addHeapObject(ret);
|
|
2667
2656
|
};
|
|
2668
2657
|
|
|
2669
|
-
module.exports.
|
|
2670
|
-
const ret =
|
|
2658
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2659
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2671
2660
|
return addHeapObject(ret);
|
|
2672
2661
|
};
|
|
2673
2662
|
|
|
@@ -2680,23 +2669,28 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
2680
2669
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2681
2670
|
};
|
|
2682
2671
|
|
|
2683
|
-
module.exports.
|
|
2684
|
-
const ret =
|
|
2672
|
+
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2673
|
+
const ret = WasmTransaction.__wrap(arg0);
|
|
2685
2674
|
return addHeapObject(ret);
|
|
2686
2675
|
};
|
|
2687
2676
|
|
|
2688
|
-
module.exports.
|
|
2689
|
-
const ret =
|
|
2677
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2678
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2690
2679
|
return addHeapObject(ret);
|
|
2691
2680
|
};
|
|
2692
2681
|
|
|
2693
|
-
module.exports.
|
|
2694
|
-
const ret =
|
|
2682
|
+
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2683
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2695
2684
|
return addHeapObject(ret);
|
|
2696
2685
|
};
|
|
2697
2686
|
|
|
2698
|
-
module.exports.
|
|
2699
|
-
const ret =
|
|
2687
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2688
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2689
|
+
return addHeapObject(ret);
|
|
2690
|
+
};
|
|
2691
|
+
|
|
2692
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2693
|
+
const ret = getObject(arg0);
|
|
2700
2694
|
return addHeapObject(ret);
|
|
2701
2695
|
};
|
|
2702
2696
|
|
|
@@ -2705,170 +2699,186 @@ module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
|
2705
2699
|
return addHeapObject(ret);
|
|
2706
2700
|
};
|
|
2707
2701
|
|
|
2708
|
-
module.exports.
|
|
2709
|
-
const ret =
|
|
2702
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2703
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2710
2704
|
return addHeapObject(ret);
|
|
2711
2705
|
};
|
|
2712
2706
|
|
|
2713
|
-
module.exports.
|
|
2714
|
-
const ret =
|
|
2707
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2708
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2715
2709
|
return addHeapObject(ret);
|
|
2716
2710
|
};
|
|
2717
2711
|
|
|
2718
|
-
module.exports.
|
|
2719
|
-
const ret =
|
|
2712
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2713
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2720
2714
|
return addHeapObject(ret);
|
|
2721
2715
|
};
|
|
2722
2716
|
|
|
2723
|
-
module.exports.
|
|
2724
|
-
const
|
|
2725
|
-
|
|
2717
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
2718
|
+
const val = getObject(arg0);
|
|
2719
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2720
|
+
return ret;
|
|
2726
2721
|
};
|
|
2727
2722
|
|
|
2728
|
-
module.exports.
|
|
2729
|
-
|
|
2723
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2724
|
+
const ret = getObject(arg0) === undefined;
|
|
2725
|
+
return ret;
|
|
2730
2726
|
};
|
|
2731
2727
|
|
|
2732
|
-
module.exports.
|
|
2733
|
-
|
|
2728
|
+
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
2729
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
2730
|
+
return ret;
|
|
2734
2731
|
};
|
|
2735
2732
|
|
|
2736
|
-
module.exports.
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
deferred0_0 = arg0;
|
|
2741
|
-
deferred0_1 = arg1;
|
|
2742
|
-
const ret = MsgHandler.connect_to_peer(getStringFromWasm0(arg0, arg1), takeObject(arg2));
|
|
2743
|
-
return addHeapObject(ret);
|
|
2744
|
-
} finally {
|
|
2745
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2746
|
-
}
|
|
2747
|
-
}, arguments) };
|
|
2733
|
+
module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
2734
|
+
const ret = WasmHop.__wrap(arg0);
|
|
2735
|
+
return addHeapObject(ret);
|
|
2736
|
+
};
|
|
2748
2737
|
|
|
2749
|
-
module.exports.
|
|
2750
|
-
const ret =
|
|
2738
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2739
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2751
2740
|
return addHeapObject(ret);
|
|
2752
|
-
}
|
|
2741
|
+
};
|
|
2753
2742
|
|
|
2754
|
-
module.exports.
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
deferred0_0 = arg2;
|
|
2759
|
-
deferred0_1 = arg3;
|
|
2760
|
-
const ret = MsgHandler.fetch_block_from_peer(getObject(arg0), takeObject(arg1), getStringFromWasm0(arg2, arg3), takeObject(arg4));
|
|
2761
|
-
return addHeapObject(ret);
|
|
2762
|
-
} finally {
|
|
2763
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2764
|
-
}
|
|
2765
|
-
}, arguments) };
|
|
2743
|
+
module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2744
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
2745
|
+
return addHeapObject(ret);
|
|
2746
|
+
};
|
|
2766
2747
|
|
|
2767
|
-
module.exports.
|
|
2748
|
+
module.exports.__wbg_flushdata_43f1541fff3d78bd = function(arg0, arg1) {
|
|
2768
2749
|
let deferred0_0;
|
|
2769
2750
|
let deferred0_1;
|
|
2770
2751
|
try {
|
|
2771
2752
|
deferred0_0 = arg0;
|
|
2772
2753
|
deferred0_1 = arg1;
|
|
2773
|
-
MsgHandler.
|
|
2754
|
+
MsgHandler.flush_data(getStringFromWasm0(arg0, arg1));
|
|
2774
2755
|
} finally {
|
|
2775
2756
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2776
2757
|
}
|
|
2777
2758
|
};
|
|
2778
2759
|
|
|
2779
|
-
module.exports.
|
|
2760
|
+
module.exports.__wbg_readvalue_0a9c92750448f1d1 = function() { return handleError(function (arg0, arg1) {
|
|
2780
2761
|
let deferred0_0;
|
|
2781
2762
|
let deferred0_1;
|
|
2782
2763
|
try {
|
|
2783
2764
|
deferred0_0 = arg0;
|
|
2784
2765
|
deferred0_1 = arg1;
|
|
2785
|
-
MsgHandler.
|
|
2766
|
+
const ret = MsgHandler.read_value(getStringFromWasm0(arg0, arg1));
|
|
2767
|
+
return addHeapObject(ret);
|
|
2786
2768
|
} finally {
|
|
2787
2769
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2788
2770
|
}
|
|
2771
|
+
}, arguments) };
|
|
2772
|
+
|
|
2773
|
+
module.exports.__wbg_loadwallet_5cd451ac436ab682 = function() {
|
|
2774
|
+
MsgHandler.load_wallet();
|
|
2775
|
+
};
|
|
2776
|
+
|
|
2777
|
+
module.exports.__wbg_savewallet_6826e875e5dd251b = function() {
|
|
2778
|
+
MsgHandler.save_wallet();
|
|
2789
2779
|
};
|
|
2790
2780
|
|
|
2791
|
-
module.exports.
|
|
2781
|
+
module.exports.__wbg_writevalue_cf07df01ae9d9d9b = function(arg0, arg1, arg2) {
|
|
2792
2782
|
let deferred0_0;
|
|
2793
2783
|
let deferred0_1;
|
|
2794
2784
|
try {
|
|
2795
2785
|
deferred0_0 = arg0;
|
|
2796
2786
|
deferred0_1 = arg1;
|
|
2797
|
-
MsgHandler.
|
|
2787
|
+
MsgHandler.write_value(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
2798
2788
|
} finally {
|
|
2799
2789
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2800
2790
|
}
|
|
2801
2791
|
};
|
|
2802
2792
|
|
|
2803
|
-
module.exports.
|
|
2793
|
+
module.exports.__wbg_appendvalue_3d3f4ddc7cd7f668 = function(arg0, arg1, arg2) {
|
|
2804
2794
|
let deferred0_0;
|
|
2805
2795
|
let deferred0_1;
|
|
2806
2796
|
try {
|
|
2807
2797
|
deferred0_0 = arg0;
|
|
2808
2798
|
deferred0_1 = arg1;
|
|
2809
|
-
|
|
2810
|
-
return addHeapObject(ret);
|
|
2799
|
+
MsgHandler.append_value(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
2811
2800
|
} finally {
|
|
2812
2801
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2813
2802
|
}
|
|
2814
|
-
}
|
|
2815
|
-
|
|
2816
|
-
module.exports.__wbg_loadblockfilelist_6ee195b852fb0251 = function() { return handleError(function () {
|
|
2817
|
-
const ret = MsgHandler.load_block_file_list();
|
|
2818
|
-
return addHeapObject(ret);
|
|
2819
|
-
}, arguments) };
|
|
2803
|
+
};
|
|
2820
2804
|
|
|
2821
|
-
module.exports.
|
|
2805
|
+
module.exports.__wbg_removevalue_f5900816b911805e = function() { return handleError(function (arg0, arg1) {
|
|
2822
2806
|
let deferred0_0;
|
|
2823
2807
|
let deferred0_1;
|
|
2824
2808
|
try {
|
|
2825
2809
|
deferred0_0 = arg0;
|
|
2826
2810
|
deferred0_1 = arg1;
|
|
2827
|
-
const ret = MsgHandler.
|
|
2811
|
+
const ret = MsgHandler.remove_value(getStringFromWasm0(arg0, arg1));
|
|
2828
2812
|
return addHeapObject(ret);
|
|
2829
2813
|
} finally {
|
|
2830
2814
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2831
2815
|
}
|
|
2832
2816
|
}, arguments) };
|
|
2833
2817
|
|
|
2834
|
-
module.exports.
|
|
2818
|
+
module.exports.__wbg_sendmessage_6d75e3e0b6cbcdea = function(arg0, arg1) {
|
|
2819
|
+
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2820
|
+
};
|
|
2821
|
+
|
|
2822
|
+
module.exports.__wbg_connecttopeer_0dbfd6477b38b460 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2835
2823
|
let deferred0_0;
|
|
2836
2824
|
let deferred0_1;
|
|
2837
2825
|
try {
|
|
2838
2826
|
deferred0_0 = arg0;
|
|
2839
2827
|
deferred0_1 = arg1;
|
|
2840
|
-
const ret = MsgHandler.
|
|
2828
|
+
const ret = MsgHandler.connect_to_peer(getStringFromWasm0(arg0, arg1), takeObject(arg2));
|
|
2841
2829
|
return addHeapObject(ret);
|
|
2842
2830
|
} finally {
|
|
2843
2831
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2844
2832
|
}
|
|
2845
2833
|
}, arguments) };
|
|
2846
2834
|
|
|
2847
|
-
module.exports.
|
|
2835
|
+
module.exports.__wbg_getmyservices_671fa3941c07e37c = function() {
|
|
2836
|
+
const ret = MsgHandler.get_my_services();
|
|
2837
|
+
_assertClass(ret, WasmPeerServiceList);
|
|
2838
|
+
var ptr1 = ret.__destroy_into_raw();
|
|
2839
|
+
return ptr1;
|
|
2840
|
+
};
|
|
2841
|
+
|
|
2842
|
+
module.exports.__wbg_isexistingfile_9c5802df7eec1b8c = function() { return handleError(function (arg0, arg1) {
|
|
2848
2843
|
let deferred0_0;
|
|
2849
2844
|
let deferred0_1;
|
|
2850
2845
|
try {
|
|
2851
2846
|
deferred0_0 = arg0;
|
|
2852
2847
|
deferred0_1 = arg1;
|
|
2853
|
-
MsgHandler.
|
|
2848
|
+
const ret = MsgHandler.is_existing_file(getStringFromWasm0(arg0, arg1));
|
|
2849
|
+
return addHeapObject(ret);
|
|
2854
2850
|
} finally {
|
|
2855
2851
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2856
2852
|
}
|
|
2857
2853
|
}, arguments) };
|
|
2858
2854
|
|
|
2859
|
-
module.exports.
|
|
2855
|
+
module.exports.__wbg_processapicall_84802524f4b72626 = function(arg0, arg1, arg2) {
|
|
2860
2856
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2861
2857
|
};
|
|
2862
2858
|
|
|
2863
|
-
module.exports.
|
|
2859
|
+
module.exports.__wbg_processapierror_d543c65b7ba51917 = function(arg0, arg1, arg2) {
|
|
2860
|
+
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2861
|
+
};
|
|
2862
|
+
|
|
2863
|
+
module.exports.__wbg_processapisuccess_346f01f1e249ab95 = function(arg0, arg1, arg2) {
|
|
2864
2864
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2865
2865
|
};
|
|
2866
2866
|
|
|
2867
|
-
module.exports.
|
|
2868
|
-
MsgHandler.
|
|
2867
|
+
module.exports.__wbg_sendmessagetoall_8b367c13a928c498 = function(arg0, arg1) {
|
|
2868
|
+
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2869
2869
|
};
|
|
2870
2870
|
|
|
2871
|
-
module.exports.
|
|
2871
|
+
module.exports.__wbg_disconnectfrompeer_eb1d4acfd8e133d3 = function() { return handleError(function (arg0) {
|
|
2872
|
+
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2873
|
+
return addHeapObject(ret);
|
|
2874
|
+
}, arguments) };
|
|
2875
|
+
|
|
2876
|
+
module.exports.__wbg_loadblockfilelist_e8a6bbf7850e77ec = function() { return handleError(function () {
|
|
2877
|
+
const ret = MsgHandler.load_block_file_list();
|
|
2878
|
+
return addHeapObject(ret);
|
|
2879
|
+
}, arguments) };
|
|
2880
|
+
|
|
2881
|
+
module.exports.__wbg_sendinterfaceevent_478dfe7c1d77edc1 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2872
2882
|
let deferred0_0;
|
|
2873
2883
|
let deferred0_1;
|
|
2874
2884
|
let deferred1_0;
|
|
@@ -2885,7 +2895,7 @@ module.exports.__wbg_sendinterfaceevent_563825bcd92676c7 = function(arg0, arg1,
|
|
|
2885
2895
|
}
|
|
2886
2896
|
};
|
|
2887
2897
|
|
|
2888
|
-
module.exports.
|
|
2898
|
+
module.exports.__wbg_sendblocksuccess_50f30a221c95ccb2 = function(arg0, arg1, arg2) {
|
|
2889
2899
|
let deferred0_0;
|
|
2890
2900
|
let deferred0_1;
|
|
2891
2901
|
try {
|
|
@@ -2897,11 +2907,11 @@ module.exports.__wbg_sendblocksuccess_2ba6e16e88f766bc = function(arg0, arg1, ar
|
|
|
2897
2907
|
}
|
|
2898
2908
|
};
|
|
2899
2909
|
|
|
2900
|
-
module.exports.
|
|
2910
|
+
module.exports.__wbg_sendwalletupdate_f56f83f3e07b49a9 = function() {
|
|
2901
2911
|
MsgHandler.send_wallet_update();
|
|
2902
2912
|
};
|
|
2903
2913
|
|
|
2904
|
-
module.exports.
|
|
2914
|
+
module.exports.__wbg_sendnewversionalert_cf706b447638507f = function(arg0, arg1, arg2) {
|
|
2905
2915
|
let deferred0_0;
|
|
2906
2916
|
let deferred0_1;
|
|
2907
2917
|
try {
|
|
@@ -2913,49 +2923,38 @@ module.exports.__wbg_sendnewversionalert_55eefbff860ae87a = function(arg0, arg1,
|
|
|
2913
2923
|
}
|
|
2914
2924
|
};
|
|
2915
2925
|
|
|
2916
|
-
module.exports.
|
|
2926
|
+
module.exports.__wbg_sendblockfetchstatusevent_34b0e8fb201fbfc5 = function(arg0) {
|
|
2917
2927
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2918
2928
|
};
|
|
2919
2929
|
|
|
2920
|
-
module.exports.
|
|
2930
|
+
module.exports.__wbg_sendnewchaindetectedevent_3ebfc9ce48ce2f00 = function() {
|
|
2921
2931
|
MsgHandler.send_new_chain_detected_event();
|
|
2922
2932
|
};
|
|
2923
2933
|
|
|
2924
|
-
module.exports.
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
return ptr1;
|
|
2937
|
-
};
|
|
2938
|
-
|
|
2939
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2940
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2941
|
-
return addHeapObject(ret);
|
|
2942
|
-
};
|
|
2943
|
-
|
|
2944
|
-
module.exports.__wbindgen_is_object = function(arg0) {
|
|
2945
|
-
const val = getObject(arg0);
|
|
2946
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
2947
|
-
return ret;
|
|
2948
|
-
};
|
|
2949
|
-
|
|
2950
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2951
|
-
const ret = getObject(arg0) === undefined;
|
|
2952
|
-
return ret;
|
|
2953
|
-
};
|
|
2934
|
+
module.exports.__wbg_fetchblockfrompeer_42bdb36ab5eb6374 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2935
|
+
let deferred0_0;
|
|
2936
|
+
let deferred0_1;
|
|
2937
|
+
try {
|
|
2938
|
+
deferred0_0 = arg2;
|
|
2939
|
+
deferred0_1 = arg3;
|
|
2940
|
+
const ret = MsgHandler.fetch_block_from_peer(getObject(arg0), takeObject(arg1), getStringFromWasm0(arg2, arg3), takeObject(arg4));
|
|
2941
|
+
return addHeapObject(ret);
|
|
2942
|
+
} finally {
|
|
2943
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2944
|
+
}
|
|
2945
|
+
}, arguments) };
|
|
2954
2946
|
|
|
2955
|
-
module.exports.
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2947
|
+
module.exports.__wbg_ensureblockdirectoryexists_2eeab9246fcb6206 = function() { return handleError(function (arg0, arg1) {
|
|
2948
|
+
let deferred0_0;
|
|
2949
|
+
let deferred0_1;
|
|
2950
|
+
try {
|
|
2951
|
+
deferred0_0 = arg0;
|
|
2952
|
+
deferred0_1 = arg1;
|
|
2953
|
+
MsgHandler.ensure_block_directory_exists(getStringFromWasm0(arg0, arg1));
|
|
2954
|
+
} finally {
|
|
2955
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2956
|
+
}
|
|
2957
|
+
}, arguments) };
|
|
2959
2958
|
|
|
2960
2959
|
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2961
2960
|
const ret = getObject(arg0) == getObject(arg1);
|
|
@@ -2980,14 +2979,8 @@ module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
|
|
|
2980
2979
|
return addHeapObject(ret);
|
|
2981
2980
|
};
|
|
2982
2981
|
|
|
2983
|
-
module.exports.
|
|
2984
|
-
|
|
2985
|
-
if (obj.cnt-- == 1) {
|
|
2986
|
-
obj.a = 0;
|
|
2987
|
-
return true;
|
|
2988
|
-
}
|
|
2989
|
-
const ret = false;
|
|
2990
|
-
return ret;
|
|
2982
|
+
module.exports.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
|
|
2983
|
+
queueMicrotask(getObject(arg0));
|
|
2991
2984
|
};
|
|
2992
2985
|
|
|
2993
2986
|
module.exports.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
|
|
@@ -3000,8 +2993,14 @@ module.exports.__wbindgen_is_function = function(arg0) {
|
|
|
3000
2993
|
return ret;
|
|
3001
2994
|
};
|
|
3002
2995
|
|
|
3003
|
-
module.exports.
|
|
3004
|
-
|
|
2996
|
+
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
2997
|
+
const obj = takeObject(arg0).original;
|
|
2998
|
+
if (obj.cnt-- == 1) {
|
|
2999
|
+
obj.a = 0;
|
|
3000
|
+
return true;
|
|
3001
|
+
}
|
|
3002
|
+
const ret = false;
|
|
3003
|
+
return ret;
|
|
3005
3004
|
};
|
|
3006
3005
|
|
|
3007
3006
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
@@ -3029,14 +3028,6 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
3029
3028
|
}
|
|
3030
3029
|
};
|
|
3031
3030
|
|
|
3032
|
-
module.exports.__wbg_debug_7d879afce6cf56cb = function(arg0, arg1, arg2, arg3) {
|
|
3033
|
-
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
3034
|
-
};
|
|
3035
|
-
|
|
3036
|
-
module.exports.__wbg_error_696630710900ec44 = function(arg0, arg1, arg2, arg3) {
|
|
3037
|
-
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
3038
|
-
};
|
|
3039
|
-
|
|
3040
3031
|
module.exports.__wbg_info_80803d9a3f0aad16 = function(arg0, arg1, arg2, arg3) {
|
|
3041
3032
|
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
3042
3033
|
};
|
|
@@ -3045,6 +3036,14 @@ module.exports.__wbg_warn_5d3f783b0bae8943 = function(arg0, arg1, arg2, arg3) {
|
|
|
3045
3036
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
3046
3037
|
};
|
|
3047
3038
|
|
|
3039
|
+
module.exports.__wbg_debug_7d879afce6cf56cb = function(arg0, arg1, arg2, arg3) {
|
|
3040
|
+
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
3041
|
+
};
|
|
3042
|
+
|
|
3043
|
+
module.exports.__wbg_error_696630710900ec44 = function(arg0, arg1, arg2, arg3) {
|
|
3044
|
+
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
3045
|
+
};
|
|
3046
|
+
|
|
3048
3047
|
module.exports.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
|
|
3049
3048
|
const ret = getObject(arg0).crypto;
|
|
3050
3049
|
return addHeapObject(ret);
|
|
@@ -3088,13 +3087,8 @@ module.exports.__wbg_getRandomValues_3aa56aa6edec874c = function() { return hand
|
|
|
3088
3087
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
3089
3088
|
}, arguments) };
|
|
3090
3089
|
|
|
3091
|
-
module.exports.
|
|
3092
|
-
const ret = getObject(arg0)
|
|
3093
|
-
return addHeapObject(ret);
|
|
3094
|
-
};
|
|
3095
|
-
|
|
3096
|
-
module.exports.__wbg_length_cd7af8117672b8b8 = function(arg0) {
|
|
3097
|
-
const ret = getObject(arg0).length;
|
|
3090
|
+
module.exports.__wbg_valueOf_b4771ea2a1ea7469 = function(arg0) {
|
|
3091
|
+
const ret = getObject(arg0).valueOf();
|
|
3098
3092
|
return ret;
|
|
3099
3093
|
};
|
|
3100
3094
|
|
|
@@ -3103,87 +3097,82 @@ module.exports.__wbg_new_16b304a2cfa7ff4a = function() {
|
|
|
3103
3097
|
return addHeapObject(ret);
|
|
3104
3098
|
};
|
|
3105
3099
|
|
|
3106
|
-
module.exports.__wbg_valueOf_b4771ea2a1ea7469 = function(arg0) {
|
|
3107
|
-
const ret = getObject(arg0).valueOf();
|
|
3108
|
-
return ret;
|
|
3109
|
-
};
|
|
3110
|
-
|
|
3111
3100
|
module.exports.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {
|
|
3112
3101
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
3113
3102
|
return addHeapObject(ret);
|
|
3114
3103
|
};
|
|
3115
3104
|
|
|
3116
|
-
module.exports.
|
|
3117
|
-
const ret = getObject(arg0)
|
|
3105
|
+
module.exports.__wbg_new_63b92bc8671ed464 = function(arg0) {
|
|
3106
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
3118
3107
|
return addHeapObject(ret);
|
|
3119
3108
|
};
|
|
3120
3109
|
|
|
3121
|
-
module.exports.
|
|
3122
|
-
const ret = getObject(arg0)
|
|
3110
|
+
module.exports.__wbg_new_5b2a2842270c66e6 = function(arg0) {
|
|
3111
|
+
const ret = new BigUint64Array(getObject(arg0));
|
|
3123
3112
|
return addHeapObject(ret);
|
|
3124
|
-
}, arguments) };
|
|
3125
|
-
|
|
3126
|
-
module.exports.__wbg_done_298b57d23c0fc80c = function(arg0) {
|
|
3127
|
-
const ret = getObject(arg0).done;
|
|
3128
|
-
return ret;
|
|
3129
3113
|
};
|
|
3130
3114
|
|
|
3131
|
-
module.exports.
|
|
3132
|
-
const ret = getObject(arg0).
|
|
3115
|
+
module.exports.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
|
|
3116
|
+
const ret = getObject(arg0).buffer;
|
|
3133
3117
|
return addHeapObject(ret);
|
|
3134
3118
|
};
|
|
3135
3119
|
|
|
3136
|
-
module.exports.
|
|
3137
|
-
const ret =
|
|
3120
|
+
module.exports.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
|
|
3121
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
3138
3122
|
return addHeapObject(ret);
|
|
3139
3123
|
};
|
|
3140
3124
|
|
|
3141
|
-
module.exports.
|
|
3142
|
-
const ret =
|
|
3125
|
+
module.exports.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {
|
|
3126
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
3143
3127
|
return addHeapObject(ret);
|
|
3144
|
-
}
|
|
3128
|
+
};
|
|
3145
3129
|
|
|
3146
|
-
module.exports.
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
}, arguments) };
|
|
3130
|
+
module.exports.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
|
|
3131
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3132
|
+
};
|
|
3150
3133
|
|
|
3151
|
-
module.exports.
|
|
3152
|
-
const ret =
|
|
3153
|
-
return
|
|
3154
|
-
}
|
|
3134
|
+
module.exports.__wbg_length_c20a40f15020d68a = function(arg0) {
|
|
3135
|
+
const ret = getObject(arg0).length;
|
|
3136
|
+
return ret;
|
|
3137
|
+
};
|
|
3155
3138
|
|
|
3156
|
-
module.exports.
|
|
3157
|
-
const ret =
|
|
3139
|
+
module.exports.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {
|
|
3140
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
3158
3141
|
return addHeapObject(ret);
|
|
3159
|
-
}
|
|
3142
|
+
};
|
|
3160
3143
|
|
|
3161
|
-
module.exports.
|
|
3162
|
-
const ret =
|
|
3163
|
-
return
|
|
3164
|
-
}
|
|
3144
|
+
module.exports.__wbg_done_298b57d23c0fc80c = function(arg0) {
|
|
3145
|
+
const ret = getObject(arg0).done;
|
|
3146
|
+
return ret;
|
|
3147
|
+
};
|
|
3165
3148
|
|
|
3166
|
-
module.exports.
|
|
3167
|
-
const ret =
|
|
3149
|
+
module.exports.__wbg_value_d93c65011f51a456 = function(arg0) {
|
|
3150
|
+
const ret = getObject(arg0).value;
|
|
3168
3151
|
return addHeapObject(ret);
|
|
3169
|
-
}
|
|
3152
|
+
};
|
|
3170
3153
|
|
|
3171
|
-
module.exports.
|
|
3172
|
-
const ret = new
|
|
3154
|
+
module.exports.__wbg_newwithbyteoffsetandlength_f3784c11ba58e531 = function(arg0, arg1, arg2) {
|
|
3155
|
+
const ret = new BigUint64Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
3173
3156
|
return addHeapObject(ret);
|
|
3174
3157
|
};
|
|
3175
3158
|
|
|
3176
|
-
module.exports.
|
|
3177
|
-
getObject(arg0)
|
|
3159
|
+
module.exports.__wbg_set_dc7aa8fdca321349 = function(arg0, arg1, arg2) {
|
|
3160
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3178
3161
|
};
|
|
3179
3162
|
|
|
3180
|
-
module.exports.
|
|
3181
|
-
const ret =
|
|
3163
|
+
module.exports.__wbg_length_a641162bc8055216 = function(arg0) {
|
|
3164
|
+
const ret = getObject(arg0).length;
|
|
3182
3165
|
return ret;
|
|
3183
3166
|
};
|
|
3184
3167
|
|
|
3185
|
-
module.exports.
|
|
3186
|
-
|
|
3168
|
+
module.exports.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
|
|
3169
|
+
let result;
|
|
3170
|
+
try {
|
|
3171
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
3172
|
+
} catch (_) {
|
|
3173
|
+
result = false;
|
|
3174
|
+
}
|
|
3175
|
+
const ret = result;
|
|
3187
3176
|
return ret;
|
|
3188
3177
|
};
|
|
3189
3178
|
|
|
@@ -3198,30 +3187,69 @@ module.exports.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
|
|
|
3198
3187
|
return ret;
|
|
3199
3188
|
};
|
|
3200
3189
|
|
|
3201
|
-
module.exports.
|
|
3202
|
-
const ret =
|
|
3190
|
+
module.exports.__wbg_now_3014639a94423537 = function() {
|
|
3191
|
+
const ret = Date.now();
|
|
3192
|
+
return ret;
|
|
3193
|
+
};
|
|
3194
|
+
|
|
3195
|
+
module.exports.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {
|
|
3196
|
+
const ret = new Array(arg0 >>> 0);
|
|
3197
|
+
return addHeapObject(ret);
|
|
3198
|
+
};
|
|
3199
|
+
|
|
3200
|
+
module.exports.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
|
|
3201
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3202
|
+
return addHeapObject(ret);
|
|
3203
|
+
};
|
|
3204
|
+
|
|
3205
|
+
module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
|
|
3206
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
3207
|
+
};
|
|
3208
|
+
|
|
3209
|
+
module.exports.__wbg_length_cd7af8117672b8b8 = function(arg0) {
|
|
3210
|
+
const ret = getObject(arg0).length;
|
|
3211
|
+
return ret;
|
|
3212
|
+
};
|
|
3213
|
+
|
|
3214
|
+
module.exports.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
|
|
3215
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
3216
|
+
return ret;
|
|
3217
|
+
};
|
|
3218
|
+
|
|
3219
|
+
module.exports.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
|
|
3220
|
+
const ret = Array.isArray(getObject(arg0));
|
|
3221
|
+
return ret;
|
|
3222
|
+
};
|
|
3223
|
+
|
|
3224
|
+
module.exports.__wbg_iterator_2cee6dadfd956dfa = function() {
|
|
3225
|
+
const ret = Symbol.iterator;
|
|
3226
|
+
return addHeapObject(ret);
|
|
3227
|
+
};
|
|
3228
|
+
|
|
3229
|
+
module.exports.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
|
|
3230
|
+
const ret = self.self;
|
|
3203
3231
|
return addHeapObject(ret);
|
|
3204
3232
|
}, arguments) };
|
|
3205
3233
|
|
|
3206
|
-
module.exports.
|
|
3207
|
-
const ret =
|
|
3234
|
+
module.exports.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
|
|
3235
|
+
const ret = window.window;
|
|
3208
3236
|
return addHeapObject(ret);
|
|
3209
3237
|
}, arguments) };
|
|
3210
3238
|
|
|
3211
|
-
module.exports.
|
|
3212
|
-
const ret =
|
|
3239
|
+
module.exports.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
|
|
3240
|
+
const ret = globalThis.globalThis;
|
|
3213
3241
|
return addHeapObject(ret);
|
|
3214
3242
|
}, arguments) };
|
|
3215
3243
|
|
|
3216
|
-
module.exports.
|
|
3217
|
-
const ret =
|
|
3218
|
-
return ret;
|
|
3219
|
-
};
|
|
3244
|
+
module.exports.__wbg_global_207b558942527489 = function() { return handleError(function () {
|
|
3245
|
+
const ret = global.global;
|
|
3246
|
+
return addHeapObject(ret);
|
|
3247
|
+
}, arguments) };
|
|
3220
3248
|
|
|
3221
|
-
module.exports.
|
|
3222
|
-
const ret = getObject(arg0).
|
|
3249
|
+
module.exports.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
|
|
3250
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
3223
3251
|
return addHeapObject(ret);
|
|
3224
|
-
};
|
|
3252
|
+
}, arguments) };
|
|
3225
3253
|
|
|
3226
3254
|
module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
3227
3255
|
try {
|
|
@@ -3230,7 +3258,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
|
3230
3258
|
const a = state0.a;
|
|
3231
3259
|
state0.a = 0;
|
|
3232
3260
|
try {
|
|
3233
|
-
return
|
|
3261
|
+
return __wbg_adapter_393(a, state0.b, arg0, arg1);
|
|
3234
3262
|
} finally {
|
|
3235
3263
|
state0.a = a;
|
|
3236
3264
|
}
|
|
@@ -3242,78 +3270,58 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
|
3242
3270
|
}
|
|
3243
3271
|
};
|
|
3244
3272
|
|
|
3245
|
-
module.exports.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
|
|
3246
|
-
const ret = Promise.resolve(getObject(arg0));
|
|
3247
|
-
return addHeapObject(ret);
|
|
3248
|
-
};
|
|
3249
|
-
|
|
3250
3273
|
module.exports.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
|
|
3251
3274
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
3252
3275
|
return addHeapObject(ret);
|
|
3253
3276
|
};
|
|
3254
3277
|
|
|
3255
|
-
module.exports.
|
|
3256
|
-
const ret = getObject(arg0)
|
|
3278
|
+
module.exports.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
|
|
3279
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
3257
3280
|
return addHeapObject(ret);
|
|
3258
3281
|
};
|
|
3259
3282
|
|
|
3260
|
-
module.exports.
|
|
3261
|
-
const ret =
|
|
3283
|
+
module.exports.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3284
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
3262
3285
|
return addHeapObject(ret);
|
|
3263
|
-
};
|
|
3286
|
+
}, arguments) };
|
|
3264
3287
|
|
|
3265
|
-
module.exports.
|
|
3266
|
-
const ret =
|
|
3288
|
+
module.exports.__wbg_call_8e7cb608789c2528 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3289
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
3267
3290
|
return addHeapObject(ret);
|
|
3268
|
-
};
|
|
3269
|
-
|
|
3270
|
-
module.exports.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
|
|
3271
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3272
|
-
};
|
|
3273
|
-
|
|
3274
|
-
module.exports.__wbg_length_c20a40f15020d68a = function(arg0) {
|
|
3275
|
-
const ret = getObject(arg0).length;
|
|
3276
|
-
return ret;
|
|
3277
|
-
};
|
|
3291
|
+
}, arguments) };
|
|
3278
3292
|
|
|
3279
|
-
module.exports.
|
|
3280
|
-
const ret =
|
|
3293
|
+
module.exports.__wbg_call_938992c832f74314 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3294
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
|
|
3281
3295
|
return addHeapObject(ret);
|
|
3282
|
-
};
|
|
3296
|
+
}, arguments) };
|
|
3283
3297
|
|
|
3284
|
-
module.exports.
|
|
3285
|
-
const ret =
|
|
3298
|
+
module.exports.__wbg_next_40fc327bfc8770e6 = function(arg0) {
|
|
3299
|
+
const ret = getObject(arg0).next;
|
|
3286
3300
|
return addHeapObject(ret);
|
|
3287
3301
|
};
|
|
3288
3302
|
|
|
3289
|
-
module.exports.
|
|
3290
|
-
getObject(arg0).
|
|
3291
|
-
|
|
3303
|
+
module.exports.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
|
|
3304
|
+
const ret = getObject(arg0).next();
|
|
3305
|
+
return addHeapObject(ret);
|
|
3306
|
+
}, arguments) };
|
|
3292
3307
|
|
|
3293
|
-
module.exports.
|
|
3294
|
-
const ret = getObject(arg0).
|
|
3295
|
-
return ret;
|
|
3308
|
+
module.exports.__wbg_toString_198eafe4f2ea2733 = function(arg0) {
|
|
3309
|
+
const ret = getObject(arg0).toString();
|
|
3310
|
+
return addHeapObject(ret);
|
|
3296
3311
|
};
|
|
3297
3312
|
|
|
3298
|
-
module.exports.
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
} catch (_) {
|
|
3303
|
-
result = false;
|
|
3304
|
-
}
|
|
3305
|
-
const ret = result;
|
|
3306
|
-
return ret;
|
|
3307
|
-
};
|
|
3313
|
+
module.exports.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
|
|
3314
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3315
|
+
return addHeapObject(ret);
|
|
3316
|
+
}, arguments) };
|
|
3308
3317
|
|
|
3309
|
-
module.exports.
|
|
3310
|
-
const ret =
|
|
3318
|
+
module.exports.__wbindgen_memory = function() {
|
|
3319
|
+
const ret = wasm.memory;
|
|
3311
3320
|
return addHeapObject(ret);
|
|
3312
3321
|
};
|
|
3313
3322
|
|
|
3314
|
-
module.exports.
|
|
3315
|
-
|
|
3316
|
-
return addHeapObject(ret);
|
|
3323
|
+
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
3324
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
3317
3325
|
};
|
|
3318
3326
|
|
|
3319
3327
|
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
@@ -3324,17 +3332,8 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
|
3324
3332
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
3325
3333
|
};
|
|
3326
3334
|
|
|
3327
|
-
module.exports.
|
|
3328
|
-
|
|
3329
|
-
};
|
|
3330
|
-
|
|
3331
|
-
module.exports.__wbindgen_memory = function() {
|
|
3332
|
-
const ret = wasm.memory;
|
|
3333
|
-
return addHeapObject(ret);
|
|
3334
|
-
};
|
|
3335
|
-
|
|
3336
|
-
module.exports.__wbindgen_closure_wrapper1625 = function(arg0, arg1, arg2) {
|
|
3337
|
-
const ret = makeMutClosure(arg0, arg1, 580, __wbg_adapter_38);
|
|
3335
|
+
module.exports.__wbindgen_closure_wrapper1618 = function(arg0, arg1, arg2) {
|
|
3336
|
+
const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
|
|
3338
3337
|
return addHeapObject(ret);
|
|
3339
3338
|
};
|
|
3340
3339
|
|