@alayanetwork/eth-json-rpc-filters
v4.1.1
Published
[json-rpc-engine](https://github.com/kumavis/json-rpc-engine) middleware implementing platon filter methods. Backed by an [eth-block-tracker](https://github.com/AlayaNetwork/samurai-eth-block-tracker) and web3 provider interface (`web3.currentProvider`).
Downloads
2
Readme
eth-json-rpc-filters
json-rpc-engine middleware implementing ethereum filter methods.
Backed by an eth-block-tracker and web3 provider interface (web3.currentProvider
).
supported rpc methods
eth_newFilter
eth_newBlockFilter
eth_newPendingTransactionFilter
eth_uninstallFilter
eth_getFilterChanges
eth_getFilterLogs
usage
basic usage:
const filterMiddleware = createFilterMiddleware({ blockTracker, provider })
engine.push(filterMiddleware)
cleanup:
// remove blockTracker handler to free middleware for garbage collection
filterMiddleware.destroy()
Changelog
2.0
- expect EthBlockTracker@4