Documentation ¶
Overview ¶
Package ethclient provides a client for the Quai RPC API.
Index ¶
- type Client
- func (ec *Client) BaseFee(ctx context.Context, txType bool) (*big.Int, error)
- func (ec *Client) CalcOrder(ctx context.Context, header *types.WorkObject) (int, error)
- func (ec *Client) Close()
- func (ec *Client) EstimateGas(ctx context.Context, msg quai.CallMsg) (uint64, error)
- func (ec *Client) FilterLogs(ctx context.Context, q quai.FilterQuery) ([]types.Log, error)
- func (ec *Client) GetPendingHeader(ctx context.Context) (*types.WorkObject, error)
- func (ec *Client) GetWorkShareThreshold(ctx context.Context) (int, error)
- func (ec *Client) HeaderByHash(ctx context.Context, hash common.Hash) *types.Header
- func (ec *Client) HeaderByNumber(ctx context.Context, number string) *types.Header
- func (ec *Client) QiRateAtBlock(ctx context.Context, block interface{}) (*big.Int, error)
- func (ec *Client) QuaiRateAtBlock(ctx context.Context, block interface{}) (*big.Int, error)
- func (ec *Client) ReceiveMinedHeader(ctx context.Context, header *types.WorkObject) error
- func (ec *Client) ReceiveWorkShare(ctx context.Context, header *types.WorkObjectHeader) error
- func (ec *Client) SubmitSubWorkshare(ctx context.Context, wo *types.WorkObject) error
- func (ec *Client) SubscribeFilterLogs(ctx context.Context, q quai.FilterQuery, ch chan<- types.Log) (quai.Subscription, error)
- func (ec *Client) SubscribePendingHeader(ctx context.Context, ch chan<- []byte) (quai.Subscription, error)
- func (ec *Client) TxPoolStatus(ctx context.Context) (map[string]hexutil.Uint, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines typed wrappers for the Quai RPC API.
func DialContext ¶
func (*Client) BaseFee ¶ added in v0.29.0
BaseFee returns the base fee for a tx to be included in the next block. If txType is set to "true" returns the Quai base fee in units of Wei. If txType is set to "false" returns the Qi base fee in units of Qit.
func (*Client) EstimateGas ¶ added in v0.29.0
EstimateGas tries to estimate the gas needed to execute a specific transaction based on the current pending state of the backend blockchain. There is no guarantee that this is the true gas limit requirement as other transactions may be added or removed by miners, but it should provide a basis for setting a reasonable default.
func (*Client) FilterLogs ¶ added in v0.28.0
FilterLogs executes a filter query.
func (*Client) GetPendingHeader ¶ added in v0.28.0
GetPendingHeader gets the latest pending header from the chain.
func (*Client) GetWorkShareThreshold ¶ added in v0.32.0
func (*Client) HeaderByHash ¶
func (*Client) HeaderByNumber ¶
func (*Client) QiRateAtBlock ¶ added in v0.29.0
QiRateAtBlock returns the number of Quai needed for a Qi at a given block number or hash.
func (*Client) QuaiRateAtBlock ¶ added in v0.29.0
QuaiRateAtBlock returns the number of Qi needed for a Quai at a given block number or hash.
func (*Client) ReceiveMinedHeader ¶ added in v0.28.0
ReceiveMinedHeader sends a mined block back to the node
func (*Client) ReceiveWorkShare ¶ added in v0.29.0
func (*Client) SubmitSubWorkshare ¶ added in v0.32.0
Submits a minimally worked workshare to the client node
func (*Client) SubscribeFilterLogs ¶ added in v0.28.0
func (ec *Client) SubscribeFilterLogs(ctx context.Context, q quai.FilterQuery, ch chan<- types.Log) (quai.Subscription, error)
SubscribeFilterLogs subscribes to the results of a streaming filter query.
func (*Client) SubscribePendingHeader ¶ added in v0.28.0
func (ec *Client) SubscribePendingHeader(ctx context.Context, ch chan<- []byte) (quai.Subscription, error)
SubscribePendingHeader subscribes to notifications about the current pending block on the node.