{"_id":"@asoltys/bip38","_rev":"3-9535e7a44a21b8f207266a3ccd56b316","name":"@asoltys/bip38","dist-tags":{"latest":"4.0.3"},"versions":{"4.0.0":{"name":"@asoltys/bip38","version":"4.0.0","description":"BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.","main":"dist/cjs/index.js","module":"dist/mjs/index.js","exports":{".":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"}},"types":"dist/mjs/index.d.ts","keywords":["bitcoin","crypto","cryptography","litecoin"],"homepage":"http://cryptocoinjs.com/modules/currency/bip38/","author":{"name":"JP Richardson"},"dependencies":{"@noble/ciphers":"^0.4.1","@noble/curves":"^1.3.0","@noble/hashes":"^1.3.3","bs58check":"^3.0.1"},"devDependencies":{"@biomejs/biome":"^1.4.1","coveralls":"^3.0.4","mocha":"^8.4.0","mochify":"^6.2.0","nyc":"^14.1.1","typescript":"^5.3.3"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bip38.git","type":"git"},"scripts":{"biome":"biome check *.js* **/*.js*","build":"rm -fr dist/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && ./fixup","browser-test":"mochify --wd -R spec --timeout 100000","ci:test":"npm run biome && npm run coveralls","coverage":"nyc --check-coverage --reporter=lcov --reporter=text mocha","coveralls":"npm run-script coverage && coveralls < coverage/lcov.info","test":"npm run biome && npm run unit","unit":"mocha --ui bdd --timeout 240000"},"_id":"@asoltys/bip38@4.0.0","gitHead":"2e7cd603bea056b33da0054b66070bb5ee6380cf","bugs":{"url":"https://github.com/bitcoinjs/bip38/issues"},"_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-m3TPasGfFcQN24XQLI6qq2gvHWcEZEYqf1MhdGzUfz4peZ4zqy0bE8Fos5xxeVUmEIpFC5KI5aKzCFyZ0pohMw==","shasum":"5e5349965a75fbd9fae369b5f115865c4fe22689","tarball":"https://registry.npmjs.org/@asoltys/bip38/-/bip38-4.0.0.tgz","fileCount":9,"unpackedSize":34963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICUF/gV8RgN6KgzoTWc7/6qeSbeDEY7YCfW+XoyNIgZEAiA+tLCD0ic6A3Xp+sZPPis9pygEefPcFaZ3nEHedHRmWQ=="}]},"_npmUser":{"name":"asoltys","email":"asoltys@gmail.com"},"directories":{},"maintainers":[{"name":"asoltys","email":"asoltys@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bip38_4.0.0_1703308179760_0.21552659473861446"},"_hasShrinkwrap":false},"4.0.1":{"name":"@asoltys/bip38","version":"4.0.1","description":"BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.","main":"dist/cjs/index.js","module":"dist/mjs/index.js","exports":{".":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"}},"types":"dist/mjs/index.d.ts","keywords":["bitcoin","crypto","cryptography","litecoin"],"homepage":"http://cryptocoinjs.com/modules/currency/bip38/","author":{"name":"JP Richardson"},"dependencies":{"@noble/ciphers":"^0.4.1","@noble/curves":"^1.3.0","@noble/hashes":"^1.3.3","bs58check":"^3.0.1"},"devDependencies":{"@biomejs/biome":"^1.4.1","@types/node":"^20.10.5","coveralls":"^3.0.4","mocha":"^8.4.0","mochify":"^6.2.0","nyc":"^14.1.1","typescript":"^5.3.3"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bip38.git","type":"git"},"scripts":{"biome":"biome check *.js* **/*.js*","build":"rm -fr dist/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && ./fixup","browser-test":"mochify --wd -R spec --timeout 100000","ci:test":"npm run biome && npm run coveralls","coverage":"nyc --check-coverage --reporter=lcov --reporter=text mocha","coveralls":"npm run-script coverage && coveralls < coverage/lcov.info","test":"npm run biome && npm run unit","unit":"mocha --ui bdd --timeout 240000"},"_id":"@asoltys/bip38@4.0.1","gitHead":"312af0d0a093373974eea1f19361c59f33fbe545","bugs":{"url":"https://github.com/bitcoinjs/bip38/issues"},"_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-mIO0TdBc+Fb+uzkKsePMuYexzSxRI8habv/shyTZsvL7syJO1vUCplIr15CCmHHE1Ou9yGKs5ZsU0w9IfPfaiw==","shasum":"b6ed7bf6dae083eab0b55c8622ebfd8d604b0790","tarball":"https://registry.npmjs.org/@asoltys/bip38/-/bip38-4.0.1.tgz","fileCount":13,"unpackedSize":35637,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYejICkQIx+6WM973GdIQw1xiW2RX/XUuQ1sv80+fWqAIgcyzCAIJs6iMZ2WYm3l9ynAHKwjhsIbg5l9+CdccKzic="}]},"_npmUser":{"name":"asoltys","email":"asoltys@gmail.com"},"directories":{},"maintainers":[{"name":"asoltys","email":"asoltys@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bip38_4.0.1_1703308912489_0.7078959581480713"},"_hasShrinkwrap":false},"4.0.2":{"name":"@asoltys/bip38","version":"4.0.2","description":"BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.","main":"dist/cjs/index.js","module":"dist/mjs/index.js","exports":{".":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"}},"types":"dist/mjs/index.d.ts","keywords":["bitcoin","crypto","cryptography","litecoin"],"homepage":"http://cryptocoinjs.com/modules/currency/bip38/","author":{"name":"JP Richardson"},"dependencies":{"@noble/ciphers":"^0.4.1","@noble/curves":"^1.3.0","@noble/hashes":"^1.3.3","bs58check":"^3.0.1"},"devDependencies":{"@biomejs/biome":"^1.4.1","@types/node":"^20.10.5","coveralls":"^3.0.4","mocha":"^8.4.0","mochify":"^6.2.0","nyc":"^14.1.1","typescript":"^5.3.3"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bip38.git","type":"git"},"scripts":{"biome":"biome check *.js* **/*.js*","build":"rm -fr dist/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && ./fixup","browser-test":"mochify --wd -R spec --timeout 100000","ci:test":"npm run biome && npm run coveralls","coverage":"nyc --check-coverage --reporter=lcov --reporter=text mocha","coveralls":"npm run-script coverage && coveralls < coverage/lcov.info","test":"npm run biome && npm run unit","unit":"mocha --ui bdd --timeout 240000"},"_id":"@asoltys/bip38@4.0.2","gitHead":"cb431c67e26c0beecb8ad4fa827cfb1de4ce1fe0","bugs":{"url":"https://github.com/bitcoinjs/bip38/issues"},"_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-q8ot4CN6HRWHm9jOD8Lhy4ITvWqMT6ldfQHYT4v19Ne2gzoOHt29skfqabO06Cj1V5kpdKFHJkTmggH7lzUnHw==","shasum":"ce67248c0f552e79c95d9a09f64122b8b0fdecff","tarball":"https://registry.npmjs.org/@asoltys/bip38/-/bip38-4.0.2.tgz","fileCount":13,"unpackedSize":36371,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnuVXmVukBBP8NXDxo1Li0Aj2iIYw8KTxaETaZuJhrdAIhAMl2DOhABXfuGur0dulw1k0c+ilN0wiT5TTXDn1nDSiS"}]},"_npmUser":{"name":"asoltys","email":"asoltys@gmail.com"},"directories":{},"maintainers":[{"name":"asoltys","email":"asoltys@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bip38_4.0.2_1703311389625_0.19752265116455225"},"_hasShrinkwrap":false},"4.0.3":{"name":"@asoltys/bip38","version":"4.0.3","description":"BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.","main":"dist/cjs/index.js","module":"dist/mjs/index.js","exports":{".":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"}},"types":"dist/mjs/index.d.ts","keywords":["bitcoin","crypto","cryptography","litecoin"],"homepage":"http://cryptocoinjs.com/modules/currency/bip38/","author":{"name":"JP Richardson"},"dependencies":{"@noble/ciphers":"^0.4.1","@noble/curves":"^1.3.0","@noble/hashes":"^1.3.3","bs58check":"^3.0.1"},"devDependencies":{"@biomejs/biome":"^1.4.1","@types/node":"^20.10.5","coveralls":"^3.0.4","mocha":"^8.4.0","mochify":"^6.2.0","nyc":"^14.1.1","typescript":"^5.3.3"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bip38.git","type":"git"},"scripts":{"biome":"biome check *.js* **/*.js*","build":"rm -fr dist/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && ./fixup","browser-test":"mochify --wd -R spec --timeout 100000","ci:test":"npm run biome && npm run coveralls","coverage":"nyc --check-coverage --reporter=lcov --reporter=text mocha","coveralls":"npm run-script coverage && coveralls < coverage/lcov.info","test":"npm run biome && npm run unit","unit":"mocha --ui bdd --timeout 240000"},"_id":"@asoltys/bip38@4.0.3","gitHead":"116e8b502446ab4e06862661ca7effdcb3e6adc8","bugs":{"url":"https://github.com/bitcoinjs/bip38/issues"},"_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-fpJDT5USWgbabATWLwhAL7NQY8FS+YhrtXYaeGORlkzYAGbip6ERhbJKlHX54Csvoro4FXwM/ASTL/uUMfWAqA==","shasum":"8f4591bd6e35d1093ff958ff773bc15cccc65570","tarball":"https://registry.npmjs.org/@asoltys/bip38/-/bip38-4.0.3.tgz","fileCount":9,"unpackedSize":35721,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEeNTdeUbLVlIesIbw31XLI6sr+s6bFPw4+jUPjCR/wVAiEA1ML6wuhUKUbbSnkzD88R/G/u2/DgJE6Ae/zY/5vdXe0="}]},"_npmUser":{"name":"asoltys","email":"asoltys@gmail.com"},"directories":{},"maintainers":[{"name":"asoltys","email":"asoltys@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bip38_4.0.3_1704389326878_0.2507229617424702"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-23T05:09:39.628Z","4.0.0":"2023-12-23T05:09:39.949Z","modified":"2024-01-04T17:28:47.246Z","4.0.1":"2023-12-23T05:21:52.652Z","4.0.2":"2023-12-23T06:03:09.842Z","4.0.3":"2024-01-04T17:28:47.084Z"},"maintainers":[{"name":"asoltys","email":"asoltys@gmail.com"}],"description":"BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.","homepage":"http://cryptocoinjs.com/modules/currency/bip38/","keywords":["bitcoin","crypto","cryptography","litecoin"],"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bip38.git","type":"git"},"author":{"name":"JP Richardson"},"bugs":{"url":"https://github.com/bitcoinjs/bip38/issues"},"readme":"# bip38\n\n[![build status](https://secure.travis-ci.org/bitcoinjs/bip38.svg)](http://travis-ci.org/bitcoinjs/bip38)\n[![Coverage Status](https://img.shields.io/coveralls/cryptocoinjs/bip38.svg)](https://coveralls.io/r/cryptocoinjs/bip38)\n[![Version](http://img.shields.io/npm/v/bip38.svg)](https://www.npmjs.org/package/bip38)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nA JavaScript component that adheres to the [BIP38](https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki) standard to secure your crypto currency private keys. Fully compliant with Node.js and the browser (via Browserify).\n\n\n## Why?\nBIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.\n\n\n## Package Info\n- homepage: [http://cryptocoinjs.com/modules/currency/bip38/](http://cryptocoinjs.com/modules/currency/bip38/)\n- github: [https://github.com/cryptocoinjs/bip38](https://github.com/cryptocoinjs/bip38)\n- tests: [https://github.com/cryptocoinjs/bip38/tree/master/test](https://github.com/cryptocoinjs/bip38/tree/master/test)\n- issues: [https://github.com/cryptocoinjs/bip38/issues](https://github.com/cryptocoinjs/bip38/issues)\n- license: **MIT**\n- versioning: [http://semver-ftw.org](http://semver-ftw.org)\n\n\n## Usage\n\n### Installation\n\n    npm install --save bip38\n\n\n### Async methods\n\nAsync methods are available. Using them will be slower but will free up the event loop. You can set `asyncTickInterval` in the scryptParams to control the maximum amount of time the function can block.\n\n   `N` is cpu/mem work factor (power of 2 e.g. 2**18)\n   `r` is block size (8 is common), fine-tunes sequential memory read size and performance\n   `p` is parallelization factor (1 is common)\n   `dkLen` is output key length in bytes e.g. 32.\n   `asyncTick` - (default: 10) max time in ms for which async function can block execution\n   `maxmem` - (default: `1024 ** 3 + 1024` aka 1GB+1KB). A limit that the app could use for scrypt\n   `onProgress` - callback function that would be executed for progress report\n\n### API\n### encrypt(buffer, compressed, passphrase[, progressCallback, scryptParams])\n\n``` javascript\nimport { encrypt } from \"bip38\"\nimport wif from \"wif\"\n\nconst myWifString = '5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR'\nconst decoded = wif.decode(myWifString)\n\nconst encryptedKey = encrypt(decoded.privateKey, decoded.compressed, 'TestingOneTwoThree')\nconsole.log(encryptedKey)\n// => '6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg'\n```\n\n\n### decrypt(encryptedKey, passphrase[, progressCallback, scryptParams])\n\n``` javascript\nimport { decrypt } from \"bip38\"\nimport wif from \"wif\"\n\nvar encryptedKey = '6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg'\nvar decryptedKey = decrypt(encryptedKey, 'TestingOneTwoThree', function (percent) {\n  console.log(percent) // will print the percent every time current increases by 1000\n})\n\nconsole.log(wif.encode(0x80, decryptedKey.privateKey, decryptedKey.compressed))\n// => '5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR'\n```\n\n\n# References\n- https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki\n- https://github.com/pointbiz/bitaddress.org/issues/56 (Safari 6.05 issue)\n- https://github.com/casascius/Bitcoin-Address-Utility/tree/master/Model\n- https://github.com/nomorecoin/python-bip38-testing/blob/master/bip38.py\n- https://github.com/pointbiz/bitaddress.org/blob/master/src/ninja.key.js\n","readmeFilename":"README.md"}