Documentation
¶
Index ¶
- type ApiBackend
- type MiningService
- type RemoteBackend
- func (back *RemoteBackend) ClientVersion(ctx context.Context) (string, error)
- func (back *RemoteBackend) EnsureVersionCompatibility() bool
- func (back *RemoteBackend) Etherbase(ctx context.Context) (common.Address, error)
- func (back *RemoteBackend) NetVersion(ctx context.Context) (uint64, error)
- func (back *RemoteBackend) ProtocolVersion(ctx context.Context) (uint64, error)
- func (back *RemoteBackend) Subscribe(ctx context.Context, onNewEvent func(*remote.SubscribeReply)) error
- type TxPoolService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiBackend ¶
type ApiBackend interface { Etherbase(ctx context.Context) (common.Address, error) NetVersion(ctx context.Context) (uint64, error) ProtocolVersion(ctx context.Context) (uint64, error) ClientVersion(ctx context.Context) (string, error) Subscribe(ctx context.Context, cb func(*remote.SubscribeReply)) error }
ApiBackend - interface which must be used by API layer implementation can work with local Ethereum object or with Remote (grpc-based) one this is reason why all methods are accepting context and returning error
type MiningService ¶
type MiningService struct { txpool.MiningClient // contains filtered or unexported fields }
func NewMiningService ¶
func NewMiningService(cc grpc.ClientConnInterface) *MiningService
func (*MiningService) EnsureVersionCompatibility ¶
func (s *MiningService) EnsureVersionCompatibility() bool
type RemoteBackend ¶
type RemoteBackend struct {
// contains filtered or unexported fields
}
func NewRemoteBackend ¶
func NewRemoteBackend(cc grpc.ClientConnInterface) *RemoteBackend
func (*RemoteBackend) ClientVersion ¶
func (back *RemoteBackend) ClientVersion(ctx context.Context) (string, error)
func (*RemoteBackend) EnsureVersionCompatibility ¶
func (back *RemoteBackend) EnsureVersionCompatibility() bool
func (*RemoteBackend) NetVersion ¶
func (back *RemoteBackend) NetVersion(ctx context.Context) (uint64, error)
func (*RemoteBackend) ProtocolVersion ¶
func (back *RemoteBackend) ProtocolVersion(ctx context.Context) (uint64, error)
func (*RemoteBackend) Subscribe ¶
func (back *RemoteBackend) Subscribe(ctx context.Context, onNewEvent func(*remote.SubscribeReply)) error
type TxPoolService ¶
type TxPoolService struct { txpool.TxpoolClient // contains filtered or unexported fields }
func NewTxPoolService ¶
func NewTxPoolService(cc grpc.ClientConnInterface) *TxPoolService
func (*TxPoolService) EnsureVersionCompatibility ¶
func (s *TxPoolService) EnsureVersionCompatibility() bool
Click to show internal directories.
Click to hide internal directories.