web3-polkadot-1.0.1.0: Polkadot support for Haskell Web3 library.
CopyrightAleksandr Krupenkin 2016-2024
LicenseApache-2.0
Maintainermail@akru.me
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Polkadot.Storage.Key

Description

When you use the Substrate RPC to access a storage item, you only need to provide the key associated with that item.

Synopsis

Documentation

data Argument where Source #

General type wrapper for SCALE encodable storage index argument.

Constructors

Argument 

Fields

Instances

Instances details
Encode Argument Source # 
Instance details

Defined in Network.Polkadot.Storage.Key

Methods

put :: Putter Argument #

type Hasher = Argument -> ByteString Source #

Hasher is a function that hash given argument.

data StorageEntry Source #

Entry type describe storage prefix for different storage entity types.

Constructors

PlainEntry ByteString

Simple storage type without arguments.

MapEntry (Argument -> ByteString)

Mapping with hashing for arguments.

DoubleMapEntry (Argument -> Argument -> ByteString)

Double map with two different hashers.

NMapEntry ([Argument] -> ByteString)

Map with array of hashers.

Instances

Instances details
Show StorageEntry Source # 
Instance details

Defined in Network.Polkadot.Storage.Key

newEntry Source #

Arguments

:: Text

Storage prefix (module name).

-> StorageEntryMetadata

Storage key metadata, includes entry type, name, etc.

-> StorageEntry

Storage key generator.

Create storage key generator from metadata description.