Skip to content

@acala-network/chopsticks-coreDocs


@acala-network/chopsticks-core / WasmExecutor

Interface: WasmExecutor

Properties

calculateStateRoot()

calculateStateRoot: (entries, trie_version) => Promise<`0x${string}`>

Parameters

entries: [`0x${string}`, `0x${string}`][]

trie_version: number

Returns

Promise<`0x${string}`>

Defined in

packages/core/src/wasm-executor/index.ts:57


createProof()

createProof: (nodes, updates) => Promise<[`0x${string}`, `0x${string}`[]]>

Parameters

nodes: `0x${string}`[]

updates: [`0x${string}`, null | `0x${string}`][]

Returns

Promise<[`0x${string}`, `0x${string}`[]]>

Defined in

packages/core/src/wasm-executor/index.ts:58


decodeProof()

decodeProof: (trieRootHash, nodes) => Promise<[[`0x${string}`, `0x${string}`]]>

Parameters

trieRootHash: `0x${string}`

nodes: `0x${string}`[]

Returns

Promise<[[`0x${string}`, `0x${string}`]]>

Defined in

packages/core/src/wasm-executor/index.ts:59


getRuntimeVersion()

getRuntimeVersion: (code) => Promise<RuntimeVersion>

Parameters

code: `0x${string}`

Returns

Promise<RuntimeVersion>

Defined in

packages/core/src/wasm-executor/index.ts:56


runTask()

runTask: (task, callback?) => Promise<TaskResponse>

Parameters

task

task.allowUnresolvedImports: boolean

task.calls?: [string, `0x${string}`[]][]

task.mockSignatureHost?: boolean

task.runtimeLogLevel?: number

task.wasm?: `0x${string}`

callback?: JsCallback

Returns

Promise<TaskResponse>

Defined in

packages/core/src/wasm-executor/index.ts:60


testing()

testing: (callback, key) => Promise<any>

Parameters

callback: JsCallback

key: any

Returns

Promise<any>

Defined in

packages/core/src/wasm-executor/index.ts:70