{"_id":"j-bitcoin","_rev":"8-e60b20dfd90a3b7b7e9475dddad60bf6","name":"j-bitcoin","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"j-bitcoin","version":"1.0.0","keywords":["Bitcoin","secp256","blockchain","elliptic","curve","Threshold signature","signature","J-BSV","BSV","BCH","BTC","Schnorr signature","bip32","bitcoin","bitcoinCash","bitcoinSV","bip","ecdsa","cryptography","security"],"author":{"name":"yfbsei"},"license":"ISC","_id":"j-bitcoin@1.0.0","maintainers":[{"name":"yfbsei","email":"yfbsei@yandex.com"}],"homepage":"https://github.com/yfbsei/J-Bitcoin-wallet#readme","bugs":{"url":"https://github.com/yfbsei/J-Bitcoin-wallet/issues"},"dist":{"shasum":"7d9337f9760d6d0268521c01419e334ab80f525f","tarball":"https://registry.npmjs.org/j-bitcoin/-/j-bitcoin-1.0.0.tgz","fileCount":22,"integrity":"sha512-W5mhnetawZTz+Ru/f9/SpZCSWbf6Y/GZ1/AL8gF+J3q6eOu/ha0GZM8cX0Ntxann0WMG50CshjjzGMi29k72Ug==","signatures":[{"sig":"MEUCIQD1SWLtgvC7G30dUjdnUqPA6sAO4OM1x8Be5onBneUEOwIgFm0OZr52ICcVtVjq7ROd20N6JSOemMXYNidBGw2YnEA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65924},"main":"index.js","type":"module","types":"index.d.ts","gitHead":"fd146ac6e38b5cc76df7e98f967b9b4bde410dae","scripts":{"test":"mocha"},"_npmUser":{"name":"yfbsei","email":"yfbsei@yandex.com"},"deprecated":"Deprecated: Versions 1.x supported BSV and BCASH which are no longer maintained. Upgrade to v2.0.0+ for BTC-only support.","repository":{"url":"git+https://github.com/yfbsei/J-Bitcoin-wallet.git","type":"git"},"_npmVersion":"9.6.7","description":"Bitcoin Custodial & non-Custodial Wallets","directories":{},"_nodeVersion":"20.3.1","dependencies":{"bn.js":"^5.2.1","base58-js":"^1.0.4","@noble/secp256k1":"^1.6.3","bigint-conversion":"^2.2.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/j-bitcoin_1.0.0_1712119809906_0.0749596524607361","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"j-bitcoin","version":"1.0.1","keywords":["Bitcoin","secp256","blockchain","elliptic","curve","Threshold signature","signature","J-BSV","BSV","BCH","BTC","Schnorr signature","bip32","bitcoin","bitcoinCash","bitcoinSV","bip","ecdsa","cryptography","security"],"author":{"name":"yfbsei"},"license":"ISC","_id":"j-bitcoin@1.0.1","maintainers":[{"name":"yfbsei","email":"yfbsei@yandex.com"}],"homepage":"https://github.com/yfbsei/J-Bitcoin#readme","bugs":{"url":"https://github.com/yfbsei/J-Bitcoin/issues"},"dist":{"shasum":"14a56afa1ae263ab95551b853985be479ccdb8d8","tarball":"https://registry.npmjs.org/j-bitcoin/-/j-bitcoin-1.0.1.tgz","fileCount":22,"integrity":"sha512-mVXdQHcKPTKYVql+zqwLFCYW9ozIkUK4OhDtl8weXphNAvlscPmmu7RviUFtjCyXUIDt9Oo7EfE8HLR/B0+tig==","signatures":[{"sig":"MEUCIQD+sO9j7LBL06PHRm5cb4SQ0+Wal6q1L3MNbup8hDLTRAIgD7sqbS8+I6Dkl8oIFUQ9wGgPbFjbvL1QyKCOXeqeIVg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65917},"main":"index.js","type":"module","types":"index.d.ts","gitHead":"d972a33351959dca16e1e444630ad0d8e566f4fd","scripts":{"test":"mocha"},"_npmUser":{"name":"yfbsei","email":"yfbsei@yandex.com"},"deprecated":"Deprecated: Versions 1.x supported BSV and BCASH which are no longer maintained. Upgrade to v2.0.0+ for BTC-only support.","repository":{"url":"git+https://github.com/yfbsei/J-Bitcoin.git","type":"git"},"_npmVersion":"9.6.7","description":"Bitcoin Custodial & non-Custodial Wallets","directories":{},"_nodeVersion":"20.3.1","dependencies":{"bn.js":"^5.2.1","base58-js":"^1.0.4","@noble/secp256k1":"^1.6.3","bigint-conversion":"^2.2.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/j-bitcoin_1.0.1_1712120549667_0.005436815779233051","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"j-bitcoin","version":"1.0.2","keywords":["bitcoin","cryptocurrency","wallet","blockchain","bip32","bip39","hierarchical-deterministic","hd-wallet","custodial","non-custodial","threshold-signatures","multi-signature","multisig","ecdsa","schnorr","secp256k1","elliptic-curve","cryptography","bitcoin-cash","bitcoin-sv","bch","bsv","btc","segwit","bech32","cashaddr","p2pkh","p2wpkh","base58","mnemonic","seed-phrase","private-key","public-key","address-generation","key-derivation","shamir-secret-sharing","polynomial-interpolation","threshold-cryptography","distributed-signatures","tss","javascript","nodejs","crypto","security","fintech","defi","web3"],"author":{"url":"https://github.com/yfbsei","name":"yfbsei"},"license":"ISC","_id":"j-bitcoin@1.0.2","maintainers":[{"name":"yfbsei","email":"yfbsei@yandex.com"}],"homepage":"https://github.com/yfbsei/J-Bitcoin#readme","bugs":{"url":"https://github.com/yfbsei/J-Bitcoin/issues"},"dist":{"shasum":"1f7def859b55724c7cd806b35e139bc3f73a1115","tarball":"https://registry.npmjs.org/j-bitcoin/-/j-bitcoin-1.0.2.tgz","fileCount":140,"integrity":"sha512-8fbOBJXWJjdRkuDrg9qQl28vizjU5dXgRC+cVlejvqVqhQmmZGhONGbYX/aAaja09mLhfI4Jv2vKyUOd1ixgKA==","signatures":[{"sig":"MEUCIELOmh6TdoAXFZBEedN1qNLArpeTK3rVePdeb1d7SPzwAiEAu2vBdgRIgNiwGO5GDIBqh5fTvmqjDy2TiakQIue49NI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4234446},"main":"index.js","type":"module","types":"index.d.ts","volta":{"npm":"9.6.7","node":"18.17.0"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.js"}},"funding":{"url":"https://github.com/sponsors/yfbsei","type":"individual"},"gitHead":"1b1ffc0697117b950c7e63e14474de5067688e0c","scripts":{"docs":"jsdoc -c jsdoc.config.json","lint":"eslint src/**/*.js index.js --ignore-missing","test":"mocha test/**/*.test.js --timeout 10000","build":"npm run docs","format":"prettier --write \"src/**/*.js\" \"index.js\" \"*.md\"","prepare":"npm run docs","examples":"node examples/basic-usage.js","lint:fix":"eslint src/**/*.js index.js --fix --ignore-missing","validate":"npm run test","benchmark":"node benchmarks/performance.js","docs:clean":"rm -rf docs","docs:serve":"http-server docs -p 8080 -o","docs:watch":"nodemon --exec 'npm run docs' --watch src --ext js","test:watch":"mocha test/**/*.test.js --watch","format:check":"prettier --check \"src/**/*.js\" \"index.js\" \"*.md\"","test:coverage":"c8 mocha test/**/*.test.js","audit:security":"npm audit --audit-level moderate"},"_npmUser":{"name":"yfbsei","email":"yfbsei@yandex.com"},"deprecated":"Deprecated: Versions 1.x supported BSV and BCASH which are no longer maintained. Upgrade to v2.0.0+ for BTC-only support.","repository":{"url":"git+https://github.com/yfbsei/J-Bitcoin.git","type":"git"},"_npmVersion":"10.9.2","description":"Comprehensive JavaScript cryptocurrency wallet library for Bitcoin (BTC), Bitcoin Cash (BCH), and Bitcoin SV (BSV) with custodial and non-custodial wallet support, threshold signatures, and multiple address formats","directories":{},"_nodeVersion":"22.16.0","browserslist":["> 1%","last 2 versions","not dead","not ie <= 11"],"dependencies":{"bn.js":"^5.2.1","base58-js":"^1.0.4","@noble/curves":"^1.9.1","bigint-conversion":"^2.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"npm@9.6.7","devDependencies":{"c8":"^8.0.1","jsdoc":"^4.0.2","mocha":"^10.2.0","eslint":"^8.50.0","nodemon":"^3.0.1","prettier":"^3.0.3","http-server":"^14.1.1","jsdoc-to-markdown":"^8.0.0","eslint-plugin-jsdoc":"^46.8.2","eslint-config-prettier":"^9.0.0"},"peerDependencies":{"node":">=16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/j-bitcoin_1.0.2_1749019002244_0.29864569300736465","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"j-bitcoin","version":"2.0.0","keywords":["bitcoin","btc","cryptocurrency","wallet","blockchain","bip32","bip39","bip340","hierarchical-deterministic","hd-wallet","custodial","non-custodial","threshold-signatures","multi-signature","multisig","ecdsa","schnorr","secp256k1","elliptic-curve","cryptography","segwit","bech32","p2pkh","p2wpkh","base58","mnemonic","seed-phrase","private-key","public-key","address-generation","key-derivation","shamir-secret-sharing","polynomial-interpolation","threshold-cryptography","distributed-signatures","tss","javascript","typescript","nodejs","crypto","security","fintech","defi","web3","esm","es-modules"],"author":{"url":"https://github.com/yfbsei","name":"yfbsei","email":"support@j-bitcoin.dev"},"license":"ISC","_id":"j-bitcoin@2.0.0","maintainers":[{"name":"yfbsei","email":"yfbsei@yandex.com"}],"homepage":"https://github.com/yfbsei/J-Bitcoin#readme","bugs":{"url":"https://github.com/yfbsei/J-Bitcoin/issues"},"os":["darwin","linux","win32"],"cpu":["x64","arm64"],"dist":{"shasum":"bec4e48b0e2b5a0cdd9abd8496f4d018346a77c0","tarball":"https://registry.npmjs.org/j-bitcoin/-/j-bitcoin-2.0.0.tgz","fileCount":146,"integrity":"sha512-j0kKXlSEgPljF6WgMnKCQx1AoYoRvebvO38Y7e64g7SiWExORBWt4C5+BLkDJ1HKiU97hYNM7MiiIobJRe15gw==","signatures":[{"sig":"MEUCIQCuqz5r7TCbp+TH0V1V0nsFgHLleNR4+HKT7Seg39QIGwIgUARUDOhyUSeQyYy4XZsd5ynATXHQFVsoT5Y+FJNRMoI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5636472},"main":"index.js","type":"module","types":"index.d.ts","volta":{"npm":"9.6.7","node":"18.17.0"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.js"},"./package.json":"./package.json"},"funding":[{"url":"https://github.com/sponsors/yfbsei","type":"individual"},{"url":"bitcoin:bc1qj-bitcoin-donations-address","type":"bitcoin"}],"gitHead":"516e8f622c460bb2278a90d704a7e8eeecc7b844","private":false,"scripts":{"docs":"jsdoc -c jsdoc.config.json","lint":"eslint src/**/*.js index.js test/**/*.js --ignore-missing","test":"mocha test/**/*.test.js --timeout 15000 --reporter spec","build":"npm run lint && npm run test && npm run docs","clean":"npm run docs:clean && npx rimraf node_modules/.cache","reset":"npm run clean && npx rimraf node_modules && npm install","format":"prettier --write \"src/**/*.js\" \"index.js\" \"test/**/*.js\" \"*.md\" \"*.json\"","examples":"node examples/basic-usage.js","lint:fix":"eslint src/**/*.js index.js test/**/*.js --fix --ignore-missing","validate":"npm run lint:check && npm run format:check && npm run test","audit:fix":"npm audit fix","benchmark":"node benchmarks/performance.js","test:unit":"mocha test/unit/**/*.test.js --timeout 10000","build:docs":"npm run docs:clean && npm run docs","docs:clean":"npx rimraf docs","docs:serve":"http-server docs -p 8080 -o -c-1","docs:watch":"nodemon --exec npm run docs --watch src --watch index.js --ext js","lint:check":"eslint src/**/*.js index.js test/**/*.js --max-warnings 0","test:watch":"mocha test/**/*.test.js --watch --timeout 15000","format:check":"prettier --check \"src/**/*.js\" \"index.js\" \"test/**/*.js\" \"*.md\" \"*.json\"","test:coverage":"c8 --reporter=html --reporter=text mocha test/**/*.test.js --timeout 15000","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","audit:security":"npm audit --audit-level moderate","benchmark:crypto":"node benchmarks/crypto-performance.js","test:integration":"mocha test/integration/**/*.test.js --timeout 20000","examples:custodial":"node examples/custodial-wallet.js","examples:threshold":"node examples/threshold-signatures.js"},"_npmUser":{"name":"yfbsei","email":"yfbsei@yandex.com"},"changelog":{"version":"2.0.0","breaking":true,"released":"2025-01-01","description":"Bitcoin-focused refactor with enhanced TypeScript support and threshold signatures"},"repository":{"url":"git+https://github.com/yfbsei/J-Bitcoin.git","type":"git"},"_npmVersion":"10.9.2","description":"Comprehensive JavaScript/TypeScript Bitcoin (BTC) wallet library with custodial and non-custodial support, hierarchical deterministic keys, threshold signatures, and advanced cryptographic features","directories":{},"releaseDate":"2025-01-01","_nodeVersion":"22.16.0","browserslist":["> 1%","last 2 versions","not dead","not ie <= 11","node >= 16"],"dependencies":{"bn.js":"^5.2.1","base58-js":"^1.0.4","@noble/curves":"^1.9.1","bigint-conversion":"^2.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"npm@9.6.7","devDependencies":{"c8":"^8.0.1","jsdoc":"^4.0.2","mocha":"^10.2.0","eslint":"^8.57.0","docdash":"^2.0.2","nodemon":"^3.0.2","prettier":"^3.1.1","http-server":"^14.1.1","jsdoc-to-markdown":"^8.0.0","eslint-plugin-jsdoc":"^46.10.1","eslint-config-prettier":"^9.1.0","eslint-plugin-security":"^1.7.1"},"peerDependencies":{"node":">=16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/j-bitcoin_2.0.0_1767238078715_0.3328172585568978","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"j-bitcoin","version":"2.0.1","description":"Comprehensive JavaScript/TypeScript Bitcoin (BTC) wallet library with custodial and non-custodial support, hierarchical deterministic keys, threshold signatures, and advanced cryptographic features","main":"index.js","types":"index.d.ts","type":"module","exports":{".":{"import":"./index.js","require":"./index.js","types":"./index.d.ts"},"./package.json":"./package.json"},"scripts":{"test":"mocha test/**/*.test.js --timeout 15000 --reporter spec","test:watch":"mocha test/**/*.test.js --watch --timeout 15000","test:coverage":"c8 --reporter=html --reporter=text mocha test/**/*.test.js --timeout 15000","test:unit":"mocha test/unit/**/*.test.js --timeout 10000","test:integration":"mocha test/integration/**/*.test.js --timeout 20000","docs":"jsdoc -c jsdoc.config.json","docs:watch":"nodemon --exec npm run docs --watch src --watch index.js --ext js","docs:serve":"http-server docs -p 8080 -o -c-1","docs:clean":"npx rimraf docs","build":"npm run lint && npm run test && npm run docs","build:docs":"npm run docs:clean && npm run docs","lint":"eslint src/**/*.js index.js test/**/*.js --ignore-missing","lint:fix":"eslint src/**/*.js index.js test/**/*.js --fix --ignore-missing","lint:check":"eslint src/**/*.js index.js test/**/*.js --max-warnings 0","format":"prettier --write \"src/**/*.js\" \"index.js\" \"test/**/*.js\" \"*.md\" \"*.json\"","format:check":"prettier --check \"src/**/*.js\" \"index.js\" \"test/**/*.js\" \"*.md\" \"*.json\"","validate":"npm run lint:check && npm run format:check && npm run test","audit:security":"npm audit --audit-level moderate","audit:fix":"npm audit fix","examples":"node examples/basic-usage.js","examples:threshold":"node examples/threshold-signatures.js","examples:custodial":"node examples/custodial-wallet.js","benchmark":"node benchmarks/performance.js","benchmark:crypto":"node benchmarks/crypto-performance.js","clean":"npm run docs:clean && npx rimraf node_modules/.cache","reset":"npm run clean && npx rimraf node_modules && npm install","version:patch":"npm version patch","version:minor":"npm version minor","version:major":"npm version major"},"repository":{"type":"git","url":"git+https://github.com/yfbsei/J-Bitcoin.git"},"homepage":"https://github.com/yfbsei/J-Bitcoin#readme","bugs":{"url":"https://github.com/yfbsei/J-Bitcoin/issues"},"author":{"name":"yfbsei","email":"support@j-bitcoin.dev","url":"https://github.com/yfbsei"},"license":"ISC","engines":{"node":">=16.0.0","npm":">=7.0.0"},"os":["darwin","linux","win32"],"cpu":["x64","arm64"],"keywords":["bitcoin","btc","cryptocurrency","wallet","blockchain","bip32","bip39","bip340","hierarchical-deterministic","hd-wallet","custodial","non-custodial","threshold-signatures","multi-signature","multisig","ecdsa","schnorr","secp256k1","elliptic-curve","cryptography","segwit","bech32","p2pkh","p2wpkh","base58","mnemonic","seed-phrase","private-key","public-key","address-generation","key-derivation","shamir-secret-sharing","polynomial-interpolation","threshold-cryptography","distributed-signatures","tss","javascript","typescript","nodejs","crypto","security","fintech","defi","web3","esm","es-modules"],"dependencies":{"@noble/curves":"^1.9.1","base58-js":"^1.0.4","bigint-conversion":"^2.4.0","bn.js":"^5.2.1"},"devDependencies":{"c8":"^8.0.1","docdash":"^2.0.2","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-jsdoc":"^46.10.1","eslint-plugin-security":"^1.7.1","http-server":"^14.1.1","jsdoc":"^4.0.2","jsdoc-to-markdown":"^8.0.0","mocha":"^10.2.0","nodemon":"^3.0.2","prettier":"^3.1.1"},"peerDependencies":{"node":">=16.0.0"},"funding":[{"type":"individual","url":"https://github.com/sponsors/yfbsei"},{"type":"bitcoin","url":"bitcoin:bc1qj-bitcoin-donations-address"}],"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"browserslist":["> 1%","last 2 versions","not dead","not ie <= 11","node >= 16"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"volta":{"node":"18.17.0","npm":"9.6.7"},"packageManager":"npm@9.6.7","releaseDate":"2025-01-01","changelog":{"version":"2.0.0","released":"2025-01-01","breaking":true,"description":"Bitcoin-focused refactor with enhanced TypeScript support and threshold signatures"},"private":false,"_id":"j-bitcoin@2.0.1","gitHead":"516e8f622c460bb2278a90d704a7e8eeecc7b844","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-oISuh3M7K/ZaEvpFYS5fg5nDonzz7mJX9ieXkXtoc/GMxRmQTXpVVgMefo5UBsM6HaITrNWgZc+kqm7kS/hsrw==","shasum":"2aebb41117168b1482eb21f75184b3469d5ba62c","tarball":"https://registry.npmjs.org/j-bitcoin/-/j-bitcoin-2.0.1.tgz","fileCount":146,"unpackedSize":5638327,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDvtEkYIup4yTvzqiLP24f8m22WSPewPDGgVNSt/L21ggIhAJ1Dd9jIsQxAbHoreSi4V7FDEv/4pV2MbZ2NsuD4cRvl"}]},"_npmUser":{"name":"yfbsei","email":"yfbsei@yandex.com"},"directories":{},"maintainers":[{"name":"yfbsei","email":"yfbsei@yandex.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/j-bitcoin_2.0.1_1767238546267_0.6107662322209837"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-03T04:50:09.905Z","modified":"2026-01-01T03:35:46.711Z","1.0.0":"2024-04-03T04:50:10.118Z","1.0.1":"2024-04-03T05:02:29.905Z","1.0.2":"2025-06-04T06:36:42.545Z","2.0.0":"2026-01-01T03:27:58.918Z","2.0.1":"2026-01-01T03:35:46.503Z"},"bugs":{"url":"https://github.com/yfbsei/J-Bitcoin/issues"},"author":{"name":"yfbsei","email":"support@j-bitcoin.dev","url":"https://github.com/yfbsei"},"license":"ISC","homepage":"https://github.com/yfbsei/J-Bitcoin#readme","keywords":["bitcoin","btc","cryptocurrency","wallet","blockchain","bip32","bip39","bip340","hierarchical-deterministic","hd-wallet","custodial","non-custodial","threshold-signatures","multi-signature","multisig","ecdsa","schnorr","secp256k1","elliptic-curve","cryptography","segwit","bech32","p2pkh","p2wpkh","base58","mnemonic","seed-phrase","private-key","public-key","address-generation","key-derivation","shamir-secret-sharing","polynomial-interpolation","threshold-cryptography","distributed-signatures","tss","javascript","typescript","nodejs","crypto","security","fintech","defi","web3","esm","es-modules"],"repository":{"type":"git","url":"git+https://github.com/yfbsei/J-Bitcoin.git"},"description":"Comprehensive JavaScript/TypeScript Bitcoin (BTC) wallet library with custodial and non-custodial support, hierarchical deterministic keys, threshold signatures, and advanced cryptographic features","maintainers":[{"name":"yfbsei","email":"yfbsei@yandex.com"}],"readme":"<p align=\"center\">\r\n  <h1 align=\"center\">🔐 J-Bitcoin</h1>\r\n  <p align=\"center\">\r\n    <strong>The Modern JavaScript Bitcoin Library</strong>\r\n  </p>\r\n  <p align=\"center\">\r\n    HD Wallets • Threshold Signatures (TSS) • Schnorr/ECDSA • Taproot • Zero Dependencies*\r\n  </p>\r\n</p>\r\n\r\n<p align=\"center\">\r\n  <a href=\"https://www.npmjs.com/package/j-bitcoin\"><img src=\"https://img.shields.io/npm/v/j-bitcoin.svg?style=flat-square&color=blue\" alt=\"npm version\"></a>\r\n  <a href=\"https://www.npmjs.com/package/j-bitcoin\"><img src=\"https://img.shields.io/npm/dw/j-bitcoin.svg?style=flat-square&color=green\" alt=\"npm downloads\"></a>\r\n  <a href=\"https://github.com/yfbsei/J-Bitcoin\"><img src=\"https://img.shields.io/github/stars/yfbsei/J-Bitcoin?style=flat-square\" alt=\"GitHub stars\"></a>\r\n  <a href=\"https://opensource.org/licenses/ISC\"><img src=\"https://img.shields.io/badge/License-ISC-blue.svg?style=flat-square\" alt=\"License\"></a>\r\n  <a href=\"https://nodejs.org/\"><img src=\"https://img.shields.io/badge/Node.js-16%2B-339933?style=flat-square&logo=node.js&logoColor=white\" alt=\"Node.js\"></a>\r\n  <a href=\"https://www.typescriptlang.org/\"><img src=\"https://img.shields.io/badge/TypeScript-Ready-3178C6?style=flat-square&logo=typescript&logoColor=white\" alt=\"TypeScript\"></a>\r\n</p>\r\n\r\n<p align=\"center\">\r\n  <a href=\"#-quick-start\">Quick Start</a> •\r\n  <a href=\"#-features\">Features</a> •\r\n  <a href=\"#-api-reference\">API</a> •\r\n  <a href=\"https://github.com/yfbsei/J-Bitcoin/issues\">Issues</a>\r\n</p>\r\n\r\n---\r\n\r\n## Why J-Bitcoin?\r\n\r\n| | J-Bitcoin | Others |\r\n|---|:---:|:---:|\r\n| **HD Wallets** (BIP32/39/44/49/84/86) | ✅ | ✅ |\r\n| **Threshold Signatures (TSS)** | ✅ | ❌ |\r\n| **Taproot (P2TR)** | ✅ | Some |\r\n| **Schnorr Signatures (BIP340)** | ✅ | Some |\r\n| **BIP322 Message Signing** | ✅ | ❌ |\r\n| **TypeScript Support** | ✅ | ✅ |\r\n| **Zero Native Dependencies*** | ✅ | ❌ |\r\n| **Testnet Verified** | ✅ | ? |\r\n\r\n<sub>*Only uses `@noble/curves` for cryptographic primitives</sub>\r\n\r\n---\r\n\r\n## ⚡ Quick Start\r\n\r\n```bash\r\nnpm install j-bitcoin\r\n```\r\n\r\n### Create HD Wallet in 3 Lines\r\n\r\n```javascript\r\nimport { CustodialWallet } from 'j-bitcoin';\r\n\r\nconst { wallet, mnemonic } = CustodialWallet.createNew('main', 128);\r\nconst address = wallet.getReceivingAddress(0, 0, 'segwit');\r\n\r\nconsole.log('Backup:', mnemonic);\r\nconsole.log('Address:', address.address); // bc1q...\r\n```\r\n\r\n### Threshold Signatures (2-of-3 TSS)\r\n\r\n```javascript\r\nimport { NonCustodialWallet } from 'j-bitcoin';\r\n\r\n// No single point of failure - requires 3 parties to sign\r\nconst { wallet, shares } = NonCustodialWallet.createNew('main', 3, 1);\r\nconst signature = wallet.sign(messageHash); // Distributed signing\r\n```\r\n\r\n---\r\n\r\n## 🚀 Features\r\n\r\n| Category | Features |\r\n|----------|----------|\r\n| **Wallets** | Custodial HD wallets, Non-custodial threshold wallets (TSS) |\r\n| **Standards** | BIP32, BIP39, BIP44, BIP49, BIP84, BIP86, BIP173, BIP322, BIP340, BIP350 |\r\n| **Addresses** | Legacy P2PKH (1...), P2SH-P2WPKH (3...), Native SegWit (bc1q...), Taproot (bc1p...) |\r\n| **Signatures** | ECDSA, Schnorr (BIP340), Threshold signatures (TSS), BIP322 message signing |\r\n| **Networks** | Bitcoin Mainnet, Testnet |\r\n\r\n---\r\n\r\n## 📖 Examples\r\n\r\n<details>\r\n<summary><strong>🔑 Custodial HD Wallet (Full Example)</strong></summary>\r\n\r\n```javascript\r\nimport { CustodialWallet } from 'j-bitcoin';\r\n\r\n// Generate new wallet (12-word mnemonic by default, 256 for 24-word)\r\nconst { wallet, mnemonic } = CustodialWallet.createNew('main', 128);\r\nconsole.log('Backup mnemonic:', mnemonic);\r\n\r\n// Derive addresses (account, index, type)\r\nconst legacy = wallet.getReceivingAddress(0, 0, 'legacy');         // 1...\r\nconst wrapped = wallet.getReceivingAddress(0, 0, 'wrapped-segwit'); // 3...\r\nconst segwit = wallet.getReceivingAddress(0, 0, 'segwit');         // bc1q...\r\nconst taproot = wallet.getReceivingAddress(0, 0, 'taproot');       // bc1p...\r\n\r\nconsole.log('Legacy:', legacy.address);\r\nconsole.log('SegWit:', segwit.address);\r\nconsole.log('Taproot:', taproot.address);\r\n\r\n// Get change address\r\nconst change = wallet.getChangeAddress(0, 0, 'segwit');\r\n\r\n// Batch generate addresses\r\nconst addresses = wallet.getAddresses(0, 'segwit', 20);\r\n\r\n// Restore from mnemonic\r\nconst restored = CustodialWallet.fromMnemonic('main', mnemonic);\r\n\r\n// Export/import WIF\r\nconst wif = wallet.exportWIF(0, 0, 0, 'segwit');\r\nconst wifWallet = CustodialWallet.fromWIF(wif);\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>🔐 Non-Custodial Threshold Wallet (TSS)</strong></summary>\r\n\r\n```javascript\r\nimport { NonCustodialWallet } from 'j-bitcoin';\r\n\r\n// Create TSS-only wallet (3 participants, threshold degree t=1)\r\n// Signing requires 2t+1 = 3 participants\r\nconst { wallet, shares, config } = NonCustodialWallet.createNew('main', 3, 1);\r\nconsole.log('TSS config:', config);\r\n\r\n// Create HD + TSS wallet (combined mode)\r\nconst { wallet: hdWallet, mnemonic, shares: hdShares } = \r\n  NonCustodialWallet.createNewHD('main', 3, 1);\r\n\r\n// Get TSS aggregate public key address\r\nconst tssAddress = wallet.getAddress('segwit');\r\n\r\n// Get HD-derived addresses (same API as CustodialWallet)\r\nconst segwitAddr = hdWallet.getReceivingAddress(0, 0, 'segwit');\r\n\r\n// Sign message hash with TSS\r\nconst messageHash = Buffer.alloc(32, 'test');\r\nconst signature = wallet.sign(messageHash);\r\nconst isValid = wallet.verify(messageHash, signature);\r\n\r\n// Sign with HD-derived key\r\nconst hdSig = hdWallet.signMessageHD('Hello Bitcoin!', 0, 0, 'segwit');\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>📝 BIP39 Mnemonic Operations</strong></summary>\r\n\r\n```javascript\r\nimport { BIP39 } from 'j-bitcoin';\r\n\r\n// Generate 12-word mnemonic (128-bit)\r\nconst { mnemonic } = BIP39.generateMnemonic(128);\r\n\r\n// Generate 24-word mnemonic (256-bit)\r\nconst { mnemonic: mnemonic24 } = BIP39.generateMnemonic(256);\r\n\r\n// Validate mnemonic\r\nconst isValid = BIP39.validateChecksum(mnemonic);\r\n\r\n// Derive seed (with optional passphrase)\r\nconst seed = BIP39.deriveSeed(mnemonic, 'optional-passphrase');\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>✍️ Schnorr & ECDSA Signatures</strong></summary>\r\n\r\n```javascript\r\nimport { Schnorr, ECDSA } from 'j-bitcoin';\r\n\r\nconst privateKey = Buffer.alloc(32, 'key');\r\nconst messageHash = Buffer.alloc(32, 'msg');\r\n\r\n// Schnorr (BIP340)\r\nconst schnorr = new Schnorr();\r\nconst schnorrSig = await schnorr.sign(privateKey, messageHash);\r\nconst schnorrPubKey = schnorr.getPublicKey(privateKey);\r\nconst isValidSchnorr = await schnorr.verify(schnorrSig.signature, messageHash, schnorrPubKey);\r\n\r\n// ECDSA\r\nconst ecdsaSig = ECDSA.sign(privateKey, messageHash);\r\nconst ecdsaPubKey = ECDSA.getPublicKey(privateKey);\r\nconst isValidEcdsa = ECDSA.verify(ecdsaSig, messageHash, ecdsaPubKey);\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>🏗️ Transaction Building</strong></summary>\r\n\r\n```javascript\r\nimport { CustodialWallet } from 'j-bitcoin';\r\n\r\nconst wallet = CustodialWallet.fromMnemonic('main', mnemonic);\r\n\r\n// Create transaction builder\r\nconst builder = wallet.createTransaction();\r\n\r\n// Add inputs and outputs\r\nbuilder.addInput(txid, vout, sequence);\r\nbuilder.addOutput(address, amount);\r\nbuilder.setFeeRate(10); // sat/vB\r\n\r\n// Sign with wallet keys\r\nawait wallet.signTransaction(builder, [\r\n  { account: 0, change: 0, index: 0, type: 'segwit' }\r\n]);\r\n\r\n// Get raw transaction hex\r\nconst rawTx = builder.build().toHex();\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>📍 Bech32 Address Encoding</strong></summary>\r\n\r\n```javascript\r\nimport { BECH32 } from 'j-bitcoin';\r\n\r\n// Encode public key to SegWit address\r\nconst address = BECH32.to_P2WPKH(publicKeyHex, 'main');\r\n\r\n// Encode to Taproot address  \r\nconst taprootAddr = BECH32.to_P2TR(xOnlyPubKeyHex, 'main');\r\n\r\n// Decode address\r\nconst { program, version, type } = BECH32.decode(address);\r\n```\r\n\r\n</details>\r\n\r\n---\r\n\r\n## 📚 API Reference\r\n\r\n### Wallet Classes\r\n\r\n| Class | Description |\r\n|-------|-------------|\r\n| `CustodialWallet` | Full HD wallet with BIP32/39/44/49/84/86 support |\r\n| `NonCustodialWallet` | Threshold (TSS) + HD hybrid wallet |\r\n\r\n### Wallet Methods\r\n\r\n| Method | Description |\r\n|--------|-------------|\r\n| `createNew(network, strength)` | Create new wallet with mnemonic |\r\n| `fromMnemonic(network, mnemonic)` | Restore from BIP39 phrase |\r\n| `fromWIF(wif)` | Import from WIF private key |\r\n| `fromExtendedKey(network, xprv/xpub)` | Import from extended key |\r\n| `getReceivingAddress(account, index, type)` | Get external address |\r\n| `getChangeAddress(account, index, type)` | Get internal address |\r\n| `getAddresses(account, type, count)` | Batch generate addresses |\r\n| `signMessage(message, account, index, type)` | Sign message |\r\n| `createTransaction()` | Create transaction builder |\r\n| `signTransaction(builder, inputInfo)` | Sign transaction |\r\n| `exportWIF(account, change, index, type)` | Export key as WIF |\r\n\r\n### Cryptographic Modules\r\n\r\n| Module | Description |\r\n|--------|-------------|\r\n| `BIP39` | Mnemonic generation (12-24 words), validation, seed derivation |\r\n| `ECDSA` | Standard Bitcoin signatures with recovery |\r\n| `Schnorr` | BIP340 Schnorr signatures |\r\n| `BECH32` | Bech32/Bech32m address encoding (BIP173/BIP350) |\r\n| `BIP322` | Generic message signing for all address types |\r\n| `b58encode` / `b58decode` | Base58Check encoding |\r\n\r\n---\r\n\r\n## 🧪 Testnet Verified\r\n\r\nAll address types and signing algorithms have been tested on **Bitcoin Testnet4** with real transactions:\r\n\r\n| Address Type | Custodial | Non-Custodial (TSS) |\r\n|--------------|:---------:|:-------------------:|\r\n| Legacy (P2PKH) | ✅ | ✅ |\r\n| Wrapped SegWit (P2SH-P2WPKH) | ✅ | ✅ |\r\n| Native SegWit (P2WPKH) | ✅ | ✅ |\r\n| Taproot (P2TR) | ✅ | ✅ |\r\n\r\n---\r\n\r\n## 📁 Project Structure\r\n\r\n```\r\nsrc/\r\n├── wallet/                    # Wallet implementations\r\n│   ├── custodial.js          # HD wallet (BIP32/39/44/49/84/86)\r\n│   └── non-custodial.js      # Threshold signature + HD wallet\r\n├── bip/                       # BIP standards\r\n│   ├── BIP173-BIP350.js      # Bech32/Bech32m encoding\r\n│   ├── bip32/                # HD key derivation\r\n│   ├── bip39/                # Mnemonic generation\r\n│   └── bip49.js              # P2SH-P2WPKH support\r\n├── core/\r\n│   ├── constants.js          # Network/crypto constants\r\n│   ├── crypto/\r\n│   │   ├── hash/             # RIPEMD160, HASH160\r\n│   │   └── signatures/       # ECDSA, Schnorr, Threshold\r\n│   └── taproot/              # Taproot support\r\n├── encoding/\r\n│   ├── base58.js             # Base58Check\r\n│   ├── base32.js             # Bech32/Bech32m\r\n│   └── address/              # Address encode/decode\r\n├── transaction/\r\n│   ├── builder.js            # Transaction construction\r\n│   ├── psbt.js               # PSBT support\r\n│   ├── message-signing.js    # BIP322 message signing\r\n│   └── script-builder.js     # Script creation\r\n└── utils/\r\n    ├── validation.js         # Input validation\r\n    └── address-helpers.js    # Address utilities\r\n```\r\n\r\n---\r\n\r\n## 🔒 Security\r\n\r\n> ⚠️ **Important**: This library handles private keys and cryptographic material.\r\n\r\n- **Never share** private keys, mnemonics, or threshold shares\r\n- **Test on testnet** before mainnet deployment\r\n- **Store securely** - use encrypted offline storage for mnemonics\r\n- **Validate inputs** - always validate addresses and signatures\r\n- **Clear sensitive data** - call `wallet.destroy()` when done\r\n\r\n---\r\n\r\n## 🛠️ Development\r\n\r\n```bash\r\n# Install dependencies\r\nnpm install\r\n\r\n# Run tests\r\nnpm test\r\nnpm run test:coverage\r\n\r\n# Run wallet compliance tests\r\nnode test/custodial-test.js\r\nnode test/non-custodial-test.js\r\n\r\n# Run comprehensive feature tests (43 tests)\r\nnode test/test-all-features.js\r\n\r\n# Run testnet testing (requires funding)\r\nnode test/testnet-test.js\r\n\r\n# Lint and format\r\nnpm run lint\r\nnpm run format\r\n```\r\n\r\n---\r\n\r\n## 📦 Dependencies\r\n\r\n- [@noble/curves](https://github.com/paulmillr/noble-curves) - Audited secp256k1 implementation\r\n- [bn.js](https://github.com/indutny/bn.js) - BigNum arithmetic\r\n\r\n---\r\n\r\n## 📄 License\r\n\r\nISC License - see [LICENSE](LICENSE)\r\n\r\n---\r\n\r\n## 🔗 Links\r\n\r\n- [📦 npm Package](https://www.npmjs.com/package/j-bitcoin)\r\n- [💻 GitHub Repository](https://github.com/yfbsei/J-Bitcoin)\r\n- [🐛 Report Issues](https://github.com/yfbsei/J-Bitcoin/issues)\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n  <strong>⭐ Star this repo if you find it useful!</strong>\r\n</p>\r\n\r\n<p align=\"center\">\r\n  Made with ❤️ for the Bitcoin community\r\n</p>","readmeFilename":"README.md"}