Skip to content

@acala-network/chopsticks-coreDocs


@acala-network/chopsticks-core / substrate

Variable: substrate

const substrate: object

Type declaration

archive_unstable_hashByHeight

archive_unstable_hashByHeight: Handler<[null | number | `0x${string}` | `0x${string}`[] | number[]], null | `0x${string}` | (null | `0x${string}`)[]> = chain_getBlockHash

author_pendingExtrinsics

author_pendingExtrinsics: Handler<void, `0x${string}`[]>

Get pending extrinsics

Returns

Array of pending extrinsics

author_submitAndWatchExtrinsic

author_submitAndWatchExtrinsic: Handler<[`0x${string}`], string>

Param

Param

[extrinsic]

Param

Returns

subscription id

author_submitExtrinsic

author_submitExtrinsic: Handler<[`0x${string}`], `0x${string}`>

Param

Param

[extrinsic]

Returns

Hash

author_unwatchExtrinsic

author_unwatchExtrinsic: Handler<[string], void>

Param

Param

[subid]

chain_getBlock

chain_getBlock: Handler<[`0x${string}`], object>

Param

Param

[blockhash]

Returns

Block header and extrinsics

chain_getBlockHash

chain_getBlockHash: Handler<[null | number | `0x${string}` | `0x${string}`[] | number[]], null | `0x${string}` | (null | `0x${string}`)[]>

Param

Param

[blockNumber | blockNumber[] | null]

Returns

Block hash | hash[] | null

chain_getFinalizedHead

chain_getFinalizedHead: Handler<void, `0x${string}`>

Param

Returns

head hash

chain_getHead

chain_getHead: Handler<[null | number | `0x${string}` | `0x${string}`[] | number[]], null | `0x${string}` | (null | `0x${string}`)[]> = chain_getBlockHash

chain_getHeader

chain_getHeader: Handler<[`0x${string}`], Header>

Param

Param

[blockhash]

Returns

Header - see @polkadot/types/interfaces

chain_subscribeFinalizedHeads

chain_subscribeFinalizedHeads: Handler<void, string>

chain_subscribeNewHead

chain_subscribeNewHead: Handler<void, string>

chain_subscribeNewHeads

chain_subscribeNewHeads: Handler<void, string> = chain_subscribeNewHead

chain_unsubscribeFinalizedHeads

chain_unsubscribeFinalizedHeads: Handler<[string], void> = chain_unsubscribeNewHead

chain_unsubscribeNewHead

chain_unsubscribeNewHead: Handler<[string], void>

chain_unsubscribeNewHeads

chain_unsubscribeNewHeads: Handler<[string], void> = chain_unsubscribeNewHead

childstate_getKeysPaged

childstate_getKeysPaged: Handler<[`0x${string}`, `0x${string}`, number, `0x${string}`, `0x${string}`], undefined | `0x${string}`[]>

Param

Param

[child, prefix, pageSize, startKey, blockhash]

Returns

paged keys

childstate_getStorage

childstate_getStorage: Handler<[`0x${string}`, `0x${string}`, `0x${string}`], null | string>

Param

Param

[child, key, blockhash]

Returns

storage valuse

payment_queryFeeDetails

payment_queryFeeDetails: Handler<[`0x${string}`, `0x${string}`], `0x${string}`>

Param

Param

[extrinsic, blockhash]

Returns

result in hash

payment_queryInfo

payment_queryInfo: Handler<[`0x${string}`, `0x${string}`], `0x${string}`>

Param

Param

[extrinsic, blockhash]

Returns

result in hash

state_call

state_call: Handler<[`0x${string}`, `0x${string}`, `0x${string}`], `0x${string}`>

Param

Param

[method, data, blockhash]

Returns

result in hash

state_getKeysPaged

state_getKeysPaged: Handler<[string, number, string, `0x${string}`], undefined | string[]>

Param

Param

[prefix, pageSize, startKey, blockhash]

Returns

paged keys

state_getMetadata

state_getMetadata: Handler<[`0x${string}`], null | `0x${string}`>

Param

Param

[blockhash]

Returns

metadata

state_getRuntimeVersion

state_getRuntimeVersion: Handler<[`0x${string}`], null | RuntimeVersion>

Param

Param

[blockhash]

Returns

runtime version

state_getStorage

state_getStorage: Handler<[`0x${string}`, `0x${string}`], null | string>

Param

Param

[key, blockhash]

Returns

storage value

state_getStorageAt

state_getStorageAt: Handler<[`0x${string}`, `0x${string}`], null | string> = state_getStorage

state_queryStorageAt

state_queryStorageAt: Handler<[string[], `0x${string}`], [] | [object]>

Param

Param

[keys, blockhash]

Returns

storage values

state_subscribeRuntimeVersion

state_subscribeRuntimeVersion: Handler<[], string>

Returns

subscription id

state_subscribeStorage

state_subscribeStorage: Handler<[string[]], string>

Param

Param

[keys]

Param

Returns

subscription id

state_unsubscribeRuntimeVersion

state_unsubscribeRuntimeVersion: Handler<[`0x${string}`], void>

Param

Param

[subid]

Param

state_unsubscribeStorage

state_unsubscribeStorage: Handler<[string], void>

Param

Param

[subid]

Param

system_accountNextIndex

system_accountNextIndex: Handler<[`0x${string}`], number>

Param

Param

[address]

system_chain

system_chain: Handler<void, string>

system_chainType

system_chainType: Handler<void, string>

system_dryRun

system_dryRun: Handler<[`0x${string}`, `0x${string}`], string>

Param

Param

[extrinsic, at]

Returns

ApplyExtrinsicResult (see @polkadot/types/interfaces) in hash

system_health()

system_health: () => Promise<object>

Returns

Promise<object>

isSyncing

isSyncing: boolean = false

peers

peers: number = 0

shouldHavePeers

shouldHavePeers: boolean = false

system_localListenAddresses()

system_localListenAddresses: () => Promise<never[]>

Returns

Promise<never[]>

system_localPeerId()

system_localPeerId: () => Promise<string>

Returns

Promise<string>

system_name

system_name: Handler<void, string>

system_nodeRoles()

system_nodeRoles: () => Promise<string[]>

Returns

Promise<string[]>

system_properties

system_properties: Handler<void, ChainProperties>

system_version

system_version: Handler<void, string>

Defined in

packages/core/src/rpc/substrate/index.ts:13