Socket
Socket
Sign inDemoInstall

abitype

Package Overview
Dependencies
Maintainers
0
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abitype - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

3

dist/cjs/human-readable/formatAbi.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatAbi = void 0;
exports.formatAbi = formatAbi;
const formatAbiItem_js_1 = require("./formatAbiItem.js");

@@ -15,3 +15,2 @@ function formatAbi(abi) {

}
exports.formatAbi = formatAbi;
//# sourceMappingURL=formatAbi.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatAbiItem = void 0;
exports.formatAbiItem = formatAbiItem;
const formatAbiParameters_js_1 = require("./formatAbiParameters.js");

@@ -22,3 +22,2 @@ function formatAbiItem(abiItem) {

}
exports.formatAbiItem = formatAbiItem;
//# sourceMappingURL=formatAbiItem.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatAbiParameter = void 0;
exports.formatAbiParameter = formatAbiParameter;
const regex_js_1 = require("../regex.js");

@@ -30,3 +30,2 @@ const tupleRegex = /^tuple(?<array>(\[(\d*)\])*)$/;

}
exports.formatAbiParameter = formatAbiParameter;
//# sourceMappingURL=formatAbiParameter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatAbiParameters = void 0;
exports.formatAbiParameters = formatAbiParameters;
const formatAbiParameter_js_1 = require("./formatAbiParameter.js");

@@ -16,3 +16,2 @@ function formatAbiParameters(abiParameters) {

}
exports.formatAbiParameters = formatAbiParameters;
//# sourceMappingURL=formatAbiParameters.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseAbi = void 0;
exports.parseAbi = parseAbi;
const signatures_js_1 = require("./runtime/signatures.js");

@@ -19,3 +19,2 @@ const structs_js_1 = require("./runtime/structs.js");

}
exports.parseAbi = parseAbi;
//# sourceMappingURL=parseAbi.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseAbiItem = void 0;
exports.parseAbiItem = parseAbiItem;
const abiItem_js_1 = require("./errors/abiItem.js");

@@ -27,3 +27,2 @@ const signatures_js_1 = require("./runtime/signatures.js");

}
exports.parseAbiItem = parseAbiItem;
//# sourceMappingURL=parseAbiItem.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseAbiParameter = void 0;
exports.parseAbiParameter = parseAbiParameter;
const abiParameter_js_1 = require("./errors/abiParameter.js");

@@ -29,3 +29,2 @@ const signatures_js_1 = require("./runtime/signatures.js");

}
exports.parseAbiParameter = parseAbiParameter;
//# sourceMappingURL=parseAbiParameter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseAbiParameters = void 0;
exports.parseAbiParameters = parseAbiParameters;
const abiParameter_js_1 = require("./errors/abiParameter.js");

@@ -36,3 +36,2 @@ const signatures_js_1 = require("./runtime/signatures.js");

}
exports.parseAbiParameters = parseAbiParameters;
//# sourceMappingURL=parseAbiParameters.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parameterCache = exports.getParameterCacheKey = void 0;
exports.parameterCache = void 0;
exports.getParameterCacheKey = getParameterCacheKey;
function getParameterCacheKey(param, type) {

@@ -9,3 +10,2 @@ if (type)

}
exports.getParameterCacheKey = getParameterCacheKey;
exports.parameterCache = new Map([

@@ -12,0 +12,0 @@ ['address', { type: 'address' }],

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.functionModifiers = exports.eventModifiers = exports.modifiers = exports.isReceiveSignature = exports.isFallbackSignature = exports.execConstructorSignature = exports.isConstructorSignature = exports.execStructSignature = exports.isStructSignature = exports.execFunctionSignature = exports.isFunctionSignature = exports.execEventSignature = exports.isEventSignature = exports.execErrorSignature = exports.isErrorSignature = void 0;
exports.functionModifiers = exports.eventModifiers = exports.modifiers = void 0;
exports.isErrorSignature = isErrorSignature;
exports.execErrorSignature = execErrorSignature;
exports.isEventSignature = isEventSignature;
exports.execEventSignature = execEventSignature;
exports.isFunctionSignature = isFunctionSignature;
exports.execFunctionSignature = execFunctionSignature;
exports.isStructSignature = isStructSignature;
exports.execStructSignature = execStructSignature;
exports.isConstructorSignature = isConstructorSignature;
exports.execConstructorSignature = execConstructorSignature;
exports.isFallbackSignature = isFallbackSignature;
exports.isReceiveSignature = isReceiveSignature;
const regex_js_1 = require("../../regex.js");

@@ -9,7 +21,5 @@ const errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;

}
exports.isErrorSignature = isErrorSignature;
function execErrorSignature(signature) {
return (0, regex_js_1.execTyped)(errorSignatureRegex, signature);
}
exports.execErrorSignature = execErrorSignature;
const eventSignatureRegex = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;

@@ -19,7 +29,5 @@ function isEventSignature(signature) {

}
exports.isEventSignature = isEventSignature;
function execEventSignature(signature) {
return (0, regex_js_1.execTyped)(eventSignatureRegex, signature);
}
exports.execEventSignature = execEventSignature;
const functionSignatureRegex = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;

@@ -29,7 +37,5 @@ function isFunctionSignature(signature) {

}
exports.isFunctionSignature = isFunctionSignature;
function execFunctionSignature(signature) {
return (0, regex_js_1.execTyped)(functionSignatureRegex, signature);
}
exports.execFunctionSignature = execFunctionSignature;
const structSignatureRegex = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;

@@ -39,7 +45,5 @@ function isStructSignature(signature) {

}
exports.isStructSignature = isStructSignature;
function execStructSignature(signature) {
return (0, regex_js_1.execTyped)(structSignatureRegex, signature);
}
exports.execStructSignature = execStructSignature;
const constructorSignatureRegex = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;

@@ -49,7 +53,5 @@ function isConstructorSignature(signature) {

}
exports.isConstructorSignature = isConstructorSignature;
function execConstructorSignature(signature) {
return (0, regex_js_1.execTyped)(constructorSignatureRegex, signature);
}
exports.execConstructorSignature = execConstructorSignature;
const fallbackSignatureRegex = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;

@@ -59,3 +61,2 @@ function isFallbackSignature(signature) {

}
exports.isFallbackSignature = isFallbackSignature;
const receiveSignatureRegex = /^receive\(\) external payable$/;

@@ -65,3 +66,2 @@ function isReceiveSignature(signature) {

}
exports.isReceiveSignature = isReceiveSignature;
exports.modifiers = new Set([

@@ -68,0 +68,0 @@ 'memory',

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseStructs = void 0;
exports.parseStructs = parseStructs;
const regex_js_1 = require("../../regex.js");

@@ -47,3 +47,2 @@ const abiItem_js_1 = require("../errors/abiItem.js");

}
exports.parseStructs = parseStructs;
const typeWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;

@@ -50,0 +49,0 @@ function resolveStructs(abiParameters, structs, ancestors = new Set()) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isValidDataLocation = exports.isSolidityKeyword = exports.isSolidityType = exports.splitParameters = exports.parseAbiParameter = exports.parseSignature = void 0;
exports.parseSignature = parseSignature;
exports.parseAbiParameter = parseAbiParameter;
exports.splitParameters = splitParameters;
exports.isSolidityType = isSolidityType;
exports.isSolidityKeyword = isSolidityKeyword;
exports.isValidDataLocation = isValidDataLocation;
const regex_js_1 = require("../../regex.js");

@@ -99,3 +104,2 @@ const abiItem_js_1 = require("../errors/abiItem.js");

}
exports.parseSignature = parseSignature;
const abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;

@@ -165,3 +169,2 @@ const abiParameterWithTupleRegex = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;

}
exports.parseAbiParameter = parseAbiParameter;
function splitParameters(params, result = [], current = '', depth = 0) {

@@ -192,3 +195,2 @@ const length = params.trim().length;

}
exports.splitParameters = splitParameters;
function isSolidityType(type) {

@@ -202,3 +204,2 @@ return (type === 'address' ||

}
exports.isSolidityType = isSolidityType;
const protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;

@@ -215,7 +216,5 @@ function isSolidityKeyword(name) {

}
exports.isSolidityKeyword = isSolidityKeyword;
function isValidDataLocation(type, isArray) {
return isArray || type === 'bytes' || type === 'string' || type === 'tuple';
}
exports.isValidDataLocation = isValidDataLocation;
//# sourceMappingURL=utils.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.narrow = void 0;
exports.narrow = narrow;
function narrow(value) {
return value;
}
exports.narrow = narrow;
//# sourceMappingURL=narrow.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isTupleRegex = exports.integerRegex = exports.bytesRegex = exports.execTyped = void 0;
exports.isTupleRegex = exports.integerRegex = exports.bytesRegex = void 0;
exports.execTyped = execTyped;
function execTyped(regex, string) {

@@ -8,3 +9,2 @@ const match = regex.exec(string);

}
exports.execTyped = execTyped;
exports.bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;

@@ -11,0 +11,0 @@ exports.integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = '1.0.3';
exports.version = '1.0.4';
//# sourceMappingURL=version.js.map

@@ -1,2 +0,2 @@

export const version = '1.0.3';
export const version = '1.0.4';
//# sourceMappingURL=version.js.map

@@ -28,3 +28,3 @@ import type { AbiStateMutability } from '../../abi.js';

parameters: string;
stateMutability?: Extract<AbiStateMutability, 'payable'>;
stateMutability?: Extract<AbiStateMutability, "payable">;
} | undefined;

@@ -31,0 +31,0 @@ export declare function isFallbackSignature(signature: string): boolean;

@@ -11,3 +11,3 @@ import type { AbiItemType, AbiType, SolidityArray, SolidityBytes, SolidityString, SolidityTuple } from '../../abi.js';

name?: string | undefined;
internalType?: string | undefined;
internalType?: import("../../abi.js").AbiInternalType | undefined;
} & {

@@ -35,3 +35,3 @@ indexed?: boolean;

name?: string | undefined;
internalType?: string | undefined;
internalType?: import("../../abi.js").AbiInternalType | undefined;
} & {

@@ -62,3 +62,3 @@ indexed?: boolean;

name?: string | undefined;
internalType?: string | undefined;
internalType?: import("../../abi.js").AbiInternalType | undefined;
} & {

@@ -91,3 +91,3 @@ indexed?: boolean;

name?: string | undefined;
internalType?: string | undefined;
internalType?: import("../../abi.js").AbiInternalType | undefined;
} & {

@@ -135,3 +135,3 @@ indexed?: boolean;

name?: string | undefined;
internalType?: string | undefined;
internalType?: import("../../abi.js").AbiInternalType | undefined;
} & {

@@ -138,0 +138,0 @@ indexed?: boolean;

@@ -1,2 +0,3 @@

export type Register = {};
export interface Register {
}
export type ResolvedRegister = {

@@ -3,0 +4,0 @@ /**

@@ -1,2 +0,2 @@

export declare const version = "1.0.3";
export declare const version = "1.0.4";
//# sourceMappingURL=version.d.ts.map
{
"name": "abitype",
"description": "Strict TypeScript types for Ethereum ABIs",
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",

@@ -6,0 +6,0 @@ "repository": "wevm/abitype",

@@ -1,2 +0,3 @@

export type Register = {}
// biome-ignore lint/suspicious/noEmptyInterface: <explanation>
export interface Register {}

@@ -3,0 +4,0 @@ // TODO: Remove deprecated properties next major version

@@ -1,1 +0,1 @@

export const version = '1.0.3'
export const version = '1.0.4'

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

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