Copyright | Aleksandr Krupenkin 2016-2024 |
---|---|
License | Apache-2.0 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Network.Polkadot.Rpc.Types
Description
Polkadot JSON-RPC types.
Synopsis
- data NodeRole
- = Full
- | LightClient
- | Authority
- | Sentry
- data ChainType
- = Development
- | Local
- | Live
- | Custom Text
- data Health = Health {}
- data PeerInfo = PeerInfo {}
- data ContractCall = ContractCall {}
- data ContractExecResult
- = SuccessExec { }
- | ExecResultError
- data ReadProof = ReadProof {}
- data RuntimeVersion = RuntimeVersion {}
- type StorageKind = Word8
- data StorageChangeSet = StorageChangeSet {
- storageBlock :: HexString
- storageChanges :: [(HexString, Maybe HexString)]
- type Weight = Word64
- data DispatchClass
- data RuntimeDispatchInfo = RuntimeDispatchInfo {}
- data ImportedAux = ImportedAux {}
- data CreatedBlock = CreatedBlock {}
- data Digest = Digest {
- digestLogs :: ![HexString]
- newtype BlockNumber = BlockNumber {}
- data Header = Header {}
- data Block = Block {
- blockHeader :: !Header
- blockExtrinsics :: ![HexString]
- data SignedBlock = SignedBlock {
- signedBlock :: !Block
- signedJustification :: !(Maybe HexString)
Documentation
The role the node is running as.
Constructors
Full | |
LightClient | |
Authority | |
Sentry |
Instances
FromJSON NodeRole Source # | |
ToJSON NodeRole Source # | |
Defined in Network.Polkadot.Rpc.Types | |
Generic NodeRole Source # | |
Show NodeRole Source # | |
Eq NodeRole Source # | |
type Rep NodeRole Source # | |
Defined in Network.Polkadot.Rpc.Types type Rep NodeRole = D1 ('MetaData "NodeRole" "Network.Polkadot.Rpc.Types" "web3-polkadot-1.0.1.0-FYtcHWVQXW93OfvqrvLkeh" 'False) ((C1 ('MetaCons "Full" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LightClient" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Authority" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Sentry" 'PrefixI 'False) (U1 :: Type -> Type))) |
Type op a chain.
Constructors
Development | |
Local | |
Live | |
Custom Text |
Instances
FromJSON ChainType Source # | |
ToJSON ChainType Source # | |
Defined in Network.Polkadot.Rpc.Types | |
Generic ChainType Source # | |
Show ChainType Source # | |
Eq ChainType Source # | |
type Rep ChainType Source # | |
Defined in Network.Polkadot.Rpc.Types type Rep ChainType = D1 ('MetaData "ChainType" "Network.Polkadot.Rpc.Types" "web3-polkadot-1.0.1.0-FYtcHWVQXW93OfvqrvLkeh" 'False) ((C1 ('MetaCons "Development" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Local" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Live" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Custom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) |
System health struct returned by the RPC
Constructors
Health | |
Fields
|
Instances
FromJSON Health Source # | |
ToJSON Health Source # | |
Defined in Network.Polkadot.Rpc.Types | |
Generic Health Source # | |
Show Health Source # | |
Eq Health Source # | |
type Rep Health Source # | |
Defined in Network.Polkadot.Rpc.Types type Rep Health = D1 ('MetaData "Health" "Network.Polkadot.Rpc.Types" "web3-polkadot-1.0.1.0-FYtcHWVQXW93OfvqrvLkeh" 'False) (C1 ('MetaCons "Health" 'PrefixI 'True) (S1 ('MetaSel ('Just "healthPeers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "healthIsSyncing") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "healthShouldHavePeers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) |
Network Peer information.
Constructors
PeerInfo | |
Fields
|
Instances
FromJSON PeerInfo Source # | |
ToJSON PeerInfo Source # | |
Defined in Network.Polkadot.Rpc.Types | |
Generic PeerInfo Source # | |
Show PeerInfo Source # | |
Eq PeerInfo Source # | |
type Rep PeerInfo Source # | |
Defined in Network.Polkadot.Rpc.Types type Rep PeerInfo = D1 ('MetaData "PeerInfo" "Network.Polkadot.Rpc.Types" "web3-polkadot-1.0.1.0-FYtcHWVQXW93OfvqrvLkeh" 'False) (C1 ('MetaCons "PeerInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "peerInfoPeerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "peerInfoRoles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [NodeRole])) :*: (S1 ('MetaSel ('Just "peerInfoProtocolVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "peerInfoBestHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "peerInfoBestNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))) |
data ContractCall Source #
Executes a call to a contract.
Constructors
ContractCall | |
Fields
|
Instances
data ContractExecResult Source #
A result of execution of a contract.
Constructors
SuccessExec | |
Fields
| |
ExecResultError |
Instances
ReadProof struct returned by RPC.
Constructors
ReadProof | |
Fields
|
Instances
FromJSON ReadProof Source # | |
ToJSON ReadProof Source # | |
Defined in Network.Polkadot.Rpc.Types | |
Generic ReadProof Source # | |
Show ReadProof Source # | |
Eq ReadProof Source # | |
type Rep ReadProof Source # | |
Defined in Network.Polkadot.Rpc.Types type Rep ReadProof = D1 ('MetaData "ReadProof" "Network.Polkadot.Rpc.Types" "web3-polkadot-1.0.1.0-FYtcHWVQXW93OfvqrvLkeh" 'False) (C1 ('MetaCons "ReadProof" 'PrefixI 'True) (S1 ('MetaSel ('Just "readProofAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HexString) :*: S1 ('MetaSel ('Just "readProofProof") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [HexString]))) |
data RuntimeVersion Source #
Runtime version.
This should not be thought of as classic Semver (majorminortiny).
This triplet have different semantics and mis-interpretation could cause problems.
In particular: bug fixes should result in an increment of spec_version
and possibly authoring_version
,
absolutely not impl_version
since they change the semantics of the runtime.
Constructors
RuntimeVersion | |
Fields
|
Instances
type StorageKind = Word8 Source #
Type of supported offchain storages.
1: persistent storage is non-revertible and not fork-aware; 2: local storage is revertible and fork-aware.
data StorageChangeSet Source #
Storage changes.
Constructors
StorageChangeSet | |
Fields
|
Instances
FromJSON StorageChangeSet Source # | |
Defined in Network.Polkadot.Rpc.Types Methods parseJSON :: Value -> Parser StorageChangeSet # parseJSONList :: Value -> Parser [StorageChangeSet] # | |
ToJSON StorageChangeSet Source # | |
Defined in Network.Polkadot.Rpc.Types Methods toJSON :: StorageChangeSet -> Value # toEncoding :: StorageChangeSet -> Encoding # toJSONList :: [StorageChangeSet] -> Value # toEncodingList :: [StorageChangeSet] -> Encoding # |
data DispatchClass Source #
Generalized group of dispatch types.
Constructors
Normal | |
Operational | |
Mandatory |
Instances
data RuntimeDispatchInfo Source #
Some information related to a dispatchable that can be queried from the runtime.
Constructors
RuntimeDispatchInfo | |
Fields
|
Instances
data ImportedAux Source #
Auxiliary data associated with an imported block result.
Constructors
ImportedAux | |
Fields
|
Instances
data CreatedBlock Source #
Constructors
CreatedBlock | |
Fields |
Instances
Generic header digest.
Constructors
Digest | |
Fields
|
newtype BlockNumber Source #
Hex-encoded block number.
Constructors
BlockNumber | |
Fields |
Instances
FromJSON BlockNumber Source # | |
Defined in Network.Polkadot.Rpc.Types | |
ToJSON BlockNumber Source # | |
Defined in Network.Polkadot.Rpc.Types Methods toJSON :: BlockNumber -> Value # toEncoding :: BlockNumber -> Encoding # toJSONList :: [BlockNumber] -> Value # toEncodingList :: [BlockNumber] -> Encoding # | |
Show BlockNumber Source # | |
Defined in Network.Polkadot.Rpc.Types Methods showsPrec :: Int -> BlockNumber -> ShowS # show :: BlockNumber -> String # showList :: [BlockNumber] -> ShowS # | |
Eq BlockNumber Source # | |
Defined in Network.Polkadot.Rpc.Types | |
Ord BlockNumber Source # | |
Defined in Network.Polkadot.Rpc.Types Methods compare :: BlockNumber -> BlockNumber -> Ordering # (<) :: BlockNumber -> BlockNumber -> Bool # (<=) :: BlockNumber -> BlockNumber -> Bool # (>) :: BlockNumber -> BlockNumber -> Bool # (>=) :: BlockNumber -> BlockNumber -> Bool # max :: BlockNumber -> BlockNumber -> BlockNumber # min :: BlockNumber -> BlockNumber -> BlockNumber # |
Abstraction over a block header for a substrate chain.
Constructors
Header | |
Fields
|
Instances
FromJSON Header Source # | |
ToJSON Header Source # | |
Defined in Network.Polkadot.Rpc.Types | |
Generic Header Source # | |
Show Header Source # | |
Eq Header Source # | |
type Rep Header Source # | |
Defined in Network.Polkadot.Rpc.Types type Rep Header = D1 ('MetaData "Header" "Network.Polkadot.Rpc.Types" "web3-polkadot-1.0.1.0-FYtcHWVQXW93OfvqrvLkeh" 'False) (C1 ('MetaCons "Header" 'PrefixI 'True) ((S1 ('MetaSel ('Just "headerParentHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HexString) :*: S1 ('MetaSel ('Just "headerNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNumber)) :*: (S1 ('MetaSel ('Just "headerStateRoot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HexString) :*: (S1 ('MetaSel ('Just "headerExtrinsicsRoot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HexString) :*: S1 ('MetaSel ('Just "headerDigest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Digest))))) |
Abstraction over a substrate block.
Constructors
Block | |
Fields
|
Instances
FromJSON Block Source # | |
ToJSON Block Source # | |
Defined in Network.Polkadot.Rpc.Types | |
Generic Block Source # | |
Show Block Source # | |
Eq Block Source # | |
type Rep Block Source # | |
Defined in Network.Polkadot.Rpc.Types type Rep Block = D1 ('MetaData "Block" "Network.Polkadot.Rpc.Types" "web3-polkadot-1.0.1.0-FYtcHWVQXW93OfvqrvLkeh" 'False) (C1 ('MetaCons "Block" 'PrefixI 'True) (S1 ('MetaSel ('Just "blockHeader") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Header) :*: S1 ('MetaSel ('Just "blockExtrinsics") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [HexString]))) |
data SignedBlock Source #
Abstraction over a substrate block and justification.
Constructors
SignedBlock | |
Fields
|