Socket
Socket
Sign inDemoInstall

web3-validator

Package Overview
Dependencies
Maintainers
5
Versions
305
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-validator - npm Package Compare versions

Comparing version 2.0.6-dev.a173a8f.0 to 2.0.6-dev.ac2e180.0

2

lib/commonjs/utils.js

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

abiType = abi.type;
abiName = abi.name;
abiName = abi.name || `${level}/${index}`;
abiComponents = abi.components;

@@ -117,0 +117,0 @@ // If its short form string value e.g. ['uint']

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

*/
const isUint8Array = (data) => { var _a; return data instanceof Uint8Array || ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array'; };
const isUint8Array = (data) => { var _a, _b; return data instanceof Uint8Array || ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array' || ((_b = data === null || data === void 0 ? void 0 : data.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'Buffer'; };
exports.isUint8Array = isUint8Array;

@@ -28,0 +28,0 @@ const isBytes = (value, options = {

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

const bigintPower = (base, expo) => {
// edge case
if (expo === BigInt(0)) {
return BigInt(1);
}
let res = base;

@@ -33,0 +37,0 @@ for (let index = 1; index < expo; index += 1) {

@@ -110,3 +110,3 @@ /*

abiType = abi.type;
abiName = abi.name;
abiName = abi.name || `${level}/${index}`;
abiComponents = abi.components;

@@ -113,0 +113,0 @@ // If its short form string value e.g. ['uint']

@@ -22,3 +22,3 @@ /*

*/
export const isUint8Array = (data) => { var _a; return data instanceof Uint8Array || ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array'; };
export const isUint8Array = (data) => { var _a, _b; return data instanceof Uint8Array || ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array' || ((_b = data === null || data === void 0 ? void 0 : data.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'Buffer'; };
export const isBytes = (value, options = {

@@ -25,0 +25,0 @@ abiType: 'bytes',

@@ -27,2 +27,6 @@ /*

export const bigintPower = (base, expo) => {
// edge case
if (expo === BigInt(0)) {
return BigInt(1);
}
let res = base;

@@ -29,0 +33,0 @@ for (let index = 1; index < expo; index += 1) {

{
"name": "web3-validator",
"version": "2.0.6-dev.a173a8f.0+a173a8f",
"version": "2.0.6-dev.ac2e180.0+ac2e180",
"description": "JSON-Schema compatible validator for web3",

@@ -14,3 +14,2 @@ "main": "./lib/commonjs/index.js",

},
"browser": "./dist/web3-validator.min.js",
"repository": "https://github.com/ChainSafe/web3.js",

@@ -37,3 +36,3 @@ "author": "ChainSafe Systems",

"build:check": "node -e \"require('./lib')\"",
"lint": "eslint --ext .js,.ts .",
"lint": "eslint --cache --cache-strategy content --ext .ts .",
"lint:fix": "eslint --fix --ext .js,.ts .",

@@ -52,4 +51,4 @@ "format": "prettier --write '**/*'",

"util": "^0.12.5",
"web3-errors": "1.1.5-dev.a173a8f.0+a173a8f",
"web3-types": "1.5.1-dev.a173a8f.0+a173a8f",
"web3-errors": "1.1.5-dev.ac2e180.0+ac2e180",
"web3-types": "1.6.1-dev.ac2e180.0+ac2e180",
"zod": "^3.21.4"

@@ -71,3 +70,3 @@ },

},
"gitHead": "a173a8f43fc4961fd52a42aeca5854e6d023b9fd"
"gitHead": "ac2e180c3db5e734c40f994edc39382542afc289"
}

@@ -144,3 +144,3 @@ /*

abiType = abi.type;
abiName = abi.name;
abiName = abi.name || `${level}/${index}`;
abiComponents = abi.components as FullValidationSchema;

@@ -147,0 +147,0 @@ // If its short form string value e.g. ['uint']

@@ -26,3 +26,3 @@ /*

export const isUint8Array = (data: ValidInputTypes): data is Uint8Array =>
data instanceof Uint8Array || data?.constructor?.name === 'Uint8Array';
data instanceof Uint8Array || data?.constructor?.name === 'Uint8Array' || data?.constructor?.name === 'Buffer';

@@ -29,0 +29,0 @@ export const isBytes = (

@@ -31,2 +31,6 @@ /*

export const bigintPower = (base: bigint, expo: bigint) => {
// edge case
if (expo === BigInt(0)) {
return BigInt(1);
}
let res = base;

@@ -33,0 +37,0 @@ for (let index = 1; index < expo; index += 1) {

Sorry, the diff of this file is too big to display

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc