client

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchElem

type BatchElem struct {
	Method string
	Args   []interface{}
	Result interface{}
	Error  error
}

type EthClient

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

func NewEthClient

func NewEthClient(client *ethclient.Client) EthClient

func (EthClient) BalanceAt

func (client EthClient) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)

func (EthClient) BlockByNumber

func (client EthClient) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)

func (EthClient) CallContract

func (client EthClient) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)

func (EthClient) FilterLogs

func (client EthClient) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)

func (EthClient) HeaderByNumber

func (client EthClient) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

func (EthClient) TransactionReceipt

func (client EthClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)

func (EthClient) TransactionSender

func (client EthClient) TransactionSender(ctx context.Context, tx *types.Transaction, block common.Hash, index uint) (common.Address, error)

type RpcClient

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

func NewRpcClient

func NewRpcClient(client *rpc.Client, ipcPath string) RpcClient

func (RpcClient) BatchCall

func (client RpcClient) BatchCall(batch []BatchElem) error

func (RpcClient) CallContext

func (client RpcClient) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error

func (RpcClient) IpcPath

func (client RpcClient) IpcPath() string

func (RpcClient) Subscribe added in v0.0.8

func (client RpcClient) Subscribe(namespace string, payloadChan interface{}, args ...interface{}) (*rpc.ClientSubscription, error)

Subscribe subscribes to an rpc "namespace_subscribe" subscription with the given channel The first argument needs to be the method we wish to invoke

func (RpcClient) SupportedModules

func (client RpcClient) SupportedModules() (map[string]string, error)

Jump to

Keyboard shortcuts

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