@acala-network/chopsticks-executor 0.9.1-2 → 0.9.1-4
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.
|
@@ -32,7 +32,7 @@ export function create_proof(nodes: any, entries: any): Promise<any>;
|
|
|
32
32
|
*/
|
|
33
33
|
export function run_task(task: any, js: JsCallback, log_level?: string): Promise<any>;
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
type HexString = `0x${string}`;
|
|
36
36
|
export interface JsCallback {
|
|
37
37
|
getStorage: (key: HexString) => Promise<string | undefined>
|
|
38
38
|
getStateRoot: () => Promise<string>
|
|
@@ -7,37 +7,10 @@ const heap = new Array(128).fill(undefined);
|
|
|
7
7
|
|
|
8
8
|
heap.push(undefined, null, true, false);
|
|
9
9
|
|
|
10
|
-
let heap_next = heap.length;
|
|
11
|
-
|
|
12
|
-
function addHeapObject(obj) {
|
|
13
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
14
|
-
const idx = heap_next;
|
|
15
|
-
heap_next = heap[idx];
|
|
16
|
-
|
|
17
|
-
heap[idx] = obj;
|
|
18
|
-
return idx;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
22
|
-
|
|
23
|
-
cachedTextDecoder.decode();
|
|
24
|
-
|
|
25
|
-
let cachedUint8Memory0 = null;
|
|
26
|
-
|
|
27
|
-
function getUint8Memory0() {
|
|
28
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
29
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
30
|
-
}
|
|
31
|
-
return cachedUint8Memory0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function getStringFromWasm0(ptr, len) {
|
|
35
|
-
ptr = ptr >>> 0;
|
|
36
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
10
|
function getObject(idx) { return heap[idx]; }
|
|
40
11
|
|
|
12
|
+
let heap_next = heap.length;
|
|
13
|
+
|
|
41
14
|
function dropObject(idx) {
|
|
42
15
|
if (idx < 132) return;
|
|
43
16
|
heap[idx] = heap_next;
|
|
@@ -72,6 +45,33 @@ function getInt32Memory0() {
|
|
|
72
45
|
return cachedInt32Memory0;
|
|
73
46
|
}
|
|
74
47
|
|
|
48
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
49
|
+
|
|
50
|
+
cachedTextDecoder.decode();
|
|
51
|
+
|
|
52
|
+
let cachedUint8Memory0 = null;
|
|
53
|
+
|
|
54
|
+
function getUint8Memory0() {
|
|
55
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
56
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
57
|
+
}
|
|
58
|
+
return cachedUint8Memory0;
|
|
59
|
+
}
|
|
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
75
|
let WASM_VECTOR_LEN = 0;
|
|
76
76
|
|
|
77
77
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -293,43 +293,6 @@ function __wbg_adapter_108(arg0, arg1, arg2, arg3) {
|
|
|
293
293
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h59e4ab6c95dba127(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
module.exports.__wbg_new_c728d68b8b34487e = function() {
|
|
297
|
-
const ret = new Object();
|
|
298
|
-
return addHeapObject(ret);
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
module.exports.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
302
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
module.exports.__wbindgen_number_new = function(arg0) {
|
|
306
|
-
const ret = arg0;
|
|
307
|
-
return addHeapObject(ret);
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
module.exports.__wbg_new_08236689f0afb357 = function() {
|
|
311
|
-
const ret = new Array();
|
|
312
|
-
return addHeapObject(ret);
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
module.exports.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
|
|
316
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
320
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
321
|
-
return addHeapObject(ret);
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
module.exports.__wbg_call_53fc3abd42e24ec8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
325
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
326
|
-
return addHeapObject(ret);
|
|
327
|
-
}, arguments) };
|
|
328
|
-
|
|
329
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
330
|
-
takeObject(arg0);
|
|
331
|
-
};
|
|
332
|
-
|
|
333
296
|
module.exports.__wbg_isArray_38525be7442aa21e = function(arg0) {
|
|
334
297
|
const ret = Array.isArray(getObject(arg0));
|
|
335
298
|
return ret;
|
|
@@ -360,6 +323,10 @@ module.exports.__wbg_value_0570714ff7d75f35 = function(arg0) {
|
|
|
360
323
|
return addHeapObject(ret);
|
|
361
324
|
};
|
|
362
325
|
|
|
326
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
327
|
+
takeObject(arg0);
|
|
328
|
+
};
|
|
329
|
+
|
|
363
330
|
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
364
331
|
const obj = getObject(arg1);
|
|
365
332
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
@@ -372,6 +339,39 @@ module.exports.__wbg_isSafeInteger_c38b0a16d0c7cef7 = function(arg0) {
|
|
|
372
339
|
return ret;
|
|
373
340
|
};
|
|
374
341
|
|
|
342
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
343
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
344
|
+
return addHeapObject(ret);
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
module.exports.__wbg_call_53fc3abd42e24ec8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
348
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
349
|
+
return addHeapObject(ret);
|
|
350
|
+
}, arguments) };
|
|
351
|
+
|
|
352
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
353
|
+
const obj = getObject(arg1);
|
|
354
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
355
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
356
|
+
var len1 = WASM_VECTOR_LEN;
|
|
357
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
358
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
362
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
363
|
+
return addHeapObject(ret);
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
module.exports.__wbg_new_08236689f0afb357 = function() {
|
|
367
|
+
const ret = new Array();
|
|
368
|
+
return addHeapObject(ret);
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
module.exports.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
|
|
372
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
373
|
+
};
|
|
374
|
+
|
|
375
375
|
module.exports.__wbindgen_is_object = function(arg0) {
|
|
376
376
|
const val = getObject(arg0);
|
|
377
377
|
const ret = typeof(val) === 'object' && val !== null;
|
|
@@ -399,17 +399,17 @@ module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
|
399
399
|
return ret;
|
|
400
400
|
};
|
|
401
401
|
|
|
402
|
-
module.exports.
|
|
403
|
-
const
|
|
404
|
-
|
|
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;
|
|
402
|
+
module.exports.__wbg_new_c728d68b8b34487e = function() {
|
|
403
|
+
const ret = new Object();
|
|
404
|
+
return addHeapObject(ret);
|
|
409
405
|
};
|
|
410
406
|
|
|
411
|
-
module.exports.
|
|
412
|
-
|
|
407
|
+
module.exports.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
408
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
412
|
+
const ret = arg0;
|
|
413
413
|
return addHeapObject(ret);
|
|
414
414
|
};
|
|
415
415
|
|
|
@@ -441,37 +441,37 @@ module.exports.__wbg_String_88810dfeb4021902 = function(arg0, arg1) {
|
|
|
441
441
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
442
442
|
};
|
|
443
443
|
|
|
444
|
-
module.exports.
|
|
444
|
+
module.exports.__wbg_getStorage_38f461cd4d96f7d1 = function(arg0, arg1) {
|
|
445
445
|
const ret = getObject(arg0).getStorage(takeObject(arg1));
|
|
446
446
|
return addHeapObject(ret);
|
|
447
447
|
};
|
|
448
448
|
|
|
449
|
-
module.exports.
|
|
449
|
+
module.exports.__wbg_getStateRoot_fc671ff707491162 = function(arg0) {
|
|
450
450
|
const ret = getObject(arg0).getStateRoot();
|
|
451
451
|
return addHeapObject(ret);
|
|
452
452
|
};
|
|
453
453
|
|
|
454
|
-
module.exports.
|
|
454
|
+
module.exports.__wbg_getNextKey_f352f504a9c8782f = function(arg0, arg1, arg2) {
|
|
455
455
|
const ret = getObject(arg0).getNextKey(takeObject(arg1), takeObject(arg2));
|
|
456
456
|
return addHeapObject(ret);
|
|
457
457
|
};
|
|
458
458
|
|
|
459
|
-
module.exports.
|
|
459
|
+
module.exports.__wbg_offchainGetStorage_4b8766ede1cae211 = function(arg0, arg1) {
|
|
460
460
|
const ret = getObject(arg0).offchainGetStorage(takeObject(arg1));
|
|
461
461
|
return addHeapObject(ret);
|
|
462
462
|
};
|
|
463
463
|
|
|
464
|
-
module.exports.
|
|
464
|
+
module.exports.__wbg_offchainTimestamp_45ee8b247786d9ab = function(arg0) {
|
|
465
465
|
const ret = getObject(arg0).offchainTimestamp();
|
|
466
466
|
return addHeapObject(ret);
|
|
467
467
|
};
|
|
468
468
|
|
|
469
|
-
module.exports.
|
|
469
|
+
module.exports.__wbg_offchainRandomSeed_676554dcb697cf70 = function(arg0) {
|
|
470
470
|
const ret = getObject(arg0).offchainRandomSeed();
|
|
471
471
|
return addHeapObject(ret);
|
|
472
472
|
};
|
|
473
473
|
|
|
474
|
-
module.exports.
|
|
474
|
+
module.exports.__wbg_offchainSubmitTransaction_a82409c564dd9903 = function(arg0, arg1) {
|
|
475
475
|
const ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
|
|
476
476
|
return addHeapObject(ret);
|
|
477
477
|
};
|
|
Binary file
|