Socket
Socket
Sign inDemoInstall

@ganache/utils

Package Overview
Dependencies
20
Maintainers
4
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.0 to 0.7.0

lib/src/utils/signature.js

3

lib/src/things/json-rpc/input-parsers.js

@@ -34,5 +34,2 @@ "use strict";

function parseAndValidateBigIntInput(input) {
if (input === 0n) {
return BUFFER_EMPTY;
}
if (input < 0n) {

@@ -39,0 +36,0 @@ throw new Error("Cannot wrap a negative value as a json-rpc type");

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

const common_1 = require("../common");
const constants_1 = require("./constants");
const uint_to_buffer_1 = require("./uint-to-buffer");

@@ -26,3 +27,6 @@ const allocUnsafe = Buffer.allocUnsafe;

_bigIntToBuffer = (value) => {
if (value <= MAX_SAFE_INTEGER) {
if (value === 0n) {
return constants_1.BUFFER_EMPTY;
}
else if (value <= MAX_SAFE_INTEGER) {
return (0, uint_to_buffer_1.uintToBuffer)(Number(value));

@@ -38,3 +42,6 @@ }

_bigIntToBuffer = (value) => {
if (value <= MAX_SAFE_INTEGER) {
if (value === 0n) {
return constants_1.BUFFER_EMPTY;
}
else if (value <= MAX_SAFE_INTEGER) {
// if this value can be handled as a JS number safely, convert it that way

@@ -41,0 +48,0 @@ return (0, uint_to_buffer_1.uintToBuffer)(Number(value));

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

}
throw new Error(`The method ${methodName} does not exist/is not available`);
throw new Error(`The method ${String(methodName)} does not exist/is not available`);
}

@@ -75,0 +75,0 @@ }

@@ -31,2 +31,3 @@ "use strict";

__exportStar(require("./min-max"), exports);
__exportStar(require("./signature"), exports);
//# sourceMappingURL=index.js.map

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

},
"version": "0.6.0",
"version": "0.7.0",
"description": "Utility functions for @ganache packages",

@@ -51,2 +51,3 @@ "author": "David Murdoch <david@trufflesuite.com> (https://davidmurdoch.com)",

"dependencies": {
"@ganache/secp256k1": "0.5.0",
"emittery": "0.10.0",

@@ -63,4 +64,4 @@ "keccak": "3.0.2",

"sinon": "11.1.2",
"ts-node": "10.4.0",
"typescript": "4.6.4"
"ts-node": "10.9.1",
"typescript": "4.7.4"
},

@@ -70,3 +71,3 @@ "optionalDependencies": {

},
"gitHead": "d8cfb81e279993ea6b2fc0f70854cac8a56aa706"
"gitHead": "5d4deb3e5fed45765e611b5ef4ada4e329e7365e"
}

@@ -15,2 +15,3 @@ export * from "./bigint-to-buffer";

export * from "./min-max";
export * from "./signature";
//# sourceMappingURL=index.d.ts.map

@@ -82,3 +82,3 @@ import { OverloadedParameters } from "../types";

(...args: infer A2_4): infer R2_4;
} ? ((...args: A1_4) => R1_4) | ((...args: A2_4) => R2_4) : T extends (...args: infer A1_5) => infer R1_5 ? (...args: A1_5) => R1_5 : never> extends infer I ? unknown[] extends I ? never : I : Parameters<T extends {
} ? ((...args: A1_4) => R1_4) | ((...args: A2_4) => R2_4) : T extends (...args: infer A1_5) => infer R1_5 ? (...args: A1_5) => R1_5 : never> extends infer T_1 ? T_1 extends Parameters<T extends {
(...args: infer A1): infer R1;

@@ -108,3 +108,3 @@ (...args: infer A2): infer R2;

(...args: infer A2_4): infer R2_4;
} ? ((...args: A1_4) => R1_4) | ((...args: A2_4) => R2_4) : T extends (...args: infer A1_5) => infer R1_5 ? (...args: A1_5) => R1_5 : never>) => Promise<{
} ? ((...args: A1_4) => R1_4) | ((...args: A2_4) => R2_4) : T extends (...args: infer A1_5) => infer R1_5 ? (...args: A1_5) => R1_5 : never> ? T_1 extends unknown ? never : T_1 : never : never) => Promise<{
value: ReturnType<T>;

@@ -111,0 +111,0 @@ }>;

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

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

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