@acala-network/chopsticks-executor 0.6.6 → 0.7.1
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/chopsticks_executor.d.ts +17 -4
- package/chopsticks_executor.js +242 -164
- package/chopsticks_executor_bg.wasm +0 -0
- package/package.json +1 -1
package/chopsticks_executor.d.ts
CHANGED
|
@@ -19,15 +19,28 @@ export function calculate_state_root(entries: any, trie_version: any): Promise<a
|
|
|
19
19
|
*/
|
|
20
20
|
export function decode_proof(root_trie_hash: any, keys: any, nodes: any): Promise<any>;
|
|
21
21
|
/**
|
|
22
|
-
* @param {any} root_trie_hash
|
|
23
22
|
* @param {any} nodes
|
|
24
23
|
* @param {any} entries
|
|
25
24
|
* @returns {Promise<any>}
|
|
26
25
|
*/
|
|
27
|
-
export function create_proof(
|
|
26
|
+
export function create_proof(nodes: any, entries: any): Promise<any>;
|
|
28
27
|
/**
|
|
29
28
|
* @param {any} task
|
|
30
|
-
* @param {
|
|
29
|
+
* @param {JsCallback} js
|
|
30
|
+
* @param {string | undefined} log_level
|
|
31
31
|
* @returns {Promise<any>}
|
|
32
32
|
*/
|
|
33
|
-
export function run_task(task: any, js:
|
|
33
|
+
export function run_task(task: any, js: JsCallback, log_level?: string): Promise<any>;
|
|
34
|
+
|
|
35
|
+
import { HexString } from '@polkadot/util/types';
|
|
36
|
+
export interface JsCallback {
|
|
37
|
+
getStorage: (key: HexString) => Promise<string | undefined>
|
|
38
|
+
getStateRoot: () => Promise<string>
|
|
39
|
+
getNextKey: (prefix: HexString, key: HexString) => Promise<string | undefined>
|
|
40
|
+
offchainGetStorage: (key: HexString) => Promise<string | undefined>
|
|
41
|
+
offchainTimestamp: () => Promise<number>
|
|
42
|
+
offchainRandomSeed: () => Promise<HexString>
|
|
43
|
+
offchainSubmitTransaction: (tx: HexString) => Promise<bool>
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
package/chopsticks_executor.js
CHANGED
|
@@ -1,25 +1,79 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const {
|
|
4
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
5
5
|
|
|
6
|
-
const heap = new Array(
|
|
6
|
+
const heap = new Array(128).fill(undefined);
|
|
7
7
|
|
|
8
8
|
heap.push(undefined, null, true, false);
|
|
9
9
|
|
|
10
10
|
function getObject(idx) { return heap[idx]; }
|
|
11
11
|
|
|
12
|
-
let
|
|
12
|
+
let heap_next = heap.length;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
function dropObject(idx) {
|
|
15
|
+
if (idx < 132) return;
|
|
16
|
+
heap[idx] = heap_next;
|
|
17
|
+
heap_next = idx;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function takeObject(idx) {
|
|
21
|
+
const ret = getObject(idx);
|
|
22
|
+
dropObject(idx);
|
|
23
|
+
return ret;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function isLikeNone(x) {
|
|
27
|
+
return x === undefined || x === null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let cachedFloat64Memory0 = null;
|
|
31
|
+
|
|
32
|
+
function getFloat64Memory0() {
|
|
33
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
34
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
35
|
+
}
|
|
36
|
+
return cachedFloat64Memory0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let cachedInt32Memory0 = null;
|
|
40
|
+
|
|
41
|
+
function getInt32Memory0() {
|
|
42
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
43
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
44
|
+
}
|
|
45
|
+
return cachedInt32Memory0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
49
|
+
|
|
50
|
+
cachedTextDecoder.decode();
|
|
51
|
+
|
|
52
|
+
let cachedUint8Memory0 = null;
|
|
15
53
|
|
|
16
54
|
function getUint8Memory0() {
|
|
17
|
-
if (cachedUint8Memory0.byteLength === 0) {
|
|
55
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
18
56
|
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
19
57
|
}
|
|
20
58
|
return cachedUint8Memory0;
|
|
21
59
|
}
|
|
22
60
|
|
|
61
|
+
function getStringFromWasm0(ptr, len) {
|
|
62
|
+
ptr = ptr >>> 0;
|
|
63
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function addHeapObject(obj) {
|
|
67
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
68
|
+
const idx = heap_next;
|
|
69
|
+
heap_next = heap[idx];
|
|
70
|
+
|
|
71
|
+
heap[idx] = obj;
|
|
72
|
+
return idx;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let WASM_VECTOR_LEN = 0;
|
|
76
|
+
|
|
23
77
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
24
78
|
|
|
25
79
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -39,14 +93,14 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
39
93
|
|
|
40
94
|
if (realloc === undefined) {
|
|
41
95
|
const buf = cachedTextEncoder.encode(arg);
|
|
42
|
-
const ptr = malloc(buf.length);
|
|
96
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
43
97
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
44
98
|
WASM_VECTOR_LEN = buf.length;
|
|
45
99
|
return ptr;
|
|
46
100
|
}
|
|
47
101
|
|
|
48
102
|
let len = arg.length;
|
|
49
|
-
let ptr = malloc(len);
|
|
103
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
50
104
|
|
|
51
105
|
const mem = getUint8Memory0();
|
|
52
106
|
|
|
@@ -62,7 +116,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
62
116
|
if (offset !== 0) {
|
|
63
117
|
arg = arg.slice(offset);
|
|
64
118
|
}
|
|
65
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
119
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
66
120
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
67
121
|
const ret = encodeString(arg, view);
|
|
68
122
|
|
|
@@ -73,57 +127,13 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
73
127
|
return ptr;
|
|
74
128
|
}
|
|
75
129
|
|
|
76
|
-
|
|
77
|
-
return x === undefined || x === null;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
let cachedInt32Memory0 = new Int32Array();
|
|
130
|
+
let cachedBigInt64Memory0 = null;
|
|
81
131
|
|
|
82
|
-
function
|
|
83
|
-
if (
|
|
84
|
-
|
|
132
|
+
function getBigInt64Memory0() {
|
|
133
|
+
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
134
|
+
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
85
135
|
}
|
|
86
|
-
return
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
let heap_next = heap.length;
|
|
90
|
-
|
|
91
|
-
function dropObject(idx) {
|
|
92
|
-
if (idx < 36) return;
|
|
93
|
-
heap[idx] = heap_next;
|
|
94
|
-
heap_next = idx;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function takeObject(idx) {
|
|
98
|
-
const ret = getObject(idx);
|
|
99
|
-
dropObject(idx);
|
|
100
|
-
return ret;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
104
|
-
|
|
105
|
-
cachedTextDecoder.decode();
|
|
106
|
-
|
|
107
|
-
function getStringFromWasm0(ptr, len) {
|
|
108
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function addHeapObject(obj) {
|
|
112
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
113
|
-
const idx = heap_next;
|
|
114
|
-
heap_next = heap[idx];
|
|
115
|
-
|
|
116
|
-
heap[idx] = obj;
|
|
117
|
-
return idx;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
let cachedFloat64Memory0 = new Float64Array();
|
|
121
|
-
|
|
122
|
-
function getFloat64Memory0() {
|
|
123
|
-
if (cachedFloat64Memory0.byteLength === 0) {
|
|
124
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
125
|
-
}
|
|
126
|
-
return cachedFloat64Memory0;
|
|
136
|
+
return cachedBigInt64Memory0;
|
|
127
137
|
}
|
|
128
138
|
|
|
129
139
|
function debugString(val) {
|
|
@@ -215,8 +225,8 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
215
225
|
|
|
216
226
|
return real;
|
|
217
227
|
}
|
|
218
|
-
function
|
|
219
|
-
wasm.
|
|
228
|
+
function __wbg_adapter_46(arg0, arg1, arg2) {
|
|
229
|
+
wasm.wasm_bindgen__convert__closures__invoke1_mut__h7043b82208c98903(arg0, arg1, addHeapObject(arg2));
|
|
220
230
|
}
|
|
221
231
|
|
|
222
232
|
/**
|
|
@@ -250,23 +260,25 @@ module.exports.decode_proof = function(root_trie_hash, keys, nodes) {
|
|
|
250
260
|
};
|
|
251
261
|
|
|
252
262
|
/**
|
|
253
|
-
* @param {any} root_trie_hash
|
|
254
263
|
* @param {any} nodes
|
|
255
264
|
* @param {any} entries
|
|
256
265
|
* @returns {Promise<any>}
|
|
257
266
|
*/
|
|
258
|
-
module.exports.create_proof = function(
|
|
259
|
-
const ret = wasm.create_proof(addHeapObject(
|
|
267
|
+
module.exports.create_proof = function(nodes, entries) {
|
|
268
|
+
const ret = wasm.create_proof(addHeapObject(nodes), addHeapObject(entries));
|
|
260
269
|
return takeObject(ret);
|
|
261
270
|
};
|
|
262
271
|
|
|
263
272
|
/**
|
|
264
273
|
* @param {any} task
|
|
265
|
-
* @param {
|
|
274
|
+
* @param {JsCallback} js
|
|
275
|
+
* @param {string | undefined} log_level
|
|
266
276
|
* @returns {Promise<any>}
|
|
267
277
|
*/
|
|
268
|
-
module.exports.run_task = function(task, js) {
|
|
269
|
-
|
|
278
|
+
module.exports.run_task = function(task, js, log_level) {
|
|
279
|
+
var ptr0 = isLikeNone(log_level) ? 0 : passStringToWasm0(log_level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
280
|
+
var len0 = WASM_VECTOR_LEN;
|
|
281
|
+
const ret = wasm.run_task(addHeapObject(task), addHeapObject(js), ptr0, len0);
|
|
270
282
|
return takeObject(ret);
|
|
271
283
|
};
|
|
272
284
|
|
|
@@ -277,61 +289,10 @@ function handleError(f, args) {
|
|
|
277
289
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
278
290
|
}
|
|
279
291
|
}
|
|
280
|
-
function
|
|
281
|
-
wasm.
|
|
292
|
+
function __wbg_adapter_106(arg0, arg1, arg2, arg3) {
|
|
293
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h14b58699f4ec867c(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
282
294
|
}
|
|
283
295
|
|
|
284
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
285
|
-
const obj = getObject(arg1);
|
|
286
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
287
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
288
|
-
var len0 = WASM_VECTOR_LEN;
|
|
289
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
290
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
294
|
-
takeObject(arg0);
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
298
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
299
|
-
return addHeapObject(ret);
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
module.exports.__wbg_call_168da88779e35f61 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
303
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
304
|
-
return addHeapObject(ret);
|
|
305
|
-
}, arguments) };
|
|
306
|
-
|
|
307
|
-
module.exports.__wbg_new_0b9bfdd97583284e = function() {
|
|
308
|
-
const ret = new Object();
|
|
309
|
-
return addHeapObject(ret);
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
module.exports.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
313
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
module.exports.__wbindgen_number_new = function(arg0) {
|
|
317
|
-
const ret = arg0;
|
|
318
|
-
return addHeapObject(ret);
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
module.exports.__wbg_new_1d9a920c6bfc44a8 = function() {
|
|
322
|
-
const ret = new Array();
|
|
323
|
-
return addHeapObject(ret);
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
module.exports.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) {
|
|
327
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
331
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
332
|
-
return addHeapObject(ret);
|
|
333
|
-
};
|
|
334
|
-
|
|
335
296
|
module.exports.__wbindgen_is_object = function(arg0) {
|
|
336
297
|
const val = getObject(arg0);
|
|
337
298
|
const ret = typeof(val) === 'object' && val !== null;
|
|
@@ -353,6 +314,10 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
|
353
314
|
return ret;
|
|
354
315
|
};
|
|
355
316
|
|
|
317
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
318
|
+
takeObject(arg0);
|
|
319
|
+
};
|
|
320
|
+
|
|
356
321
|
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
357
322
|
const obj = getObject(arg1);
|
|
358
323
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
@@ -360,37 +325,37 @@ module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
|
360
325
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
361
326
|
};
|
|
362
327
|
|
|
363
|
-
module.exports.
|
|
328
|
+
module.exports.__wbg_isSafeInteger_bb8e18dd21c97288 = function(arg0) {
|
|
364
329
|
const ret = Number.isSafeInteger(getObject(arg0));
|
|
365
330
|
return ret;
|
|
366
331
|
};
|
|
367
332
|
|
|
368
|
-
module.exports.
|
|
333
|
+
module.exports.__wbg_isArray_4c24b343cb13cfb1 = function(arg0) {
|
|
369
334
|
const ret = Array.isArray(getObject(arg0));
|
|
370
335
|
return ret;
|
|
371
336
|
};
|
|
372
337
|
|
|
373
|
-
module.exports.
|
|
338
|
+
module.exports.__wbg_length_fff51ee6522a1a18 = function(arg0) {
|
|
374
339
|
const ret = getObject(arg0).length;
|
|
375
340
|
return ret;
|
|
376
341
|
};
|
|
377
342
|
|
|
378
|
-
module.exports.
|
|
343
|
+
module.exports.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
|
|
379
344
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
380
345
|
return addHeapObject(ret);
|
|
381
346
|
};
|
|
382
347
|
|
|
383
|
-
module.exports.
|
|
348
|
+
module.exports.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) {
|
|
384
349
|
const ret = getObject(arg0).next();
|
|
385
350
|
return addHeapObject(ret);
|
|
386
351
|
}, arguments) };
|
|
387
352
|
|
|
388
|
-
module.exports.
|
|
353
|
+
module.exports.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
|
|
389
354
|
const ret = getObject(arg0).done;
|
|
390
355
|
return ret;
|
|
391
356
|
};
|
|
392
357
|
|
|
393
|
-
module.exports.
|
|
358
|
+
module.exports.__wbg_value_1695675138684bd5 = function(arg0) {
|
|
394
359
|
const ret = getObject(arg0).value;
|
|
395
360
|
return addHeapObject(ret);
|
|
396
361
|
};
|
|
@@ -401,6 +366,53 @@ module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
|
401
366
|
return ret;
|
|
402
367
|
};
|
|
403
368
|
|
|
369
|
+
module.exports.__wbg_new_b51585de1b234aff = function() {
|
|
370
|
+
const ret = new Object();
|
|
371
|
+
return addHeapObject(ret);
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
module.exports.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
375
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
module.exports.__wbg_new_898a68150f225f2e = function() {
|
|
379
|
+
const ret = new Array();
|
|
380
|
+
return addHeapObject(ret);
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
384
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
385
|
+
return addHeapObject(ret);
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
module.exports.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
|
|
389
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
module.exports.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
|
|
393
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
394
|
+
return addHeapObject(ret);
|
|
395
|
+
}, arguments) };
|
|
396
|
+
|
|
397
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
398
|
+
const ret = arg0;
|
|
399
|
+
return addHeapObject(ret);
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
403
|
+
const obj = getObject(arg1);
|
|
404
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
405
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
406
|
+
var len1 = WASM_VECTOR_LEN;
|
|
407
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
408
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
412
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
413
|
+
return addHeapObject(ret);
|
|
414
|
+
};
|
|
415
|
+
|
|
404
416
|
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
405
417
|
const obj = takeObject(arg0).original;
|
|
406
418
|
if (obj.cnt-- == 1) {
|
|
@@ -416,42 +428,84 @@ module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
|
416
428
|
return ret;
|
|
417
429
|
};
|
|
418
430
|
|
|
419
|
-
module.exports.
|
|
420
|
-
const ret = getObject(arg0).
|
|
431
|
+
module.exports.__wbg_offchainSubmitTransaction_82ca90c1d3f30e36 = function(arg0, arg1) {
|
|
432
|
+
const ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
|
|
421
433
|
return addHeapObject(ret);
|
|
422
434
|
};
|
|
423
435
|
|
|
424
|
-
module.exports.
|
|
425
|
-
const ret = getObject(arg0).
|
|
436
|
+
module.exports.__wbg_offchainRandomSeed_e93abb703f95d5b9 = function(arg0) {
|
|
437
|
+
const ret = getObject(arg0).offchainRandomSeed();
|
|
426
438
|
return addHeapObject(ret);
|
|
427
439
|
};
|
|
428
440
|
|
|
429
|
-
module.exports.
|
|
430
|
-
const ret = getObject(arg0).
|
|
441
|
+
module.exports.__wbg_offchainTimestamp_5c113cccb6f8c3e4 = function(arg0) {
|
|
442
|
+
const ret = getObject(arg0).offchainTimestamp();
|
|
431
443
|
return addHeapObject(ret);
|
|
432
444
|
};
|
|
433
445
|
|
|
434
|
-
module.exports.
|
|
435
|
-
const ret =
|
|
436
|
-
return ret;
|
|
446
|
+
module.exports.__wbg_offchainGetStorage_5c9121a99463a349 = function(arg0, arg1) {
|
|
447
|
+
const ret = getObject(arg0).offchainGetStorage(takeObject(arg1));
|
|
448
|
+
return addHeapObject(ret);
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
module.exports.__wbg_getNextKey_c5a640b3d7115b20 = function(arg0, arg1, arg2) {
|
|
452
|
+
const ret = getObject(arg0).getNextKey(takeObject(arg1), takeObject(arg2));
|
|
453
|
+
return addHeapObject(ret);
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
module.exports.__wbg_getStateRoot_8993c08754f9ac56 = function(arg0) {
|
|
457
|
+
const ret = getObject(arg0).getStateRoot();
|
|
458
|
+
return addHeapObject(ret);
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
module.exports.__wbg_getStorage_b5ef06a2f566f75c = function(arg0, arg1) {
|
|
462
|
+
const ret = getObject(arg0).getStorage(takeObject(arg1));
|
|
463
|
+
return addHeapObject(ret);
|
|
437
464
|
};
|
|
438
465
|
|
|
439
466
|
module.exports.__wbg_String_88810dfeb4021902 = function(arg0, arg1) {
|
|
440
467
|
const ret = String(getObject(arg1));
|
|
441
|
-
const
|
|
442
|
-
const
|
|
443
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
444
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
468
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
469
|
+
const len1 = WASM_VECTOR_LEN;
|
|
470
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
471
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
475
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
476
|
+
return ret;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
480
|
+
const v = getObject(arg1);
|
|
481
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
482
|
+
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
483
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
487
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
488
|
+
return addHeapObject(ret);
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
492
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
493
|
+
return ret;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
module.exports.__wbindgen_is_string = function(arg0) {
|
|
497
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
498
|
+
return ret;
|
|
445
499
|
};
|
|
446
500
|
|
|
447
|
-
module.exports.
|
|
501
|
+
module.exports.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) {
|
|
448
502
|
try {
|
|
449
503
|
var state0 = {a: arg0, b: arg1};
|
|
450
504
|
var cb0 = (arg0, arg1) => {
|
|
451
505
|
const a = state0.a;
|
|
452
506
|
state0.a = 0;
|
|
453
507
|
try {
|
|
454
|
-
return
|
|
508
|
+
return __wbg_adapter_106(a, state0.b, arg0, arg1);
|
|
455
509
|
} finally {
|
|
456
510
|
state0.a = a;
|
|
457
511
|
}
|
|
@@ -470,26 +524,30 @@ module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
|
470
524
|
|
|
471
525
|
module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
472
526
|
const ret = getObject(arg1).stack;
|
|
473
|
-
const
|
|
474
|
-
const
|
|
475
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
476
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
527
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
528
|
+
const len1 = WASM_VECTOR_LEN;
|
|
529
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
530
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
477
531
|
};
|
|
478
532
|
|
|
479
533
|
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
534
|
+
let deferred0_0;
|
|
535
|
+
let deferred0_1;
|
|
480
536
|
try {
|
|
537
|
+
deferred0_0 = arg0;
|
|
538
|
+
deferred0_1 = arg1;
|
|
481
539
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
482
540
|
} finally {
|
|
483
|
-
wasm.__wbindgen_free(
|
|
541
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
484
542
|
}
|
|
485
543
|
};
|
|
486
544
|
|
|
487
|
-
module.exports.
|
|
545
|
+
module.exports.__wbg_iterator_97f0c81209c6c35a = function() {
|
|
488
546
|
const ret = Symbol.iterator;
|
|
489
547
|
return addHeapObject(ret);
|
|
490
548
|
};
|
|
491
549
|
|
|
492
|
-
module.exports.
|
|
550
|
+
module.exports.__wbg_get_97b561fb56f034b5 = function() { return handleError(function (arg0, arg1) {
|
|
493
551
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
494
552
|
return addHeapObject(ret);
|
|
495
553
|
}, arguments) };
|
|
@@ -499,17 +557,17 @@ module.exports.__wbindgen_is_function = function(arg0) {
|
|
|
499
557
|
return ret;
|
|
500
558
|
};
|
|
501
559
|
|
|
502
|
-
module.exports.
|
|
560
|
+
module.exports.__wbg_call_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) {
|
|
503
561
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
504
562
|
return addHeapObject(ret);
|
|
505
563
|
}, arguments) };
|
|
506
564
|
|
|
507
|
-
module.exports.
|
|
565
|
+
module.exports.__wbg_next_526fc47e980da008 = function(arg0) {
|
|
508
566
|
const ret = getObject(arg0).next;
|
|
509
567
|
return addHeapObject(ret);
|
|
510
568
|
};
|
|
511
569
|
|
|
512
|
-
module.exports.
|
|
570
|
+
module.exports.__wbg_length_72e2208bbc0efc61 = function(arg0) {
|
|
513
571
|
const ret = getObject(arg0).length;
|
|
514
572
|
return ret;
|
|
515
573
|
};
|
|
@@ -519,21 +577,21 @@ module.exports.__wbindgen_memory = function() {
|
|
|
519
577
|
return addHeapObject(ret);
|
|
520
578
|
};
|
|
521
579
|
|
|
522
|
-
module.exports.
|
|
580
|
+
module.exports.__wbg_buffer_085ec1f694018c4f = function(arg0) {
|
|
523
581
|
const ret = getObject(arg0).buffer;
|
|
524
582
|
return addHeapObject(ret);
|
|
525
583
|
};
|
|
526
584
|
|
|
527
|
-
module.exports.
|
|
585
|
+
module.exports.__wbg_new_8125e318e6245eed = function(arg0) {
|
|
528
586
|
const ret = new Uint8Array(getObject(arg0));
|
|
529
587
|
return addHeapObject(ret);
|
|
530
588
|
};
|
|
531
589
|
|
|
532
|
-
module.exports.
|
|
590
|
+
module.exports.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
|
|
533
591
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
534
592
|
};
|
|
535
593
|
|
|
536
|
-
module.exports.
|
|
594
|
+
module.exports.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4 = function(arg0) {
|
|
537
595
|
let result;
|
|
538
596
|
try {
|
|
539
597
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -544,7 +602,7 @@ module.exports.__wbg_instanceof_Uint8Array_971eeda69eb75003 = function(arg0) {
|
|
|
544
602
|
return ret;
|
|
545
603
|
};
|
|
546
604
|
|
|
547
|
-
module.exports.
|
|
605
|
+
module.exports.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb = function(arg0) {
|
|
548
606
|
let result;
|
|
549
607
|
try {
|
|
550
608
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -562,33 +620,53 @@ module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
|
562
620
|
|
|
563
621
|
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
564
622
|
const ret = debugString(getObject(arg1));
|
|
565
|
-
const
|
|
566
|
-
const
|
|
567
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
568
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
623
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
624
|
+
const len1 = WASM_VECTOR_LEN;
|
|
625
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
626
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
569
627
|
};
|
|
570
628
|
|
|
571
629
|
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
572
630
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
573
631
|
};
|
|
574
632
|
|
|
575
|
-
module.exports.
|
|
633
|
+
module.exports.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) {
|
|
576
634
|
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
577
635
|
return addHeapObject(ret);
|
|
578
636
|
};
|
|
579
637
|
|
|
580
|
-
module.exports.
|
|
638
|
+
module.exports.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {
|
|
581
639
|
const ret = Promise.resolve(getObject(arg0));
|
|
582
640
|
return addHeapObject(ret);
|
|
583
641
|
};
|
|
584
642
|
|
|
585
|
-
module.exports.
|
|
643
|
+
module.exports.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {
|
|
586
644
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
587
645
|
return addHeapObject(ret);
|
|
588
646
|
};
|
|
589
647
|
|
|
590
|
-
module.exports.
|
|
591
|
-
|
|
648
|
+
module.exports.__wbg_debug_f15cb542ea509609 = function(arg0) {
|
|
649
|
+
console.debug(getObject(arg0));
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
module.exports.__wbg_error_ef9a0be47931175f = function(arg0) {
|
|
653
|
+
console.error(getObject(arg0));
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
module.exports.__wbg_info_2874fdd5393f35ce = function(arg0) {
|
|
657
|
+
console.info(getObject(arg0));
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
module.exports.__wbg_log_4b5638ad60bdc54a = function(arg0) {
|
|
661
|
+
console.log(getObject(arg0));
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
module.exports.__wbg_warn_58110c4a199df084 = function(arg0) {
|
|
665
|
+
console.warn(getObject(arg0));
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
module.exports.__wbindgen_closure_wrapper1328 = function(arg0, arg1, arg2) {
|
|
669
|
+
const ret = makeMutClosure(arg0, arg1, 128, __wbg_adapter_46);
|
|
592
670
|
return addHeapObject(ret);
|
|
593
671
|
};
|
|
594
672
|
|
|
Binary file
|