json-rpc-engine middleware implementing Ethereum filter methods.
Backed by an eth-block-tracker and web3 provider interface (web3.currentProvider
).
eth_newFilter
eth_newBlockFilter
eth_newPendingTransactionFilter
eth_uninstallFilter
eth_getFilterChanges
eth_getFilterLogs
basic usage:
const filterMiddleware = createFilterMiddleware({ blockTracker, provider })
engine.push(filterMiddleware)
cleanup:
// remove blockTracker handler to free middleware for garbage collection
filterMiddleware.destroy()
yarn test