Skip to content

json-rpc-engine middleware implementing ethereum filter methods

License

Notifications You must be signed in to change notification settings

MetaMask/eth-json-rpc-filters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d3a0732 · Jul 23, 2024
Jul 19, 2024
Jul 12, 2024
Apr 5, 2021
Sep 7, 2020
Sep 22, 2023
Sep 25, 2023
Jul 23, 2024
Apr 21, 2020
Sep 22, 2023
Mar 29, 2019
Feb 5, 2021
Oct 8, 2018
Feb 16, 2023
Oct 4, 2018
Sep 22, 2023
Oct 12, 2023
Jul 23, 2024
Sep 22, 2023
Feb 5, 2021
Jul 22, 2024

Repository files navigation

@metamask/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()

Running Tests

yarn test

Changelog

CHANGELOG.md