core_client

package
v0.0.0-...-7c12c5a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2015 License: GPL-2.0, GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	BlockchainInfo(minHeight int, maxHeight int) (*ctypes.ResultBlockchainInfo, error)
	BroadcastTx(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
	Call(fromAddress []byte, toAddress []byte, data []byte) (*ctypes.ResultCall, error)
	CallCode(fromAddress []byte, code []byte, data []byte) (*ctypes.ResultCall, error)
	DumpConsensusState() (*ctypes.ResultDumpConsensusState, error)
	DumpStorage(address []byte) (*ctypes.ResultDumpStorage, error)
	GenPrivAccount() (*ctypes.ResultGenPrivAccount, error)
	Genesis() (*ctypes.ResultGenesis, error)
	GetAccount(address []byte) (*ctypes.ResultGetAccount, error)
	GetBlock(height int) (*ctypes.ResultGetBlock, error)
	GetName(name string) (*ctypes.ResultGetName, error)
	GetStorage(address []byte, key []byte) (*ctypes.ResultGetStorage, error)
	ListAccounts() (*ctypes.ResultListAccounts, error)
	ListNames() (*ctypes.ResultListNames, error)
	ListUnconfirmedTxs() (*ctypes.ResultListUnconfirmedTxs, error)
	ListValidators() (*ctypes.ResultListValidators, error)
	NetInfo() (*ctypes.ResultNetInfo, error)
	SignTx(tx types.Tx, privAccounts []*acm.PrivAccount) (*ctypes.ResultSignTx, error)
	Status() (*ctypes.ResultStatus, error)
}

func NewClient

func NewClient(addr, typ string) Client

type ClientHTTP

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

func (*ClientHTTP) BlockchainInfo

func (c *ClientHTTP) BlockchainInfo(minHeight int, maxHeight int) (*ctypes.ResultBlockchainInfo, error)

func (*ClientHTTP) BroadcastTx

func (c *ClientHTTP) BroadcastTx(tx types.Tx) (*ctypes.ResultBroadcastTx, error)

func (*ClientHTTP) Call

func (c *ClientHTTP) Call(fromAddress []byte, toAddress []byte, data []byte) (*ctypes.ResultCall, error)

func (*ClientHTTP) CallCode

func (c *ClientHTTP) CallCode(fromAddress []byte, code []byte, data []byte) (*ctypes.ResultCall, error)

func (*ClientHTTP) DumpConsensusState

func (c *ClientHTTP) DumpConsensusState() (*ctypes.ResultDumpConsensusState, error)

func (*ClientHTTP) DumpStorage

func (c *ClientHTTP) DumpStorage(address []byte) (*ctypes.ResultDumpStorage, error)

func (*ClientHTTP) GenPrivAccount

func (c *ClientHTTP) GenPrivAccount() (*ctypes.ResultGenPrivAccount, error)

func (*ClientHTTP) Genesis

func (c *ClientHTTP) Genesis() (*ctypes.ResultGenesis, error)

func (*ClientHTTP) GetAccount

func (c *ClientHTTP) GetAccount(address []byte) (*ctypes.ResultGetAccount, error)

func (*ClientHTTP) GetBlock

func (c *ClientHTTP) GetBlock(height int) (*ctypes.ResultGetBlock, error)

func (*ClientHTTP) GetName

func (c *ClientHTTP) GetName(name string) (*ctypes.ResultGetName, error)

func (*ClientHTTP) GetStorage

func (c *ClientHTTP) GetStorage(address []byte, key []byte) (*ctypes.ResultGetStorage, error)

func (*ClientHTTP) ListAccounts

func (c *ClientHTTP) ListAccounts() (*ctypes.ResultListAccounts, error)

func (*ClientHTTP) ListNames

func (c *ClientHTTP) ListNames() (*ctypes.ResultListNames, error)

func (*ClientHTTP) ListUnconfirmedTxs

func (c *ClientHTTP) ListUnconfirmedTxs() (*ctypes.ResultListUnconfirmedTxs, error)

func (*ClientHTTP) ListValidators

func (c *ClientHTTP) ListValidators() (*ctypes.ResultListValidators, error)

func (*ClientHTTP) NetInfo

func (c *ClientHTTP) NetInfo() (*ctypes.ResultNetInfo, error)

func (*ClientHTTP) SignTx

func (c *ClientHTTP) SignTx(tx types.Tx, privAccounts []*acm.PrivAccount) (*ctypes.ResultSignTx, error)

func (*ClientHTTP) Status

func (c *ClientHTTP) Status() (*ctypes.ResultStatus, error)

type ClientJSON

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

func (*ClientJSON) BlockchainInfo

func (c *ClientJSON) BlockchainInfo(minHeight int, maxHeight int) (*ctypes.ResultBlockchainInfo, error)

func (*ClientJSON) BroadcastTx

func (c *ClientJSON) BroadcastTx(tx types.Tx) (*ctypes.ResultBroadcastTx, error)

func (*ClientJSON) Call

func (c *ClientJSON) Call(fromAddress []byte, toAddress []byte, data []byte) (*ctypes.ResultCall, error)

func (*ClientJSON) CallCode

func (c *ClientJSON) CallCode(fromAddress []byte, code []byte, data []byte) (*ctypes.ResultCall, error)

func (*ClientJSON) DumpConsensusState

func (c *ClientJSON) DumpConsensusState() (*ctypes.ResultDumpConsensusState, error)

func (*ClientJSON) DumpStorage

func (c *ClientJSON) DumpStorage(address []byte) (*ctypes.ResultDumpStorage, error)

func (*ClientJSON) GenPrivAccount

func (c *ClientJSON) GenPrivAccount() (*ctypes.ResultGenPrivAccount, error)

func (*ClientJSON) Genesis

func (c *ClientJSON) Genesis() (*ctypes.ResultGenesis, error)

func (*ClientJSON) GetAccount

func (c *ClientJSON) GetAccount(address []byte) (*ctypes.ResultGetAccount, error)

func (*ClientJSON) GetBlock

func (c *ClientJSON) GetBlock(height int) (*ctypes.ResultGetBlock, error)

func (*ClientJSON) GetName

func (c *ClientJSON) GetName(name string) (*ctypes.ResultGetName, error)

func (*ClientJSON) GetStorage

func (c *ClientJSON) GetStorage(address []byte, key []byte) (*ctypes.ResultGetStorage, error)

func (*ClientJSON) ListAccounts

func (c *ClientJSON) ListAccounts() (*ctypes.ResultListAccounts, error)

func (*ClientJSON) ListNames

func (c *ClientJSON) ListNames() (*ctypes.ResultListNames, error)

func (*ClientJSON) ListUnconfirmedTxs

func (c *ClientJSON) ListUnconfirmedTxs() (*ctypes.ResultListUnconfirmedTxs, error)

func (*ClientJSON) ListValidators

func (c *ClientJSON) ListValidators() (*ctypes.ResultListValidators, error)

func (*ClientJSON) NetInfo

func (c *ClientJSON) NetInfo() (*ctypes.ResultNetInfo, error)

func (*ClientJSON) RequestResponse

func (c *ClientJSON) RequestResponse(s rpctypes.RPCRequest) (b []byte, err error)

func (*ClientJSON) SignTx

func (c *ClientJSON) SignTx(tx types.Tx, privAccounts []*acm.PrivAccount) (*ctypes.ResultSignTx, error)

func (*ClientJSON) Status

func (c *ClientJSON) Status() (*ctypes.ResultStatus, error)

type Response

type Response struct {
	Status string
	Data   interface{}
	Error  string
}

type WSClient

type WSClient struct {
	QuitService
	Address string
	*websocket.Conn
	EventsCh  chan ctypes.ResultEvent
	ResultsCh chan ctypes.Result
}

func NewWSClient

func NewWSClient(addr string) *WSClient

create a new connection

func (*WSClient) OnStart

func (wsc *WSClient) OnStart() error

func (*WSClient) OnStop

func (wsc *WSClient) OnStop()

func (*WSClient) Subscribe

func (wsc *WSClient) Subscribe(eventid string) error

subscribe to an event

func (*WSClient) Unsubscribe

func (wsc *WSClient) Unsubscribe(eventid string) error

unsubscribe from an event

Jump to

Keyboard shortcuts

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