web3-eth-abi
Advanced tools
Comparing version 4.2.5-dev.32c8cc8.0 to 4.2.5-dev.496ed93.0
@@ -49,2 +49,2 @@ /** | ||
*/ | ||
export declare const decodeLog: <ReturnType extends DecodedParams>(inputs: Array<AbiParameter>, data: HexString, topics: string | string[]) => ReturnType; | ||
export declare const decodeLog: <ReturnType_1 extends DecodedParams>(inputs: Array<AbiParameter> | ReadonlyArray<AbiParameter>, data: HexString, topics: string | string[]) => ReturnType_1; |
@@ -63,3 +63,3 @@ import { AbiInput, HexString } from 'web3-types'; | ||
*/ | ||
export declare const decodeParametersWith: (abis: AbiInput[], bytes: HexString, loose: boolean) => { | ||
export declare const decodeParametersWith: (abis: AbiInput[] | ReadonlyArray<AbiInput>, bytes: HexString, loose: boolean) => { | ||
[key: string]: unknown; | ||
@@ -172,3 +172,3 @@ __length__: number; | ||
*/ | ||
export declare const decodeParameters: (abi: AbiInput[], bytes: HexString) => { | ||
export declare const decodeParameters: (abi: AbiInput[] | ReadonlyArray<AbiInput>, bytes: HexString) => { | ||
[key: string]: unknown; | ||
@@ -175,0 +175,0 @@ __length__: number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.encodeAddress = encodeAddress; | ||
exports.decodeAddress = decodeAddress; | ||
exports.decodeAddress = exports.encodeAddress = void 0; | ||
/* | ||
@@ -56,2 +55,3 @@ This file is part of web3.js. | ||
} | ||
exports.encodeAddress = encodeAddress; | ||
function decodeAddress(_param, bytes) { | ||
@@ -75,2 +75,3 @@ 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.encodeArray = encodeArray; | ||
exports.decodeArray = decodeArray; | ||
exports.decodeArray = exports.encodeArray = void 0; | ||
/* | ||
@@ -63,2 +62,3 @@ This file is part of web3.js. | ||
} | ||
exports.encodeArray = encodeArray; | ||
function decodeArray(param, bytes) { | ||
@@ -106,2 +106,3 @@ // eslint-disable-next-line prefer-const | ||
} | ||
exports.decodeArray = decodeArray; | ||
//# sourceMappingURL=array.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.encodeBoolean = encodeBoolean; | ||
exports.decodeBool = decodeBool; | ||
exports.decodeBool = exports.encodeBoolean = void 0; | ||
/* | ||
@@ -41,2 +40,3 @@ This file is part of web3.js. | ||
} | ||
exports.encodeBoolean = encodeBoolean; | ||
function decodeBool(_param, bytes) { | ||
@@ -56,2 +56,3 @@ 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.encodeBytes = encodeBytes; | ||
exports.decodeBytes = decodeBytes; | ||
exports.decodeBytes = exports.encodeBytes = void 0; | ||
/* | ||
@@ -73,2 +72,3 @@ This file is part of web3.js. | ||
} | ||
exports.encodeBytes = encodeBytes; | ||
function decodeBytes(param, bytes) { | ||
@@ -101,2 +101,3 @@ const [, sizeString] = param.type.split('bytes'); | ||
} | ||
exports.decodeBytes = decodeBytes; | ||
//# sourceMappingURL=bytes.js.map |
@@ -19,5 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
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; | ||
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; | ||
const web3_errors_1 = require("web3-errors"); | ||
@@ -83,2 +81,3 @@ const address_js_1 = require("./address.js"); | ||
} | ||
exports.encodeParamFromAbiParameter = encodeParamFromAbiParameter; | ||
function decodeParamFromAbiParameter(param, bytes) { | ||
@@ -111,2 +110,3 @@ if (param.type === 'string') { | ||
} | ||
exports.decodeParamFromAbiParameter = decodeParamFromAbiParameter; | ||
//# sourceMappingURL=index.js.map |
@@ -19,4 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.encodeNumber = encodeNumber; | ||
exports.decodeNumber = decodeNumber; | ||
exports.decodeNumber = exports.encodeNumber = void 0; | ||
const web3_errors_1 = require("web3-errors"); | ||
@@ -84,2 +83,3 @@ const web3_utils_1 = require("web3-utils"); | ||
} | ||
exports.encodeNumber = encodeNumber; | ||
function decodeNumber(param, bytes) { | ||
@@ -117,2 +117,3 @@ if (bytes.length < utils_js_1.WORD_SIZE) { | ||
} | ||
exports.decodeNumber = decodeNumber; | ||
//# sourceMappingURL=number.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.encodeString = encodeString; | ||
exports.decodeString = decodeString; | ||
exports.decodeString = exports.encodeString = void 0; | ||
/* | ||
@@ -31,2 +30,3 @@ This file is part of web3.js. | ||
} | ||
exports.encodeString = encodeString; | ||
function decodeString(_param, bytes) { | ||
@@ -40,2 +40,3 @@ 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.encodeTuple = encodeTuple; | ||
exports.decodeTuple = decodeTuple; | ||
exports.decodeTuple = exports.encodeTuple = void 0; | ||
/* | ||
@@ -80,2 +79,3 @@ This file is part of web3.js. | ||
} | ||
exports.encodeTuple = encodeTuple; | ||
function decodeTuple(param, bytes) { | ||
@@ -123,2 +123,3 @@ const result = { | ||
} | ||
exports.decodeTuple = decodeTuple; | ||
//# sourceMappingURL=tuple.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.encodeDynamicParams = encodeDynamicParams; | ||
exports.encodeDynamicParams = void 0; | ||
/* | ||
@@ -49,2 +49,3 @@ This file is part of web3.js. | ||
} | ||
exports.encodeDynamicParams = encodeDynamicParams; | ||
//# sourceMappingURL=utils.js.map |
import { AbiInput, HexString } from 'web3-types'; | ||
export declare function decodeParameters(abis: AbiInput[], bytes: HexString, _loose: boolean): { | ||
export declare function decodeParameters(abis: AbiInput[] | ReadonlyArray<AbiInput>, bytes: HexString, _loose: boolean): { | ||
[key: string]: unknown; | ||
__length__: number; | ||
}; |
@@ -19,3 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decodeParameters = decodeParameters; | ||
exports.decodeParameters = void 0; | ||
const web3_validator_1 = require("web3-validator"); | ||
@@ -29,2 +29,3 @@ const tuple_js_1 = require("./base/tuple.js"); | ||
} | ||
exports.decodeParameters = decodeParameters; | ||
//# sourceMappingURL=decode.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.encodeParameters = encodeParameters; | ||
exports.inferTypesAndEncodeParameters = inferTypesAndEncodeParameters; | ||
exports.inferTypesAndEncodeParameters = exports.encodeParameters = void 0; | ||
/* | ||
@@ -81,2 +80,3 @@ This file is part of web3.js. | ||
} | ||
exports.encodeParameters = encodeParameters; | ||
/** | ||
@@ -113,2 +113,3 @@ * Infer a smart contract method parameter type and then encode this parameter. | ||
} | ||
exports.inferTypesAndEncodeParameters = inferTypesAndEncodeParameters; | ||
//# sourceMappingURL=encode.js.map |
@@ -1,6 +0,6 @@ | ||
export type EncoderResult = { | ||
export declare type EncoderResult = { | ||
dynamic: boolean; | ||
encoded: Uint8Array; | ||
}; | ||
export type DecoderResult<T = unknown> = { | ||
export declare type DecoderResult<T = unknown> = { | ||
result: T; | ||
@@ -10,8 +10,8 @@ encoded: Uint8Array; | ||
}; | ||
export type NumberType = { | ||
export declare type NumberType = { | ||
signed: boolean; | ||
byteLength: number; | ||
}; | ||
export type BytesType = { | ||
export declare type BytesType = { | ||
size?: number; | ||
}; |
@@ -19,10 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
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; | ||
exports.isDynamic = exports.extractArrayType = exports.toAbiParams = exports.isAbiParameter = exports.convertExternalAbiParameter = exports.allocUnsafe = exports.alloc = exports.WORD_SIZE = void 0; | ||
const abitype_1 = require("abitype"); | ||
@@ -41,2 +34,3 @@ const web3_errors_1 = require("web3-errors"); | ||
} | ||
exports.alloc = alloc; | ||
/** | ||
@@ -55,2 +49,3 @@ * Where possible returns a Uint8Array of the requested size that references | ||
} | ||
exports.allocUnsafe = allocUnsafe; | ||
function convertExternalAbiParameter(abiParam) { | ||
@@ -60,2 +55,3 @@ var _a, _b; | ||
} | ||
exports.convertExternalAbiParameter = convertExternalAbiParameter; | ||
function isAbiParameter(param) { | ||
@@ -67,2 +63,3 @@ return (!(0, web3_utils_1.isNullish)(param) && | ||
} | ||
exports.isAbiParameter = isAbiParameter; | ||
function toAbiParams(abi) { | ||
@@ -86,2 +83,3 @@ return abi.map(input => { | ||
} | ||
exports.toAbiParams = toAbiParams; | ||
function extractArrayType(param) { | ||
@@ -104,2 +102,3 @@ const arrayParenthesisStart = param.type.lastIndexOf('['); | ||
} | ||
exports.extractArrayType = extractArrayType; | ||
/** | ||
@@ -122,2 +121,3 @@ * 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 extends DecodedParams>(inputs: Array<AbiParameter>, data: HexString, topics: string | string[]) => ReturnType; | ||
export declare const decodeLog: <ReturnType_1 extends DecodedParams>(inputs: Array<AbiParameter> | ReadonlyArray<AbiParameter>, data: HexString, topics: string | string[]) => ReturnType_1; | ||
//# sourceMappingURL=logs_api.d.ts.map |
@@ -63,3 +63,3 @@ import { AbiInput, HexString } from 'web3-types'; | ||
*/ | ||
export declare const decodeParametersWith: (abis: AbiInput[], bytes: HexString, loose: boolean) => { | ||
export declare const decodeParametersWith: (abis: AbiInput[] | ReadonlyArray<AbiInput>, bytes: HexString, loose: boolean) => { | ||
[key: string]: unknown; | ||
@@ -172,3 +172,3 @@ __length__: number; | ||
*/ | ||
export declare const decodeParameters: (abi: AbiInput[], bytes: HexString) => { | ||
export declare const decodeParameters: (abi: AbiInput[] | ReadonlyArray<AbiInput>, bytes: HexString) => { | ||
[key: string]: unknown; | ||
@@ -175,0 +175,0 @@ __length__: number; |
import { AbiInput, HexString } from 'web3-types'; | ||
export declare function decodeParameters(abis: AbiInput[], bytes: HexString, _loose: boolean): { | ||
export declare function decodeParameters(abis: AbiInput[] | ReadonlyArray<AbiInput>, bytes: HexString, _loose: boolean): { | ||
[key: string]: unknown; | ||
@@ -4,0 +4,0 @@ __length__: number; |
@@ -1,6 +0,6 @@ | ||
export type EncoderResult = { | ||
export declare type EncoderResult = { | ||
dynamic: boolean; | ||
encoded: Uint8Array; | ||
}; | ||
export type DecoderResult<T = unknown> = { | ||
export declare type DecoderResult<T = unknown> = { | ||
result: T; | ||
@@ -10,9 +10,9 @@ encoded: Uint8Array; | ||
}; | ||
export type NumberType = { | ||
export declare type NumberType = { | ||
signed: boolean; | ||
byteLength: number; | ||
}; | ||
export type BytesType = { | ||
export declare type BytesType = { | ||
size?: number; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "web3-eth-abi", | ||
"version": "4.2.5-dev.32c8cc8.0+32c8cc8", | ||
"version": "4.2.5-dev.496ed93.0+496ed93", | ||
"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.1-dev.32c8cc8.0+32c8cc8", | ||
"web3-types": "1.8.1-dev.32c8cc8.0+32c8cc8", | ||
"web3-utils": "4.3.2-dev.32c8cc8.0+32c8cc8", | ||
"web3-validator": "2.0.7-dev.32c8cc8.0+32c8cc8" | ||
"web3-errors": "1.3.1-dev.496ed93.0+496ed93", | ||
"web3-types": "1.8.1-dev.496ed93.0+496ed93", | ||
"web3-utils": "4.3.2-dev.496ed93.0+496ed93", | ||
"web3-validator": "2.0.7-dev.496ed93.0+496ed93" | ||
}, | ||
@@ -67,5 +67,5 @@ "devDependencies": { | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^5.5.4" | ||
"typescript": "^4.7.4" | ||
}, | ||
"gitHead": "32c8cc8cc8cdf0dc6c2e331b6463bccef37c3ce6" | ||
"gitHead": "496ed9379d1f8343dd7acdb03be9aa6aeafbc2c3" | ||
} |
@@ -75,3 +75,3 @@ /* | ||
export const decodeLog = <ReturnType extends DecodedParams>( | ||
inputs: Array<AbiParameter>, | ||
inputs: Array<AbiParameter> | ReadonlyArray<AbiParameter>, | ||
data: HexString, | ||
@@ -78,0 +78,0 @@ topics: string | string[], |
@@ -92,3 +92,3 @@ /* | ||
export const decodeParametersWith = ( | ||
abis: AbiInput[], | ||
abis: AbiInput[] | ReadonlyArray<AbiInput>, | ||
bytes: HexString, | ||
@@ -220,3 +220,3 @@ loose: boolean, | ||
export const decodeParameters = ( | ||
abi: AbiInput[], | ||
abi: AbiInput[] | ReadonlyArray<AbiInput>, | ||
bytes: HexString, | ||
@@ -223,0 +223,0 @@ ): { [key: string]: unknown; __length__: number } => decodeParametersWith(abi, bytes, false); |
@@ -24,3 +24,3 @@ /* | ||
export function decodeParameters( | ||
abis: AbiInput[], | ||
abis: AbiInput[] | ReadonlyArray<AbiInput>, | ||
bytes: HexString, | ||
@@ -27,0 +27,0 @@ _loose: boolean, |
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
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
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
7723
402937
189