{"_id":"@alayanetwork/eth-sig-util","_rev":"1-ad42f665dba0d4910c679107e7efa1c4","name":"@alayanetwork/eth-sig-util","dist-tags":{"latest":"2.5.3"},"versions":{"2.5.3":{"name":"@alayanetwork/eth-sig-util","version":"2.5.3","description":"A few useful functions for signing platon data","main":"index.js","scripts":{"build":"tsc --project .","lint":"eslint . --ext .ts,.js","test":"yarn build && node test/index.js","test:browser":"yarn build && browserify test/index.js > test/bundle.js && echo ';window.close();' >> test/bundle.js && cat test/bundle.js | smokestack","prepublishOnly":"yarn build"},"repository":{"type":"git","url":"git+ssh://git@github.com/AlayaNetwork/samurai-eth-sig-util.git"},"keywords":["platon","signature"],"author":{"name":"Dan Finlay"},"license":"ISC","bugs":{"url":"https://github.com/AlayaNetwork/samurai-eth-sig-util/issues"},"homepage":"https://github.com/AlayaNetwork/samurai-eth-sig-util#readme","resolutions":{"smokestack/minimist":"^1.2.5","smokestack/shoe/sockjs/node-uuid":"^1.4.4"},"dependencies":{"buffer":"^5.2.1","elliptic":"^6.4.0","ethereumjs-abi":"0.6.5","@alayanetwork/ethereumjs-util":"^5.2.0","tweetnacl":"^1.0.0","tweetnacl-util":"^0.15.0"},"devDependencies":{"@metamask/eslint-config":"^2.0.0","@types/node":"^10.17.13","@typescript-eslint/eslint-plugin":"^2.20.0","@typescript-eslint/parser":"^2.20.0","browserify":"^16.5.1","eslint":"^6.8.0","eslint-plugin-import":"^2.20.1","smokestack":"^3.6.0","tape":"^4.9.1","typescript":"^3.9.2"},"gitHead":"40a313ac46a3077095a77453742c8a3531329c85","_id":"@alayanetwork/eth-sig-util@2.5.3","_nodeVersion":"14.12.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-2PUgLA6CX98wcRGrf3XpFB+nSkXATcVAQbIoPlFjTgh6l2mV0dJGBjQG2nAKR+QJar/sVi7mVFpbg2667OIaHQ==","shasum":"0007e22be035c6d29abd78db12a974bbeeee4ec3","tarball":"https://registry.npmjs.org/@alayanetwork/eth-sig-util/-/eth-sig-util-2.5.3.tgz","fileCount":6,"unpackedSize":39692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfo2FMCRA9TVsSAnZWagAATCwP+wbpKXXHQ2+7PC3zkmWt\nTeTzFCyiBshKiAG6VNlbbPgrIKyO3JI0UWf02tXS6z5PQS3NQsQghJiNhKux\n8UbcQtmEaN5RDzIG8m6tvnr0qsBT0vxCUG80q8/JzQB1UhpnlPeZYyCoF64d\nDSQpa9fNSxxcCHIH+nmX6KF8goiJ6HAlKmh14NPLP38NBxgs/C6JU83qhyoH\nTxdJDNZpN1SYkdS9ZIeNF+0mir8bKU0hyrrxGSjpmTuJGtAO2Zk/ZBrTlfcx\nvfbz6grho7VEnieAZJ6Nlr3xeEY3ajyBV2CHtqIHJNak/6pKirf3+ratSN4u\nmbFvYX22/354E3+vwSGfuJOOPA+b7FKfAuqepL/4awG/Vs7LQgwMYURrLn0R\nxTLBkw6c7Tr+tUOSokuSNkNwiKmc0NyVXoAflyAvgjVW9U6JnSu5Y1ByhMZD\n5hqicPvCAvHXZ2z0k+YSxh0KmHqY1aYKCZPsaMd5QWeihdHJG0BoASPfi7Wf\n/H2T/a/6H1tqMqBF6UdOeAU8O1oQ/O3JuvSaNPLHPh58qnC3+p6Nhhic/PTj\nA6xbnq7KYJoDn5pPDpjeHC1Ld3Imme/jkg2vpHl/AAKudLpmkB0H+P+xzzeD\nS02elLVfA++R/F1+xzQqe6NQwHNZfsT/BqEH4EwsA2diLyBmUDh+MIoT+6Mo\nkzmx\r\n=m4sn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdCxtrLJ8+tUEONl+ndH98GeoH9cjfF3dUiwOJxv5M+QIhAJPsfq1bkl32m2ir4X0EWBVsPbon+GcqxjYwQ+iFs60Q"}]},"_npmUser":{"name":"alayanetwork","email":"npm@latticex.foundation"},"directories":{},"maintainers":[{"name":"alayanetwork","email":"npm@latticex.foundation"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eth-sig-util_2.5.3_1604542796260_0.19880382732683222"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-05T02:19:56.228Z","2.5.3":"2020-11-05T02:19:56.383Z","modified":"2022-04-04T12:33:53.242Z"},"maintainers":[{"name":"alayanetwork","email":"npm@latticex.foundation"}],"description":"A few useful functions for signing platon data","homepage":"https://github.com/AlayaNetwork/samurai-eth-sig-util#readme","keywords":["platon","signature"],"repository":{"type":"git","url":"git+ssh://git@github.com/AlayaNetwork/samurai-eth-sig-util.git"},"author":{"name":"Dan Finlay"},"bugs":{"url":"https://github.com/AlayaNetwork/samurai-eth-sig-util/issues"},"license":"ISC","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```\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\n","readmeFilename":"README.md"}