{"name":"eth-sig-util","version":"2.5.1","keywords":["ethereum","signature"],"author":{"name":"Dan Finlay"},"license":"ISC","_id":"eth-sig-util@2.5.1","maintainers":[{"name":"brunobar79","email":"brunobar79@gmail.com"},{"name":"danfinlay","email":"dan@danfinlay.com"},{"name":"kumavis","email":"aaron@kumavis.me"},{"name":"rekmarks","email":"rekmarks@protonmail.com"},{"name":"whymarrh","email":"whymarrh.whitby@gmail.com"}],"homepage":"https://github.com/MetaMask/eth-sig-util#readme","bugs":{"url":"https://github.com/MetaMask/eth-sig-util/issues"},"dist":{"shasum":"13e52237dc83f8c240fe730b69a36f424d9a3abc","tarball":"http://registry-npm.ywwl.com/eth-sig-util/download/eth-sig-util-2.5.1.tgz","fileCount":8,"integrity":"sha512-F5k+6gdSphUtHwCsj0QD59gwxxXoG+ZiFODgTiGS7xc53tPcjBSdBRuhcXdLwXGiytsjk+77oYQRRYeAKXIjBQ==","signatures":[{"sig":"MEQCIDFbs1ZR7If6WVEJmjQplNUguXLkeNZQDariruyDyPV1AiBqDGKUsPxwOPwzPdYxsxjDs+/Kcu4/6YJoGq/vPHpf1g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1xMnCRA9TVsSAnZWagAAnKYQAIv/PcepreK6o04E3zDa\nghuk3954egIn++ps+1FRIK0gyd8k1/5mGkkBXRoBbfE/5xJTRkk5ostTadc4\nDao3InsbZ53OlDn7AbF1aacTLNN99VAc6ZdE09J1NWT01eRrbRUxOppKqGhg\nlJJdhljJCQc6Vq+XwK69N3McU6yy2w2Fpi2I4ofxDhWPtPDZnvf7bsDfEs0v\n1uE3PNS9iOA5+QQ89GiZy08+19+/zhWshc8KjSF1UDLHnCKSlx2cst9hhv81\n7z3RaXLPqHEHNt6bJ9XHKkFw0l8QvXrLsx1Uw5dgfIGrJK3gpHHBxfPuk7Eh\nFeboRshouscvp6zwckqXEv65tV1U+GyaXh3GVVx+rkQu7pFSEAhZAifMOz5s\nF8X4dIxkuVPYh2FfFSUW582quugcpx6UqvGRxiZ+dSKI/AqxrkVPJqkGcnL/\np54VpojyPGZ3FtwI2Xx6I/xCNQdMuYJzgjsHj40w6zN/alC33RXsV4I4xBts\n8brF1ozcwUA4coRq8QjNF+wlK8xXuxxyUy1tSy8/8Bli6ekHTSz2d3jp1uts\nCO2gH/MOftBQOkebG17mo+r4yTWhfuUP2D/6JPkODs4lT1npUL9cEWs1G7R8\n7IT2BX+e/u0zQA7LtnI2HNRa72vwwUdmw1ve0wLJqyMMgZjv/cx4ErJi/wYl\nwt9p\r\n=Ig4L\r\n-----END PGP SIGNATURE-----\r\n","size":14058,"noattachment":false,"key":"/eth-sig-util/-/eth-sig-util-2.5.1.tgz"},"main":"index.js","gitHead":"dccc4dcecbdd160e95b36f277af7f5b6d13f365f","scripts":{"test":"node test/index.js"},"_npmUser":{"name":"danfinlay","email":"dan@danfinlay.com"},"deprecated":"Deprecated in favor of '@metamask/eth-sig-util'","repository":{"url":"git+ssh://git@github.com/MetaMask/eth-sig-util.git","type":"git"},"_npmVersion":"6.10.3","description":"A few useful functions for signing ethereum data","directories":{},"_nodeVersion":"12.10.0","dependencies":{"buffer":"^5.2.1","elliptic":"^6.4.0","tweetnacl":"^1.0.0","ethereumjs-abi":"0.6.5","tweetnacl-util":"^0.15.0","ethereumjs-util":"^5.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/eth-sig-util_2.5.1_1574376231448_0.08915827638038487","host":"s3://npm-registry-packages"},"readme":"# Eth-Sig-Util [![CircleCI](https://circleci.com/gh/MetaMask/eth-sig-util.svg?style=svg)](https://circleci.com/gh/MetaMask/eth-sig-util)\n\nA small collection of ethereum signing functions.\n\nYou can find usage examples [here](https://github.com/danfinlay/js-eth-personal-sign-examples)\n\n[Available on NPM](https://www.npmjs.com/package/eth-sig-util)\n\n## Installation\n\n```shell\nnpm install eth-sig-util --save\n```\n\n## Methods\n\n### concatSig(v, r, s)\n\nAll three arguments should be provided as buffers.\n\nReturns a continuous, hex-prefixed hex value for the signature, suitable for inclusion in a JSON transaction's data field.\n\n### normalize(address)\n\nTakes an address of either upper or lower case, with or without a hex prefix, and returns an all-lowercase, hex-prefixed address, suitable for submitting to an ethereum provider.\n\n### personalSign (privateKeyBuffer, msgParams)\n\nmsgParams should have a `data` key that is hex-encoded data to sign.\n\nReturns the prefixed signature expected for calls to `eth.personalSign`.\n\n### recoverPersonalSignature (msgParams)\n\nmsgParams should have a `data` key that is hex-encoded data unsigned, and a `sig` key that is hex-encoded and already signed.\n\nReturns a hex-encoded sender address.\n\n### signTypedData (privateKeyBuffer, msgParams)\n\nSigns typed data as per [an early draft of EIP 712](https://github.com/ethereum/EIPs/pull/712/commits/21abe254fe0452d8583d5b132b1d7be87c0439ca).\n\nData should be under `data` key of `msgParams`. The method returns prefixed signature.\n\n### signTypedData_v3 (privateKeyBuffer, msgParams)\n\nSigns typed data as per the published version of [EIP 712](https://github.com/ethereum/EIPs/pull/712).\n\nData should be under `data` key of `msgParams`. The method returns prefixed signature.\n\n### signTypedData_v4 (privateKeyBuffer, msgParams)\n\nSigns typed data as per an extension of the published version of [EIP 712](https://github.com/MetaMask/eth-sig-util/pull/54).\n\nThis extension adds support for arrays and recursive data types.\n\nData should be under `data` key of `msgParams`. The method returns prefixed signature.\n\n### recoverTypedSignature ({data, sig})\n\nReturn address of a signer that did `signTypedData`.\n\nExpects the same data that were used for signing. `sig` is a prefixed signature.\n\n### recoverTypedSignature_V4 ({data, sig})\n\nReturn address of a signer that did `signTypedData` as per an extension of the published version of [EIP 712](https://github.com/MetaMask/eth-sig-util/pull/54).\n\nThis extension adds support for arrays and recursive data types.\n\nExpects the same data that were used for signing. `sig` is a prefixed signature.\n\n### typedSignatureHash (typedData)\n\nReturn hex-encoded hash of typed data params according to [EIP712](https://github.com/ethereum/EIPs/pull/712) schema.\n\n### extractPublicKey (msgParams)\n\nmsgParams should have a `data` key that is hex-encoded data unsigned, and a `sig` key that is hex-encoded and already signed.\n\nReturns a hex-encoded public key.\n","publish_time":1574376231584,"_cnpm_publish_time":1574376231584,"dist-tags":{"latest":"3.0.1"}}