| Copyright | Alexander Krupenkin 2016 |
|---|---|
| License | BSD3 |
| Maintainer | mail@akru.me |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.Polkadot.Api.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
- type Metadata = Value
- 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 Header = Header {}
- data Block = Block {}
- data SignedBlock = SignedBlock {}
Documentation
The role the node is running as.
Constructors
| Full | |
| LightClient | |
| Authority | |
| Sentry |
Instances
| Eq NodeRole Source # | |
| Show NodeRole Source # | |
| Generic NodeRole Source # | |
| ToJSON NodeRole Source # | |
Defined in Network.Polkadot.Api.Types | |
| FromJSON NodeRole Source # | |
| type Rep NodeRole Source # | |
Defined in Network.Polkadot.Api.Types type Rep NodeRole = D1 (MetaData "NodeRole" "Network.Polkadot.Api.Types" "web3-0.9.0.0-6wv3rkKFlHwFfHKZvDcYhG" 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
| Eq ChainType Source # | |
| Show ChainType Source # | |
| Generic ChainType Source # | |
| ToJSON ChainType Source # | |
Defined in Network.Polkadot.Api.Types | |
| FromJSON ChainType Source # | |
| type Rep ChainType Source # | |
Defined in Network.Polkadot.Api.Types type Rep ChainType = D1 (MetaData "ChainType" "Network.Polkadot.Api.Types" "web3-0.9.0.0-6wv3rkKFlHwFfHKZvDcYhG" 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
| Eq Health Source # | |
| Show Health Source # | |
| Generic Health Source # | |
| ToJSON Health Source # | |
Defined in Network.Polkadot.Api.Types | |
| FromJSON Health Source # | |
| type Rep Health Source # | |
Defined in Network.Polkadot.Api.Types type Rep Health = D1 (MetaData "Health" "Network.Polkadot.Api.Types" "web3-0.9.0.0-6wv3rkKFlHwFfHKZvDcYhG" 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
| Eq PeerInfo Source # | |
| Show PeerInfo Source # | |
| Generic PeerInfo Source # | |
| ToJSON PeerInfo Source # | |
Defined in Network.Polkadot.Api.Types | |
| FromJSON PeerInfo Source # | |
| type Rep PeerInfo Source # | |
Defined in Network.Polkadot.Api.Types type Rep PeerInfo = D1 (MetaData "PeerInfo" "Network.Polkadot.Api.Types" "web3-0.9.0.0-6wv3rkKFlHwFfHKZvDcYhG" 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
| Eq ReadProof Source # | |
| Show ReadProof Source # | |
| Generic ReadProof Source # | |
| ToJSON ReadProof Source # | |
Defined in Network.Polkadot.Api.Types | |
| FromJSON ReadProof Source # | |
| type Rep ReadProof Source # | |
Defined in Network.Polkadot.Api.Types type Rep ReadProof = D1 (MetaData "ReadProof" "Network.Polkadot.Api.Types" "web3-0.9.0.0-6wv3rkKFlHwFfHKZvDcYhG" 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
| ToJSON StorageChangeSet Source # | |
Defined in Network.Polkadot.Api.Types Methods toJSON :: StorageChangeSet -> Value # toEncoding :: StorageChangeSet -> Encoding # toJSONList :: [StorageChangeSet] -> Value # toEncodingList :: [StorageChangeSet] -> Encoding # | |
| FromJSON StorageChangeSet Source # | |
Defined in Network.Polkadot.Api.Types Methods parseJSON :: Value -> Parser StorageChangeSet # parseJSONList :: Value -> Parser [StorageChangeSet] # | |
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
Abstraction over a block header for a substrate chain.
Constructors
| Header | |
Fields
| |
Instances
| Eq Header Source # | |
| Show Header Source # | |
| Generic Header Source # | |
| ToJSON Header Source # | |
Defined in Network.Polkadot.Api.Types | |
| FromJSON Header Source # | |
| type Rep Header Source # | |
Defined in Network.Polkadot.Api.Types type Rep Header = D1 (MetaData "Header" "Network.Polkadot.Api.Types" "web3-0.9.0.0-6wv3rkKFlHwFfHKZvDcYhG" False) (C1 (MetaCons "Header" PrefixI True) ((S1 (MetaSel (Just "headerParentHash") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 HexString) :*: S1 (MetaSel (Just "headerNumber") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :*: (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 HexString))))) | |
Abstraction over a substrate block.
Constructors
| Block | |
Fields
| |
Instances
| Eq Block Source # | |
| Show Block Source # | |
| Generic Block Source # | |
| ToJSON Block Source # | |
Defined in Network.Polkadot.Api.Types | |
| FromJSON Block Source # | |
| type Rep Block Source # | |
Defined in Network.Polkadot.Api.Types type Rep Block = D1 (MetaData "Block" "Network.Polkadot.Api.Types" "web3-0.9.0.0-6wv3rkKFlHwFfHKZvDcYhG" False) (C1 (MetaCons "Block" PrefixI True) (S1 (MetaSel (Just "blockHeader") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Header) :*: S1 (MetaSel (Just "blockExtrinsics") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [HexString]))) | |
data SignedBlock Source #
Abstraction over a substrate block and justification.
Constructors
| SignedBlock | |
Fields
| |