Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
GetSyncStatus(ctx context.Context) (*SyncStatus, error)
IsSyncing(ctx context.Context) (bool, error)
GetBlockNumber(ctx context.Context) (uint64, error)
GetPeerCount(ctx context.Context) (int, error)
Name() string
}
Client defines the interface for execution layer operations
type RPCError ¶
type RPCError struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
RPCError represents a JSON-RPC error
type RPCResponse ¶
type RPCResponse struct {
JSONRPC string `json:"jsonrpc"`
ID int `json:"id"`
Result json.RawMessage `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
}
RPCResponse represents a JSON-RPC response
type SyncProgress ¶
type SyncProgress struct {
CurrentBlock uint64 `json:"currentBlock"`
HighestBlock uint64 `json:"highestBlock"`
StartingBlock uint64 `json:"startingBlock"`
}
SyncProgress represents the sync progress when syncing
type SyncStatus ¶
type SyncStatus struct {
BlockNumber uint64
IsSyncing bool
PeerCount int
SyncProgress *SyncProgress
}
SyncStatus represents the sync status of the execution client
Click to show internal directories.
Click to hide internal directories.