web3-eth-abi
Advanced tools
Comparing version 4.2.4 to 4.2.5-dev.04da324.0
@@ -49,2 +49,2 @@ /** | ||
*/ | ||
export declare const decodeLog: <ReturnType_1 extends DecodedParams>(inputs: Array<AbiParameter>, data: HexString, topics: string | string[]) => ReturnType_1; | ||
export declare const decodeLog: <ReturnType extends DecodedParams>(inputs: Array<AbiParameter>, data: HexString, topics: string | string[]) => ReturnType; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeAddress = exports.encodeAddress = void 0; | ||
exports.encodeAddress = encodeAddress; | ||
exports.decodeAddress = decodeAddress; | ||
/* | ||
@@ -55,3 +56,2 @@ This file is part of web3.js. | ||
} | ||
exports.encodeAddress = encodeAddress; | ||
function decodeAddress(_param, bytes) { | ||
@@ -75,3 +75,2 @@ const addressBytes = bytes.subarray(ADDRESS_OFFSET, utils_js_1.WORD_SIZE); | ||
} | ||
exports.decodeAddress = decodeAddress; | ||
//# sourceMappingURL=address.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeArray = exports.encodeArray = void 0; | ||
exports.encodeArray = encodeArray; | ||
exports.decodeArray = decodeArray; | ||
/* | ||
@@ -62,3 +63,2 @@ This file is part of web3.js. | ||
} | ||
exports.encodeArray = encodeArray; | ||
function decodeArray(param, bytes) { | ||
@@ -106,3 +106,2 @@ // eslint-disable-next-line prefer-const | ||
} | ||
exports.decodeArray = decodeArray; | ||
//# sourceMappingURL=array.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeBool = exports.encodeBoolean = void 0; | ||
exports.encodeBoolean = encodeBoolean; | ||
exports.decodeBool = decodeBool; | ||
/* | ||
@@ -40,3 +41,2 @@ This file is part of web3.js. | ||
} | ||
exports.encodeBoolean = encodeBoolean; | ||
function decodeBool(_param, bytes) { | ||
@@ -56,3 +56,2 @@ const numberResult = (0, number_js_1.decodeNumber)({ type: 'uint8', name: '' }, bytes); | ||
} | ||
exports.decodeBool = decodeBool; | ||
//# sourceMappingURL=bool.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeBytes = exports.encodeBytes = void 0; | ||
exports.encodeBytes = encodeBytes; | ||
exports.decodeBytes = decodeBytes; | ||
/* | ||
@@ -72,3 +73,2 @@ This file is part of web3.js. | ||
} | ||
exports.encodeBytes = encodeBytes; | ||
function decodeBytes(param, bytes) { | ||
@@ -101,3 +101,2 @@ const [, sizeString] = param.type.split('bytes'); | ||
} | ||
exports.decodeBytes = decodeBytes; | ||
//# sourceMappingURL=bytes.js.map |
@@ -19,3 +19,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeParamFromAbiParameter = exports.encodeParamFromAbiParameter = exports.decodeArray = exports.encodeArray = exports.decodeTuple = exports.encodeTuple = exports.decodeString = exports.encodeString = exports.decodeNumber = exports.encodeNumber = exports.decodeBytes = exports.encodeBytes = exports.decodeBool = exports.encodeBoolean = exports.decodeAddress = exports.encodeAddress = void 0; | ||
exports.decodeArray = exports.encodeArray = exports.decodeTuple = exports.encodeTuple = exports.decodeString = exports.encodeString = exports.decodeNumber = exports.encodeNumber = exports.decodeBytes = exports.encodeBytes = exports.decodeBool = exports.encodeBoolean = exports.decodeAddress = exports.encodeAddress = void 0; | ||
exports.encodeParamFromAbiParameter = encodeParamFromAbiParameter; | ||
exports.decodeParamFromAbiParameter = decodeParamFromAbiParameter; | ||
const web3_errors_1 = require("web3-errors"); | ||
@@ -81,3 +83,2 @@ const address_js_1 = require("./address.js"); | ||
} | ||
exports.encodeParamFromAbiParameter = encodeParamFromAbiParameter; | ||
function decodeParamFromAbiParameter(param, bytes) { | ||
@@ -110,3 +111,2 @@ if (param.type === 'string') { | ||
} | ||
exports.decodeParamFromAbiParameter = decodeParamFromAbiParameter; | ||
//# sourceMappingURL=index.js.map |
@@ -19,3 +19,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeNumber = exports.encodeNumber = void 0; | ||
exports.encodeNumber = encodeNumber; | ||
exports.decodeNumber = decodeNumber; | ||
const web3_errors_1 = require("web3-errors"); | ||
@@ -83,3 +84,2 @@ const web3_utils_1 = require("web3-utils"); | ||
} | ||
exports.encodeNumber = encodeNumber; | ||
function decodeNumber(param, bytes) { | ||
@@ -117,3 +117,2 @@ if (bytes.length < utils_js_1.WORD_SIZE) { | ||
} | ||
exports.decodeNumber = decodeNumber; | ||
//# sourceMappingURL=number.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeString = exports.encodeString = void 0; | ||
exports.encodeString = encodeString; | ||
exports.decodeString = decodeString; | ||
/* | ||
@@ -30,3 +31,2 @@ This file is part of web3.js. | ||
} | ||
exports.encodeString = encodeString; | ||
function decodeString(_param, bytes) { | ||
@@ -40,3 +40,2 @@ const r = (0, bytes_js_1.decodeBytes)({ type: 'bytes', name: '' }, bytes); | ||
} | ||
exports.decodeString = decodeString; | ||
//# sourceMappingURL=string.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeTuple = exports.encodeTuple = void 0; | ||
exports.encodeTuple = encodeTuple; | ||
exports.decodeTuple = decodeTuple; | ||
/* | ||
@@ -79,3 +80,2 @@ This file is part of web3.js. | ||
} | ||
exports.encodeTuple = encodeTuple; | ||
function decodeTuple(param, bytes) { | ||
@@ -123,3 +123,2 @@ const result = { | ||
} | ||
exports.decodeTuple = decodeTuple; | ||
//# sourceMappingURL=tuple.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.encodeDynamicParams = void 0; | ||
exports.encodeDynamicParams = encodeDynamicParams; | ||
/* | ||
@@ -49,3 +49,2 @@ This file is part of web3.js. | ||
} | ||
exports.encodeDynamicParams = encodeDynamicParams; | ||
//# sourceMappingURL=utils.js.map |
@@ -19,3 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeParameters = void 0; | ||
exports.decodeParameters = decodeParameters; | ||
const web3_validator_1 = require("web3-validator"); | ||
@@ -29,3 +29,2 @@ const tuple_js_1 = require("./base/tuple.js"); | ||
} | ||
exports.decodeParameters = decodeParameters; | ||
//# sourceMappingURL=decode.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.inferTypesAndEncodeParameters = exports.encodeParameters = void 0; | ||
exports.encodeParameters = encodeParameters; | ||
exports.inferTypesAndEncodeParameters = inferTypesAndEncodeParameters; | ||
/* | ||
@@ -80,3 +81,2 @@ This file is part of web3.js. | ||
} | ||
exports.encodeParameters = encodeParameters; | ||
/** | ||
@@ -113,3 +113,2 @@ * Infer a smart contract method parameter type and then encode this parameter. | ||
} | ||
exports.inferTypesAndEncodeParameters = inferTypesAndEncodeParameters; | ||
//# sourceMappingURL=encode.js.map |
@@ -1,6 +0,6 @@ | ||
export declare type EncoderResult = { | ||
export type EncoderResult = { | ||
dynamic: boolean; | ||
encoded: Uint8Array; | ||
}; | ||
export declare type DecoderResult<T = unknown> = { | ||
export type DecoderResult<T = unknown> = { | ||
result: T; | ||
@@ -10,8 +10,8 @@ encoded: Uint8Array; | ||
}; | ||
export declare type NumberType = { | ||
export type NumberType = { | ||
signed: boolean; | ||
byteLength: number; | ||
}; | ||
export declare type BytesType = { | ||
export type BytesType = { | ||
size?: number; | ||
}; |
@@ -19,3 +19,10 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isDynamic = exports.extractArrayType = exports.toAbiParams = exports.isAbiParameter = exports.convertExternalAbiParameter = exports.allocUnsafe = exports.alloc = exports.WORD_SIZE = void 0; | ||
exports.WORD_SIZE = void 0; | ||
exports.alloc = alloc; | ||
exports.allocUnsafe = allocUnsafe; | ||
exports.convertExternalAbiParameter = convertExternalAbiParameter; | ||
exports.isAbiParameter = isAbiParameter; | ||
exports.toAbiParams = toAbiParams; | ||
exports.extractArrayType = extractArrayType; | ||
exports.isDynamic = isDynamic; | ||
const abitype_1 = require("abitype"); | ||
@@ -34,3 +41,2 @@ const web3_errors_1 = require("web3-errors"); | ||
} | ||
exports.alloc = alloc; | ||
/** | ||
@@ -49,3 +55,2 @@ * Where possible returns a Uint8Array of the requested size that references | ||
} | ||
exports.allocUnsafe = allocUnsafe; | ||
function convertExternalAbiParameter(abiParam) { | ||
@@ -55,3 +60,2 @@ var _a, _b; | ||
} | ||
exports.convertExternalAbiParameter = convertExternalAbiParameter; | ||
function isAbiParameter(param) { | ||
@@ -63,3 +67,2 @@ return (!(0, web3_utils_1.isNullish)(param) && | ||
} | ||
exports.isAbiParameter = isAbiParameter; | ||
function toAbiParams(abi) { | ||
@@ -83,3 +86,2 @@ return abi.map(input => { | ||
} | ||
exports.toAbiParams = toAbiParams; | ||
function extractArrayType(param) { | ||
@@ -102,3 +104,2 @@ const arrayParenthesisStart = param.type.lastIndexOf('['); | ||
} | ||
exports.extractArrayType = extractArrayType; | ||
/** | ||
@@ -121,3 +122,2 @@ * Param is dynamic if it's dynamic base type or if some of his children (components, array items) | ||
} | ||
exports.isDynamic = isDynamic; | ||
//# sourceMappingURL=utils.js.map |
@@ -49,3 +49,3 @@ /** | ||
*/ | ||
export declare const decodeLog: <ReturnType_1 extends DecodedParams>(inputs: Array<AbiParameter>, data: HexString, topics: string | string[]) => ReturnType_1; | ||
export declare const decodeLog: <ReturnType extends DecodedParams>(inputs: Array<AbiParameter>, data: HexString, topics: string | string[]) => ReturnType; | ||
//# sourceMappingURL=logs_api.d.ts.map |
@@ -1,6 +0,6 @@ | ||
export declare type EncoderResult = { | ||
export type EncoderResult = { | ||
dynamic: boolean; | ||
encoded: Uint8Array; | ||
}; | ||
export declare type DecoderResult<T = unknown> = { | ||
export type DecoderResult<T = unknown> = { | ||
result: T; | ||
@@ -10,9 +10,9 @@ encoded: Uint8Array; | ||
}; | ||
export declare type NumberType = { | ||
export type NumberType = { | ||
signed: boolean; | ||
byteLength: number; | ||
}; | ||
export declare type BytesType = { | ||
export type BytesType = { | ||
size?: number; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "web3-eth-abi", | ||
"version": "4.2.4", | ||
"version": "4.2.5-dev.04da324.0+04da324", | ||
"description": "Web3 module encode and decode EVM in/output.", | ||
@@ -46,6 +46,6 @@ "main": "./lib/commonjs/index.js", | ||
"abitype": "0.7.1", | ||
"web3-errors": "^1.3.0", | ||
"web3-types": "^1.8.0", | ||
"web3-utils": "^4.3.1", | ||
"web3-validator": "^2.0.6" | ||
"web3-errors": "1.3.1-dev.04da324.0+04da324", | ||
"web3-types": "1.8.1-dev.04da324.0+04da324", | ||
"web3-utils": "4.3.2-dev.04da324.0+04da324", | ||
"web3-validator": "2.0.7-dev.04da324.0+04da324" | ||
}, | ||
@@ -67,5 +67,5 @@ "devDependencies": { | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^4.7.4" | ||
"typescript": "^5.5.4" | ||
}, | ||
"gitHead": "07993314c5db2dfaedb51bf1243c99568b6e070f" | ||
"gitHead": "04da324744d2e8d8b358cd4ccf0e97c08d635be3" | ||
} |
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
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
406365
191
7713
2
1
- Removed@noble/curves@1.4.2(transitive)
- Removed@noble/hashes@1.4.0(transitive)
- Removed@scure/base@1.1.9(transitive)
- Removed@scure/bip32@1.4.0(transitive)
- Removed@scure/bip39@1.3.0(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedethereum-cryptography@2.2.1(transitive)
- Removedeventemitter3@5.0.1(transitive)
- Removedfor-each@0.3.3(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-arguments@1.1.1(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-generator-function@1.0.10(transitive)
- Removedis-typed-array@1.1.13(transitive)
- Removedpossible-typed-array-names@1.0.0(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedutil@0.12.5(transitive)
- Removedweb3-errors@1.3.0(transitive)
- Removedweb3-types@1.9.0(transitive)
- Removedweb3-utils@4.3.2(transitive)
- Removedweb3-validator@2.0.6(transitive)
- Removedwhich-typed-array@1.1.15(transitive)
- Removedzod@3.23.8(transitive)