Skip to content

@acala-network/chopsticks-coreDocs


@acala-network/chopsticks-core / OffchainWorker

Class: OffchainWorker

Constructors

new OffchainWorker()

new OffchainWorker(): OffchainWorker

Returns

OffchainWorker

Properties

offchainStorage

readonly offchainStorage: Map<string, undefined | null | string>

Defined in

packages/core/src/offchain.ts:11


pendingExtrinsics

readonly pendingExtrinsics: `0x${string}`[] = []

Defined in

packages/core/src/offchain.ts:10

Methods

get()

get(key): undefined | null | string

Parameters

key: string

Returns

undefined | null | string

Defined in

packages/core/src/offchain.ts:13


pushExtrinsic()

pushExtrinsic(block, extrinsic): Promise<`0x${string}`>

Parameters

block: Block

extrinsic: `0x${string}`

Returns

Promise<`0x${string}`>

Defined in

packages/core/src/offchain.ts:45


run()

run(block): Promise<void>

Parameters

block: Block

Returns

Promise<void>

Defined in

packages/core/src/offchain.ts:21


set()

set(key, value): void

Parameters

key: string

value: undefined | null | string

Returns

void

Defined in

packages/core/src/offchain.ts:17