{"_id":"@ai4secops/ai4-abi-decoder","_rev":"1-81b0fe45d5e910f0eb8535c3e4a86bd4","name":"@ai4secops/ai4-abi-decoder","dist-tags":{"latest":"2.3.1"},"versions":{"2.3.0":{"name":"@ai4secops/ai4-abi-decoder","version":"2.3.0","description":"Nodejs and Javascript library for decoding data params and events from ethereum transactions\"","main":"index.js","scripts":{"pretest":"eslint --ignore-path .eslintignore .","test":"mocha test","dist":"webpack"},"repository":{"type":"git","url":"git+https://github.com/ai4secops/ai4-abi-decoder.git"},"keywords":["ethereum","abi","decode"],"author":{"name":"ai4secops@gmail.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/ai4secops/ai4-abi-decoder/issues"},"homepage":"https://github.com/ai4secops/ai4-abi-decoder#readme","dependencies":{"web3-eth-abi":"^1.2.1","web3-utils":"^1.2.1"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-transform-modules-amd":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/runtime":"^7.3.1","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","eslint":"^6.0.1","json-loader":"^0.5.7","mocha":"^5.2.0","webpack":"^4.29.1","webpack-cli":"^3.2.3"},"directories":{"test":"test"},"gitHead":"de3ec175166a8d09ad0c2f6cea4ac1663752034f","_id":"@ai4secops/ai4-abi-decoder@2.3.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-7NYCHF+n9Y0+U5GZwuyRLgX458zzvBxdvl4STM/Syg9dF9FAcS74lepPcORbhgUewzUR2g1MetBQvh/LxqbHMw==","shasum":"ba198aa6f15c2185ea4a3399e556c19213a64756","tarball":"https://registry.npmjs.org/@ai4secops/ai4-abi-decoder/-/ai4-abi-decoder-2.3.0.tgz","fileCount":11,"unpackedSize":64668,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwK9pHLKRwFzQLZMFIQtLHrFDW1uJNrnHcNaaELVgtUAIhAOn3ubs6ZONCZnojM37wUODPzppjwwhaU2bHzwxQfSes"}]},"_npmUser":{"name":"ai4secops","email":"ai4secops@gmail.com"},"maintainers":[{"name":"ai4secops","email":"ai4secops@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ai4-abi-decoder_2.3.0_1689669314316_0.1529948886343222"},"_hasShrinkwrap":false},"2.3.1":{"name":"@ai4secops/ai4-abi-decoder","version":"2.3.1","description":"Nodejs and Javascript library for decoding data params and events from ethereum transactions\"","main":"index.js","scripts":{"pretest":"eslint --ignore-path .eslintignore .","test":"mocha test","dist":"webpack"},"repository":{"type":"git","url":"git+https://github.com/ai4secops/ai4-abi-decoder.git"},"keywords":["ethereum","abi","decode"],"author":{"name":"ai4secops@gmail.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/ai4secops/ai4-abi-decoder/issues"},"homepage":"https://github.com/ai4secops/ai4-abi-decoder#readme","dependencies":{"web3-eth-abi":"^1.2.1","web3-utils":"^1.2.1"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-transform-modules-amd":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/runtime":"^7.3.1","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","eslint":"^6.0.1","json-loader":"^0.5.7","mocha":"^5.2.0","webpack":"^4.29.1","webpack-cli":"^3.2.3"},"directories":{"test":"test"},"gitHead":"c0ab2509963bffa37ccec55800a7fec0454b3c1f","_id":"@ai4secops/ai4-abi-decoder@2.3.1","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-w1PXKqgjj7Qtr9v4Nx/kpWk+DJbPU1GRLjQ4ekrkFvHPoHp0Zs33fx1SwVZVvfWvukwT0E69EcPAZRM2NtgVYA==","shasum":"a936ee5f424e9b2166adf2eb63ede2102acdf03b","tarball":"https://registry.npmjs.org/@ai4secops/ai4-abi-decoder/-/ai4-abi-decoder-2.3.1.tgz","fileCount":11,"unpackedSize":64759,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6g2BnG6fL1ZertU4KMKNmqMkbiCjW+pO3eV+LIST7UAIga4mxIV/4E6wVI+F+9vzcHW68Ymq/ZOdhjnqrpI9VtFs="}]},"_npmUser":{"name":"ai4secops","email":"ai4secops@gmail.com"},"maintainers":[{"name":"ai4secops","email":"ai4secops@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ai4-abi-decoder_2.3.1_1689669749375_0.7557628809785144"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-18T08:35:14.245Z","2.3.0":"2023-07-18T08:35:14.455Z","modified":"2023-07-18T08:42:29.741Z","2.3.1":"2023-07-18T08:42:29.587Z"},"maintainers":[{"name":"ai4secops","email":"ai4secops@gmail.com"}],"description":"Nodejs and Javascript library for decoding data params and events from ethereum transactions\"","homepage":"https://github.com/ai4secops/ai4-abi-decoder#readme","keywords":["ethereum","abi","decode"],"repository":{"type":"git","url":"git+https://github.com/ai4secops/ai4-abi-decoder.git"},"author":{"name":"ai4secops@gmail.com"},"bugs":{"url":"https://github.com/ai4secops/ai4-abi-decoder/issues"},"license":"GPL-3.0","readme":"# @ai4secops/ai4-abi-decoder fork from abi-decoder\nNodejs and Javascript library for decoding data params and events from etherem transactions\n\n# Install\n```\nnpm install @ai4secops/ai4-abi-decoder\nbower install @ai4secops/ai4-abi-decoder\n```\n\n# Instantiate\n```js\n<script src=\"bower_components/@ai4secops/ai4-abi-decoder/dist/@ai4secops/ai4-abi-decoder.js\"> // Javascript\nconst abiDecoder = require('@ai4secops/ai4-abi-decoder'); // NodeJS\n```\n\n# Add ABI's\nNeed to pass the ABI's manually to the library in order to be able to decode params later\n```js\nconst testABI = [{\"inputs\": [{\"type\": \"address\", \"name\": \"\"}], \"constant\": true, \"name\": \"isInstantiation\", \"payable\": false, \"outputs\": [{\"type\": \"bool\", \"name\": \"\"}], \"type\": \"function\"}, {\"inputs\": [{\"type\": \"address[]\", \"name\": \"_owners\"}, {\"type\": \"uint256\", \"name\": \"_required\"}, {\"type\": \"uint256\", \"name\": \"_dailyLimit\"}], \"constant\": false, \"name\": \"create\", \"payable\": false, \"outputs\": [{\"type\": \"address\", \"name\": \"wallet\"}], \"type\": \"function\"}, {\"inputs\": [{\"type\": \"address\", \"name\": \"\"}, {\"type\": \"uint256\", \"name\": \"\"}], \"constant\": true, \"name\": \"instantiations\", \"payable\": false, \"outputs\": [{\"type\": \"address\", \"name\": \"\"}], \"type\": \"function\"}, {\"inputs\": [{\"type\": \"address\", \"name\": \"creator\"}], \"constant\": true, \"name\": \"getInstantiationCount\", \"payable\": false, \"outputs\": [{\"type\": \"uint256\", \"name\": \"\"}], \"type\": \"function\"}, {\"inputs\": [{\"indexed\": false, \"type\": \"address\", \"name\": \"sender\"}, {\"indexed\": false, \"type\": \"address\", \"name\": \"instantiation\"}], \"type\": \"event\", \"name\": \"ContractInstantiation\", \"anonymous\": false}];\nabiDecoder.addABI(testABI);\n```\n\n# Decode Tx data\n```js\nconst testData = \"0x53d9d9100000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a6d9c5f7d4de3cef51ad3b7235d79ccc95114de5000000000000000000000000a6d9c5f7d4de3cef51ad3b7235d79ccc95114daa\";\nconst decodedData = abiDecoder.decodeMethod(testData);\n```\n\n# Decode Logs from Tx Receipt\n```js\nweb3.eth.getTransactionReceipt(\"0x9199e262aaab0a6ec99558b3e9f42397c07a2bb9c6befb637643aebfb03cc32a\", function(e, receipt) {\n  const decodedLogs = abiDecoder.decodeLogs(receipt.logs);\n});\n```\n","readmeFilename":"README.md"}