Socket
Socket
Sign inDemoInstall

@nomicfoundation/ethereumjs-rlp

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nomicfoundation/ethereumjs-rlp - npm Package Compare versions

Comparing version 5.0.3 to 5.0.4

bin/rlp.cjs

19

package.json
{
"name": "@nomicfoundation/ethereumjs-rlp",
"version": "5.0.3",
"version": "5.0.4",
"description": "Recursive Length Prefix Encoding Module",

@@ -27,6 +27,7 @@ "keywords": [

],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"bin": {
"rlp": "bin/rlp"
"rlp": "bin/rlp.cjs"
},

@@ -41,15 +42,15 @@ "files": [

"clean": "../../config/cli/clean-package.sh",
"coverage": "../../config/cli/coverage.sh",
"coverage": "c8 --all --reporter=lcov --reporter=text npm run test:node",
"examples": "tsx ../../scripts/examples-runner.ts -- rlp",
"lint": "../../config/cli/lint.sh",
"lint:diff": "../../config/cli/lint-diff.sh",
"lint:fix": "../../config/cli/lint-fix.sh",
"tape": "tape -r ts-node/register",
"test": "npm run test:node && npm run test:browser",
"test:browser": "karma start karma.conf.js",
"test:node": "npm run tape -- test/*.spec.ts",
"test:browser": "npx vitest run --browser.name=chrome --browser.headless -c=vitest.config.browser.ts",
"test:node": "npx vitest run",
"tsc": "../../config/cli/ts-compile.sh"
},
"engines": {
"node": ">=14"
"node": ">=18"
}
}

@@ -9,3 +9,4 @@ # @ethereumjs/rlp

[Recursive Length Prefix](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp) encoding for Node.js and the browser.
| [Recursive Length Prefix](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp) encoding for Node.js and the browser. |
| ----------------------------------------------------------------------------------------------------------------------------------------- |

@@ -24,3 +25,3 @@ ## Installation

```typescript
```ts
import assert from 'assert'

@@ -35,2 +36,8 @@ import { RLP } from '@ethereumjs/rlp'

## Browser
With the breaking release round in Summer 2023 we have added hybrid ESM/CJS builds for all our libraries (see section below) and have eliminated many of the caveats which had previously prevented a frictionless browser usage.
It is now easily possible to run a browser build of one of the EthereumJS libraries within a modern browser using the provided ESM build. For a setup example see [./examples/browser.html](./examples/browser.html).
## API

@@ -46,3 +53,3 @@

```typescript
```ts
import assert from 'assert'

@@ -60,2 +67,8 @@ import { arrToBufArr, bufArrToArr } from '@ethereumjs/util'

### Buffer -> Uint8Array
With the breaking releases from Summer 2023 we have removed all Node.js specific `Buffer` usages from our libraries and replace these with [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) representations, which are available both in Node.js and the browser (`Buffer` is a subclass of `Uint8Array`).
We have converted existing Buffer conversion methods to Uint8Array conversion methods in the [@ethereumjs/util](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util) `bytes` module, see the respective README section for guidance.
### BigInt Support

@@ -79,18 +92,2 @@

## Tests
Tests use mocha.
To run tests and linting: `npm test`
To auto-fix linting problems run: `npm run lint:fix`
## Code Coverage
Install dev dependencies: `npm install`
Run coverage: `npm run coverage`
The results will be at: `coverage/lcov-report/index.html`
## EthereumJS

@@ -97,0 +94,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