@acala-network/chopsticks-core 0.10.2 → 0.11.0

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.
@@ -14,6 +14,14 @@ export type RuntimeVersion = {
14
14
  transactionVersion: number;
15
15
  stateVersion: number;
16
16
  };
17
+ export type TaskCall = {
18
+ wasm: HexString;
19
+ calls: [string, HexString[]][];
20
+ mockSignatureHost: boolean;
21
+ allowUnresolvedImports: boolean;
22
+ runtimeLogLevel: number;
23
+ storageProofSize?: number;
24
+ };
17
25
  export type RuntimeLog = {
18
26
  message: string;
19
27
  level?: number;
@@ -57,13 +65,7 @@ export declare const createProof: (nodes: HexString[], updates: [HexString, HexS
57
65
  trieRootHash: `0x${string}`;
58
66
  nodes: `0x${string}`[];
59
67
  }>;
60
- export declare const runTask: (task: {
61
- wasm: HexString;
62
- calls: [string, HexString[]][];
63
- mockSignatureHost: boolean;
64
- allowUnresolvedImports: boolean;
65
- runtimeLogLevel: number;
66
- }, callback?: JsCallback) => Promise<{
68
+ export declare const runTask: (task: TaskCall, callback?: JsCallback) => Promise<{
67
69
  Call: TaskCallResponse;
68
70
  } | {
69
71
  Error: string;
@@ -136,9 +136,13 @@ const createProof = async (nodes, updates)=>{
136
136
  };
137
137
  };
138
138
  const runTask = async (task, callback = emptyTaskHandler)=>{
139
+ const task2 = {
140
+ ...task,
141
+ storageProofSize: task.storageProofSize ?? 0
142
+ };
139
143
  const worker = await getWorker();
140
- logger.trace((0, _logger.truncate)(task), 'taskRun');
141
- const response = await worker.remote.runTask(task, _comlink.proxy(callback));
144
+ logger.trace((0, _logger.truncate)(task2), 'taskRun');
145
+ const response = await worker.remote.runTask(task2, _comlink.proxy(callback));
142
146
  if ('Call' in response) {
143
147
  logger.trace((0, _logger.truncate)(response.Call), 'taskResponse');
144
148
  } else {
@@ -14,6 +14,14 @@ export type RuntimeVersion = {
14
14
  transactionVersion: number;
15
15
  stateVersion: number;
16
16
  };
17
+ export type TaskCall = {
18
+ wasm: HexString;
19
+ calls: [string, HexString[]][];
20
+ mockSignatureHost: boolean;
21
+ allowUnresolvedImports: boolean;
22
+ runtimeLogLevel: number;
23
+ storageProofSize?: number;
24
+ };
17
25
  export type RuntimeLog = {
18
26
  message: string;
19
27
  level?: number;
@@ -57,13 +65,7 @@ export declare const createProof: (nodes: HexString[], updates: [HexString, HexS
57
65
  trieRootHash: `0x${string}`;
58
66
  nodes: `0x${string}`[];
59
67
  }>;
60
- export declare const runTask: (task: {
61
- wasm: HexString;
62
- calls: [string, HexString[]][];
63
- mockSignatureHost: boolean;
64
- allowUnresolvedImports: boolean;
65
- runtimeLogLevel: number;
66
- }, callback?: JsCallback) => Promise<{
68
+ export declare const runTask: (task: TaskCall, callback?: JsCallback) => Promise<{
67
69
  Call: TaskCallResponse;
68
70
  } | {
69
71
  Error: string;
@@ -49,9 +49,13 @@ export const createProof = async (nodes, updates)=>{
49
49
  };
50
50
  };
51
51
  export const runTask = async (task, callback = emptyTaskHandler)=>{
52
+ const task2 = {
53
+ ...task,
54
+ storageProofSize: task.storageProofSize ?? 0
55
+ };
52
56
  const worker = await getWorker();
53
- logger.trace(truncate(task), 'taskRun');
54
- const response = await worker.remote.runTask(task, Comlink.proxy(callback));
57
+ logger.trace(truncate(task2), 'taskRun');
58
+ const response = await worker.remote.runTask(task2, Comlink.proxy(callback));
55
59
  if ('Call' in response) {
56
60
  logger.trace(truncate(response.Call), 'taskResponse');
57
61
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acala-network/chopsticks-core",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "author": "Acala Developers <hello@acala.network>",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  "docs:prep": "typedoc"
13
13
  },
14
14
  "dependencies": {
15
- "@acala-network/chopsticks-executor": "0.10.2",
15
+ "@acala-network/chopsticks-executor": "0.11.0",
16
16
  "@polkadot/rpc-provider": "^10.11.2",
17
17
  "@polkadot/types": "^10.11.2",
18
18
  "@polkadot/types-codec": "^10.11.2",