{"name":"secp256k1","version":"5.0.1","keywords":["ec","ecdh","ecdsa","secp256k1"],"author":{"name":"Martin Becze","email":"mjbecze@gmail.com"},"license":"MIT","_id":"secp256k1@5.0.1","contributors":[{"url":"https://github.com/kumavis","name":"Aaron Davis"},{"url":"https://github.com/phpb-com","name":"Ian Matyssik"},{"url":"http://kagami.genshiken.org/","name":"Kagami Hiiragi","email":"kagami@genshiken.org"},{"url":"https://github.com/ethers","name":"ethers"},{"url":"https://github.com/fanatid","name":"Kirill Fomichev","email":"fanatid@ya.ru"}],"homepage":"https://github.com/cryptocoinjs/secp256k1-node#readme","bugs":{"url":"https://github.com/cryptocoinjs/secp256k1-node/issues"},"dist":{"shasum":"dc2c86187d48ff2da756f0f7e96417ee03c414b1","tarball":"http://registry-npm.ywwl.com/secp256k1/download/secp256k1-5.0.1.tgz","fileCount":107,"integrity":"sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==","signatures":[{"sig":"MEUCIF3rHyiI0waQJwnaE3jT1L4p58AzMdet8vDjb07QxLMkAiEA0KUIFXNTlpEWJHQQnc2wlFRJmkRUpRA7hHY6zZvuUj8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1815956,"size":566310,"noattachment":false,"key":"/secp256k1/-/secp256k1-5.0.1.tgz"},"main":"./index.js","_from":"file:secp256k1-5.0.1.tgz","browser":{"./index.js":"./elliptic.js"},"engines":{"node":">=18.0.0"},"gypfile":true,"scripts":{"install":"node-gyp-build || exit 0"},"_npmUser":{"name":"fanatid","email":"fanatid@ya.ru"},"_resolved":"/home/kirill/projects/secp256k1-node/secp256k1-5.0.1.tgz","_integrity":"sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==","repository":{"url":"git+https://github.com/cryptocoinjs/secp256k1-node.git","type":"git"},"_npmVersion":"10.8.2","description":"This module provides native bindings to ecdsa secp256k1 functions","directories":{},"_nodeVersion":"22.5.1","dependencies":{"elliptic":"^6.5.7","node-addon-api":"^5.0.0","node-gyp-build":"^4.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/secp256k1_5.0.1_1729232876133_0.3039191950807716","host":"s3://npm-registry-packages"},"readme":"# secp256k1-node\n\nVersion | Mac/Linux | Windows\n------- | --------- | -------\n[![NPM Package](https://img.shields.io/npm/v/secp256k1.svg?style=flat-square)](https://www.npmjs.org/package/secp256k1) | [![Build Status](https://img.shields.io/travis/cryptocoinjs/secp256k1-node.svg?branch=master&style=flat-square)](https://travis-ci.org/cryptocoinjs/secp256k1-node) | [![AppVeyor](https://img.shields.io/appveyor/ci/fanatid/secp256k1-node.svg?branch=master&style=flat-square)](https://ci.appveyor.com/project/fanatid/secp256k1-node)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nThis module provides native bindings to [bitcoin-core/secp256k1](https://github.com/bitcoin-core/secp256k1). In browser [elliptic](https://github.com/indutny/elliptic) will be used.\n\nThis library is experimental, so use at your own risk. Works on node version 4.0.0 or greater.\n\n## Installation\n\n##### from npm\n\n`npm install secp256k1`\n\n##### from git\n\n```\ngit clone git@github.com:cryptocoinjs/secp256k1-node.git\ncd secp256k1-node\ngit submodule update --init\nnpm install\n```\n\n##### Windows\n\nThe easiest way to build the package on windows is to install [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools).\n\nOr install the following software:\n\n  * Git: https://git-scm.com/download/win\n  * nvm: https://github.com/coreybutler/nvm-windows\n  * Python 2.7: https://www.python.org/downloads/release/python-2712/\n  * Visual C++ Build Tools: http://landinghub.visualstudio.com/visual-cpp-build-tools (Custom Install, and select both Windows 8.1 and Windows 10 SDKs)\n\nAnd run commands:\n\n```\nnpm config set msvs_version 2015 --global\nnpm install npm@next -g\n```\n\nBased on:\n\n  * https://github.com/nodejs/node-gyp/issues/629#issuecomment-153196245\n  * https://github.com/nodejs/node-gyp/issues/972\n\n## Usage\n\n* [API Reference (v3.x)](https://github.com/cryptocoinjs/secp256k1-node/blob/master/API.md)\n* [API Reference (v2.x)](https://github.com/cryptocoinjs/secp256k1-node/blob/v2.x/API.md)\n\n```js\nconst { randomBytes } = require('crypto')\nconst secp256k1 = require('secp256k1')\n// or require('secp256k1/elliptic')\n//   if you want to use pure js implementation in node\n\n// generate message to sign\nconst msg = randomBytes(32)\n\n// generate privKey\nlet privKey\ndo {\n  privKey = randomBytes(32)\n} while (!secp256k1.privateKeyVerify(privKey))\n\n// get the public key in a compressed format\nconst pubKey = secp256k1.publicKeyCreate(privKey)\n\n// sign the message\nconst sigObj = secp256k1.sign(msg, privKey)\n\n// verify the signature\nconsole.log(secp256k1.verify(msg, sigObj.signature, pubKey))\n// => true\n```\n\n\\* **.verify return false for high signatures**\n\n## Second pure js implementation\n\nProject has yet one secp256k1 implementation based on [elliptic](http://github.com/indutny/elliptic) and [bn.js](http://github.com/indutny/bn.js). The main purpose of this smaller size, high performance and easy code audit. This implementation is super experimental, use it at your own risk.\n\n## LICENSE\n\nThis library is free and open-source software released under the MIT license.\n","publish_time":1729232876422,"maintainers":[{"name":"null_radix","email":"null_radix@riseup.net"},{"name":"fanatid","email":"fanatid@ya.ru"},{"name":"jprichardson","email":"jprichardson@gmail.com"}],"_cnpm_publish_time":1729232876422,"dist-tags":{"latest":"5.0.2"}}