Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eth-json-rpc-filters

Package Overview
Dependencies
Maintainers
7
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eth-json-rpc-filters - npm Package Compare versions

Comparing version 4.2.2 to 5.0.0

23

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [4.2.2] - 2021-02-04
## [5.0.0] - 2022-05-10
### Added
- Add retry logic to `getBlocksForRange`, treating a null block number as failure ([#61](https://github.com/MetaMask/eth-json-rpc-filters/pull/61))
### Changed
- **BREAKING:** Set minimum Node.js version to v12 ([#50](https://github.com/MetaMask/eth-json-rpc-filters/pull/50))
- We officially support Node 12, 14, and 16, in alignment with our other packages.
## [4.2.2] - 2021-02-04
### Changed
- Replace `await-semaphore` with `async-mutex` ([#33](https://github.com/MetaMask/eth-json-rpc-filters/pull/33))

@@ -21,11 +27,7 @@ - Move `pify` to production dependencies and update to v5 ([#39](https://github.com/MetaMask/eth-json-rpc-filters/pull/39) and [#40](https://github.com/MetaMask/eth-json-rpc-filters/pull/40))

## [4.2.1] - 2020-09-22
### Changed
- Specify publish files ([#30](https://github.com/MetaMask/eth-json-rpc-filters/pull/30))
## [4.2.0] - 2020-09-22
### Changed
- Update RPC packages ([#29](https://github.com/MetaMask/eth-json-rpc-filters/pull/29))

@@ -35,3 +37,6 @@ - `json-rpc-engine@5.3.0`

[Unreleased]:https://github.com/MetaMask/eth-json-rpc-filters/compare/v4.2.1...HEAD
[4.2.1]:https://github.com/MetaMask/eth-json-rpc-filters/compare/v4.2.0...v4.2.1
[Unreleased]: https://github.com/MetaMask/eth-json-rpc-filters/compare/v5.0.0...HEAD
[5.0.0]: https://github.com/MetaMask/eth-json-rpc-filters/compare/v4.2.2...v5.0.0
[4.2.2]: https://github.com/MetaMask/eth-json-rpc-filters/compare/v4.2.1...v4.2.2
[4.2.1]: https://github.com/MetaMask/eth-json-rpc-filters/compare/v4.2.0...v4.2.1
[4.2.0]: https://github.com/MetaMask/eth-json-rpc-filters/releases/tag/v4.2.0

@@ -36,9 +36,34 @@ module.exports = getBlocksForRange

function query(provider, method, params) {
function sendAsync(provider, request) {
return new Promise((resolve, reject) => {
provider.sendAsync({ id: 1, jsonrpc: '2.0', method, params }, (err, res) => {
if (err) return reject(err)
resolve(res.result)
})
})
provider.sendAsync(request, (error, response) => {
if (error) {
reject(error);
} else if (response.error) {
reject(response.error);
} else if (response.result) {
resolve(response.result);
} else {
reject(new Error("Result was empty"));
}
});
});
}
async function query(provider, method, params) {
for (let i = 0; i < 3; i++) {
try {
return await sendAsync(provider, {
id: 1,
jsonrpc: "2.0",
method,
params,
});
} catch (error) {
console.error(
`provider.sendAsync failed: ${error.stack || error.message || error}`
);
}
}
throw new Error(`Block not found for params: ${JSON.stringify(params)}`);
}
{
"name": "eth-json-rpc-filters",
"version": "4.2.2",
"version": "5.0.0",
"description": "[json-rpc-engine](https://github.com/MetaMask/json-rpc-engine) middleware implementing ethereum filter methods. Backed by an [eth-block-tracker](https://github.com/MetaMask/eth-block-tracker) and web3 provider interface (`web3.currentProvider`).",
"main": "index.js",
"engines": {
"node": ">=12.0.0"
},
"scripts": {
"build": "echo 'this does nothing'",
"build:clean": "rimraf dist && yarn build",
"lint": "printf '%s\\n' 'No lint command'",
"setup": "yarn install && yarn allow-scripts",
"test": "node test"

@@ -23,2 +29,4 @@ },

"devDependencies": {
"@lavamoat/allow-scripts": "^2.0.3",
"@metamask/auto-changelog": "^2.5.0",
"eth-block-tracker": "^4.4.1",

@@ -28,2 +36,3 @@ "ethereumjs-util": "^6.1.0",

"ganache-core": "^2.13.2",
"sinon": "^13.0.2",
"tape": "^4.9.1"

@@ -33,3 +42,3 @@ },

"type": "git",
"url": "git+https://github.com/MetaMask/eth-json-rpc-filters.git"
"url": "https://github.com/MetaMask/eth-json-rpc-filters.git"
},

@@ -39,3 +48,16 @@ "bugs": {

},
"homepage": "https://github.com/MetaMask/eth-json-rpc-filters#readme"
"homepage": "https://github.com/MetaMask/eth-json-rpc-filters#readme",
"lavamoat": {
"allowScripts": {
"@lavamoat/preinstall-always-fail": false,
"ethereumjs-util>ethereum-cryptography>keccak": false,
"ethereumjs-util>ethereum-cryptography>secp256k1": false,
"ethjs-query>babel-runtime>core-js": false,
"ganache-core>ethereumjs-vm>core-js-pure": false,
"ganache-core>keccak": false,
"ganache-core>web3": false,
"ganache-core>websocket>bufferutil": false,
"ganache-core>websocket>utf-8-validate": false
}
}
}

@@ -28,2 +28,8 @@ # eth-json-rpc-filters

## Running Tests
```bash
yarn test
```
### Changelog

@@ -30,0 +36,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc