{"name":"eth-sig-util","version":"2.0.1","keywords":["ethereum","signature"],"author":{"name":"Dan Finlay"},"license":"ISC","_id":"eth-sig-util@2.0.1","maintainers":[{"name":"danfinlay","email":"dan@danfinlay.com"},{"name":"kumavis","email":"aaron@kumavis.me"}],"homepage":"https://github.com/flyswatter/eth-sig-util#readme","bugs":{"url":"https://github.com/flyswatter/eth-sig-util/issues"},"dist":{"shasum":"0aff75e56d1444deefbb2d80a7cd49367a2f7ee3","tarball":"http://registry-npm.ywwl.com/eth-sig-util/download/eth-sig-util-2.0.1.tgz","fileCount":5,"integrity":"sha512-lxHZOQspexk3DaGj4RBbWy4C/qNOWRnxpaJzNnYD3WEmC8shcJ4tHs7Xv878rzvILfJnSFSCCiKQhng1m80oBQ==","signatures":[{"sig":"MEYCIQCzaUP5EnfUbvFy+ayd/ozCeoEpyKVIv5VVcQ7NQT4csQIhAJ/bR0WZ2g7WeVqRssANDwhSFu9ftwGnlS6WENJirO79","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbSQuzCRA9TVsSAnZWagAAY+IP/0SpkJG88G2ugjy3EC+n\n2ht9l3R1N6buOzWG5LJwlE/3vsVi121p3Bi9KxZdxSegUvpurvuF7vacpf3X\nrqd5A+qS4blGMe4d72+FPYZ76AjWx6KjpDt3896HrSEucl5dhTnuRKaYvq+Y\nvWlFuPpACIadCfWDs5+wZ3QgC8nHnbDHk9wy/Wf3/pFCRi+QW69PYZOqHR01\no91/Ir5dOZBh85VTCkEgahaLGZe156l0yc6riYTPIXlhIg978zLONAX+smzA\n1Vfy+ax/ehU5RLdCwRYik9jk0iojOGP3+e2BKdgeWMU3+Ap/AhNTpxn8Azbz\nfe7OFxijkM43N3fdaMXjQXrrj08fPaKt7isoHLhl9gOWJ1Gxb3XVBMe0T3DZ\nhdWPopmsahdqdGPIKCHTKhwHgjmwwNg0iYcnUv7rLghg5MgSs1/143G6rTgl\njKxFTbnLwVIu3naQL3fYoG65sK3lWEDu2cZPA9kyz3UJBUWQxtuZA79KdSUI\n5SMjIX07VC7kpiVlgwE71myvxWbqrcn72tiuzIhs2/pz75p58IcD05Vrfllz\nsqGwfwUkJH5IJFR/Yk2MgBD3CFYVy1BVOG0iAeaIM4ttw6OM697lwlIYb6wD\nVDduuAPiOiuDjsfLBR89IJz0nFsPHmAQ05uHXllXTzX6ljyYkzW4jkeTuIfA\nvTqK\r\n=SMtd\r\n-----END PGP SIGNATURE-----\r\n","size":6720,"noattachment":false,"key":"/eth-sig-util/-/eth-sig-util-2.0.1.tgz"},"main":"index.js","gitHead":"8401e35e4bac43f0f520b6be030054a955849893","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/flyswatter/eth-sig-util.git","type":"git"},"_npmVersion":"6.1.0","description":"A few useful functions for signing ethereum data","directories":{},"_nodeVersion":"9.4.0","dependencies":{"ethereumjs-abi":"git+https://github.com/ethereumjs/ethereumjs-abi.git","ethereumjs-util":"^5.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.6.3","mocha":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eth-sig-util_2.0.1_1531513779875_0.871704638082242","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":1531513779928,"_cnpm_publish_time":1531513779928,"dist-tags":{"latest":"3.0.1"}}