StateApi<P extends Provider> class
Substrate state API
Constructors
- StateApi(P _provider)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- latestRuntimeMetadata ↔ RuntimeMetadata
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
String method, Uint8List bytes, {BlockHash? at}) → Future< Uint8List> - Call a contract at a block's state.
-
getKeysPaged(
{required StorageKey key, required int count, StorageKey? startKey, BlockHash? at}) → Future< List< StorageKey> > -
Returns the keys with prefix with pagination support.
Up to
count
keys will be returned. IfstartKey
is passed, return next keys in storage in lexicographic order. -
getMetadata(
{BlockHash? at}) → Future< RuntimeMetadata> - Returns the runtime metadata
-
getPairs(
StorageKey prefix, {BlockHash? at}) → Future< List< KeyValue> > - Returns the keys with prefix, leave empty to get all the keys
-
getReadProof(
List< StorageKey> keys, {BlockHash? at}) → Future<ReadProof> - Returns proof of storage entries at a specific block's state.
-
getRuntimeVersion(
{BlockHash? at}) → Future< RuntimeVersion> - Get the runtime version.
-
getStorage(
StorageKey key, {BlockHash? at}) → Future< StorageData?> - Returns a storage entry at a specific block's state.
-
getStorageHash(
StorageKey key, {BlockHash? at}) → Future< BlockHash?> - Returns the hash of a storage entry at a block's state.
-
getStorageSize(
StorageKey key, {BlockHash? at}) → Future< int?> - Returns the size of a storage entry at a block's state.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryStorage(
List< StorageKey> keys, BlockHash fromBlock, {BlockHash? toBlock}) → Future<List< StorageChangeSet> > - Query historical storage entries (by key) starting from a block given as the second parameter.
-
queryStorageAt(
List< StorageKey> keys, {BlockHash? at}) → Future<List< StorageChangeSet> > - Query storage entries (by key) starting at block hash given as the second parameter.
-
subscribeEvents(
BlockHash at, dynamic onData(Events)) → Future< StreamSubscription< Events> > -
subscribeRuntimeVersion(
dynamic onData(RuntimeVersion)) → Future< StreamSubscription< RuntimeVersion> > - Retrieves the runtime version via subscription
-
subscribeStorage(
List< Uint8List> storageKeys, dynamic onData(StorageChangeSet)) → Future<StreamSubscription< StorageChangeSet> > - Subscribes to storage changes for the provided keys
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited