@acala-network/chopsticks-executor 0.2.0 → 0.2.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 +14 -0
- package/chopsticks_executor.js +54 -32
- package/chopsticks_executor_bg.wasm +0 -0
- package/package.json +1 -1
package/chopsticks_executor.d.ts
CHANGED
|
@@ -16,6 +16,20 @@ export function get_runtime_version(code: string): Promise<any>;
|
|
|
16
16
|
*/
|
|
17
17
|
export function calculate_state_root(entries: any): Promise<any>;
|
|
18
18
|
/**
|
|
19
|
+
* @param {any} root_trie_hash
|
|
20
|
+
* @param {any} keys
|
|
21
|
+
* @param {any} nodes
|
|
22
|
+
* @returns {Promise<any>}
|
|
23
|
+
*/
|
|
24
|
+
export function decode_proof(root_trie_hash: any, keys: any, nodes: any): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* @param {any} root_trie_hash
|
|
27
|
+
* @param {any} nodes
|
|
28
|
+
* @param {any} entries
|
|
29
|
+
* @returns {Promise<any>}
|
|
30
|
+
*/
|
|
31
|
+
export function create_proof(root_trie_hash: any, nodes: any, entries: any): Promise<any>;
|
|
32
|
+
/**
|
|
19
33
|
* @param {number} task_id
|
|
20
34
|
* @param {string} ws_url
|
|
21
35
|
* @returns {Promise<void>}
|
package/chopsticks_executor.js
CHANGED
|
@@ -216,23 +216,23 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
216
216
|
return real;
|
|
217
217
|
}
|
|
218
218
|
function __wbg_adapter_34(arg0, arg1) {
|
|
219
|
-
wasm.
|
|
219
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0f84c08448d2865e(arg0, arg1);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
function __wbg_adapter_37(arg0, arg1, arg2) {
|
|
223
|
-
wasm.
|
|
223
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7283a49030747712(arg0, arg1, addHeapObject(arg2));
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
function __wbg_adapter_42(arg0, arg1) {
|
|
227
|
-
wasm.
|
|
227
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4934162a4b354484(arg0, arg1);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
function __wbg_adapter_47(arg0, arg1, arg2) {
|
|
231
|
-
wasm.
|
|
231
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h02de66892f7d307a(arg0, arg1, addHeapObject(arg2));
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
function __wbg_adapter_50(arg0, arg1) {
|
|
235
|
-
wasm.
|
|
235
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he68b9fa6e29ec1bd(arg0, arg1);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
/**
|
|
@@ -266,6 +266,28 @@ module.exports.calculate_state_root = function(entries) {
|
|
|
266
266
|
return takeObject(ret);
|
|
267
267
|
};
|
|
268
268
|
|
|
269
|
+
/**
|
|
270
|
+
* @param {any} root_trie_hash
|
|
271
|
+
* @param {any} keys
|
|
272
|
+
* @param {any} nodes
|
|
273
|
+
* @returns {Promise<any>}
|
|
274
|
+
*/
|
|
275
|
+
module.exports.decode_proof = function(root_trie_hash, keys, nodes) {
|
|
276
|
+
const ret = wasm.decode_proof(addHeapObject(root_trie_hash), addHeapObject(keys), addHeapObject(nodes));
|
|
277
|
+
return takeObject(ret);
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* @param {any} root_trie_hash
|
|
282
|
+
* @param {any} nodes
|
|
283
|
+
* @param {any} entries
|
|
284
|
+
* @returns {Promise<any>}
|
|
285
|
+
*/
|
|
286
|
+
module.exports.create_proof = function(root_trie_hash, nodes, entries) {
|
|
287
|
+
const ret = wasm.create_proof(addHeapObject(root_trie_hash), addHeapObject(nodes), addHeapObject(entries));
|
|
288
|
+
return takeObject(ret);
|
|
289
|
+
};
|
|
290
|
+
|
|
269
291
|
/**
|
|
270
292
|
* @param {number} task_id
|
|
271
293
|
* @param {string} ws_url
|
|
@@ -291,24 +313,14 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
291
313
|
}
|
|
292
314
|
|
|
293
315
|
function notDefined(what) { return () => { throw new Error(`${what} is not defined`); }; }
|
|
294
|
-
function
|
|
295
|
-
wasm.
|
|
316
|
+
function __wbg_adapter_137(arg0, arg1, arg2, arg3) {
|
|
317
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h118ebac2f2d8ba77(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
296
318
|
}
|
|
297
319
|
|
|
298
320
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
299
321
|
takeObject(arg0);
|
|
300
322
|
};
|
|
301
323
|
|
|
302
|
-
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
303
|
-
const obj = takeObject(arg0).original;
|
|
304
|
-
if (obj.cnt-- == 1) {
|
|
305
|
-
obj.a = 0;
|
|
306
|
-
return true;
|
|
307
|
-
}
|
|
308
|
-
const ret = false;
|
|
309
|
-
return ret;
|
|
310
|
-
};
|
|
311
|
-
|
|
312
324
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
313
325
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
314
326
|
return addHeapObject(ret);
|
|
@@ -323,6 +335,16 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
323
335
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
324
336
|
};
|
|
325
337
|
|
|
338
|
+
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
339
|
+
const obj = takeObject(arg0).original;
|
|
340
|
+
if (obj.cnt-- == 1) {
|
|
341
|
+
obj.a = 0;
|
|
342
|
+
return true;
|
|
343
|
+
}
|
|
344
|
+
const ret = false;
|
|
345
|
+
return ret;
|
|
346
|
+
};
|
|
347
|
+
|
|
326
348
|
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
327
349
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
328
350
|
return addHeapObject(ret);
|
|
@@ -581,7 +603,7 @@ module.exports.__wbg_new_9962f939219f1820 = function(arg0, arg1) {
|
|
|
581
603
|
const a = state0.a;
|
|
582
604
|
state0.a = 0;
|
|
583
605
|
try {
|
|
584
|
-
return
|
|
606
|
+
return __wbg_adapter_137(a, state0.b, arg0, arg1);
|
|
585
607
|
} finally {
|
|
586
608
|
state0.a = a;
|
|
587
609
|
}
|
|
@@ -671,38 +693,38 @@ module.exports.__wbindgen_memory = function() {
|
|
|
671
693
|
return addHeapObject(ret);
|
|
672
694
|
};
|
|
673
695
|
|
|
674
|
-
module.exports.
|
|
675
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
696
|
+
module.exports.__wbindgen_closure_wrapper493 = function(arg0, arg1, arg2) {
|
|
697
|
+
const ret = makeMutClosure(arg0, arg1, 99, __wbg_adapter_34);
|
|
676
698
|
return addHeapObject(ret);
|
|
677
699
|
};
|
|
678
700
|
|
|
679
|
-
module.exports.
|
|
680
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
701
|
+
module.exports.__wbindgen_closure_wrapper1954 = function(arg0, arg1, arg2) {
|
|
702
|
+
const ret = makeMutClosure(arg0, arg1, 457, __wbg_adapter_37);
|
|
681
703
|
return addHeapObject(ret);
|
|
682
704
|
};
|
|
683
705
|
|
|
684
|
-
module.exports.
|
|
685
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
706
|
+
module.exports.__wbindgen_closure_wrapper1956 = function(arg0, arg1, arg2) {
|
|
707
|
+
const ret = makeMutClosure(arg0, arg1, 457, __wbg_adapter_37);
|
|
686
708
|
return addHeapObject(ret);
|
|
687
709
|
};
|
|
688
710
|
|
|
689
|
-
module.exports.
|
|
690
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
711
|
+
module.exports.__wbindgen_closure_wrapper1958 = function(arg0, arg1, arg2) {
|
|
712
|
+
const ret = makeMutClosure(arg0, arg1, 457, __wbg_adapter_42);
|
|
691
713
|
return addHeapObject(ret);
|
|
692
714
|
};
|
|
693
715
|
|
|
694
|
-
module.exports.
|
|
695
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
716
|
+
module.exports.__wbindgen_closure_wrapper1960 = function(arg0, arg1, arg2) {
|
|
717
|
+
const ret = makeMutClosure(arg0, arg1, 457, __wbg_adapter_37);
|
|
696
718
|
return addHeapObject(ret);
|
|
697
719
|
};
|
|
698
720
|
|
|
699
|
-
module.exports.
|
|
700
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
721
|
+
module.exports.__wbindgen_closure_wrapper2330 = function(arg0, arg1, arg2) {
|
|
722
|
+
const ret = makeMutClosure(arg0, arg1, 547, __wbg_adapter_47);
|
|
701
723
|
return addHeapObject(ret);
|
|
702
724
|
};
|
|
703
725
|
|
|
704
|
-
module.exports.
|
|
705
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
726
|
+
module.exports.__wbindgen_closure_wrapper2364 = function(arg0, arg1, arg2) {
|
|
727
|
+
const ret = makeMutClosure(arg0, arg1, 561, __wbg_adapter_50);
|
|
706
728
|
return addHeapObject(ret);
|
|
707
729
|
};
|
|
708
730
|
|
|
Binary file
|