Versions in this module Expand all Collapse all v1 v1.0.1 Jun 12, 2023 Changes in this version + var ErrInvalidSubscriptionID = errors.New("invalid id") + type Backend interface + ChainDb func() ethdb.Database + EvmLogIndex func() *topicsdb.Index + GetLogs func(ctx context.Context, blockHash common.Hash) ([][]*types.Log, error) + GetReceipts func(ctx context.Context, blockHash common.Hash) (types.Receipts, error) + HeaderByHash func(ctx context.Context, blockHash common.Hash) (*evmcore.EvmHeader, error) + HeaderByNumber func(ctx context.Context, blockNr rpc.BlockNumber) (*evmcore.EvmHeader, error) + SubscribeLogsEvent func(ch chan<- []*types.Log) notify.Subscription + SubscribeNewBlockEvent func(ch chan<- evmcore.ChainHeadNotify) notify.Subscription + SubscribeNewTxsEvent func(chan<- core.NewTxsEvent) notify.Subscription + type Config struct + IndexedLogsBlockRangeLimit idx.Block + UnindexedLogsBlockRangeLimit idx.Block + func DefaultConfig() Config + type EventSystem struct + func NewEventSystem(backend Backend) *EventSystem + func (es *EventSystem) SubscribeLogs(crit ethereum.FilterQuery, logs chan []*types.Log) (*Subscription, error) + func (es *EventSystem) SubscribeNewHeads(headers chan *types.Header) *Subscription + func (es *EventSystem) SubscribePendingTxs(hashes chan []common.Hash) *Subscription + type Filter struct + func NewBlockFilter(backend Backend, cfg Config, block common.Hash, addresses []common.Address, ...) *Filter + func NewRangeFilter(backend Backend, cfg Config, begin, end int64, addresses []common.Address, ...) *Filter + func (f *Filter) Logs(ctx context.Context) ([]*types.Log, error) + type FilterCriteria ethereum.FilterQuery + func (args *FilterCriteria) UnmarshalJSON(data []byte) error + type PublicFilterAPI struct + func NewPublicFilterAPI(backend Backend, cfg Config) *PublicFilterAPI + func (api *PublicFilterAPI) GetFilterChanges(id rpc.ID) (interface{}, error) + func (api *PublicFilterAPI) GetFilterLogs(ctx context.Context, id rpc.ID) ([]*types.Log, error) + func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([]*types.Log, error) + func (api *PublicFilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc.Subscription, error) + func (api *PublicFilterAPI) NewBlockFilter() rpc.ID + func (api *PublicFilterAPI) NewFilter(crit FilterCriteria) (rpc.ID, error) + func (api *PublicFilterAPI) NewHeads(ctx context.Context) (*rpc.Subscription, error) + func (api *PublicFilterAPI) NewPendingTransactionFilter() rpc.ID + func (api *PublicFilterAPI) NewPendingTransactions(ctx context.Context) (*rpc.Subscription, error) + func (api *PublicFilterAPI) UninstallFilter(id rpc.ID) bool + type Subscription struct + ID rpc.ID + func (sub *Subscription) Err() <-chan error + func (sub *Subscription) Unsubscribe() + type Type byte + const BlocksSubscription + const LastIndexSubscription + const LogsSubscription + const MinedAndPendingLogsSubscription + const PendingLogsSubscription + const PendingTransactionsSubscription + const UnknownSubscription