@acala-network/chopsticks-executor 0.8.0-0 → 0.8.0-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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@acala-network/chopsticks-executor",
3
3
  "description": "Chopsticks executor",
4
- "version": "0.8.0-0",
4
+ "version": "0.8.0-2",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -9,14 +9,23 @@
9
9
  },
10
10
  "scripts": {
11
11
  "clean": "rm -rf web node",
12
- "build": "wasm-pack build --target web --out-dir browser; wasm-pack build --target nodejs --out-dir node"
12
+ "build": "wasm-pack build --target web --out-dir browser; wasm-pack build --target nodejs --out-dir node; scripts/pack-wasm.js"
13
+ },
14
+ "dependencies": {
15
+ "@polkadot/wasm-util": "^7.2.1"
16
+ },
17
+ "devDependencies": {
18
+ "@polkadot/util": "^12.3.2",
19
+ "fflate": "^0.8.0"
13
20
  },
14
21
  "files": [
15
- "browser/chopsticks_*",
22
+ "browser/index.js",
23
+ "browser/chopsticks_executor.js",
24
+ "browser/chopsticks_executor_bg.wasm",
16
25
  "node/chopsticks_*"
17
26
  ],
18
27
  "main": "node/chopsticks_executor.js",
19
- "types": "browser/chopsticks_executor.d.ts",
20
- "browser": "browser/chopsticks_executor.js",
28
+ "types": "node/chopsticks_executor.d.ts",
29
+ "browser": "browser/index.js",
21
30
  "stableVersion": "0.7.3"
22
31
  }
@@ -1,85 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * @param {any} code
5
- * @returns {Promise<any>}
6
- */
7
- export function get_runtime_version(code: any): Promise<any>;
8
- /**
9
- * @param {any} entries
10
- * @param {any} trie_version
11
- * @returns {Promise<any>}
12
- */
13
- export function calculate_state_root(entries: any, trie_version: any): Promise<any>;
14
- /**
15
- * @param {any} root_trie_hash
16
- * @param {any} keys
17
- * @param {any} nodes
18
- * @returns {Promise<any>}
19
- */
20
- export function decode_proof(root_trie_hash: any, keys: any, nodes: any): Promise<any>;
21
- /**
22
- * @param {any} nodes
23
- * @param {any} entries
24
- * @returns {Promise<any>}
25
- */
26
- export function create_proof(nodes: any, entries: any): Promise<any>;
27
- /**
28
- * @param {any} task
29
- * @param {JsCallback} js
30
- * @param {string | undefined} log_level
31
- * @returns {Promise<any>}
32
- */
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<boolean>
44
- }
45
-
46
-
47
-
48
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
49
-
50
- export interface InitOutput {
51
- readonly memory: WebAssembly.Memory;
52
- readonly get_runtime_version: (a: number) => number;
53
- readonly calculate_state_root: (a: number, b: number) => number;
54
- readonly decode_proof: (a: number, b: number, c: number) => number;
55
- readonly create_proof: (a: number, b: number) => number;
56
- readonly run_task: (a: number, b: number, c: number, d: number) => number;
57
- readonly __wbindgen_malloc: (a: number, b: number) => number;
58
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
59
- readonly __wbindgen_export_2: WebAssembly.Table;
60
- readonly wasm_bindgen__convert__closures__invoke1_mut__h7043b82208c98903: (a: number, b: number, c: number) => void;
61
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
62
- readonly __wbindgen_exn_store: (a: number) => void;
63
- readonly wasm_bindgen__convert__closures__invoke2_mut__h14b58699f4ec867c: (a: number, b: number, c: number, d: number) => void;
64
- }
65
-
66
- export type SyncInitInput = BufferSource | WebAssembly.Module;
67
- /**
68
- * Instantiates the given `module`, which can either be bytes or
69
- * a precompiled `WebAssembly.Module`.
70
- *
71
- * @param {SyncInitInput} module
72
- *
73
- * @returns {InitOutput}
74
- */
75
- export function initSync(module: SyncInitInput): InitOutput;
76
-
77
- /**
78
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
79
- * for everything else, calls `WebAssembly.instantiate` directly.
80
- *
81
- * @param {InitInput | Promise<InitInput>} module_or_path
82
- *
83
- * @returns {Promise<InitOutput>}
84
- */
85
- export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
@@ -1,15 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- export const memory: WebAssembly.Memory;
4
- export function get_runtime_version(a: number): number;
5
- export function calculate_state_root(a: number, b: number): number;
6
- export function decode_proof(a: number, b: number, c: number): number;
7
- export function create_proof(a: number, b: number): number;
8
- export function run_task(a: number, b: number, c: number, d: number): number;
9
- export function __wbindgen_malloc(a: number, b: number): number;
10
- export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
11
- export const __wbindgen_export_2: WebAssembly.Table;
12
- export function wasm_bindgen__convert__closures__invoke1_mut__h7043b82208c98903(a: number, b: number, c: number): void;
13
- export function __wbindgen_free(a: number, b: number, c: number): void;
14
- export function __wbindgen_exn_store(a: number): void;
15
- export function wasm_bindgen__convert__closures__invoke2_mut__h14b58699f4ec867c(a: number, b: number, c: number, d: number): void;