client

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockchainInfo

func BlockchainInfo(client RPCClient, minHeight,
	maxHeight int) (*rpc_types.ResultBlockchainInfo, error)

func BroadcastTx

func BroadcastTx(client RPCClient,
	tx txs.Tx) (txs.Receipt, error)

func Call

func Call(client RPCClient, fromAddress, toAddress,
	data []byte) (*rpc_types.ResultCall, error)

func CallCode

func CallCode(client RPCClient, fromAddress, code,
	data []byte) (*rpc_types.ResultCall, error)

func ChainId

func ChainId(client RPCClient) (*rpc_types.ResultChainId, error)

func DumpConsensusState

func DumpConsensusState(client RPCClient) (*rpc_types.ResultDumpConsensusState, error)

func DumpStorage

func DumpStorage(client RPCClient,
	address []byte) (*rpc_types.ResultDumpStorage, error)

func GenPrivAccount

func GenPrivAccount(client RPCClient) (*acm.PrivAccount, error)

func GetAccount

func GetAccount(client RPCClient, address []byte) (*acm.Account, error)

func GetBlock

func GetBlock(client RPCClient, height int) (*rpc_types.ResultGetBlock, error)

func GetName

func GetName(client RPCClient, name string) (*core_types.NameRegEntry, error)

func GetStorage

func GetStorage(client RPCClient, address, key []byte) ([]byte, error)

func ListUnconfirmedTxs

func ListUnconfirmedTxs(client RPCClient) (*rpc_types.ResultListUnconfirmedTxs, error)

func ListValidators

func ListValidators(client RPCClient) (*rpc_types.ResultListValidators, error)

func SignTx

func SignTx(client RPCClient, tx txs.Tx,
	privAccounts []*acm.PrivAccount) (txs.Tx, error)

func Status

func Status(client RPCClient) (*rpc_types.ResultStatus, error)

func Subscribe added in v0.17.0

func Subscribe(websocketClient WebsocketClient, eventId string) error

func Unsubscribe added in v0.17.0

func Unsubscribe(websocketClient WebsocketClient, subscriptionId string) error

Types

type RPCClient added in v0.17.0

type RPCClient interface {
	Call(method string, params map[string]interface{}, result interface{}) (interface{}, error)
}

type WebsocketClient added in v0.17.0

type WebsocketClient interface {
	WriteJSON(v interface{}) error
}

Jump to

Keyboard shortcuts

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