{"_id":"solidity-sha3","_rev":"10-a313c1c30f73493aa062191114d13486","name":"solidity-sha3","description":"Solidity sha3 in Javascript","dist-tags":{"latest":"0.4.1"},"versions":{"0.0.0":{"name":"solidity-sha3","version":"0.0.0","description":"Solidity sha3 in Javascript","license":"ISC","repository":{"type":"git","url":"git+https://github.com/raineorshine/solidity-sha3.git"},"author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"engines":{"node":">=0.12.0"},"scripts":{"test":"mocha --compilers js:babel-register","build":"babel -d dist src","postinstall":"npm run build","watch":"nodemon -w src -w test -x \"npm run build && npm test\""},"keywords":["ethereum","solidity","sha","sha3","keccak"],"devDependencies":{"bignumber.js":"^2.4.0","chai":"*","mocha":"*"},"dependencies":{"babel-cli":"*","babel-preset-es2015":"*","babel-register":"*","left-pad":"^1.1.1","web3":"^0.16.0"},"gitHead":"0fade30d548d505308ef98a3b9afcd3338594d0d","bugs":{"url":"https://github.com/raineorshine/solidity-sha3/issues"},"homepage":"https://github.com/raineorshine/solidity-sha3#readme","_id":"solidity-sha3@0.0.0","_shasum":"678694232c3b65bbbfa8537a49a548b7ff235f77","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"raine","email":"raineorshine@gmail.com"},"dist":{"shasum":"678694232c3b65bbbfa8537a49a548b7ff235f77","tarball":"https://registry.npmjs.org/solidity-sha3/-/solidity-sha3-0.0.0.tgz","integrity":"sha512-O1NLBFyFMQQ9t3yXQ7YWTO/dHlcSJ4bjvL4yg2fH2/QNmI1LdgTMt6wh8ys9Y+Jwoo1emeC6sbs4o8bEaJ8edg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAk3Er9JAMTipkc3e81lP32In59o1O2McJgH364/fwwvAiAv25t0Bc7YN5B2JFDu1sLFKpnqn0Ifzwb8xVQGnZPFdQ=="}]},"maintainers":[{"name":"raine","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/solidity-sha3-0.0.0.tgz_1468793052694_0.07652184320613742"}},"0.1.0":{"name":"solidity-sha3","version":"0.1.0","description":"Solidity sha3 in Javascript","license":"ISC","repository":{"type":"git","url":"git+https://github.com/raineorshine/solidity-sha3.git"},"author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"engines":{"node":">=0.12.0"},"scripts":{"test":"mocha --compilers js:babel-register","build":"babel -d dist src","postinstall":"npm run build","watch":"nodemon -w src -w test -x \"npm run build && npm test\""},"keywords":["ethereum","solidity","sha","sha3","keccak"],"devDependencies":{"bignumber.js":"^2.4.0","chai":"*","mocha":"*"},"dependencies":{"babel-cli":"*","babel-preset-es2015":"*","babel-register":"*","left-pad":"^1.1.1","web3":"^0.16.0"},"gitHead":"d0bc5ebca53a1a94cf77e7461f3926c155cc7157","bugs":{"url":"https://github.com/raineorshine/solidity-sha3/issues"},"homepage":"https://github.com/raineorshine/solidity-sha3#readme","_id":"solidity-sha3@0.1.0","_shasum":"8547f05d5e56a55f49dc8888fd1ff162bba41fd3","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"raine","email":"raineorshine@gmail.com"},"dist":{"shasum":"8547f05d5e56a55f49dc8888fd1ff162bba41fd3","tarball":"https://registry.npmjs.org/solidity-sha3/-/solidity-sha3-0.1.0.tgz","integrity":"sha512-cXHvpldR+oD9mF/qbsNm2P361Eh7Xc2nGr0yOE/Ayg77B4/gHavAkGOMUP7l71QguQG8qhuuDC9R3wzuszh94Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpYLzLT8a1zRwi4bkvTKWddA6sDyn8Oeh9kF+7sdQeFgIgdKdBwTAa7IHQglmkJKCFOdLoEpziiKzMk0IGJ9fzwik="}]},"maintainers":[{"name":"raine","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/solidity-sha3-0.1.0.tgz_1468793074162_0.47313888813368976"}},"0.2.0":{"name":"solidity-sha3","version":"0.2.0","description":"Solidity sha3 in Javascript","license":"ISC","repository":{"type":"git","url":"git+https://github.com/raineorshine/solidity-sha3.git"},"author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"engines":{"node":">=0.12.0"},"main":"dist","scripts":{"test":"mocha --compilers js:babel-register","build":"babel -d dist src","postinstall":"npm run build","watch":"nodemon -w src -w test -x \"npm test\""},"keywords":["ethereum","solidity","sha","sha3","keccak"],"devDependencies":{"bignumber.js":"^2.4.0","chai":"*","mocha":"*"},"dependencies":{"babel-cli":"*","babel-preset-es2015":"*","babel-register":"*","left-pad":"^1.1.1","web3":"^0.16.0"},"gitHead":"1e8ea49333578a9a049d6ff4b9d28935c99768e4","bugs":{"url":"https://github.com/raineorshine/solidity-sha3/issues"},"homepage":"https://github.com/raineorshine/solidity-sha3#readme","_id":"solidity-sha3@0.2.0","_shasum":"fca9c3bc3ed3b90d26475f383e9f7e852a94f186","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"raine","email":"raineorshine@gmail.com"},"dist":{"shasum":"fca9c3bc3ed3b90d26475f383e9f7e852a94f186","tarball":"https://registry.npmjs.org/solidity-sha3/-/solidity-sha3-0.2.0.tgz","integrity":"sha512-qVMBj3NYTn1A3CWMYY24ii8y0fHTC/htVxXgguC2HZfNGjZgKAR/C/O2Qr90fAnOg6BFNmun+mA++260ZjOo5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCELWoOC9Nr0w2bIihlj6ObGPBV4u/bwo9IEsgqFe3icwIhAOn7c1EeTKRm4Pb37NUN+BUAjw0zoOHxkfGvIiz6kDQp"}]},"maintainers":[{"name":"raine","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/solidity-sha3-0.2.0.tgz_1468863673030_0.3019542002584785"}},"0.3.0":{"name":"solidity-sha3","version":"0.3.0","description":"Solidity sha3 in Javascript","license":"ISC","repository":{"type":"git","url":"git+https://github.com/raineorshine/solidity-sha3.git"},"author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"engines":{"node":">=0.12.0"},"main":"dist","scripts":{"test":"mocha --compilers js:babel-register","build":"babel -d dist src","postinstall":"npm run build","watch":"nodemon -w src -w test -x \"npm test\""},"keywords":["ethereum","solidity","sha","sha3","keccak"],"devDependencies":{"bignumber.js":"^2.4.0","chai":"*","mocha":"*"},"dependencies":{"babel-cli":"*","babel-preset-es2015":"*","babel-register":"*","left-pad":"^1.1.1","web3":"^0.16.0"},"gitHead":"4fbfa87d04f3f98fdf323851e0be7068d9b7915d","bugs":{"url":"https://github.com/raineorshine/solidity-sha3/issues"},"homepage":"https://github.com/raineorshine/solidity-sha3#readme","_id":"solidity-sha3@0.3.0","_shasum":"3b17592d700d5ba241083a9c82f175309cf58146","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"raine","email":"raineorshine@gmail.com"},"dist":{"shasum":"3b17592d700d5ba241083a9c82f175309cf58146","tarball":"https://registry.npmjs.org/solidity-sha3/-/solidity-sha3-0.3.0.tgz","integrity":"sha512-8ebfZh4kZxjWu4gVjaXJVK87FSKev9WqwGIVSXgJcC/mZ0D5cRhxAsyvSyDlkcG2ncyr0dq6gX1Gs8gy87D9ww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAM75gATaIjdHkstLyjDTdOak5R8sPiV2oiXkwZc/+tPAiAfBurktlWUU31ZOWKoV/CL6+D3JVom/4BAJai6CbiWWA=="}]},"maintainers":[{"name":"raine","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/solidity-sha3-0.3.0.tgz_1468864588028_0.10929748881608248"}},"0.4.0":{"name":"solidity-sha3","version":"0.4.0","description":"Solidity sha3 in Javascript","license":"ISC","repository":{"type":"git","url":"git+https://github.com/raineorshine/solidity-sha3.git"},"author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"engines":{"node":">=0.12.0"},"main":"dist","scripts":{"test":"mocha --compilers js:babel-register","build":"babel -d dist src","postinstall":"npm run build","watch":"nodemon -w src -w test -x \"npm test\""},"keywords":["ethereum","solidity","sha","sha3","keccak"],"devDependencies":{"bignumber.js":"^2.4.0","chai":"*","mocha":"*"},"dependencies":{"babel-cli":"*","babel-preset-es2015":"*","babel-register":"*","left-pad":"^1.1.1","web3":"^0.16.0"},"gitHead":"297c480ff7d5a0f126205691150d3b81942abf7a","bugs":{"url":"https://github.com/raineorshine/solidity-sha3/issues"},"homepage":"https://github.com/raineorshine/solidity-sha3#readme","_id":"solidity-sha3@0.4.0","_shasum":"beff12b962be962efcadae759f63e91c56ce91a9","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"raine","email":"raineorshine@gmail.com"},"dist":{"shasum":"beff12b962be962efcadae759f63e91c56ce91a9","tarball":"https://registry.npmjs.org/solidity-sha3/-/solidity-sha3-0.4.0.tgz","integrity":"sha512-FVrTmhJ1XgXN4XstMiWf3DyA7Zm82eURGrntBG3LzH5iQ3VBPgGy4NwEDCSj8ymBmhukV7rrpzMVABgeT4R1LQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyogrAn3cJA5WQZFj2YqtBNy7/YEHKi0mB11BU7yHtBAIhAKTYGkro66QeRDXCKg97LWZDQnJxnHGfF6puyvkvC1sN"}]},"maintainers":[{"name":"raine","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/solidity-sha3-0.4.0.tgz_1469025629492_0.3151463852263987"}},"0.4.1":{"name":"solidity-sha3","version":"0.4.1","description":"Solidity sha3 in Javascript","license":"ISC","repository":{"type":"git","url":"git+https://github.com/raineorshine/solidity-sha3.git"},"author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"engines":{"node":">=0.12.0"},"main":"dist","scripts":{"test":"mocha --compilers js:babel-register","build":"babel -d dist src","postinstall":"npm run build","watch":"nodemon -w src -w test -x \"npm test\""},"keywords":["ethereum","solidity","sha","sha3","keccak"],"devDependencies":{"bignumber.js":"^2.4.0","chai":"*","mocha":"*"},"dependencies":{"babel-cli":"*","babel-preset-es2015":"*","babel-register":"*","left-pad":"^1.1.1","web3":"^0.16.0"},"gitHead":"c1ea2354764559d106f71c196ed7784ce05cc4e3","bugs":{"url":"https://github.com/raineorshine/solidity-sha3/issues"},"homepage":"https://github.com/raineorshine/solidity-sha3#readme","_id":"solidity-sha3@0.4.1","_shasum":"17577e93f6cfd58489c4ec7f2da3047530329ec1","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"raine","email":"raineorshine@gmail.com"},"dist":{"shasum":"17577e93f6cfd58489c4ec7f2da3047530329ec1","tarball":"https://registry.npmjs.org/solidity-sha3/-/solidity-sha3-0.4.1.tgz","integrity":"sha512-kot9T9kifTIkwBhtBORgtXLkr68E20AfYX0/MMT5u/phAdFMg0DMXf4YkkJsWJhjype5gES4fxG6nA65tHPggQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmvtqUSu4sizAx23MJW1tsh66dLvzgvED6BAiAFblXsgIhAKaP1XQyak/lo0B4e3eW1O0khiAXnC40buD9btu+Q4sE"}]},"maintainers":[{"name":"raine","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/solidity-sha3-0.4.1.tgz_1469027561896_0.6392845208756626"}}},"readme":"# solidity-sha3\n[![npm version](https://img.shields.io/npm/v/solidity-sha3.svg)](https://npmjs.org/package/solidity-sha3)\n[![Build Status](https://travis-ci.org/raineorshine/solidity-sha3.svg?branch=master)](https://travis-ci.org/raineorshine/solidity-sha3)\n\n`web3.sha3` doesn't always match the behavior of `sha3` in Solidity. This one does.\n\n- Hashes integers (default size: `uint256`)\n- Hashes tightly-packed arguments\n- Supports hex strings and BigNumber instances\n\n## Install\n\n```sh\n$ npm install --save solidity-sha3\n```\n\n## Usage\n\n```js\nimport sha3 from 'solidity-sha3'\n\nsha3('a') // 0x3ac225168df54212a25c1c01fd35bebfea408fdac2e31ddd6f80a4bbf9a5f1cb\nsha3('0x0a') // 0x0ef9d8f8804d174666011a394cab7901679a8944d24249fd148a6a36071151f8\nsha3(1) // 0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6\nsha3(-1) // 0xa9c584056064687e149968cbab758a3376d22aedc6a55823d1b3ecbee81b8fb9\nsha3(new BigNumber('100')) // 0x26700e13983fefbd9cf16da2ed70fa5c6798ac55062a4803121a869731e308d2\nsha3('a', 1) // 0xb5cafab5b83d18303877bb912b2d66ca18ab7390cfd9be8a2e66cc5096e0ea02\n```\n\nYou can also hash a value at a specific size:\n\n```js\nimport { sha3withsize } from 'solidity-sha3'\n\n// same as sha3(uint32(1)) in Solidity\nsha3withsize(1, 32) // 0x51f81bcdfc324a0dff2b5bec9d92e21cbebc4d5e29d3a3d30de3e03fbeab8d7f\n\n// same as sha3(1) in Solidity\nsha3withsize(1, 8) // 0x5fe7f977e71dba2ea1a68e21057beebb9be2ac30c6410aa38d4f3fbe41dcffd2\n```\n\nBe aware that strings will be converted into hex by default. You can use `sha3num` to explicitly pad and hash a string as a number. This is useful for Wei that is not a BigNumber instance:\n\n```js\nimport { sha3num } from 'solidity-sha3'\n\n// same as sha3(uint(100 ether)) in Solidity\nsha3num(web3.toWei(100)) // c7cc234d21c9cfbd4632749fd77669e7ae72f5241ce5895e410c45185a469273\n\n// otherwise, it would convert the value '100000000000000000000' to '0x56bc75e2d63100000' and then hash that\nsha3(web3.toWei(100)) // 0x44bc2093d8a26b279e2eecbfdcb9cc0b960c2141b83a29dce25f2a18c2653bfa\n```\n\n## License\n\nISC © [Raine Revere](https://github.com/raineorshine)\n","maintainers":[{"name":"raine","email":"raineorshine@gmail.com"}],"time":{"modified":"2022-06-26T22:07:09.049Z","created":"2016-07-17T22:04:13.752Z","0.0.0":"2016-07-17T22:04:13.752Z","0.1.0":"2016-07-17T22:04:35.231Z","0.2.0":"2016-07-18T17:41:15.504Z","0.3.0":"2016-07-18T17:56:30.410Z","0.4.0":"2016-07-20T14:40:30.887Z","0.4.1":"2016-07-20T15:12:43.393Z"},"homepage":"https://github.com/raineorshine/solidity-sha3#readme","keywords":["ethereum","solidity","sha","sha3","keccak"],"repository":{"type":"git","url":"git+https://github.com/raineorshine/solidity-sha3.git"},"author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"bugs":{"url":"https://github.com/raineorshine/solidity-sha3/issues"},"license":"ISC","readmeFilename":"README.md"}