state

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

func NewState

func NewState(c *client.Client) *State

func (*State) GetChildKeys added in v0.0.3

func (s *State) GetChildKeys(childStorageKey, prefix types.StorageKey, blockHash types.Hash) (
	[]types.StorageKey, error)

GetChildKeys retreives the keys with the given prefix of a specific child storage

func (*State) GetChildKeysLatest added in v0.0.3

func (s *State) GetChildKeysLatest(childStorageKey, prefix types.StorageKey) ([]types.StorageKey, error)

GetChildKeysLatest retreives the keys with the given prefix of a specific child storage for the latest block height

func (*State) GetChildStorage added in v0.0.3

func (s *State) GetChildStorage(childStorageKey, key types.StorageKey, target interface{}, blockHash types.Hash) error

GetChildStorage retreives the child storage for a key and decodes them into the provided interface

func (*State) GetChildStorageHash added in v0.0.3

func (s *State) GetChildStorageHash(childStorageKey, key types.StorageKey, blockHash types.Hash) (types.Hash, error)

GetChildStorageHash retreives the child storage hash for the given key

func (*State) GetChildStorageHashLatest added in v0.0.3

func (s *State) GetChildStorageHashLatest(childStorageKey, key types.StorageKey) (types.Hash, error)

GetChildStorageHashLatest retreives the child storage hash for the given key for the latest block height

func (*State) GetChildStorageLatest added in v0.0.3

func (s *State) GetChildStorageLatest(childStorageKey, key types.StorageKey, target interface{}) error

GetChildStorageLatest retreives the child storage for a key for the latest block height and decodes them into the provided interface

func (*State) GetChildStorageRaw added in v0.0.3

func (s *State) GetChildStorageRaw(childStorageKey, key types.StorageKey, blockHash types.Hash) (
	*types.StorageDataRaw, error)

GetChildStorageRaw retreives the child storage for a key as raw bytes, without decoding them

func (*State) GetChildStorageRawLatest added in v0.0.3

func (s *State) GetChildStorageRawLatest(childStorageKey, key types.StorageKey) (*types.StorageDataRaw, error)

GetChildStorageRawLatest retreives the child storage for a key for the latest block height as raw bytes, without decoding them

func (*State) GetChildStorageSize added in v0.0.3

func (s *State) GetChildStorageSize(childStorageKey, key types.StorageKey, blockHash types.Hash) (types.U64, error)

GetChildStorageSize retreives the child storage size for the given key

func (*State) GetChildStorageSizeLatest added in v0.0.3

func (s *State) GetChildStorageSizeLatest(childStorageKey, key types.StorageKey) (types.U64, error)

GetChildStorageSizeLatest retreives the child storage size for the given key for the latest block height

func (*State) GetKeys added in v0.0.3

func (s *State) GetKeys(prefix types.StorageKey, blockHash types.Hash) ([]types.StorageKey, error)

GetKeys retreives the keys with the given prefix

func (*State) GetKeysLatest added in v0.0.3

func (s *State) GetKeysLatest(prefix types.StorageKey) ([]types.StorageKey, error)

GetKeysLatest retreives the keys with the given prefix for the latest block height

func (*State) GetMetadata

func (s *State) GetMetadata(blockHash types.Hash) (*types.Metadata, error)

func (*State) GetMetadataLatest

func (s *State) GetMetadataLatest() (*types.Metadata, error)

func (*State) GetRuntimeVersion

func (s *State) GetRuntimeVersion(blockHash types.Hash) (*types.RuntimeVersion, error)

func (*State) GetRuntimeVersionLatest

func (s *State) GetRuntimeVersionLatest() (*types.RuntimeVersion, error)

func (*State) GetStorage added in v0.0.3

func (s *State) GetStorage(key types.StorageKey, target interface{}, blockHash types.Hash) error

GetStorage retreives the stored data and decodes them into the provided interface

func (*State) GetStorageHash added in v0.0.3

func (s *State) GetStorageHash(key types.StorageKey, blockHash types.Hash) (types.Hash, error)

GetStorageHash retreives the storage hash for the given key

func (*State) GetStorageHashLatest added in v0.0.3

func (s *State) GetStorageHashLatest(key types.StorageKey) (types.Hash, error)

GetStorageHashLatest retreives the storage hash for the given key for the latest block height

func (*State) GetStorageLatest added in v0.0.3

func (s *State) GetStorageLatest(key types.StorageKey, target interface{}) error

GetStorageLatest retreives the stored data for the latest block height and decodes them into the provided interface

func (*State) GetStorageRaw added in v0.0.3

func (s *State) GetStorageRaw(key types.StorageKey, blockHash types.Hash) (*types.StorageDataRaw, error)

GetStorageRaw retreives the stored data as raw bytes, without decoding them

func (*State) GetStorageRawLatest added in v0.0.3

func (s *State) GetStorageRawLatest(key types.StorageKey) (*types.StorageDataRaw, error)

GetStorageRawLatest retreives the stored data for the latest block height as raw bytes, without decoding them

func (*State) GetStorageSize added in v0.0.3

func (s *State) GetStorageSize(key types.StorageKey, blockHash types.Hash) (types.U64, error)

GetStorageSize retreives the storage size for the given key

func (*State) GetStorageSizeLatest added in v0.0.3

func (s *State) GetStorageSizeLatest(key types.StorageKey) (types.U64, error)

GetStorageSizeLatest retreives the storage size for the given key for the latest block height

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL