rpcfilters

package
v0.184.53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 18 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainEvent added in v0.161.6

type ChainEvent interface {
	Start() error
	Stop()
	Subscribe() (id int, ch interface{})
	Unsubscribe(id int)
}

type ContextCaller added in v0.35.0

type ContextCaller interface {
	CallContext(ctx context.Context, result interface{}, chainID uint64, method string, args ...interface{}) error
}

ContextCaller provides CallContext method as ethereums rpc.Client.

type PendingTxInfo added in v0.161.6

type PendingTxInfo struct {
	Hash    common.Hash
	Type    string
	From    common.Address
	ChainID uint64
}

type PublicAPI

type PublicAPI struct {
	// contains filtered or unexported fields
}

PublicAPI represents filter API that is exported to `eth` namespace

func NewPublicAPI

func NewPublicAPI(s *Service) *PublicAPI

NewPublicAPI returns a reference to the PublicAPI object

func (*PublicAPI) GetFilterChanges

func (api *PublicAPI) GetFilterChanges(id getrpc.ID) (interface{}, error)

GetFilterChanges returns the hashes for the filter with the given id since last time it was called. This can be used for polling.

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterchanges

func (*PublicAPI) GetFilterLogs added in v0.35.0

func (api *PublicAPI) GetFilterLogs(ctx context.Context, id getrpc.ID) ([]types.Log, error)

GetFilterLogs returns the logs for the filter with the given id. If the filter could not be found an empty array of logs is returned.

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterlogs

func (*PublicAPI) NewBlockFilter

func (api *PublicAPI) NewBlockFilter() getrpc.ID

NewBlockFilter is an implemenation of `eth_newBlockFilter` API https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newblockfilter

func (*PublicAPI) NewFilter added in v0.35.0

func (api *PublicAPI) NewFilter(crit filters.FilterCriteria) (getrpc.ID, error)

func (*PublicAPI) NewPendingTransactionFilter

func (api *PublicAPI) NewPendingTransactionFilter() getrpc.ID

NewPendingTransactionFilter is an implementation of `eth_newPendingTransactionFilter` API https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newpendingtransactionfilter

func (*PublicAPI) UninstallFilter

func (api *PublicAPI) UninstallFilter(id getrpc.ID) bool

UninstallFilter is an implemenation of `eth_uninstallFilter` API https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_uninstallfilter

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service represents out own implementation of personal sign operations.

func New

func New(rpc rpcProvider) *Service

New returns a new Service.

func (*Service) APIs

func (s *Service) APIs() []rpc.API

APIs returns a list of new APIs.

func (*Service) Protocols

func (s *Service) Protocols() []p2p.Protocol

Protocols returns a new protocols list. In this case, there are none.

func (*Service) Start

func (s *Service) Start() error

Start is run when a service is started.

func (*Service) Stop

func (s *Service) Stop() error

Stop is run when a service is stopped.

func (*Service) TransactionSentToUpstreamEvent added in v0.161.6

func (s *Service) TransactionSentToUpstreamEvent() ChainEvent

func (*Service) TriggerTransactionSentToUpstreamEvent

func (s *Service) TriggerTransactionSentToUpstreamEvent(txInfo *PendingTxInfo)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL