tm

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BroadcastTx = "broadcast_tx"
	Subscribe   = "subscribe"
	Unsubscribe = "unsubscribe"

	// Status
	Status  = "status"
	NetInfo = "net_info"

	// Accounts
	ListAccounts    = "list_accounts"
	GetAccount      = "get_account"
	GetStorage      = "get_storage"
	DumpStorage     = "dump_storage"
	GetAccountHuman = "get_account_human"

	// Simulated call
	Call     = "call"
	CallCode = "call_code"

	// Names
	GetName   = "get_name"
	ListNames = "list_names"

	// Blockchain
	Genesis    = "genesis"
	ChainID    = "chain_id"
	GetBlock   = "get_block"
	ListBlocks = "list_blocks"

	// Consensus
	ListUnconfirmedTxs = "list_unconfirmed_txs"
	ListValidators     = "list_validators"
	DumpConsensusState = "dump_consensus_state"

	// Private keys and signing
	GeneratePrivateAccount = "unsafe/gen_priv_account"
	SignTx                 = "unsafe/sign_tx"

	// Health check
	LastBlockInfo = "last_block_info"
)

Method names

View Source
const SubscriptionTimeout = 5 * time.Second

Variables

This section is empty.

Functions

func EventResponseID

func EventResponseID(requestID, eventID string) string

In a slight abuse of the JSON-RPC spec (it states we should return the same ID as provided by the client) we append the eventID to the websocket response ID when pushing events over the websocket to distinguish events themselves from the initial ResultSubscribe response.

func GetRoutes

func GetRoutes(service *rpc.Service, logger *logging.Logger) map[string]*server.RPCFunc

func StartServer

func StartServer(service *rpc.Service, pattern, listenAddress string, emitter event.Emitter,
	logger *logging.Logger) (*http.Server, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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