{"_id":"@axerunners/axe-util","_rev":"6-8e4e6424951a9369f8733e69b651edf8","time":{"2.0.3":"2018-06-19T07:16:25.281Z","created":"2018-06-19T16:11:30.009Z","2.0.4":"2018-06-19T16:11:30.351Z","modified":"2022-04-04T17:09:34.442Z","2.0.5":"2018-06-19T16:13:28.291Z"},"name":"@axerunners/axe-util","dist-tags":{"latest":"2.0.5"},"versions":{"2.0.4":{"name":"@axerunners/axe-util","version":"2.0.4","description":"Utility functions for AXE hashes and targets","main":"index.js","scripts":{"test":"standard && nyc tape test/*.js | faucet && nyc report","test-browser":"./test/browser.sh"},"keywords":["axe","axecoin","webcoin","util","utils","hash","hashes","target","blockchain","axerunners"],"author":{"name":"AXErunners"},"license":"MIT","dependencies":{"bn.js":"^4.6.4","buffer-reverse":"^1.0.1"},"devDependencies":{"faucet":"0.0.1","nyc":"^6.4.4","standard":"^7.0.0","tape":"^4.5.1","zuul":"^3.10.1","zuul-ngrok":"^4.0.0"},"repository":{"type":"git","url":"git+https://github.com/axerunners/axe-util.git"},"bugs":{"url":"https://github.com/axerunners/axe-util/issues"},"homepage":"https://github.com/axerunners/axe-util#readme","gitHead":"9f0cf131a1d85b6f74a7ba9c2b9cb2931034ef0e","_id":"@axerunners/axe-util@2.0.4","_npmVersion":"6.1.0","_nodeVersion":"10.4.0","_npmUser":{"name":"charlie137","email":"charlie@axerunners.com"},"dist":{"integrity":"sha512-xcpeBe1lg/eIGULdeiG79rsgta9JgMJRwsgYo3vPjyDmZYMIqzQ8yJio3Z0sWaCjm/1TbgkjMiHQraDdHyVA7w==","shasum":"f03c0b79e75a98900be1bf2f1ba10542f7052348","tarball":"https://registry.npmjs.org/@axerunners/axe-util/-/axe-util-2.0.4.tgz","fileCount":8,"unpackedSize":8163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKSsyCRA9TVsSAnZWagAAXsUP/A+PWfZIRD6Xu6kc2pVV\nU1VhMshQd1bNliigtxphiF8EWQJyOcjurSCMNjbgxLYFZBN3KKj7nMsdrnKg\nki0wawJhNwfuCeJHW69EdnjmcKUM3MM7ulFjL3Kii3tBLdf0SAcXgmIMaNNl\nVQHUhgZLHsUlSrnbpXP9CEdenxTXZFxr1C/gcxOfIGYn1JhD2X71vf0DeyVZ\nLFtiPenM359BUBd17gB4/UL5UQ1Dz4hxtwO6U7FrpputqZPR++FJLLYEb6wm\n8NQGFNuVl6wdiGpnaZm0SHzkdHd/CShrotAZTX/SuzEWXwGbY7nyy8HXJK7w\nt1rOzhHXBjVVgqOiE0RH86k/JQgJnKzXtWK3y7yviD60mezd5gZGFkTqT9Qw\n1iRKMUtUYO2qbC5skbtDRPb9UmcjaLWSfSnh85HdlQJs4OVHmu7nuuvf/myE\noEQo9oZ/cIbqk3kIhKilwu/A5ceRmx9fQ52Gfi//lWELbWqA0cOGD4vkeJJ9\nwlZUbdSYWpXvMxiiKhxbABRjnI3avOQxTOtYHtda5zQygTnE4KzvObJMzFI1\noonvCTJz1+VmnhBCAMePQ+vm1/R6Emv7Am79i17hDSLcUyGZqDXFVn2TmgV8\nmd9InP41XRwbOZ/qCxeKG1lmgI6ugdZFMHC/MzEqqZ83bvWe30AjGo1wIk6l\nyTky\r\n=5uAh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIOWatg0KrlChx4SLx62OmC6JFbaATb6TlZ6wyM+y7uQIhAK+9uyoL1PUYAqew+SAcktWamlqfM/Y1qrHybX1OKCF7"}]},"maintainers":[{"name":"charlie137","email":"charlie@axerunners.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axe-util_2.0.4_1529424690270_0.33772846988166405"},"_hasShrinkwrap":false},"2.0.5":{"name":"@axerunners/axe-util","version":"2.0.5","description":"Utility functions for AXE hashes and targets","main":"index.js","scripts":{"test":"standard && nyc tape test/*.js | faucet && nyc report","test-browser":"./test/browser.sh"},"keywords":["axe","axecoin","util","utils","hash","hashes","target","blockchain","axerunners"],"author":{"name":"AXErunners"},"license":"MIT","dependencies":{"bn.js":"^4.6.4","buffer-reverse":"^1.0.1"},"devDependencies":{"faucet":"0.0.1","nyc":"^6.4.4","standard":"^7.0.0","tape":"^4.5.1","zuul":"^3.10.1","zuul-ngrok":"^4.0.0"},"repository":{"type":"git","url":"git+https://github.com/axerunners/axe-util.git"},"bugs":{"url":"https://github.com/axerunners/axe-util/issues"},"homepage":"https://github.com/axerunners/axe-util#readme","gitHead":"9f0cf131a1d85b6f74a7ba9c2b9cb2931034ef0e","_id":"@axerunners/axe-util@2.0.5","_npmVersion":"6.1.0","_nodeVersion":"10.4.0","_npmUser":{"name":"charlie137","email":"charlie@axerunners.com"},"dist":{"integrity":"sha512-ku1kchV7DEct2ed/hZ9atNr4q0jYn4suMa3yqi7ed6yAZaAhKOaKaaP3yXbgu81ve9egark5YQdrCi2wqeGseA==","shasum":"0691a60bc6ce996675898224b59083c64466cb7e","tarball":"https://registry.npmjs.org/@axerunners/axe-util/-/axe-util-2.0.5.tgz","fileCount":8,"unpackedSize":8148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKSuoCRA9TVsSAnZWagAAPg4P/2Y+EX+f9663J9iiHm/B\n8ziPAv9sY9UoVAin79lhIRbqQTwVvZVRe3ssL4BbDUPdtUbRJZFnGQrNrkEj\nxRR0lGypk80oATwjpQJol7AX39iN7p27bZU/6mbn+KZoMDEi1iOuZDqC2A1N\nTAr3j/e+hiA2lkDSc9UORQwgLKm/Ut8Gx1JfoDa27bm96Mb88q8Lo5AX7XvO\n1OB0IwEDCvzpV32Hd4NOCdj09hSAvd4NmmbGZ9JAmKN9LvpD3b66XK5NFSL+\no6DNl1ZI0fHLCBzkEEVgboValhASivb23483ucwyUV2HYflj2YZm6ZkaMbxL\n61QaeGm6/z6XDf2zuStMkM2iKSqtZLSe0zKChyy9X/GqDdoU2yKJ+9dAfFX9\nwkMWon1J07KkwycEQLeKDnlpcLBo3oBh7NM+2zIMHTj7rsGFm9LqMo8Nvot7\nxkIX1U19w44atVFH1vBydhX6eUEpN3C2eg09GYC1FD12rtEXrJwGHz6Bxo/3\nAHozlTDfJMasH8pgpcbI0Wlh35hdLTGzYLfbZ4FmfNyBdgf8HFaog5IJexp7\nVJ+zhIHHNfMiJDB2z1OFkXW0s3zusRqdBGZboAhJ2J3kNonNVa1hecl+jMGK\nC2FEO0F7xVcrr4WPW0zE+ZLSxiqpEbcGm0ImPj7rjwZgZ3f1Jd+fV+85MCRr\nZXRU\r\n=XaAE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEw5iY8hW0KwG0Br8jmvqZ4fLkylqcQLtAcwULtam8aPAiA+ZrHyH+ir/NIaydo202Iv5U69jlSlT/brBNK24EVjvQ=="}]},"maintainers":[{"name":"charlie137","email":"charlie@axerunners.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axe-util_2.0.5_1529424808195_0.7925501120637768"},"_hasShrinkwrap":false}},"maintainers":[{"email":"bence.coronation@gmail.com","name":"ddude1"},{"email":"charlie@axerunners.com","name":"charlie137"}],"description":"Utility functions for AXE hashes and targets","homepage":"https://github.com/axerunners/axe-util#readme","keywords":["axe","axecoin","util","utils","hash","hashes","target","blockchain","axerunners"],"repository":{"type":"git","url":"git+https://github.com/axerunners/axe-util.git"},"author":{"name":"AXErunners"},"bugs":{"url":"https://github.com/axerunners/axe-util/issues"},"license":"MIT","readme":"# axe-util\n\n[![npm version](https://img.shields.io/npm/v/axe-util.svg)](https://www.npmjs.com/package/@axerunners/axe-util)\n[![Build Status](https://travis-ci.org/AXErunners/axe-util.svg?branch=master)](https://travis-ci.org/AXErunners/axe-util)\n[![Dependency Status](https://david-dm.org/AXErunners/axe-util.svg)](https://david-dm.org/AXErunners/axe-util)\n\n**Utility functions for AXE hashes and targets**\n\n## Usage\n\n`npm install @axerunners/axe-util`\n\n### Methods\n\n#### `toHash(hex)`\n\nTakes a hex string that contains a AXE hash as input, and returns a AXE-protocol-friendly little-endian Buffer. Throws an error if the hex string is not of length 64 (representing a 256-bit hash).\n\n#### `compressTarget(target)`\n\nConverts the difficulty target `target` to its compact representation (used in the \"bits\" field in block headers). `target` should be a `Buffer` (little-endian, the zeroes should be at the end). Returns a `number`.\n\n#### `expandTarget(bits)`\n\nConverts the compressed target integer `bits` to its target hash representation. Returns a `Buffer`.\n","readmeFilename":"README.md"}