@acala-network/chopsticks-core • Docs
@acala-network/chopsticks-core / StorageLayer
Class: StorageLayer
Implements
Constructors
new StorageLayer()
new StorageLayer(
parent
?):StorageLayer
Parameters
• parent?: StorageLayerProvider
Returns
Defined in
packages/core/src/blockchain/storage-layer.ts:132
Methods
findNextKey()
findNextKey(
prefix
,startKey
,knownBest
?):Promise
<undefined
|string
>
Find next storage key.
Parameters
• prefix: string
• startKey: string
• knownBest?: string
Returns
Promise
<undefined
| string
>
Implementation of
StorageLayerProvider
.findNextKey
Defined in
packages/core/src/blockchain/storage-layer.ts:208
get()
get(
key
,cache
):Promise
<StorageValue
>
Get the value of a storage key.
Parameters
• key: string
• cache: boolean
Returns
Promise
<StorageValue
>
Implementation of
Defined in
packages/core/src/blockchain/storage-layer.ts:153
getKeysPaged()
getKeysPaged(
prefix
,pageSize
,startKey
):Promise
<string
[]>
Get paged storage keys.
Parameters
• prefix: string
• pageSize: number
• startKey: string
Returns
Promise
<string
[]>
Implementation of
StorageLayerProvider
.getKeysPaged
Defined in
packages/core/src/blockchain/storage-layer.ts:228
mergeInto()
mergeInto(
into
):Promise
<void
>
Merge the storage layer into the given object, can be used to get sotrage diff.
Parameters
• into: Record
<string
, null
| string
>
Returns
Promise
<void
>
Defined in
packages/core/src/blockchain/storage-layer.ts:247
set()
set(
key
,value
):void
Parameters
• key: string
• value: StorageValue
Returns
void
Defined in
packages/core/src/blockchain/storage-layer.ts:173
setAll()
setAll(
values
):void
Parameters
• values: Record
<string
, null
| StorageValue
> | [string
, null
| StorageValue
][]
Returns
void