saito-wasm 0.0.14 → 0.0.16
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/package.json +1 -1
- package/pkg/node/index.d.ts +2 -5
- package/pkg/node/index.js +60 -66
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +1 -2
- package/pkg/node/package.json +2 -2
- package/pkg/web/index.d.ts +3 -7
- package/pkg/web/index.js +58 -64
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +1 -2
package/package.json
CHANGED
package/pkg/node/index.d.ts
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @param {string} json
|
|
5
5
|
* @param {string} private_key
|
|
6
|
+
* @param {number} log_level_num
|
|
6
7
|
* @returns {Promise<any>}
|
|
7
8
|
*/
|
|
8
|
-
export function initialize(json: string, private_key: string): Promise<any>;
|
|
9
|
+
export function initialize(json: string, private_key: string, log_level_num: number): Promise<any>;
|
|
9
10
|
/**
|
|
10
11
|
* @param {string} public_key
|
|
11
12
|
* @param {bigint} amount
|
|
@@ -375,10 +376,6 @@ export class WasmTransaction {
|
|
|
375
376
|
*/
|
|
376
377
|
sign(): Promise<void>;
|
|
377
378
|
/**
|
|
378
|
-
* @returns {Promise<void>}
|
|
379
|
-
*/
|
|
380
|
-
sign_and_encrypt(): Promise<void>;
|
|
381
|
-
/**
|
|
382
379
|
* @returns {Uint8Array}
|
|
383
380
|
*/
|
|
384
381
|
serialize(): Uint8Array;
|
package/pkg/node/index.js
CHANGED
|
@@ -4,29 +4,25 @@ let wasm;
|
|
|
4
4
|
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-ab5a63a608170761/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;
|
|
@@ -238,10 +238,11 @@ function handleError(f, args) {
|
|
|
238
238
|
/**
|
|
239
239
|
* @param {string} json
|
|
240
240
|
* @param {string} private_key
|
|
241
|
+
* @param {number} log_level_num
|
|
241
242
|
* @returns {Promise<any>}
|
|
242
243
|
*/
|
|
243
|
-
module.exports.initialize = function(json, private_key) {
|
|
244
|
-
const ret = wasm.initialize(addHeapObject(json), addHeapObject(private_key));
|
|
244
|
+
module.exports.initialize = function(json, private_key, log_level_num) {
|
|
245
|
+
const ret = wasm.initialize(addHeapObject(json), addHeapObject(private_key), log_level_num);
|
|
245
246
|
return takeObject(ret);
|
|
246
247
|
};
|
|
247
248
|
|
|
@@ -473,7 +474,7 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
473
474
|
ptr = ptr >>> 0;
|
|
474
475
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
475
476
|
}
|
|
476
|
-
function
|
|
477
|
+
function __wbg_adapter_273(arg0, arg1, arg2, arg3) {
|
|
477
478
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h5cc70648b3a77aa5(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
478
479
|
}
|
|
479
480
|
|
|
@@ -1255,13 +1256,6 @@ class WasmTransaction {
|
|
|
1255
1256
|
return takeObject(ret);
|
|
1256
1257
|
}
|
|
1257
1258
|
/**
|
|
1258
|
-
* @returns {Promise<void>}
|
|
1259
|
-
*/
|
|
1260
|
-
sign_and_encrypt() {
|
|
1261
|
-
const ret = wasm.wasmtransaction_sign_and_encrypt(this.__wbg_ptr);
|
|
1262
|
-
return takeObject(ret);
|
|
1263
|
-
}
|
|
1264
|
-
/**
|
|
1265
1259
|
* @returns {number}
|
|
1266
1260
|
*/
|
|
1267
1261
|
get type() {
|
|
@@ -1400,23 +1394,22 @@ class WasmWallet {
|
|
|
1400
1394
|
}
|
|
1401
1395
|
module.exports.WasmWallet = WasmWallet;
|
|
1402
1396
|
|
|
1403
|
-
module.exports.
|
|
1404
|
-
|
|
1405
|
-
return addHeapObject(ret);
|
|
1397
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
1398
|
+
takeObject(arg0);
|
|
1406
1399
|
};
|
|
1407
1400
|
|
|
1408
|
-
module.exports.
|
|
1409
|
-
const ret =
|
|
1401
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
1402
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1410
1403
|
return addHeapObject(ret);
|
|
1411
1404
|
};
|
|
1412
1405
|
|
|
1413
|
-
module.exports.
|
|
1414
|
-
const ret =
|
|
1406
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
1407
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
1415
1408
|
return addHeapObject(ret);
|
|
1416
1409
|
};
|
|
1417
1410
|
|
|
1418
|
-
module.exports.
|
|
1419
|
-
const ret =
|
|
1411
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
1412
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1420
1413
|
return addHeapObject(ret);
|
|
1421
1414
|
};
|
|
1422
1415
|
|
|
@@ -1425,13 +1418,9 @@ module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
|
1425
1418
|
return addHeapObject(ret);
|
|
1426
1419
|
};
|
|
1427
1420
|
|
|
1428
|
-
module.exports.
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
1433
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
1434
|
-
return addHeapObject(ret);
|
|
1421
|
+
module.exports.__wbindgen_is_falsy = function(arg0) {
|
|
1422
|
+
const ret = !getObject(arg0);
|
|
1423
|
+
return ret;
|
|
1435
1424
|
};
|
|
1436
1425
|
|
|
1437
1426
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
@@ -1443,18 +1432,28 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
1443
1432
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1444
1433
|
};
|
|
1445
1434
|
|
|
1446
|
-
module.exports.
|
|
1447
|
-
const ret =
|
|
1435
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
1436
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
1448
1437
|
return addHeapObject(ret);
|
|
1449
1438
|
};
|
|
1450
1439
|
|
|
1451
|
-
module.exports.
|
|
1452
|
-
const ret =
|
|
1440
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
1441
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
1453
1442
|
return addHeapObject(ret);
|
|
1454
1443
|
};
|
|
1455
1444
|
|
|
1456
|
-
module.exports.
|
|
1457
|
-
const ret =
|
|
1445
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
1446
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
1447
|
+
return addHeapObject(ret);
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
1451
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1452
|
+
return addHeapObject(ret);
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1455
|
+
module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
1456
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
1458
1457
|
return addHeapObject(ret);
|
|
1459
1458
|
};
|
|
1460
1459
|
|
|
@@ -1617,11 +1616,6 @@ module.exports.__wbg_getmyservices_07cd9026693aca08 = function() {
|
|
|
1617
1616
|
return ptr1;
|
|
1618
1617
|
};
|
|
1619
1618
|
|
|
1620
|
-
module.exports.__wbindgen_is_falsy = function(arg0) {
|
|
1621
|
-
const ret = !getObject(arg0);
|
|
1622
|
-
return ret;
|
|
1623
|
-
};
|
|
1624
|
-
|
|
1625
1619
|
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
1626
1620
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1627
1621
|
return ret;
|
|
@@ -1850,7 +1844,7 @@ module.exports.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
|
|
|
1850
1844
|
const a = state0.a;
|
|
1851
1845
|
state0.a = 0;
|
|
1852
1846
|
try {
|
|
1853
|
-
return
|
|
1847
|
+
return __wbg_adapter_273(a, state0.b, arg0, arg1);
|
|
1854
1848
|
} finally {
|
|
1855
1849
|
state0.a = a;
|
|
1856
1850
|
}
|
|
@@ -1944,8 +1938,8 @@ module.exports.__wbindgen_memory = function() {
|
|
|
1944
1938
|
return addHeapObject(ret);
|
|
1945
1939
|
};
|
|
1946
1940
|
|
|
1947
|
-
module.exports.
|
|
1948
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1941
|
+
module.exports.__wbindgen_closure_wrapper937 = function(arg0, arg1, arg2) {
|
|
1942
|
+
const ret = makeMutClosure(arg0, arg1, 312, __wbg_adapter_40);
|
|
1949
1943
|
return addHeapObject(ret);
|
|
1950
1944
|
};
|
|
1951
1945
|
|
package/pkg/node/index_bg.wasm
CHANGED
|
Binary file
|
|
@@ -77,7 +77,6 @@ export function wasmtransaction_set_data(a: number, b: number): void;
|
|
|
77
77
|
export function wasmtransaction_get_timestamp(a: number): number;
|
|
78
78
|
export function wasmtransaction_set_timestamp(a: number, b: number): void;
|
|
79
79
|
export function wasmtransaction_sign(a: number): number;
|
|
80
|
-
export function wasmtransaction_sign_and_encrypt(a: number): number;
|
|
81
80
|
export function wasmtransaction_get_type(a: number): number;
|
|
82
81
|
export function wasmtransaction_set_type(a: number, b: number): void;
|
|
83
82
|
export function wasmtransaction_total_fees(a: number): number;
|
|
@@ -107,7 +106,7 @@ export function wasmblock_generate_lite_block(a: number, b: number): number;
|
|
|
107
106
|
export function __wbg_wasmconfiguration_free(a: number): void;
|
|
108
107
|
export function wasmconfiguration_new(): number;
|
|
109
108
|
export function __wbg_saitowasm_free(a: number): void;
|
|
110
|
-
export function initialize(a: number, b: number): number;
|
|
109
|
+
export function initialize(a: number, b: number, c: number): number;
|
|
111
110
|
export function create_transaction(a: number, b: number, c: number, d: number): number;
|
|
112
111
|
export function get_latest_block_hash(): number;
|
|
113
112
|
export function get_block(a: number): number;
|
package/pkg/node/package.json
CHANGED
package/pkg/web/index.d.ts
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @param {string} json
|
|
5
5
|
* @param {string} private_key
|
|
6
|
+
* @param {number} log_level_num
|
|
6
7
|
* @returns {Promise<any>}
|
|
7
8
|
*/
|
|
8
|
-
export function initialize(json: string, private_key: string): Promise<any>;
|
|
9
|
+
export function initialize(json: string, private_key: string, log_level_num: number): Promise<any>;
|
|
9
10
|
/**
|
|
10
11
|
* @param {string} public_key
|
|
11
12
|
* @param {bigint} amount
|
|
@@ -375,10 +376,6 @@ export class WasmTransaction {
|
|
|
375
376
|
*/
|
|
376
377
|
sign(): Promise<void>;
|
|
377
378
|
/**
|
|
378
|
-
* @returns {Promise<void>}
|
|
379
|
-
*/
|
|
380
|
-
sign_and_encrypt(): Promise<void>;
|
|
381
|
-
/**
|
|
382
379
|
* @returns {Uint8Array}
|
|
383
380
|
*/
|
|
384
381
|
serialize(): Uint8Array;
|
|
@@ -536,7 +533,6 @@ export interface InitOutput {
|
|
|
536
533
|
readonly wasmtransaction_get_timestamp: (a: number) => number;
|
|
537
534
|
readonly wasmtransaction_set_timestamp: (a: number, b: number) => void;
|
|
538
535
|
readonly wasmtransaction_sign: (a: number) => number;
|
|
539
|
-
readonly wasmtransaction_sign_and_encrypt: (a: number) => number;
|
|
540
536
|
readonly wasmtransaction_get_type: (a: number) => number;
|
|
541
537
|
readonly wasmtransaction_set_type: (a: number, b: number) => void;
|
|
542
538
|
readonly wasmtransaction_total_fees: (a: number) => number;
|
|
@@ -566,7 +562,7 @@ export interface InitOutput {
|
|
|
566
562
|
readonly __wbg_wasmconfiguration_free: (a: number) => void;
|
|
567
563
|
readonly wasmconfiguration_new: () => number;
|
|
568
564
|
readonly __wbg_saitowasm_free: (a: number) => void;
|
|
569
|
-
readonly initialize: (a: number, b: number) => number;
|
|
565
|
+
readonly initialize: (a: number, b: number, c: number) => number;
|
|
570
566
|
readonly create_transaction: (a: number, b: number, c: number, d: number) => number;
|
|
571
567
|
readonly get_latest_block_hash: () => number;
|
|
572
568
|
readonly get_block: (a: number) => number;
|
package/pkg/web/index.js
CHANGED
|
@@ -2,29 +2,25 @@ import { MsgHandler } from './snippets/saito-wasm-ab5a63a608170761/js/msg_handle
|
|
|
2
2
|
|
|
3
3
|
let wasm;
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const heap = new Array(128).fill(undefined);
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
heap.push(undefined, null, true, false);
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
function getObject(idx) { return heap[idx]; }
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
13
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
14
|
-
}
|
|
15
|
-
return cachedUint8Memory0;
|
|
16
|
-
}
|
|
11
|
+
let heap_next = heap.length;
|
|
17
12
|
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
function dropObject(idx) {
|
|
14
|
+
if (idx < 132) return;
|
|
15
|
+
heap[idx] = heap_next;
|
|
16
|
+
heap_next = idx;
|
|
21
17
|
}
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
function takeObject(idx) {
|
|
20
|
+
const ret = getObject(idx);
|
|
21
|
+
dropObject(idx);
|
|
22
|
+
return ret;
|
|
23
|
+
}
|
|
28
24
|
|
|
29
25
|
function addHeapObject(obj) {
|
|
30
26
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
@@ -35,18 +31,22 @@ function addHeapObject(obj) {
|
|
|
35
31
|
return idx;
|
|
36
32
|
}
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
37
|
+
|
|
38
|
+
let cachedUint8Memory0 = null;
|
|
39
|
+
|
|
40
|
+
function getUint8Memory0() {
|
|
41
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
42
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
43
|
+
}
|
|
44
|
+
return cachedUint8Memory0;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return ret;
|
|
47
|
+
function getStringFromWasm0(ptr, len) {
|
|
48
|
+
ptr = ptr >>> 0;
|
|
49
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
let WASM_VECTOR_LEN = 0;
|
|
@@ -240,10 +240,11 @@ function handleError(f, args) {
|
|
|
240
240
|
/**
|
|
241
241
|
* @param {string} json
|
|
242
242
|
* @param {string} private_key
|
|
243
|
+
* @param {number} log_level_num
|
|
243
244
|
* @returns {Promise<any>}
|
|
244
245
|
*/
|
|
245
|
-
export function initialize(json, private_key) {
|
|
246
|
-
const ret = wasm.initialize(addHeapObject(json), addHeapObject(private_key));
|
|
246
|
+
export function initialize(json, private_key, log_level_num) {
|
|
247
|
+
const ret = wasm.initialize(addHeapObject(json), addHeapObject(private_key), log_level_num);
|
|
247
248
|
return takeObject(ret);
|
|
248
249
|
}
|
|
249
250
|
|
|
@@ -475,7 +476,7 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
475
476
|
ptr = ptr >>> 0;
|
|
476
477
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
477
478
|
}
|
|
478
|
-
function
|
|
479
|
+
function __wbg_adapter_273(arg0, arg1, arg2, arg3) {
|
|
479
480
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h5cc70648b3a77aa5(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
480
481
|
}
|
|
481
482
|
|
|
@@ -1266,13 +1267,6 @@ export class WasmTransaction {
|
|
|
1266
1267
|
return takeObject(ret);
|
|
1267
1268
|
}
|
|
1268
1269
|
/**
|
|
1269
|
-
* @returns {Promise<void>}
|
|
1270
|
-
*/
|
|
1271
|
-
sign_and_encrypt() {
|
|
1272
|
-
const ret = wasm.wasmtransaction_sign_and_encrypt(this.__wbg_ptr);
|
|
1273
|
-
return takeObject(ret);
|
|
1274
|
-
}
|
|
1275
|
-
/**
|
|
1276
1270
|
* @returns {number}
|
|
1277
1271
|
*/
|
|
1278
1272
|
get type() {
|
|
@@ -1445,32 +1439,28 @@ async function __wbg_load(module, imports) {
|
|
|
1445
1439
|
function __wbg_get_imports() {
|
|
1446
1440
|
const imports = {};
|
|
1447
1441
|
imports.wbg = {};
|
|
1448
|
-
imports.wbg.
|
|
1449
|
-
|
|
1450
|
-
return addHeapObject(ret);
|
|
1442
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
1443
|
+
takeObject(arg0);
|
|
1451
1444
|
};
|
|
1452
|
-
imports.wbg.
|
|
1453
|
-
const ret =
|
|
1445
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
1446
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1454
1447
|
return addHeapObject(ret);
|
|
1455
1448
|
};
|
|
1456
|
-
imports.wbg.
|
|
1457
|
-
const ret =
|
|
1449
|
+
imports.wbg.__wbg_wasmpeer_new = function(arg0) {
|
|
1450
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
1458
1451
|
return addHeapObject(ret);
|
|
1459
1452
|
};
|
|
1460
|
-
imports.wbg.
|
|
1461
|
-
const ret =
|
|
1453
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1454
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1462
1455
|
return addHeapObject(ret);
|
|
1463
1456
|
};
|
|
1464
1457
|
imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
|
|
1465
1458
|
const ret = WasmTransaction.__wrap(arg0);
|
|
1466
1459
|
return addHeapObject(ret);
|
|
1467
1460
|
};
|
|
1468
|
-
imports.wbg.
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
1472
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
1473
|
-
return addHeapObject(ret);
|
|
1461
|
+
imports.wbg.__wbindgen_is_falsy = function(arg0) {
|
|
1462
|
+
const ret = !getObject(arg0);
|
|
1463
|
+
return ret;
|
|
1474
1464
|
};
|
|
1475
1465
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1476
1466
|
const obj = getObject(arg1);
|
|
@@ -1480,16 +1470,24 @@ function __wbg_get_imports() {
|
|
|
1480
1470
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1481
1471
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1482
1472
|
};
|
|
1483
|
-
imports.wbg.
|
|
1484
|
-
const ret =
|
|
1473
|
+
imports.wbg.__wbg_wasmwallet_new = function(arg0) {
|
|
1474
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
1485
1475
|
return addHeapObject(ret);
|
|
1486
1476
|
};
|
|
1487
|
-
imports.wbg.
|
|
1488
|
-
const ret =
|
|
1477
|
+
imports.wbg.__wbg_wasmblock_new = function(arg0) {
|
|
1478
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
1489
1479
|
return addHeapObject(ret);
|
|
1490
1480
|
};
|
|
1491
|
-
imports.wbg.
|
|
1492
|
-
const ret =
|
|
1481
|
+
imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
|
|
1482
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
1483
|
+
return addHeapObject(ret);
|
|
1484
|
+
};
|
|
1485
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
1486
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1487
|
+
return addHeapObject(ret);
|
|
1488
|
+
};
|
|
1489
|
+
imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
|
|
1490
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
1493
1491
|
return addHeapObject(ret);
|
|
1494
1492
|
};
|
|
1495
1493
|
imports.wbg.__wbg_wasmslip_new = function(arg0) {
|
|
@@ -1629,10 +1627,6 @@ function __wbg_get_imports() {
|
|
|
1629
1627
|
var ptr1 = ret.__destroy_into_raw();
|
|
1630
1628
|
return ptr1;
|
|
1631
1629
|
};
|
|
1632
|
-
imports.wbg.__wbindgen_is_falsy = function(arg0) {
|
|
1633
|
-
const ret = !getObject(arg0);
|
|
1634
|
-
return ret;
|
|
1635
|
-
};
|
|
1636
1630
|
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
1637
1631
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1638
1632
|
return ret;
|
|
@@ -1818,7 +1812,7 @@ function __wbg_get_imports() {
|
|
|
1818
1812
|
const a = state0.a;
|
|
1819
1813
|
state0.a = 0;
|
|
1820
1814
|
try {
|
|
1821
|
-
return
|
|
1815
|
+
return __wbg_adapter_273(a, state0.b, arg0, arg1);
|
|
1822
1816
|
} finally {
|
|
1823
1817
|
state0.a = a;
|
|
1824
1818
|
}
|
|
@@ -1896,8 +1890,8 @@ function __wbg_get_imports() {
|
|
|
1896
1890
|
const ret = wasm.memory;
|
|
1897
1891
|
return addHeapObject(ret);
|
|
1898
1892
|
};
|
|
1899
|
-
imports.wbg.
|
|
1900
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1893
|
+
imports.wbg.__wbindgen_closure_wrapper937 = function(arg0, arg1, arg2) {
|
|
1894
|
+
const ret = makeMutClosure(arg0, arg1, 312, __wbg_adapter_40);
|
|
1901
1895
|
return addHeapObject(ret);
|
|
1902
1896
|
};
|
|
1903
1897
|
|
package/pkg/web/index_bg.wasm
CHANGED
|
Binary file
|
|
@@ -77,7 +77,6 @@ export function wasmtransaction_set_data(a: number, b: number): void;
|
|
|
77
77
|
export function wasmtransaction_get_timestamp(a: number): number;
|
|
78
78
|
export function wasmtransaction_set_timestamp(a: number, b: number): void;
|
|
79
79
|
export function wasmtransaction_sign(a: number): number;
|
|
80
|
-
export function wasmtransaction_sign_and_encrypt(a: number): number;
|
|
81
80
|
export function wasmtransaction_get_type(a: number): number;
|
|
82
81
|
export function wasmtransaction_set_type(a: number, b: number): void;
|
|
83
82
|
export function wasmtransaction_total_fees(a: number): number;
|
|
@@ -107,7 +106,7 @@ export function wasmblock_generate_lite_block(a: number, b: number): number;
|
|
|
107
106
|
export function __wbg_wasmconfiguration_free(a: number): void;
|
|
108
107
|
export function wasmconfiguration_new(): number;
|
|
109
108
|
export function __wbg_saitowasm_free(a: number): void;
|
|
110
|
-
export function initialize(a: number, b: number): number;
|
|
109
|
+
export function initialize(a: number, b: number, c: number): number;
|
|
111
110
|
export function create_transaction(a: number, b: number, c: number, d: number): number;
|
|
112
111
|
export function get_latest_block_hash(): number;
|
|
113
112
|
export function get_block(a: number): number;
|