{"_id":"@bitgo-forks/ecpair","_rev":"5-2e7e8e63a355386c5ef195d5c988c1d3","name":"@bitgo-forks/ecpair","dist-tags":{"rc":"2.1.1-master.1","latest":"2.1.1-master.1"},"versions":{"2.1.1-master.1":{"name":"@bitgo-forks/ecpair","version":"2.1.1-master.1","keywords":["bitcoinjs","bitcoin","browserify","javascript","bitcoinjs"],"license":"MIT","_id":"@bitgo-forks/ecpair@2.1.1-master.1","maintainers":[{"name":"bitgobot","email":"infra+npmjs@bitgo.com"},{"name":"dhoffmann","email":"danhoffmann@bitgo.com"},{"name":"louib-bitgo","email":"louisvarin@bitgo.com"},{"name":"ericcrosson-bitgo","email":"ericcrosson@bitgo.com"}],"homepage":"https://github.com/BitGo/ecpair#readme","bugs":{"url":"https://github.com/BitGo/ecpair/issues"},"dist":{"shasum":"f6b3a0afebab69cddbf450f487c5f7b9f933b6c6","tarball":"https://registry.npmjs.org/@bitgo-forks/ecpair/-/ecpair-2.1.1-master.1.tgz","fileCount":13,"integrity":"sha512-1j6yGXn/U3XAx2zX8SLv9QgkqCHn6S52x3s6LfBMjFZMeQRkexRDmbPM40PR6tAJoTxqsKbrUk0/jnn0c4EW3g==","signatures":[{"sig":"MEUCIG7to/iSRyOBorhPtfAKMxKGTvj3BbTJaOHLf3VhcgPAAiEA80jjqROGTAujcLX0Yfq4acZ9IpnHmbSSQeKtpRP57xE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24572},"main":"./src/index.js","types":"./src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"a607af1806a283eb351f4a4cff354f38a1efdef9","scripts":{"lint":"tslint -p tsconfig.json -c tslint.json","test":"npm run build && npm run format:ci && npm run lint && npm run nobuild:coverage","unit":"npm run build && npm run nobuild:unit","audit":"NPM_AUDIT_IGNORE_DEV=1 NPM_AUDIT_IGNORE_LEVEL=low npm-audit-whitelister .npm-audit-whitelister.json","build":"npm run clean && tsc -p ./tsconfig.json && npm run formatjs","clean":"rimraf src","format":"npm run prettier -- --write","coverage":"npm run build && npm run nobuild:coverage","formatjs":"npm run prettierjs -- --write","mocha:ts":"mocha --recursive --require test/ts-node-register","prettier":"prettier \"ts_src/**/*.ts\" \"test/**/*.ts\" --ignore-path ./.prettierignore","format:ci":"npm run prettier -- --check && npm run prettierjs -- --check","gitdiff:ci":"npm run build && git diff --exit-code","lint:tests":"tslint -p test/tsconfig.json -c tslint.json","prettierjs":"prettier \"src/**/*.js\" --ignore-path ./.prettierignore","build:tests":"npm run clean:jstests && tsc -p ./test/tsconfig.json","nobuild:unit":"npm run mocha:ts -- 'test/*.ts'","clean:jstests":"rimraf 'test/**/!(ts-node-register)*.js'","coverage-html":"npm run build && npm run nobuild:coverage-html","coverage-report":"npm run build && npm run nobuild:coverage-report","nobuild:coverage":"npm run build:tests && nyc --check-coverage --branches 90 --functions 90 --lines 90 mocha && npm run clean:jstests","nobuild:coverage-html":"nyc report --reporter=html","nobuild:coverage-report":"nyc report --reporter=lcov"},"_npmUser":{"name":"bitgobot","email":"infra+npmjs@bitgo.com"},"repository":{"url":"git+https://github.com/BitGo/ecpair.git","type":"git"},"_npmVersion":"8.19.4","description":"Fork of ecpair with BitGo specific changes","directories":{},"_nodeVersion":"14.21.3","dependencies":{"wif":"^2.0.6","typeforce":"^1.18.0","randombytes":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","bs58":"^4.0.0","bip39":"^3.0.2","bip65":"^1.0.1","bip68":"^1.0.3","bn.js":"^4.11.8","dhttp":"^3.0.0","mocha":"^7.1.1","rimraf":"^2.6.3","tslint":"^6.1.3","ts-node":"^8.3.0","hoodwink":"^2.0.0","prettier":"^2.4.1","@types/wif":"^2.0.2","proxyquire":"^2.0.1","typescript":"^4.4.4","@types/node":"^16.11.1","create-hash":"^1.2.0","minimaldata":"^1.0.2","@types/mocha":"^5.2.7","tiny-secp256k1":"^2.2.1","semantic-release":"19.0.5","@types/proxyquire":"^1.3.28","@types/create-hash":"^1.2.2","@types/randombytes":"^2.0.0","npm-audit-whitelister":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ecpair_2.1.1-master.1_1707407970431_0.7957253163086864","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-02-08T15:59:30.307Z","modified":"2025-10-28T15:49:49.252Z","2.1.1-master.1":"2024-02-08T15:59:30.605Z"},"bugs":{"url":"https://github.com/BitGo/ecpair/issues"},"license":"MIT","homepage":"https://github.com/BitGo/ecpair#readme","keywords":["bitcoinjs","bitcoin","browserify","javascript","bitcoinjs"],"repository":{"url":"git+https://github.com/BitGo/ecpair.git","type":"git"},"description":"Fork of ecpair with BitGo specific changes","maintainers":[{"email":"infra+npmjs@bitgo.com","name":"bitgobot"}],"readme":"# ecpair\n[![Github CI](https://github.com/bitcoinjs/ecpair/actions/workflows/main_ci.yml/badge.svg)](https://github.com/bitcoinjs/ecpair/actions/workflows/main_ci.yml) [![NPM](https://img.shields.io/npm/v/ecpair.svg)](https://www.npmjs.org/package/ecpair) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\nA library for managing SECP256k1 keypairs written in TypeScript with transpiled JavaScript committed to git.\n\nThis BitGo fork improves compatibility with fork coins, and alternative SECP256K1 implementations.\n\n## Example\n\nTypeScript\n\n``` typescript\nimport { Signer, SignerAsync, ECPairInterface, ECPairFactory, ECPairAPI, TinySecp256k1Interface } from 'ecpair';\nimport * as crypto from 'crypto';\n\n// You need to provide the ECC library. The ECC library must implement \n// all the methods of the `TinySecp256k1Interface` interface.\nconst tinysecp: TinySecp256k1Interface = require('tiny-secp256k1');\nconst ECPair: ECPairAPI = ECPairFactory(tinysecp);\n\n// You don't need to explicitly write ECPairInterface, but just to show\n// that the keyPair implements the interface this example includes it.\n\n// From WIF\nconst keyPair1: ECPairInterface = ECPair.fromWIF('KynD8ZKdViVo5W82oyxvE18BbG6nZPVQ8Td8hYbwU94RmyUALUik');\n// Random private key\nconst keyPair2 = ECPair.fromPrivateKey(crypto.randomBytes(32));\n// OR (uses randombytes library, compatible with browser)\nconst keyPair3 = ECPair.makeRandom();\n// OR use your own custom random buffer generator BE CAREFUL!!!!\nconst customRandomBufferFunc = (size: number): Buffer => crypto.randomBytes(size);\nconst keyPair4 = ECPair.makeRandom({ rng: customRandomBufferFunc });\n// From pubkey (33 or 65 byte DER format public key)\nconst keyPair5 = ECPair.fromPublicKey(keyPair1.publicKey);\n\n// Pass a custom network\nconst network = {}; // Your custom network object here\nECPair.makeRandom({ network });\nECPair.fromPrivateKey(crypto.randomBytes(32), { network });\nECPair.fromPublicKey(keyPair1.publicKey, { network });\n// fromWIF will check the WIF version against the network you pass in\n// pass in multiple networks if you are not sure\nECPair.fromWIF('wif key...', network);\nconst network2 = {}; // Your custom network object here\nconst network3 = {}; // Your custom network object here\nECPair.fromWIF('wif key...', [network, network2, network3]);\n```\n\n## LICENSE [MIT](LICENSE)\nWritten and tested by [bitcoinjs-lib](https://github.com/bitcoinjs/bitcoinjs-lib) contributors since 2014.\n","readmeFilename":"README.md"}