Documentation ¶
Overview ¶
Package ethclient provides a client for the Quai RPC API.
Index ¶
- type Client
- func (ec *Client) Append(ctx context.Context, header *types.WorkObject, manifest types.BlockManifest, ...) (types.Transactions, bool, bool, error)
- func (ec *Client) BaseFee(ctx context.Context, txType bool) (*big.Int, error)
- func (ec *Client) Close()
- func (ec *Client) DownloadBlocksInManifest(ctx context.Context, hash common.Hash, manifest types.BlockManifest, ...)
- 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) GenerateRecoveryPendingHeader(ctx context.Context, pendingHeader *types.WorkObject, ...) error
- func (ec *Client) GetManifest(ctx context.Context, blockHash common.Hash) (types.BlockManifest, error)
- func (ec *Client) GetPendingEtxsFromSub(ctx context.Context, hash common.Hash, location common.Location) (types.PendingEtxs, error)
- func (ec *Client) GetPendingEtxsRollupFromSub(ctx context.Context, hash common.Hash, location common.Location) (types.PendingEtxsRollup, error)
- func (ec *Client) GetPendingHeader(ctx context.Context) (*types.WorkObject, 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) NewGenesisPendingHeader(ctx context.Context, header *types.WorkObject, domTerminus common.Hash, ...) error
- 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) RequestDomToAppendOrFetch(ctx context.Context, hash common.Hash, entropy *big.Int, order int)
- func (ec *Client) SendPendingEtxsRollupToDom(ctx context.Context, pEtxsRollup types.PendingEtxsRollup) error
- func (ec *Client) SendPendingEtxsToDom(ctx context.Context, pEtxs types.PendingEtxs) error
- func (ec *Client) SubRelayPendingHeader(ctx context.Context, pendingHeader types.PendingHeader, newEntropy *big.Int, ...)
- 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<- *types.WorkObject) (quai.Subscription, error)
- func (ec *Client) UpdateDom(ctx context.Context, oldTerminus common.Hash, ...)
- type Termini
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) Append ¶
func (ec *Client) Append(ctx context.Context, header *types.WorkObject, manifest types.BlockManifest, domPendingHeader *types.WorkObject, domTerminus common.Hash, domOrigin bool, newInboundEtxs types.Transactions) (types.Transactions, bool, bool, error)
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) DownloadBlocksInManifest ¶ added in v0.19.0
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) GenerateRecoveryPendingHeader ¶
func (*Client) GetManifest ¶
func (ec *Client) GetManifest(ctx context.Context, blockHash common.Hash) (types.BlockManifest, error)
GetManifest will get the block manifest ending with the parent hash
func (*Client) GetPendingEtxsFromSub ¶ added in v0.19.0
func (ec *Client) GetPendingEtxsFromSub(ctx context.Context, hash common.Hash, location common.Location) (types.PendingEtxs, error)
GetPendingEtxsFromSub gets the pendingEtxsRollup from the region
func (*Client) GetPendingEtxsRollupFromSub ¶ added in v0.19.0
func (ec *Client) GetPendingEtxsRollupFromSub(ctx context.Context, hash common.Hash, location common.Location) (types.PendingEtxsRollup, error)
GetPendingEtxsRollupFromSub gets the pendingEtxsRollup from the region
func (*Client) GetPendingHeader ¶ added in v0.28.0
GetPendingHeader gets the latest pending header from the chain.
func (*Client) HeaderByHash ¶
func (*Client) HeaderByNumber ¶
func (*Client) NewGenesisPendingHeader ¶
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) RequestDomToAppendOrFetch ¶
func (*Client) SendPendingEtxsRollupToDom ¶
func (*Client) SendPendingEtxsToDom ¶
func (*Client) SubRelayPendingHeader ¶
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<- *types.WorkObject) (quai.Subscription, error)
SubscribePendingHeader subscribes to notifications about the current pending block on the node.