Socket
Socket
Sign inDemoInstall

@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.2 to 4.0.3

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

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

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

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

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

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

@@ -9,3 +9,3 @@ # @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://eth.wiki/en/fundamentals/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://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/
* RLP Encoding based on https://eth.wiki/en/fundamentals/rlp
* This function takes in data, converts it to Uint8Array if not,

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

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

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

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

@@ -76,0 +74,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