{"name":"eth-sig-util","version":"3.0.1","keywords":["ethereum","signature"],"author":{"name":"Dan Finlay"},"license":"ISC","_id":"eth-sig-util@3.0.1","maintainers":[{"name":"danfinlay","email":"dan@danfinlay.com"},{"name":"kumavis","email":"aaron@kumavis.me"},{"name":"rekmarks","email":"rekmarks@protonmail.com"},{"name":"estebanmino","email":"efmino@uc.cl"},{"name":"metamaskbot","email":"security@metamask.io"},{"name":"gudahtt","email":"markjstacey@gmail.com"}],"homepage":"https://github.com/MetaMask/eth-sig-util#readme","bugs":{"url":"https://github.com/MetaMask/eth-sig-util/issues"},"dist":{"shasum":"8753297c83a3f58346bd13547b59c4b2cd110c96","tarball":"http://registry-npm.ywwl.com/eth-sig-util/download/eth-sig-util-3.0.1.tgz","fileCount":7,"integrity":"sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==","signatures":[{"sig":"MEUCICMxcakp6fYlcycJKMput5XmO5fXSfKEfE1uAUL6E/F9AiEAvN9u+YFyqO6ZDT9xMLoRCg1dIV+6apKCeygxNl9Mczw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2qTaCRA9TVsSAnZWagAA+GgP+QEnwxBoxdbrYaOEucq2\naK9qybl+zZ1RsemShuX25cLEwlZUVfwEfX/TTUnok7o7bqMjZlqmk6doqMxG\nJJoJAqCJvXhlTV6MXEe7TceAV2RNlDt99b8UEbzbhlhN/syWpuN22edd2+NV\nlBAJDeqoSqXhF/NRj5HQYqLZx6OxNi9mjWgNmkhgqx2CqcPN59KCq9eQNLjt\nvKUFQ3aMJ5rg98gIGt63a9RX4CJ3Ga4BAyjrZf4b7/BAUGDN6fSi/PSHCuUe\n1yv+jFB/pdSmbeBukp7pfWPuxxczmr0nXoR4QCU3000PR/CPYv0I5RBq8YsQ\nraFNhSjxgvZijtNgKG+B6C7ztGA4k8GfjV4DeJGj+ey+nXmOM5qbde2fzHrJ\n3rCVC1uvN8mKYvaCFAuJ1QqeTkvIuHYxFbYOV4y5CgOLKPoi7UAGBiK9JZD4\nb4j3iYZum/qQaZghzNALb16S+8dFa6DTT9WnLruqBh/KkSKz12xS3+uxq6bf\nuWEbyT7j5G0ZmP0hOoPdqyqjBPubxafNd/1+BHzLnhLtoUaUTWs+OIPvf8nn\nWAThYtTU7hRQKap1cwebUjWyP1T9GIW890/96MyeLJyoDWQM1DQQy2Zog2Q0\n6B6McFqb6+NsCzUhsrzzHfgvYVZcfKmHFvxQ+MoB2Sh+pmuyqa7wEgPQp4VP\nXeao\r\n=MaX7\r\n-----END PGP SIGNATURE-----\r\n","size":12336,"noattachment":false,"key":"/eth-sig-util/-/eth-sig-util-3.0.1.tgz"},"main":"dist/index.js","gitHead":"8c6112f1dc831ba4ced675b5229274242328abe1","scripts":{"lint":"eslint . --ext ts,js,json","test":"yarn build && node test/index.js","build":"tsc --project ./tsconfig.prod.json && tsc --project ./tsconfig.test.json","lint:fix":"yarn lint --fix","test:browser":"yarn build && airtap test/index.js","prepublishOnly":"yarn build"},"_npmUser":{"name":"gudahtt","email":"markjstacey@gmail.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.14.4","description":"A few useful functions for signing ethereum data","directories":{},"_nodeVersion":"10.20.1","dependencies":{"tweetnacl":"^1.0.3","ethereumjs-abi":"^0.6.8","tweetnacl-util":"^0.15.0","ethereumjs-util":"^5.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.9.1","airtap":"4.0.1","eslint":"^7.19.0","typescript":"^4.1.3","@types/node":"^14.14.25","airtap-system":"^0.0.2","eslint-plugin-json":"^2.1.2","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.22.1","@metamask/eslint-config":"^5.0.0","@typescript-eslint/parser":"^4.14.2","@typescript-eslint/eslint-plugin":"^4.14.2"},"_npmOperationalInternal":{"tmp":"tmp/eth-sig-util_3.0.1_1612493558180_0.2732002487037879","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":1612493558317,"_cnpm_publish_time":1612493558317,"dist-tags":{"latest":"3.0.1"}}