state

package
v0.0.0-...-f5f0bdb Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallArgs

type CallArgs struct {
	Method    string
	Data      []byte
	BlockHash *string
}

CallArgs is passed to the Call method

type QueryStorageArgs

type QueryStorageArgs struct {
	Keys          []*storage.Key
	FromBlockHash string
	ToBlockHash   *string
}

QueryStorageArgs is passed to the QueryStorage method

type Service

type Service interface{}

Service implements the service interface

type ServiceInterface

type ServiceInterface interface {
	// Call is used to call a contract at a block's state.
	Call(args *CallArgs, response []byte) error
	// GetStorage returns a storage entry at a specific block's state.
	GetStorage(args *StorageArgs, response *storage.Data) error
	// GetStorageHash returns the hash of a storage entry at a block's state.
	GetStorageHash(args *StorageArgs, response *string) error
	// GetStorageSize returns the size of a storage entry at a block's state.
	GetStorageSize(args *StorageArgs, response *uint64) error
	// GetMetadata returns the runtime metadata as an opaque blob.
	GetMetadata(blockHash *string, response []byte) error
	// GetRuntimeVersion returns the runtime version.
	GetRuntimeVersion(blockHash *string, response *runtime.Version) error
	// QueryStorage queries historical storage entries (by key) starting from a block given as the second parameter.
	//
	// NOTE: This first returned result contains the initial state of storage for all keys.
	// Subsequent values in the vector represent changes to the previous state (diffs).
	QueryStorage(args *QueryStorageArgs, response *storage.ChangeSet) error
	// SubscribeRuntimeVersion subscribes to a new runtime version subscription.
	SubscribeRuntimeVersion(subscriber pubsub.Subscriber, response rpctypes.NilResponse) error
	// UnsubscribeRuntimeVersion unsubscribes from runtime version subscription.
	UnsubscribeRuntimeVersion(id pubsub.SubscriptionID, response *bool) error
	// SubscribeStorage subscribes to a new storage subscription.
	SubscribeStorage(args *SubscribeStorageArgs, response rpctypes.NilResponse) error
	// UnsubscribeStorage unsubscribes from storage subscription.
	UnsubscribeStorage(id pubsub.SubscriptionID, response *bool) error
}

ServiceInterface described the methods performed by the state rpc api.

type StorageArgs

type StorageArgs struct {
	Key       *storage.Key
	BlockHash *string
}

StorageArgs is passed to the various storage methods

type SubscribeStorageArgs

type SubscribeStorageArgs struct {
	Subscriber pubsub.Subscriber
	Keys       []*storage.Key
}

SubscribeStorageArgs is passed to the SubscribeRuntimeVersion method

Jump to

Keyboard shortcuts

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