Socket
Socket
Sign inDemoInstall

@ganache/rlp

Package Overview
Dependencies
2
Maintainers
4
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.1 to 0.8.0

8

lib/index.js

@@ -29,8 +29,8 @@ "use strict";

*/
function digest(ranges, length) {
function digest(ranges, length, offset = 0, alloc = Buffer.allocUnsafe) {
const encodedLength = encodeLength(length, 192);
const lengthEncodedLength = encodedLength.length;
const buf = Buffer.allocUnsafe(lengthEncodedLength + length);
encodedLength.copy(buf, 0, 0, lengthEncodedLength);
let offset = lengthEncodedLength;
const buf = alloc(lengthEncodedLength + length);
encodedLength.copy(buf, offset, 0, lengthEncodedLength);
offset += lengthEncodedLength;
for (let i = 0, l = ranges.length; i < l; i++) {

@@ -37,0 +37,0 @@ const range = ranges[i];

@@ -6,3 +6,3 @@ {

},
"version": "0.7.1",
"version": "0.8.0",
"description": "Recursive Length Prefix Encoding Module",

@@ -52,3 +52,3 @@ "author": "David Murdoch",

"dependencies": {
"@ganache/utils": "0.7.1",
"@ganache/utils": "0.8.0",
"rlp": "2.2.7"

@@ -64,3 +64,3 @@ },

},
"gitHead": "533f002248ad58ae670a346883fc74031637bcf5"
"gitHead": "7cba77c07030f113ddad4258fdf3dd0150f8bcbf"
}

@@ -30,3 +30,3 @@ /// <reference types="node" />

*/
export declare function digest(ranges: Readonly<Buffer[]>[], length: number): Buffer;
export declare function digest(ranges: Readonly<Buffer[]>[], length: number, offset?: number, alloc?: typeof Buffer.allocUnsafe): Buffer;
/**

@@ -33,0 +33,0 @@ * RLP Encoding based on: https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-RLP

Sorry, the diff of this file is not supported yet

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc