@acala-network/chopsticks-executor 0.9.2-5 → 0.9.2
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/dist/cjs/chopsticks_executor.js +86 -86
- package/dist/cjs/index.js +4 -20
- package/dist/esm/chopsticks_executor.js +87 -87
- package/dist/esm/index.js +4 -9
- package/package.json +1 -1
|
@@ -161,26 +161,10 @@ function _ts_generator(thisArg, body) {
|
|
|
161
161
|
var wasm;
|
|
162
162
|
var heap = new Array(128).fill(undefined);
|
|
163
163
|
heap.push(undefined, null, true, false);
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
167
|
-
var idx = heap_next;
|
|
168
|
-
heap_next = heap[idx];
|
|
169
|
-
heap[idx] = obj;
|
|
170
|
-
return idx;
|
|
171
|
-
}
|
|
172
|
-
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", {
|
|
173
|
-
ignoreBOM: true,
|
|
174
|
-
fatal: true
|
|
175
|
-
}) : {
|
|
176
|
-
decode: function() {
|
|
177
|
-
throw Error("TextDecoder not available");
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
if (typeof TextDecoder !== "undefined") {
|
|
181
|
-
cachedTextDecoder.decode();
|
|
164
|
+
function getObject(idx) {
|
|
165
|
+
return heap[idx];
|
|
182
166
|
}
|
|
183
|
-
;
|
|
167
|
+
var WASM_VECTOR_LEN = 0;
|
|
184
168
|
var cachedUint8Memory0 = null;
|
|
185
169
|
function getUint8Memory0() {
|
|
186
170
|
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
@@ -188,41 +172,6 @@ function getUint8Memory0() {
|
|
|
188
172
|
}
|
|
189
173
|
return cachedUint8Memory0;
|
|
190
174
|
}
|
|
191
|
-
function getStringFromWasm0(ptr, len) {
|
|
192
|
-
ptr = ptr >>> 0;
|
|
193
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
194
|
-
}
|
|
195
|
-
function getObject(idx) {
|
|
196
|
-
return heap[idx];
|
|
197
|
-
}
|
|
198
|
-
function dropObject(idx) {
|
|
199
|
-
if (idx < 132) return;
|
|
200
|
-
heap[idx] = heap_next;
|
|
201
|
-
heap_next = idx;
|
|
202
|
-
}
|
|
203
|
-
function takeObject(idx) {
|
|
204
|
-
var ret = getObject(idx);
|
|
205
|
-
dropObject(idx);
|
|
206
|
-
return ret;
|
|
207
|
-
}
|
|
208
|
-
function isLikeNone(x) {
|
|
209
|
-
return x === undefined || x === null;
|
|
210
|
-
}
|
|
211
|
-
var cachedFloat64Memory0 = null;
|
|
212
|
-
function getFloat64Memory0() {
|
|
213
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
214
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
215
|
-
}
|
|
216
|
-
return cachedFloat64Memory0;
|
|
217
|
-
}
|
|
218
|
-
var cachedInt32Memory0 = null;
|
|
219
|
-
function getInt32Memory0() {
|
|
220
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
221
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
222
|
-
}
|
|
223
|
-
return cachedInt32Memory0;
|
|
224
|
-
}
|
|
225
|
-
var WASM_VECTOR_LEN = 0;
|
|
226
175
|
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : {
|
|
227
176
|
encode: function() {
|
|
228
177
|
throw Error("TextEncoder not available");
|
|
@@ -267,6 +216,57 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
267
216
|
WASM_VECTOR_LEN = offset;
|
|
268
217
|
return ptr1;
|
|
269
218
|
}
|
|
219
|
+
function isLikeNone(x) {
|
|
220
|
+
return x === undefined || x === null;
|
|
221
|
+
}
|
|
222
|
+
var cachedInt32Memory0 = null;
|
|
223
|
+
function getInt32Memory0() {
|
|
224
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
225
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
226
|
+
}
|
|
227
|
+
return cachedInt32Memory0;
|
|
228
|
+
}
|
|
229
|
+
var heap_next = heap.length;
|
|
230
|
+
function dropObject(idx) {
|
|
231
|
+
if (idx < 132) return;
|
|
232
|
+
heap[idx] = heap_next;
|
|
233
|
+
heap_next = idx;
|
|
234
|
+
}
|
|
235
|
+
function takeObject(idx) {
|
|
236
|
+
var ret = getObject(idx);
|
|
237
|
+
dropObject(idx);
|
|
238
|
+
return ret;
|
|
239
|
+
}
|
|
240
|
+
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", {
|
|
241
|
+
ignoreBOM: true,
|
|
242
|
+
fatal: true
|
|
243
|
+
}) : {
|
|
244
|
+
decode: function() {
|
|
245
|
+
throw Error("TextDecoder not available");
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
if (typeof TextDecoder !== "undefined") {
|
|
249
|
+
cachedTextDecoder.decode();
|
|
250
|
+
}
|
|
251
|
+
;
|
|
252
|
+
function getStringFromWasm0(ptr, len) {
|
|
253
|
+
ptr = ptr >>> 0;
|
|
254
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
255
|
+
}
|
|
256
|
+
function addHeapObject(obj) {
|
|
257
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
258
|
+
var idx = heap_next;
|
|
259
|
+
heap_next = heap[idx];
|
|
260
|
+
heap[idx] = obj;
|
|
261
|
+
return idx;
|
|
262
|
+
}
|
|
263
|
+
var cachedFloat64Memory0 = null;
|
|
264
|
+
function getFloat64Memory0() {
|
|
265
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
266
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
267
|
+
}
|
|
268
|
+
return cachedFloat64Memory0;
|
|
269
|
+
}
|
|
270
270
|
var cachedBigInt64Memory0 = null;
|
|
271
271
|
function getBigInt64Memory0() {
|
|
272
272
|
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
@@ -522,24 +522,21 @@ function ___wbg_load() {
|
|
|
522
522
|
function __wbg_get_imports() {
|
|
523
523
|
var imports = {};
|
|
524
524
|
imports.wbg = {};
|
|
525
|
-
imports.wbg.
|
|
526
|
-
var
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
525
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
526
|
+
var obj = getObject(arg1);
|
|
527
|
+
var ret = typeof obj === "string" ? obj : undefined;
|
|
528
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
529
|
+
var len1 = WASM_VECTOR_LEN;
|
|
530
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
531
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
531
532
|
};
|
|
532
|
-
imports.wbg.
|
|
533
|
-
|
|
534
|
-
return addHeapObject(ret);
|
|
533
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
534
|
+
takeObject(arg0);
|
|
535
535
|
};
|
|
536
|
-
imports.wbg.
|
|
537
|
-
var ret = new
|
|
536
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
537
|
+
var ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
538
538
|
return addHeapObject(ret);
|
|
539
539
|
};
|
|
540
|
-
imports.wbg.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
|
|
541
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
542
|
-
};
|
|
543
540
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
544
541
|
var ret = getStringFromWasm0(arg0, arg1);
|
|
545
542
|
return addHeapObject(ret);
|
|
@@ -550,9 +547,6 @@ function __wbg_get_imports() {
|
|
|
550
547
|
return addHeapObject(ret);
|
|
551
548
|
}, arguments);
|
|
552
549
|
};
|
|
553
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
554
|
-
takeObject(arg0);
|
|
555
|
-
};
|
|
556
550
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
557
551
|
var val = getObject(arg0);
|
|
558
552
|
var ret = typeof val === "object" && val !== null;
|
|
@@ -611,18 +605,24 @@ function __wbg_get_imports() {
|
|
|
611
605
|
var ret = Number.isSafeInteger(getObject(arg0));
|
|
612
606
|
return ret;
|
|
613
607
|
};
|
|
614
|
-
imports.wbg.
|
|
615
|
-
var
|
|
616
|
-
|
|
617
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
618
|
-
var len1 = WASM_VECTOR_LEN;
|
|
619
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
620
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
608
|
+
imports.wbg.__wbg_new_c728d68b8b34487e = function() {
|
|
609
|
+
var ret = new Object();
|
|
610
|
+
return addHeapObject(ret);
|
|
621
611
|
};
|
|
622
|
-
imports.wbg.
|
|
623
|
-
|
|
612
|
+
imports.wbg.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
613
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
614
|
+
};
|
|
615
|
+
imports.wbg.__wbg_new_08236689f0afb357 = function() {
|
|
616
|
+
var ret = new Array();
|
|
617
|
+
return addHeapObject(ret);
|
|
618
|
+
};
|
|
619
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
620
|
+
var ret = arg0;
|
|
624
621
|
return addHeapObject(ret);
|
|
625
622
|
};
|
|
623
|
+
imports.wbg.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
|
|
624
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
625
|
+
};
|
|
626
626
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
627
627
|
var obj = takeObject(arg0).original;
|
|
628
628
|
if (obj.cnt-- == 1) {
|
|
@@ -647,31 +647,31 @@ function __wbg_get_imports() {
|
|
|
647
647
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
648
648
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
649
649
|
};
|
|
650
|
-
imports.wbg.
|
|
650
|
+
imports.wbg.__wbg_getStorage_b3dfc127bb7cb52c = function(arg0, arg1) {
|
|
651
651
|
var ret = getObject(arg0).getStorage(takeObject(arg1));
|
|
652
652
|
return addHeapObject(ret);
|
|
653
653
|
};
|
|
654
|
-
imports.wbg.
|
|
654
|
+
imports.wbg.__wbg_getStateRoot_bd9ab642bda5fd90 = function(arg0) {
|
|
655
655
|
var ret = getObject(arg0).getStateRoot();
|
|
656
656
|
return addHeapObject(ret);
|
|
657
657
|
};
|
|
658
|
-
imports.wbg.
|
|
658
|
+
imports.wbg.__wbg_getNextKey_5e93e323bd8971ba = function(arg0, arg1, arg2) {
|
|
659
659
|
var ret = getObject(arg0).getNextKey(takeObject(arg1), takeObject(arg2));
|
|
660
660
|
return addHeapObject(ret);
|
|
661
661
|
};
|
|
662
|
-
imports.wbg.
|
|
662
|
+
imports.wbg.__wbg_offchainGetStorage_9932361b5f165cc5 = function(arg0, arg1) {
|
|
663
663
|
var ret = getObject(arg0).offchainGetStorage(takeObject(arg1));
|
|
664
664
|
return addHeapObject(ret);
|
|
665
665
|
};
|
|
666
|
-
imports.wbg.
|
|
666
|
+
imports.wbg.__wbg_offchainTimestamp_a1694afbc025f171 = function(arg0) {
|
|
667
667
|
var ret = getObject(arg0).offchainTimestamp();
|
|
668
668
|
return addHeapObject(ret);
|
|
669
669
|
};
|
|
670
|
-
imports.wbg.
|
|
670
|
+
imports.wbg.__wbg_offchainRandomSeed_cd901cd7a7c4e4c0 = function(arg0) {
|
|
671
671
|
var ret = getObject(arg0).offchainRandomSeed();
|
|
672
672
|
return addHeapObject(ret);
|
|
673
673
|
};
|
|
674
|
-
imports.wbg.
|
|
674
|
+
imports.wbg.__wbg_offchainSubmitTransaction_89b76187f91f6f11 = function(arg0, arg1) {
|
|
675
675
|
var ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
|
|
676
676
|
return addHeapObject(ret);
|
|
677
677
|
};
|