client

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: AGPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EthClient

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

func NewEthClient

func NewEthClient(client *ethclient.Client) EthClient

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) SubscribeNewStateChanges added in v0.1.0

func (client EthClient) SubscribeNewStateChanges(ctx context.Context, q ethereum.FilterQuery, ch chan<- filters.Payload) (ethereum.Subscription, 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 []core.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

func (client RpcClient) Subscribe(namespace string, payloadChan interface{}, args ...interface{}) (core.Subscription, 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

type Subscription added in v0.1.0

type Subscription struct {
	RpcSubscription *rpc.ClientSubscription
}

func (Subscription) Err added in v0.1.0

func (sub Subscription) Err() <-chan error

func (Subscription) Unsubscribe added in v0.1.0

func (sub Subscription) Unsubscribe()

Jump to

Keyboard shortcuts

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