client

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SubscribeRequestID = "Subscribe"
View Source
const UnsubscribeRequestID = "Unsubscribe"

Variables

This section is empty.

Functions

func BroadcastTx

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

func Call

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

func CallCode

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

func ChainId

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

func DumpConsensusState

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

func DumpStorage

func DumpStorage(client RPCClient, address acm.Address) (*rpc.ResultDumpStorage, error)

func EventResponseID

func EventResponseID(eventID string) string

func GenPrivAccount

func GenPrivAccount(client RPCClient) (*rpc.ResultGeneratePrivateAccount, error)

func GetAccount

func GetAccount(client RPCClient, address acm.Address) (acm.Account, error)

func GetBlock

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

func GetName

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

func GetStorage

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

func ListBlocks

func ListBlocks(client RPCClient, minHeight, maxHeight int) (*rpc.ResultListBlocks, error)

func ListUnconfirmedTxs

func ListUnconfirmedTxs(client RPCClient, maxTxs int) (*rpc.ResultListUnconfirmedTxs, error)

func ListValidators

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

func SignTx

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

func Status

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

func Subscribe

func Subscribe(wsc WebsocketClient, eventID string) error

func Unsubscribe

func Unsubscribe(websocketClient WebsocketClient, subscriptionID string) error

Types

type RPCClient

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

type WebsocketClient

type WebsocketClient interface {
	Send(ctx context.Context, request rpctypes.RPCRequest) error
}

Jump to

Keyboard shortcuts

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