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

@nomicfoundation/ethereumjs-rlp

Package Overview
Dependencies
Maintainers
2
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 4.0.3 to 5.0.0

4

dist/index.d.ts

@@ -8,3 +8,3 @@ export declare type Input = string | number | bigint | Uint8Array | Array<Input> | null | undefined;

/**
* RLP Encoding based on https://eth.wiki/en/fundamentals/rlp
* RLP Encoding based on https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/
* This function takes in data, converts it to Uint8Array if not,

@@ -17,3 +17,3 @@ * and adds a length for recursion.

/**
* RLP Decoding based on https://eth.wiki/en/fundamentals/rlp
* RLP Decoding based on https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/
* @param input Will be converted to Uint8Array

@@ -20,0 +20,0 @@ * @param stream Is the input a stream (false by default)

@@ -5,3 +5,3 @@ "use strict";

/**
* RLP Encoding based on https://eth.wiki/en/fundamentals/rlp
* RLP Encoding based on https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/
* This function takes in data, converts it to Uint8Array if not,

@@ -15,7 +15,9 @@ * and adds a length for recursion.

const output = [];
let outputLength = 0;
for (let i = 0; i < input.length; i++) {
output.push(encode(input[i]));
const encoded = encode(input[i]);
output.push(encoded);
outputLength += encoded.length;
}
const buf = concatBytes(...output);
return concatBytes(encodeLength(buf.length, 192), buf);
return concatBytes(encodeLength(outputLength, 192), ...output);
}

@@ -22,0 +24,0 @@ const inputBuf = toBytes(input);

{
"name": "@nomicfoundation/ethereumjs-rlp",
"version": "4.0.3",
"version": "5.0.0",
"description": "Recursive Length Prefix Encoding Module",

@@ -5,0 +5,0 @@ "keywords": [

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

[Recursive Length Prefix](https://eth.wiki/en/fundamentals/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.

@@ -12,0 +12,0 @@ ## Installation

@@ -11,3 +11,3 @@ export type Input = string | number | bigint | Uint8Array | Array<Input> | null | undefined

/**
* RLP Encoding based on https://eth.wiki/en/fundamentals/rlp
* RLP Encoding based on https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/
* This function takes in data, converts it to Uint8Array if not,

@@ -21,7 +21,9 @@ * and adds a length for recursion.

const output: Uint8Array[] = []
let outputLength = 0
for (let i = 0; i < input.length; i++) {
output.push(encode(input[i]))
const encoded = encode(input[i])
output.push(encoded)
outputLength += encoded.length
}
const buf = concatBytes(...output)
return concatBytes(encodeLength(buf.length, 192), buf)
return concatBytes(encodeLength(outputLength, 192), ...output)
}

@@ -71,3 +73,3 @@ const inputBuf = toBytes(input)

/**
* RLP Decoding based on https://eth.wiki/en/fundamentals/rlp
* RLP Decoding based on https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/
* @param input Will be converted to Uint8Array

@@ -74,0 +76,0 @@ * @param stream Is the input a stream (false by default)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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