{"_id":"@scure/btc-signer","_rev":"25-7e589ca4a5998fe8173b08d031841537","name":"@scure/btc-signer","dist-tags":{"beta":"2.0.0-beta.1","latest":"2.4.1"},"versions":{"0.5.0":{"name":"@scure/btc-signer","version":"0.5.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@0.5.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"5dc170e3d9266d6d7777657288d2571768090377","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-0.5.0.tgz","fileCount":8,"integrity":"sha512-kgxcuPa9u06CZE8VWcAlPMwjMGhpAru6nAgQ1+of9Fe+hcIGEl2qn2FlpYYr+fRo1yE87DFVqxD5SFs0DUuSgA==","signatures":[{"sig":"MEUCIQC5nYaajTde1iT6meftqrtoTLRPQAAJF3Ko5orKaDltEgIgXZbE0zRcZb/6aXtvVd9I4BqgsAbYLUdaJQ3zeBGJhjU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":427843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkB+z2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzVA//eboZ3V/DGObA/ex0NOjIg2iS/JpDZDO2/lStMArA/cmBH1uc\r\ncN/oDB98WbkcBI20wtmtgIcnGV4NUMbPaVX1qgnBXoRu6SY5SibONda6Gk0Z\r\nSq0LI7YZS0zUBZptDPsDH4MQQWiAW+3UaqHKItibCt07064+2KSKCD3GKsD+\r\nFHhhU6pOMuW43pmqC4UlwRjmrSl5yiV81oBa5Hb9BthNAyV896loNi/9+hRe\r\no82dpRqsI1L3NZ9eF9Suza84VEhxvsgvwm7Wu11QOtk68qGZbPBnkGDXOMhH\r\nuQ+Cwf1fOa1yAxowuW5S9Ir+39gW3e1QHj9T4NyI6RFIHGjI/Qc0C/PUfaw7\r\n1WhYyK7syc/Bd4y6tEHShLW7iU1OT4w/GtpepIOTiVteuaUnZskAqZGiJkLa\r\nH1yYAlaJPf0WLzo3XSuBsCBsE2juSfwmUo/RS4i5BY3WA92oDfTGZaTNZIY8\r\nVLCX3sxp+fKIdb403O54BjuK3ly6AEJyxTqOJpCFo4aM3/SQ7hCpJ2jI/5Aq\r\nJuCNVXYJAU3bh+rWbNj4kqUaIxec9XvKbFAE9ctsJypmzu/opVS506PajvQv\r\nT4SEHymFJ+lyH/jRJqe2DvmXGQibFRBLK8XZ9M6LrYr6mF6Reho16tMh4jAJ\r\nXSxA3Rb0OCb3KxM/zQ+o/9ARRqGxgwmi7PU=\r\n=hZVN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","funding":[{"url":"https://paulmillr.com/funding/","type":"individual"}],"gitHead":"a0937a2dc933ea1244945dedd748c6c39d208984","scripts":{"lint":"prettier --check index.ts","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"9.3.1","description":"Audited minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"18.14.0","dependencies":{"@scure/base":"~1.1.0","micro-packed":"~0.3.2","@noble/curves":"~0.8.0","@noble/hashes":"~1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"2.6.2","typescript":"4.7.3","@scure/bip32":"~1.1.0","micro-should":"0.4.0","micro-packed-debugger":"0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_0.5.0_1678241014413_0.8115098487644312","host":"s3://npm-registry-packages"}},"0.5.1":{"name":"@scure/btc-signer","version":"0.5.1","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@0.5.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"79e2e89a359c5ba9aa944ba5bd487a6ce1b2ad36","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-0.5.1.tgz","fileCount":8,"integrity":"sha512-T8ViYQEwAz79UNdfrdpxUeGuriYlvgxH2EouL7gTJZJ3jAqK/0ft3gL0VsOkrmYx8XfIX+p89tJFxuy/MXhgoA==","signatures":[{"sig":"MEUCICHkTiTpQEORov4ximUs3G9/zKYfKwdEceYonN60tP49AiEAt8J59EYAxndC6yBrjLqzk6d7vHlHzMj7LxlVcUNyrtA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":437227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkE2PIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvVhAAiUnC/A8gXgwjNDhmuISYPibXMR1mZxD+/PMEEKuzRYmIWeN6\r\nRt9+VTYjT0+3n7DeOLaqy7V82+zVnCr5CgooFxD017RLloEdBrhTTnzxSmQP\r\nEEOh/ZfsaAeXBduRp2xwKRiqbHcvxURh9h5A+PT1LP//Z5tHIWjP4EPLGMNR\r\nJccUikX+zjtf5IGRhvpjkdgcDnqApH0aNMWM6Z3p318dvYFTdt+yfkYeavEX\r\nCtFz2aPHZ1mvEh/K0wI0fWCz1wVBQYzI02ggaKzKg/qrX4oihPAxzVM6VUGV\r\nlI3rNON1XaFegKXZiga9fcdJenGa78vb6aUnAK3EzUtwkocgdMzPXaOBnv+j\r\ndF2s7LcD6fKEg/7k7ce+ytf9WfwJXcsPT7WWDGuvwsiwLzvh0V8U13DWE4r3\r\npTFqobO0subQ2nfKxdLf4Y1BlpWQJTkZY+eA2GGPDcFKi7yZIct5r7/EclYq\r\nKoxLR7e4IqPw8nZvqJbkEx7mDOPmfv76W9uPMIGqfVj9YsocSCRNmwwMZ18a\r\n9KWBr08g0CeCls1N/oCCIOp3WTTJ1HgOneucsswf2QT+qQcWidUTNMohEtbC\r\n4Jtw6I+z5vFMBGrKHGCOd4mmw7exmCSkYRAzBuZ3ZEq+w2CKOS3OkKU//SLg\r\nbFIi1allF7YenBYq5lM+Rzqjt2slDriuI9E=\r\n=5Dn4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","funding":[{"url":"https://paulmillr.com/funding/","type":"individual"}],"gitHead":"7ef07e02324decc5674e5457c403bd73c4775a02","scripts":{"lint":"prettier --check index.ts","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"9.4.0","description":"Audited minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"19.6.0","dependencies":{"@scure/base":"~1.1.0","micro-packed":"~0.3.2","@noble/curves":"~0.8.3","@noble/hashes":"~1.3.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"2.8.4","typescript":"5.0.2","@scure/bip32":"~1.2.0","micro-should":"0.4.0","micro-packed-debugger":"0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_0.5.1_1678992328135_0.7055587278405655","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@scure/btc-signer","version":"1.0.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.0.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"196c05beb24285af2c6c4c0c453db2d13d68650a","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.0.0.tgz","fileCount":8,"integrity":"sha512-xBMV/QPWz5BxWQye4DU7133fo9qTgkAcf1RBMSe2zQZHPfpYI1BiC0ITFtHyUbPZvZi0xvstFcXSOW+eKoj/og==","signatures":[{"sig":"MEUCIQCuzyf5rkO/cetVnd8kEX6WBjBX/Bgl0Wrlycf9c8Fy6AIgM+tdlTJJTmaDHUA6SrRYMa+lpO5jWW0AaUFeQxVJ/6I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":437232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNhxhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmor7Q/9GfUHXGDn0yUbdcvWbYFuJqCK1TP4bUkBSaJ/pvKO+SWUgfkz\r\nhlv9L7LSto8qlrRHvntUEM0bdZRYRzGEVWRF7sIAcP3MYgmQOmNxt2Cdxcxn\r\nBlgZfE+fy2loWMdYs11MUOgnkHqmrUsMLgBUJAdajw/cfoHdfOHOMQjXjAcG\r\nGdeZ7UflDawRm9XlVXro/wxUY3G8qTSGucyUTYpd+CMLIkBCbcaKDQSP+g8F\r\n+7Q/OUaBI4JIhba5bnc0YpCmZt+FsMeeOTrekJ3FB/B489QsQPbbfnrdsIz0\r\nJrmiepNQEwKQugr6fThc2eJPtc1NnJhN45Ch388tegdaK7PHKAdNEpIX+syQ\r\nuC3pTxdhzufWmm4d+KynJwGGecziQnQPPW4M7lYJduL6wKO+XCYzV4zwfCt7\r\naMZIq5ij1uQyGiMxbe3cisRtutYGnD1c0+DXgRXrNcZGNuEbpdNrmgvtjI5D\r\nR1wD3xV6O0WgTEjLun/XiDCuJGVrcOSpt64cOYhkxrgR/5QXlTUX6GgYNzRq\r\nTE4MKSwbdPE7o04JpAxMK1dIeSLhPZzgERQkHIC8tdv706a/JTApBYpeUOZ6\r\n9FV/jFdjEbYxfYIR8PC6yU7QolCbPeyP99ptKBbue4C9ErfaKv5+hySsdKcw\r\nhe7FlVto7z3JcGxpyHcC6GpC1AI3+/Jnsp8=\r\n=YNCo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","funding":[{"url":"https://paulmillr.com/funding/","type":"individual"}],"gitHead":"2784d49e5279d3a7fbddedf95938659bede6d9ff","scripts":{"lint":"prettier --check index.ts","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"9.4.0","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"19.6.0","dependencies":{"@scure/base":"~1.1.1","micro-packed":"~0.3.2","@noble/curves":"~1.0.0","@noble/hashes":"~1.3.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"2.8.4","typescript":"5.0.2","@scure/bip32":"~1.3.0","micro-should":"0.4.0","micro-packed-debugger":"0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.0.0_1681267809286_0.7608363321423683","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@scure/btc-signer","version":"1.0.1","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.0.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"de96c14bb26599252b4a7ba764027165a82e46a1","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.0.1.tgz","fileCount":8,"integrity":"sha512-sPGK7p+qHJSIs6zyzTjXCdt5mizEMelaYC3JPJGr1+NfVdYFfcRxGf9h4QfNVngHIHFSn39fzJhTBa5LSNpA4w==","signatures":[{"sig":"MEUCIQDzbrqsQAfnol49WPNXRQomrMW0ED0tV08mk9XLgEiGqAIgUvfywLv8Yn9dmwyE1BnSQ+ZE1m7+ge1P35fIz85QQZQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"unpackedSize":436712},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","funding":"https://paulmillr.com/funding/","gitHead":"91b37a5e2d5bc372d079f399efa552f4eb132cb7","scripts":{"lint":"prettier --check index.ts","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"9.7.1","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"20.3.0","dependencies":{"@scure/base":"~1.1.1","micro-packed":"~0.3.2","@noble/curves":"~1.0.0","@noble/hashes":"~1.3.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"2.8.4","typescript":"5.0.2","@scure/bip32":"~1.3.0","micro-should":"0.4.0","micro-packed-debugger":"0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.0.1_1687215038175_0.50598259558322","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@scure/btc-signer","version":"1.1.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.1.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"d3b8c66ad4b588a98ab29a09796a03ac8b06ad4b","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.1.0.tgz","fileCount":8,"integrity":"sha512-kCX7WaaTJr0VZIXDvaY0wNZfzZoZuLnPz4G0qmKXN8bnNx5M86wb1cce9XrZcfzb0jrVAbZJqNpxmE1e7Ka2hA==","signatures":[{"sig":"MEQCIHZjyCZ02pOTPywL7GW4Zh1qfiewyEdhX0fEjjzekPPhAiBWssbsQPSRaMxgyc+7se56eofzEt/ntVs6JD02jtaxnA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":442395},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","funding":"https://paulmillr.com/funding/","gitHead":"38c40320953c837cc124057d1dbd247679b081ea","scripts":{"lint":"prettier --check index.ts","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc","format":"prettier --write index.ts","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.0.0","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"20.5.1","dependencies":{"@scure/base":"~1.1.3","micro-packed":"~0.3.2","@noble/curves":"~1.2.0","@noble/hashes":"~1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"2.8.4","typescript":"5.0.2","@scure/bip32":"~1.3.2","micro-should":"0.4.0","micro-packed-debugger":"0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.1.0_1693751780189_0.34939168045461577","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@scure/btc-signer","version":"1.1.1","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.1.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"7c01e32cc6a882a7d5e64ae3068d5645f7c36f1a","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.1.1.tgz","fileCount":8,"integrity":"sha512-oXDbQFnGEQNHLNcTxM/MHXaQnZzSmoxunwXQbBr2Eg9ALAjYB9xvUa+EywkUSbU82Gn0/OEm0Gg9dz5HYifAIg==","signatures":[{"sig":"MEYCIQDkFsssKmWJBIEQfXGOuVRpGqO0k4/71hZsxdNDblkLTwIhAKYFELSE+FraQ7cT4FLYkXeU8lABPpA+9lDw+8o8eu2J","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":440268},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","funding":"https://paulmillr.com/funding/","gitHead":"9a8d39dbd6fad0aa6c6683dbfc631653821fd07d","scripts":{"lint":"prettier --check index.ts","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc","format":"prettier --write index.ts","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.2.5","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"20.10.0","dependencies":{"@scure/base":"~1.1.4","micro-packed":"~0.4.0","@noble/curves":"~1.3.0","@noble/hashes":"~1.3.3"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.1.1","typescript":"5.3.2","@scure/bip32":"~1.3.3","micro-should":"0.4.0","micro-packed-debugger":"0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.1.1_1702340014927_0.20200916506197997","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@scure/btc-signer","version":"1.2.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.2.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"f96427b3c3c9f59c9a26234d9040d65be9589b22","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.2.0.tgz","fileCount":9,"integrity":"sha512-EopDXEzFblSwj/hMb+Hn4Pm/3LnDPIcgYbSCFQCkQMMZiIGcB9UUxA/mPuGoGVPkI4N4g7KkSurQB7XjEcFBmw==","signatures":[{"sig":"MEYCIQCC7dCkrjDLu1GOyM/x5c0Hgs+sGwNm2upZE/6eEvJzTQIhAI+IpI2s7a5afrok7bx0lo4Iw8U51HfDQOgbmQrx7Ge3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":513329},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","exports":{".":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"342ad080071d7969f170ccfd3a2a8ac3aa25a03d","scripts":{"lint":"prettier --check index.ts","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc && tsc -p tsconfig.esm.json","format":"prettier --write index.ts","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.2.5","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"20.10.0","dependencies":{"@scure/base":"~1.1.5","micro-packed":"~0.5.0","@noble/curves":"~1.3.0","@noble/hashes":"~1.3.3"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.1.1","typescript":"5.3.2","@scure/bip32":"~1.3.3","micro-should":"0.4.0","micro-packed-debugger":"0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.2.0_1704511509305_0.771491461816477","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"@scure/btc-signer","version":"1.2.1","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.2.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"57a8367e61c9193cf9022b905ca4654b2838f856","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.2.1.tgz","fileCount":9,"integrity":"sha512-/Zle18/aWhYDBuBeXGDGJTdo0/LKpQhU8ETBJeWABCQkbk0QHCFCinidTiz9hdQFfh0HtasPGq5p6EodVCfEew==","signatures":[{"sig":"MEUCIFwXRLoRkzSuXr3ZxEDSI3Nm1TisW4/YgATD4Maj+mBmAiEA3aByM56vSp4VZTM4p/z7kr5krrlQSNliF4QRfTfQ2ts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":515664},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","exports":{".":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"6b41acbf2319d03665e4bc67cd435f60ddc7665d","scripts":{"lint":"prettier --check index.ts","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc && tsc -p tsconfig.esm.json","format":"prettier --write index.ts","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.3.0","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"20.10.0","dependencies":{"@scure/base":"~1.1.5","micro-packed":"~0.5.1","@noble/curves":"~1.3.0","@noble/hashes":"~1.3.3"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.1.1","typescript":"5.3.2","@scure/bip32":"~1.3.3","micro-should":"0.4.0","micro-packed-debugger":"0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.2.1_1705050448441_0.7944007571449483","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"@scure/btc-signer","version":"1.2.2","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.2.2","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"4166527d8083c3a0312cb9b44238779093d659be","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.2.2.tgz","fileCount":10,"integrity":"sha512-+jGiCYgy7LIIQdIW4htZYVS41RTV93bUB5OU83CIahNvQpqCkIKIcnod1nv2YR1AvQp3U33MdyCLoBGaRWAkRg==","signatures":[{"sig":"MEUCIQCPQBGVMp3WZatKxuP+Ja+2j1I6woFNoz37jpwsw5CT7wIgKmWxgo8+4ln3hHkukHuWtNoB0m4ubkBLfFeB89LAfSs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":639012},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","exports":{".":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"42d0617a52d4f0dad322316e479baca148ee4ab0","scripts":{"lint":"prettier --check index.ts","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc && tsc -p tsconfig.esm.json","format":"prettier --write index.ts","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.5.0","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"20.11.1","dependencies":{"@scure/base":"~1.1.6","micro-packed":"~0.5.3","@noble/curves":"~1.4.0","@noble/hashes":"~1.4.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.1.1","typescript":"5.3.2","@scure/bip32":"~1.4.0","micro-should":"0.4.0","@paulmillr/jsbt":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.2.2_1711286682028_0.46439732987981275","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@scure/btc-signer","version":"1.3.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.3.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"842655241a2605f25df27c0d6ab35ca566a43fff","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.3.0.tgz","fileCount":61,"integrity":"sha512-/0cxVHDy+gsiEbZGa5wcZMK/oZ0YxSVUqnqUF9dGZFC/rhjE5Q3V94Yg0TusP3dxG4YLKZ7m9LYnqccLzMapDA==","signatures":[{"sig":"MEUCIQDKuSnPofK9TjW0VIU5gaelyf6HF44zTjBgixEF/jrJoAIge6uqALJx6I+ArOLjl29Ew68P+K1VYCaqOPvaUsrnW6Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":827960},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","exports":{".":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"},"./psbt":{"types":"./lib/psbt.d.ts","import":"./lib/esm/psbt.js","default":"./lib/psbt.js"},"./utxo":{"types":"./lib/utxo.d.ts","import":"./lib/esm/utxo.js","default":"./lib/utxo.js"},"./index":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"},"./utils":{"types":"./lib/utils.d.ts","import":"./lib/esm/utils.js","default":"./lib/utils.js"},"./script":{"types":"./lib/script.d.ts","import":"./lib/esm/script.js","default":"./lib/script.js"},"./payment":{"types":"./lib/payment.d.ts","import":"./lib/esm/payment.js","default":"./lib/payment.js"},"./transaction":{"types":"./lib/transaction.d.ts","import":"./lib/esm/transaction.js","default":"./lib/transaction.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"678c859e1ee4d214121b5d46b6dd904e6b98caf9","scripts":{"lint":"prettier --check src","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc && tsc -p tsconfig.esm.json","format":"prettier --write src","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.5.2","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"20.12.2","dependencies":{"@scure/base":"~1.1.6","micro-packed":"~0.5.3","@noble/curves":"~1.4.0","@noble/hashes":"~1.4.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.1.1","typescript":"5.3.2","@scure/bip32":"~1.4.0","micro-should":"0.4.0","@paulmillr/jsbt":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.3.0_1713367874510_0.03480300544270043","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@scure/btc-signer","version":"1.3.1","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.3.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"3aa587a079cbe98ef0ba6385408695c11a1644ba","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.3.1.tgz","fileCount":61,"integrity":"sha512-PMXk3PRfqzdM33dDejtmfBGK6fIr24hHq4x7x0R24rBkRLUac5UyC31BglAddLiv409+feT8oH0rgu5Tfvch9w==","signatures":[{"sig":"MEYCIQCk7pOUKrgB0SyMFJ77V/H0mmpc1jzBwv+3JjC+Fz9Z5wIhAIUU/Y5Ab86B6yeLXShKWd3spmGcz6/zsuXL9hfNNb8/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":834994},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","exports":{".":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"},"./psbt":{"types":"./lib/psbt.d.ts","import":"./lib/esm/psbt.js","default":"./lib/psbt.js"},"./utxo":{"types":"./lib/utxo.d.ts","import":"./lib/esm/utxo.js","default":"./lib/utxo.js"},"./index":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"},"./utils":{"types":"./lib/utils.d.ts","import":"./lib/esm/utils.js","default":"./lib/utils.js"},"./script":{"types":"./lib/script.d.ts","import":"./lib/esm/script.js","default":"./lib/script.js"},"./payment":{"types":"./lib/payment.d.ts","import":"./lib/esm/payment.js","default":"./lib/payment.js"},"./transaction":{"types":"./lib/transaction.d.ts","import":"./lib/esm/transaction.js","default":"./lib/transaction.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"5ead71ea9a873d8ba1882a9cd6aa561ad410d0d1","scripts":{"lint":"prettier --check src","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc && tsc -p tsconfig.esm.json","format":"prettier --write src","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.5.2","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"20.12.2","dependencies":{"@scure/base":"~1.1.6","micro-packed":"~0.5.3","@noble/curves":"~1.4.0","@noble/hashes":"~1.4.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.1.1","typescript":"5.3.2","@scure/bip32":"~1.4.0","micro-should":"0.4.0","@paulmillr/jsbt":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.3.1_1713541396667_0.7194316022565157","host":"s3://npm-registry-packages"}},"1.3.2":{"name":"@scure/btc-signer","version":"1.3.2","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.3.2","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"56cf02a2e318097b1e4f531fac8ef114bdf4ddc8","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.3.2.tgz","fileCount":61,"integrity":"sha512-BmcQHvxaaShKwgbFC0vDk0xzqbMhNtNmgXm6u7cz07FNtGsVItUuHow6NbgHmc+oJSBZJRym5dz8+Uu0JoEJhQ==","signatures":[{"sig":"MEYCIQDcKOWVh/cGNgrNyrULgjA0wLyrcuE+4ay3v0O3u3gd2wIhAMHzvwi5iU0ywMmWZtO355cES+cqErLLWCuAAdIu0yFK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":836156},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","exports":{".":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"},"./psbt":{"types":"./lib/psbt.d.ts","import":"./lib/esm/psbt.js","default":"./lib/psbt.js"},"./utxo":{"types":"./lib/utxo.d.ts","import":"./lib/esm/utxo.js","default":"./lib/utxo.js"},"./index":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"},"./utils":{"types":"./lib/utils.d.ts","import":"./lib/esm/utils.js","default":"./lib/utils.js"},"./script":{"types":"./lib/script.d.ts","import":"./lib/esm/script.js","default":"./lib/script.js"},"./payment":{"types":"./lib/payment.d.ts","import":"./lib/esm/payment.js","default":"./lib/payment.js"},"./transaction":{"types":"./lib/transaction.d.ts","import":"./lib/esm/transaction.js","default":"./lib/transaction.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"98d01610d1615937e2cc31ba739ee42953e80b1d","scripts":{"lint":"prettier --check src","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc && tsc -p tsconfig.esm.json","format":"prettier --write src","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.8.0","description":"Audited & minimal library for creating, signing & decoding Bitcoin transactions: with Schnorr, Taproot, UTXO & PSBT","directories":{},"_nodeVersion":"20.13.1","dependencies":{"@scure/base":"~1.1.6","micro-packed":"~0.6.2","@noble/curves":"~1.4.0","@noble/hashes":"~1.4.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.1.1","typescript":"5.3.2","@scure/bip32":"~1.4.0","micro-should":"0.4.0","@paulmillr/jsbt":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.3.2_1715987601636_0.16708772029638141","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@scure/btc-signer","version":"1.4.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.4.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"b8e87b7c2bee51f28cb991c6987708338a683438","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.4.0.tgz","fileCount":77,"integrity":"sha512-uSZqmiWWm1+wflQbiob0CrzQSCwDO9MmAxqsqk+tkiRcUv8GbC3Ptv9/2nUbsoUBuPN/6mBQJ/KOBzHjc5Bgow==","signatures":[{"sig":"MEUCIEMi6Sc5nZiRewnYSsGpH3VH1fwzbYtNobERhqlbWYavAiEA0EQgXOa4Gr24dlACcDpBrdtDJvM5KCsTldg7Pv8gl/U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":961644},"main":"./index.js","types":"./index.d.ts","module":"./esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./index.js"},"./psbt":{"import":"./esm/psbt.js","require":"./psbt.js"},"./utxo":{"import":"./esm/utxo.js","require":"./utxo.js"},"./index":{"import":"./esm/index.js","require":"./index.js"},"./utils":{"import":"./esm/utils.js","require":"./utils.js"},"./script":{"import":"./esm/script.js","require":"./script.js"},"./payment":{"import":"./esm/payment.js","require":"./payment.js"},"./transaction":{"import":"./esm/transaction.js","require":"./transaction.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"e0bb69be194fa5251a49385db21009dee79c2e1e","scripts":{"lint":"prettier --check src","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc && tsc -p tsconfig.esm.json","format":"prettier --write src","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.8.3","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"20.17.0","dependencies":{"@scure/base":"~1.1.9","micro-packed":"~0.6.2","@noble/curves":"~1.6.0","@noble/hashes":"~1.5.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.3.2","typescript":"5.5.2","@scure/bip32":"~1.5.0","micro-should":"0.4.0","@paulmillr/jsbt":"0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.4.0_1726636693893_0.8331463086785811","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@scure/btc-signer","version":"1.5.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.5.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"de0f6ea31c746a79a5e213099b406a57de1ef785","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.5.0.tgz","fileCount":77,"integrity":"sha512-KCtq5z73/VthxeXrxgWgZNgOz6tXaSRr1+mMPCec5+S2G3aDLnh+uLM/l4imBWFm5cTppKG0ZmEk0N2thC7WVA==","signatures":[{"sig":"MEQCIE9U3/8L1Qdb/M/r0V801roW6SPSrUf+nFPhExTpNnZVAiBhJJl0+QS3qugxjr/bToyaRsIQNsdGzozfnOWeLZJ5Kg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":961851},"main":"./index.js","types":"./index.d.ts","module":"./esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./index.js"},"./psbt":{"import":"./esm/psbt.js","require":"./psbt.js"},"./utxo":{"import":"./esm/utxo.js","require":"./utxo.js"},"./index":{"import":"./esm/index.js","require":"./index.js"},"./utils":{"import":"./esm/utils.js","require":"./utils.js"},"./script":{"import":"./esm/script.js","require":"./script.js"},"./payment":{"import":"./esm/payment.js","require":"./payment.js"},"./transaction":{"import":"./esm/transaction.js","require":"./transaction.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"3e7161c9c2302f678999fa509cfc8b672c00db6b","scripts":{"lint":"prettier --check src","test":"node test/index.test.js && node test/psbt-test/bip174-psbt-extended.test.js","build":"tsc && tsc -p tsconfig.esm.json","format":"prettier --write src","test:slow":"node test/index.test.js && node test/slow.test.js","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.9.1","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"20.18.0","dependencies":{"@scure/base":"~1.2.1","micro-packed":"~0.7.0","@noble/curves":"~1.7.0","@noble/hashes":"~1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.3.2","typescript":"5.5.2","@scure/bip32":"~1.6.0","micro-should":"0.4.0","@paulmillr/jsbt":"0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.5.0_1732351503382_0.23810776367606712","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@scure/btc-signer","version":"1.6.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.6.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"01796134be05507891f78f8536d99ce59a7cb559","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.6.0.tgz","fileCount":77,"integrity":"sha512-qd6ciJE4Onk1xdQEdjPvRbLRrH7EddPZagMuZOFv77R/76EWixENd6nuoxqHNEPGRbS09rgAhhPgT7j0oQdi1A==","signatures":[{"sig":"MEUCIC7c29HSDPcYxgfkoI3R2aczlO8KnfQIWyr8LiZ2TZVpAiEAu8P+wVYqQfsLzOLXLzRWHpFMYDfT6ST2eXNx6/MJHcQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":958162},"main":"./index.js","types":"./index.d.ts","module":"./esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./index.js"},"./psbt":{"import":"./esm/psbt.js","require":"./psbt.js"},"./utxo":{"import":"./esm/utxo.js","require":"./utxo.js"},"./index":{"import":"./esm/index.js","require":"./index.js"},"./utils":{"import":"./esm/utils.js","require":"./utils.js"},"./script":{"import":"./esm/script.js","require":"./script.js"},"./payment":{"import":"./esm/payment.js","require":"./payment.js"},"./transaction":{"import":"./esm/transaction.js","require":"./transaction.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"f9d7e454593736ab39116900f78bb4ed3d721535","scripts":{"lint":"prettier --check src","test":"node test/index.js","build":"tsc && tsc -p tsconfig.cjs.json","format":"prettier --write src","test:big":"node test/slow.test.js","test:bun":"bun test/index.js","test:deno":"deno --allow-env --allow-read test/index.js","build:release":"npx jsbt esbuild test/build","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.9.2","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"22.13.0","dependencies":{"@scure/base":"~1.2.2","micro-packed":"~0.7.2","@noble/curves":"~1.8.1","@noble/hashes":"~1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.3.2","typescript":"5.5.2","micro-bmark":"0.4.0","@scure/bip32":"~1.6.1","micro-should":"0.5.1","@paulmillr/jsbt":"0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.6.0_1737192199012_0.7050619069321373","host":"s3://npm-registry-packages-npm-production"}},"1.7.0":{"name":"@scure/btc-signer","version":"1.7.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.7.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"f510b4c1ad0c4d143c291cddee4b0797f94d567d","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.7.0.tgz","fileCount":86,"integrity":"sha512-GqwwBp05GLTJQ1Ja6am64GhDSFqKJrFbavMt/UZF4pNn/gXbZUcuWjJA4g7qtOudW1MGRYkIO5JsPWi6JmSoQw==","signatures":[{"sig":"MEQCIDIZM4DBsDMHthPr4bYMCjqn0vsPhSX5vIpHz59mzRuMAiAZyNKjwVRcpzO0bPML7LK5TZ3cfFhoOjMZtOK206WWrg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1088328},"main":"./index.js","types":"./index.d.ts","module":"./esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./index.js"},"./psbt":{"import":"./esm/psbt.js","require":"./psbt.js"},"./utxo":{"import":"./esm/utxo.js","require":"./utxo.js"},"./index":{"import":"./esm/index.js","require":"./index.js"},"./utils":{"import":"./esm/utils.js","require":"./utils.js"},"./musig2":{"import":"./esm/musig2.js","require":"./musig2.js"},"./script":{"import":"./esm/script.js","require":"./script.js"},"./payment":{"import":"./esm/payment.js","require":"./payment.js"},"./transaction":{"import":"./esm/transaction.js","require":"./transaction.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"4749bd0889d2b6b2f91536a77e3076f88230718f","scripts":{"lint":"prettier --check src","test":"node test/index.js","build":"tsc && tsc -p tsconfig.cjs.json","format":"prettier --write src","test:big":"node test/slow.test.js","test:bun":"bun test/index.js","test:deno":"deno --allow-env --allow-read test/index.js","build:release":"npx jsbt esbuild test/build","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.9.2","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"22.13.0","dependencies":{"@scure/base":"~1.2.2","micro-packed":"~0.7.2","@noble/curves":"~1.8.1","@noble/hashes":"~1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.2","typescript":"5.8.2","micro-bmark":"0.4.0","@scure/bip32":"~1.6.1","micro-should":"0.5.1","@paulmillr/jsbt":"0.3.2"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.7.0_1740787958797_0.041075678257904036","host":"s3://npm-registry-packages-npm-production"}},"1.8.0":{"name":"@scure/btc-signer","version":"1.8.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.8.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"f7bbd2f31c8417e680b38fd33c21dd5712ab7e59","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.8.0.tgz","fileCount":95,"integrity":"sha512-lzf9ugp2hZwP84bdRQuxdX2iib3wyUs7+8+Ph/hanVaXWGOZfSfgEZFaOyocj/Qh0Igt1WHkZh6hdh4KloynNQ==","signatures":[{"sig":"MEUCIEu/F1vcV7YRQfV+FD+xF7GJFPU0z15ixuyQZhm4/nAFAiEA40yPJhdgwYos98BpJz45JffAW0jQeUQ99Je623wRAFg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1138889},"main":"./index.js","types":"./index.d.ts","module":"./esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./index.js"},"./psbt":{"import":"./esm/psbt.js","require":"./psbt.js"},"./utxo":{"import":"./esm/utxo.js","require":"./utxo.js"},"./index":{"import":"./esm/index.js","require":"./index.js"},"./utils":{"import":"./esm/utils.js","require":"./utils.js"},"./musig2":{"import":"./esm/musig2.js","require":"./musig2.js"},"./script":{"import":"./esm/script.js","require":"./script.js"},"./payment":{"import":"./esm/payment.js","require":"./payment.js"},"./transaction":{"import":"./esm/transaction.js","require":"./transaction.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"05f40379f92e6bfe872943881a23c63c02896873","scripts":{"lint":"prettier --check src","test":"node test/index.js","build":"tsc && tsc -p tsconfig.cjs.json","format":"prettier --write src","test:big":"node test/slow.test.js","test:bun":"bun test/index.js","test:deno":"deno --allow-env --allow-read test/index.js","build:release":"npx jsbt esbuild test/build","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.9.2","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"22.13.0","dependencies":{"@scure/base":"~1.2.5","micro-packed":"~0.7.3","@noble/curves":"~1.9.0","@noble/hashes":"~1.8.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","typescript":"5.8.3","micro-bmark":"0.4.1","@scure/bip32":"~1.7.0","micro-should":"0.5.2","@paulmillr/jsbt":"0.3.3"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.8.0_1745511028822_0.0825684391372361","host":"s3://npm-registry-packages-npm-production"}},"1.8.1":{"name":"@scure/btc-signer","version":"1.8.1","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@1.8.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/scure-btc-signer","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"565e0116ca21c50fc16f2d1ee778081fdf662661","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.8.1.tgz","fileCount":95,"integrity":"sha512-8nX9T++dFyKpvqksNHfSi9CgRsGnHAQtCdIQ1y1GmbCGLpV97v4MUyemUUT6uDumKL3oo3m4niyY6A32nmdLuQ==","signatures":[{"sig":"MEQCIApDQiVEfAlrw3MBVBIEf8EhSxZKhGz6ovFX+L/LQ07IAiAsj78UzUXcoBA8xQ6OKotDiGUXzqk0cNP2q26btB3Xdw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@1.8.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1140774},"main":"./index.js","types":"./index.d.ts","module":"./esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./index.js"},"./psbt":{"import":"./esm/psbt.js","require":"./psbt.js"},"./utxo":{"import":"./esm/utxo.js","require":"./utxo.js"},"./index":{"import":"./esm/index.js","require":"./index.js"},"./utils":{"import":"./esm/utils.js","require":"./utils.js"},"./musig2":{"import":"./esm/musig2.js","require":"./musig2.js"},"./script":{"import":"./esm/script.js","require":"./script.js"},"./payment":{"import":"./esm/payment.js","require":"./payment.js"},"./psbt.js":{"import":"./esm/psbt.js","require":"./psbt.js"},"./utxo.js":{"import":"./esm/utxo.js","require":"./utxo.js"},"./index.js":{"import":"./esm/index.js","require":"./index.js"},"./utils.js":{"import":"./esm/utils.js","require":"./utils.js"},"./musig2.js":{"import":"./esm/musig2.js","require":"./musig2.js"},"./script.js":{"import":"./esm/script.js","require":"./script.js"},"./payment.js":{"import":"./esm/payment.js","require":"./payment.js"},"./transaction":{"import":"./esm/transaction.js","require":"./transaction.js"},"./transaction.js":{"import":"./esm/transaction.js","require":"./transaction.js"}},"funding":"https://paulmillr.com/funding/","gitHead":"84e7b7f45b6e29d44dd033b3874a691b84304a88","scripts":{"lint":"prettier --check src","test":"node test/index.js","build":"tsc && tsc -p tsconfig.cjs.json","format":"prettier --write src","test:big":"node test/slow.test.js","test:bun":"bun test/index.js","test:deno":"deno --allow-env --allow-read test/index.js","build:release":"npx jsbt esbuild test/build","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"10.9.2","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"22.13.0","dependencies":{"@scure/base":"~1.2.5","micro-packed":"~0.7.3","@noble/curves":"~1.9.0","@noble/hashes":"~1.8.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","typescript":"5.8.3","micro-bmark":"0.4.1","@scure/bip32":"~1.7.0","micro-should":"0.5.2","@paulmillr/jsbt":"0.3.3"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_1.8.1_1748549278206_0.5361565746659376","host":"s3://npm-registry-packages-npm-production"}},"2.0.0-beta.1":{"name":"@scure/btc-signer","version":"2.0.0-beta.1","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@2.0.0-beta.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://paulmillr.com/noble/#scure","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"9f2b20b734eada11d0abb851598248bfca90b6a5","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-2.0.0-beta.1.tgz","fileCount":53,"integrity":"sha512-IDRVN6nL1kDulILuenRWzZ8Ld5duFUHwBnzWhmgBFMzD0+bcR3H1YWkUnUFSMUTS++VINP9AYvoDGqoknxeHiA==","signatures":[{"sig":"MEQCIDxbp2jnyK5B+O0qEMbXjiLUOljqAP5DwqsLHyJF/5b/AiAsHIjKNbbHtNDw1hXfTvPOd+2KghWyH0U3tQJHsh0peQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":675612},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","funding":"https://paulmillr.com/funding/","gitHead":"929e2e46e8c4f353f44f8a6fc30ee02ae10f07b0","scripts":{"test":"node --no-warnings test/index.ts","build":"tsc","format":"prettier --write src test/*.test.*","test:big":"node test/slow.test.ts","test:bun":"bun test/index.ts","test:deno":"deno --allow-env --allow-read test/index.js","build:clean":"rm -f *.{js,d.ts,js.map,d.ts.map}","test:node20":"cd test; npx tsc; node compiled/test/index.js","build:release":"npx --no @paulmillr/jsbt esbuild test/build","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"11.4.2","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"24.4.1","dependencies":{"@scure/base":"2.0.0-beta.1","micro-packed":"0.8.0-beta.1","@noble/curves":"2.0.0-beta.3","@noble/hashes":"2.0.0-beta.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"prettier":"3.6.2","typescript":"5.9.2","micro-bmark":"0.4.2","@scure/bip32":"~1.7.0","micro-should":"0.5.3","@paulmillr/jsbt":"0.4.2"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_2.0.0-beta.1_1755434162621_0.18656965349857435","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@scure/btc-signer","version":"2.0.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@2.0.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://paulmillr.com/noble/#scure","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"5842fa8f0ceb10fe82596c6a62e1ec4af6157152","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-2.0.0.tgz","fileCount":48,"integrity":"sha512-UwdEcIkH/RRLVzAR1mqGGwLwmASD/4RL1zyZjsAWej+AdvAoRxURRi6yQsn0cAO8qEI+iSYDo7nTTgOue1KBlQ==","signatures":[{"sig":"MEYCIQCcOgwvQZcpuwYQjdTOZ+comWCq6XLCCXXU2olYaQB19gIhAKDbG6pzWM1TmkfiKQCmCoWrfsOOhl5ptzYO0lKZLaVP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":669389},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","funding":"https://paulmillr.com/funding/","gitHead":"591bf92a0a7513c96f30d55de9cf04492c66f6ca","scripts":{"test":"node --no-warnings test/index.ts","build":"tsc","format":"prettier --write src test/*.test.*","test:big":"node test/slow.test.ts","test:bun":"bun test/index.ts","test:deno":"deno --allow-env --allow-read test/index.js","build:clean":"rm -f *.{js,d.ts,js.map,d.ts.map}","test:node20":"cd test; npx tsc; node compiled/test/index.js","build:release":"npx --no @paulmillr/jsbt esbuild test/build","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"11.5.1","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"24.6.0","dependencies":{"@scure/base":"~2.0.0","micro-packed":"~0.8.0","@noble/curves":"~2.0.0","@noble/hashes":"~2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.6.2","typescript":"5.9.2","@scure/bip32":"~2.0.0","@paulmillr/jsbt":"0.4.4"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_2.0.0_1756138309753_0.3984235850754936","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@scure/btc-signer","version":"2.0.1","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@2.0.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://paulmillr.com/noble/#scure","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"06267325f80c8c6880dd846620ed859fea908a1e","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-2.0.1.tgz","fileCount":48,"integrity":"sha512-vk5a/16BbSFZkhh1JIJ0+4H9nceZVo5WzKvJGGWiPp3sQOExeW+L53z3dI6u0adTPoE8ZbL+XEb6hEGzVZSvvQ==","signatures":[{"sig":"MEUCIQDHdreKW47C9/5ZBfi79enXdU9V6Z5cQtO4tU6jiozpUgIgOqrVp42B17kWvBZYgxizaMc3e19yweuwibKOaOwpRj0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@2.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":669699},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","exports":{".":"./index.js","./p2p.js":"./p2p.js","./psbt.js":"./psbt.js","./utxo.js":"./utxo.js","./utils.js":"./utils.js","./musig2.js":"./musig2.js","./script.js":"./script.js","./payment.js":"./payment.js","./transaction.js":"./transaction.js"},"funding":"https://paulmillr.com/funding/","gitHead":"81e8b148d08a417a19c37cc1e30d3f7dc1de292a","scripts":{"test":"node --no-warnings test/index.ts","build":"tsc","format":"prettier --write src test/*.test.*","test:big":"node test/slow.test.ts","test:bun":"bun test/index.ts","test:deno":"deno --allow-env --allow-read test/index.js","build:clean":"rm -f *.{js,d.ts,js.map,d.ts.map}","test:node20":"cd test; npx tsc; node compiled/test/index.js","build:release":"npx --no @paulmillr/jsbt esbuild test/build","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"11.5.1","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"24.6.0","dependencies":{"@scure/base":"~2.0.0","micro-packed":"~0.8.0","@noble/curves":"~2.0.0","@noble/hashes":"~2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.6.2","typescript":"5.9.2","@scure/bip32":"~2.0.0","@paulmillr/jsbt":"0.4.4"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_2.0.1_1757379089954_0.659551189510065","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@scure/btc-signer","version":"2.2.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@2.2.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://paulmillr.com/noble/#scure","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"8aa38dcda9606a47deffb18fb1485e0c116ed17b","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-2.2.0.tgz","fileCount":48,"integrity":"sha512-ZXZ08sZqSZKEcOuEQnxTF66ouHtl6+UA6U/QfQM06K9WiOlEkXF4LviZCaSgkdiFh9cyMt9+xdup7JtEv3p0fw==","signatures":[{"sig":"MEYCIQDh1/VrYhLMkbOKL+sFM0lENfJjzhJJ0YTjyrBW2ZE7rQIhAKYMJ+FdU7cPwqjIye/+QTrV3YFSNFzS1tECKebbdMpy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@2.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1043647},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","exports":{".":"./index.js","./p2p.js":"./p2p.js","./psbt.js":"./psbt.js","./utxo.js":"./utxo.js","./utils.js":"./utils.js","./musig2.js":"./musig2.js","./script.js":"./script.js","./payment.js":"./payment.js","./transaction.js":"./transaction.js"},"funding":"https://paulmillr.com/funding/","gitHead":"7fcd12455f89f89a274e3ba2b3a4772f6a5e3858","scripts":{"test":"node --no-warnings test/index.ts","build":"tsc","check":"npx --no @paulmillr/jsbt check package.json","format":"prettier --write src test/*.test.*","test:bun":"bun test/index.ts","test:deno":"deno --allow-env --allow-read test/index.ts","test:slow":"node test/slow.test.ts","build:clean":"rm -f *.{js,d.ts,js.map,d.ts.map}","check:jsdoc":"npx --no @paulmillr/jsbt tsdoc package.json","test:node20":"cd test; npx tsc; node compiled/test/index.js","check:readme":"npx --no @paulmillr/jsbt readme package.json","build:release":"npx --no @paulmillr/jsbt esbuild test/build","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js","check:treeshake":"npx --no @paulmillr/jsbt treeshake package.json test/build/out-treeshake"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:244b163c-4b84-4157-b638-948f4d019d9f"}},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"11.6.1","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","dependencies":{"@scure/base":"~2.2.0","micro-packed":"~0.9.0","@noble/curves":"~2.2.0","@noble/hashes":"~2.2.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.6.2","typescript":"6.0.2","@scure/bip32":"2.0.0","@paulmillr/jsbt":"0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_2.2.0_1777368086926_0.2472511142266416","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"@scure/btc-signer","version":"2.3.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@2.3.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://paulmillr.com/noble/#scure","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"9b40085a6858f56afc837ec862dae01c95494a05","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-2.3.0.tgz","fileCount":34,"integrity":"sha512-05oEjx2l4VhT+CBGKqGqE+4R2n+XN7+z+vC5I0edzymHfmTZ8nrHvl0WGgPVaNPkOg/+elEhIB1gRROkunxCRg==","signatures":[{"sig":"MEUCIHjKw67UlizoLoKs4jXUkb1mZtmBK20GeJQ24oFPnnSfAiEAzNpzhR6wsY+bdh+gpzTCfDAAdmgi5W8ugmml9twj18Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@2.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":955398},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","exports":{".":"./index.js","./net.js":"./net.js","./p2p.js":"./p2p.js","./psbt.js":"./psbt.js","./utxo.js":"./utxo.js","./utils.js":"./utils.js","./musig2.js":"./musig2.js","./script.js":"./script.js","./payment.js":"./payment.js","./transaction.js":"./transaction.js"},"funding":"https://paulmillr.com/funding/","gitHead":"cb3fe0b2c7fc56ea6b1afe258710670c58b5e88f","scripts":{"test":"node test/index.ts","build":"tsc","check":"jsbt-check","format":"prettier --write src test/*.test.*","benchmark":"node benchmark/index.ts","test:slow":"node test/slow.test.ts","build:clean":"rm -f *.{js,d.ts}","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js","benchmark:size":"npx bismar@0.1.3 -s","benchmark:network":"node benchmark/network.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"paulmillr","email":"paul@paulmillr.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:d7cdb29b-2056-459c-a2b7-f24ba9dff037"}},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"12.0.2","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@scure/base":"~2.3.0","micro-packed":"~0.11.0","@noble/curves":"~2.3.0","@noble/hashes":"~2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.6.2","micro-ftch":"^1.1.0","typescript":"6.0.2","@scure/bip32":"2.2.0","@paulmillr/jsbt":"0.6.5"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_2.3.0_1786162649462_0.9823635527613439","host":"s3://npm-registry-packages-npm-production"}},"2.4.0":{"name":"@scure/btc-signer","version":"2.4.0","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@scure/btc-signer@2.4.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://paulmillr.com/noble/#scure","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"4553fb25cc19b6f0b936835c0707f3255e8587be","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-2.4.0.tgz","fileCount":34,"integrity":"sha512-jW9r1pfCCMka73X1cyxyYRc9A1ADpeS0+0GdNAsbITMojTcuI1ALTIOLdTkz8yBJj5pXIXBJm49Po6nUJ276wA==","signatures":[{"sig":"MEUCIEQ/5rLGy7MI4eSSw0kxx1LmcI7dU2n07jcj6/9wqQj8AiEA9L9zmBD7XbbCiTpjMy+wl5+TiGsZyaZmPm1yxYcIJNA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@2.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1115683},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","exports":{".":"./index.js","./net.js":"./net.js","./p2p.js":"./p2p.js","./psbt.js":"./psbt.js","./utxo.js":"./utxo.js","./utils.js":"./utils.js","./musig2.js":"./musig2.js","./script.js":"./script.js","./payment.js":"./payment.js","./transaction.js":"./transaction.js"},"funding":"https://paulmillr.com/funding/","gitHead":"2270193c08070ddd7525fd148a651ff6e09e7c44","scripts":{"test":"node test/index.ts","build":"tsc","check":"jsbt-check","format":"prettier --write src test/*.test.*","benchmark":"node benchmark/index.ts","test:slow":"node test/slow.test.ts","build:clean":"rm -f *.{js,d.ts}","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js","benchmark:size":"bismar -bsm","benchmark:network":"node benchmark/network.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"paulmillr","email":"paul@paulmillr.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:d7cdb29b-2056-459c-a2b7-f24ba9dff037"}},"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"12.0.2","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@scure/base":"2.4.0","micro-packed":"0.11.0","@noble/curves":"2.4.0","@noble/hashes":"2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"bismar":"0.1.8","prettier":"3.9.6","micro-ftch":"1.2.0","typescript":"6.0.3","@scure/bip32":"2.4.0","@paulmillr/jsbt":"0.7.1"},"_npmOperationalInternal":{"tmp":"tmp/btc-signer_2.4.0_1787947559814_0.4156926102702765","host":"s3://npm-registry-packages-npm-production"}},"2.4.1":{"_id":"@scure/btc-signer@2.4.1","bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"dist":{"shasum":"68efb8102b945d6e7eefb78a12bcab64f33ce11b","tarball":"https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-2.4.1.tgz","integrity":"sha512-ch6h66o9nPhEoe/KciMMUJeH2MBPB8UAJI1if35Fxl6885lKTsc9YoCRqTW0/RjI0Vv9GSg1tmKtHHODyAw81g==","fileCount":34,"unpackedSize":1115683,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@scure%2fbtc-signer@2.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC8GKRSR4MCqtpxgP83nr7KPvd3eUIfLfYrb2+fS2hwhgIhAMx4H89QvhG/oyo9SFPig0w4+0fx35+NV0Op43nTLB5D"}]},"main":"index.js","name":"@scure/btc-signer","type":"module","types":"index.d.ts","author":{"url":"https://paulmillr.com","name":"Paul Miller"},"module":"index.js","exports":{".":"./index.js","./net.js":"./net.js","./p2p.js":"./p2p.js","./psbt.js":"./psbt.js","./utxo.js":"./utxo.js","./utils.js":"./utils.js","./musig2.js":"./musig2.js","./script.js":"./script.js","./payment.js":"./payment.js","./transaction.js":"./transaction.js"},"funding":"https://paulmillr.com/funding/","gitHead":"373d2f3ed32478fcf52a088c14c769df3d29acb8","license":"MIT","scripts":{"test":"node test/index.ts","build":"tsc","check":"jsbt-check","format":"prettier --write src test/*.test.*","benchmark":"node benchmark/index.ts","test:slow":"node test/slow.test.ts","build:clean":"rm -f *.{js,d.ts}","test:extended":"node --experimental-loader ./test/bitcoinjs-test/esm-loader.js ./test/bitcoinjs-test/index.test.js","benchmark:size":"bismar -bsm","benchmark:network":"node benchmark/network.ts"},"version":"2.4.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d7cdb29b-2056-459c-a2b7-f24ba9dff037"},"approver":{"name":"paulmillr","email":"paul@paulmillr.com"}},"homepage":"https://paulmillr.com/noble/#scure","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"_npmVersion":"12.0.2","description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","directories":{},"maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@scure/base":"2.4.0","micro-packed":"0.11.1","@noble/curves":"2.4.0","@noble/hashes":"2.4.0"},"devDependencies":{"bismar":"0.1.8","prettier":"3.9.6","micro-ftch":"1.2.0","typescript":"6.0.3","@scure/bip32":"2.4.0","@paulmillr/jsbt":"0.7.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/btc-signer_2.4.1_1788014733041_0.49470312820155793"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-08T02:03:34.294Z","modified":"2026-08-29T14:45:33.460Z","0.5.0":"2023-03-08T02:03:34.589Z","0.5.1":"2023-03-16T18:45:28.370Z","1.0.0":"2023-04-12T02:50:09.454Z","1.0.1":"2023-06-19T22:50:38.328Z","1.1.0":"2023-09-03T14:36:20.437Z","1.1.1":"2023-12-12T00:13:35.114Z","1.2.0":"2024-01-06T03:25:09.478Z","1.2.1":"2024-01-12T09:07:28.616Z","1.2.2":"2024-03-24T13:24:42.244Z","1.3.0":"2024-04-17T15:31:14.748Z","1.3.1":"2024-04-19T15:43:16.816Z","1.3.2":"2024-05-17T23:13:21.828Z","1.4.0":"2024-09-18T05:18:14.216Z","1.5.0":"2024-11-23T08:45:03.591Z","1.6.0":"2025-01-18T09:23:19.286Z","1.7.0":"2025-03-01T00:12:39.106Z","1.8.0":"2025-04-24T16:10:29.065Z","1.8.1":"2025-05-29T20:07:58.482Z","2.0.0-beta.1":"2025-08-17T12:36:02.874Z","2.0.0":"2025-08-25T16:11:49.980Z","2.0.1":"2025-09-09T00:51:30.445Z","2.2.0":"2026-04-28T09:21:27.121Z","2.3.0":"2026-08-08T04:17:29.553Z","2.4.0":"2026-08-28T20:05:59.935Z","2.4.1":"2026-08-29T14:45:33.152Z"},"bugs":{"url":"https://github.com/paulmillr/scure-btc-signer/issues"},"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","homepage":"https://paulmillr.com/noble/#scure","keywords":["bitcoin","btc","sign","tx","transaction","address","taproot","schnorr","psbt","p2pkh","p2wpkh","p2sh","p2wsh","p2tr"],"repository":{"url":"git+https://github.com/paulmillr/scure-btc-signer.git","type":"git"},"description":"Audited & minimal library for Bitcoin. Handle transactions, Schnorr, Taproot, UTXO & PSBT","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"readme":"# scure-btc-signer\n\nAudited & minimal library for creating, signing & decoding Bitcoin transactions.\n\n- 🔒 [**Audited**](#security) by an independent security firm\n- ✍️ Create transactions, inputs, outputs, sign them\n- 📡 Optional network helper; core signer works offline\n- 🔀 UTXO selection with different strategies\n- 🎻 Classic & SegWit: P2PK, P2PKH, P2WPKH, P2SH, P2WSH, P2MS\n- 🧪 Schnorr & Taproot BIP340/BIP341: P2TR, P2TR-NS, P2TR-MS\n- 📨 BIP174 PSBT, BIP327 MuSig2\n- 🗳️ Easy ordinals and inscriptions\n- 🪶 39KB (gzipped) with all deps\n\nInitial development has been funded by [Ryan Shea](https://shea.io).\nMusig2 feature has been funded by [Arklabs](https://arklabs.to).\n\nFor discussions, questions and support, visit\n[GitHub Discussions](https://github.com/paulmillr/scure-btc-signer/discussions)\nsection of the repository.\n\n_Check out all web3 utility libraries:_ [ETH](https://github.com/paulmillr/micro-eth-signer), [BTC](https://github.com/paulmillr/scure-btc-signer), [SOL](https://github.com/paulmillr/micro-sol-signer), [ordinals](https://github.com/paulmillr/micro-ordinals)\n\n### This library belongs to _scure_\n\n> **scure** — audited micro-libraries.\n\n- Zero or minimal dependencies\n- Highly readable TypeScript / JS code\n- PGP-signed releases and transparent NPM builds\n- Check out [homepage](https://paulmillr.com/noble/#scure) & all libraries:\n  [base](https://github.com/paulmillr/scure-base),\n  [bip32](https://github.com/paulmillr/scure-bip32),\n  [bip39](https://github.com/paulmillr/scure-bip39),\n  [btc-signer](https://github.com/paulmillr/scure-btc-signer),\n  [starknet](https://github.com/paulmillr/scure-starknet)\n\n## Usage\n\n> `npm install @scure/btc-signer`\n\n> `deno add jsr:@scure/btc-signer`\n\nWe support all major platforms and runtimes.\nFor [Deno](https://deno.land), ensure to use [npm specifier](https://deno.land/manual@v1.28.0/node/npm_specifiers).\nFor React Native, you may need a [polyfill for crypto.getRandomValues](https://github.com/LinusU/react-native-get-random-values).\n\n```ts\nimport * as btc from '@scure/btc-signer';\n```\n\n### Quickstart\n\nCreate a Taproot address, build a transaction spending one of its UTXOs, sign and finalize it:\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\n\nconst privKey = hex.decode('a1547d0a01c9acb2b8a4128f97bbcd74d9a5750a9a3d1571ee3d9840b41d1fbb');\nconst pubKey = btc.utils.pubSchnorr(privKey);\n\n// Taproot payment for a single key. Also check out p2wpkh, p2sh, p2wsh & others below\nconst spend = btc.p2tr(pubKey);\nconsole.log(spend.address);\n// bc1pkw4e67whvet7q6xa854tstt7kjn9f7n3gqvyjqznezqwux0gnzhsrtlvy3\n\nconst tx = new btc.Transaction();\ntx.addInput({\n  ...spend, // adds tapInternalKey & other fields required for signing\n  txid: '75ddabb27b8845f5247975c8a5ba7c6f336c4570708ebe230caf6db5217ae858',\n  index: 0,\n  witnessUtxo: { script: spend.script, amount: 100_000n }, // amounts are always bigint sats\n});\ntx.addOutputAddress(spend.address!, 90_000n); // leftover 10k sats become the fee\ntx.sign(privKey);\ntx.finalize();\n\nconsole.log(tx.id);\n// 927bc3441c7b376a83913b534bf10430139d9f64d83cbc38eb3a4e24cce54dc5\nconsole.log(tx.hex); // ready to broadcast, e.g. via net.ts EsploraProvider\n```\n\nThe rest of the docs cover every payment type, PSBT workflows, UTXO selection and more:\n\n- [Payments](#payments)\n  - [P2PK Pay To Public Key](#p2pk-pay-to-public-key)\n  - [P2PKH Public Key Hash](#p2pkh-public-key-hash)\n  - [P2WPKH Witness Public Key Hash](#p2wpkh-witness-public-key-hash)\n  - [P2SH Script Hash](#p2sh-script-hash)\n  - [P2WSH Witness Script Hash](#p2wsh-witness-script-hash)\n  - [P2SH-P2WSH](#p2sh-p2wsh)\n  - [P2MS classic multisig](#p2ms-classic-multisig)\n  - [P2TR Taproot](#p2tr-taproot)\n  - [P2TR-NS Taproot multisig](#p2tr-ns-taproot-multisig)\n  - [P2TR-MS Taproot M-of-N multisig](#p2tr-ms-taproot-m-of-n-multisig)\n  - [P2TR-PK Taproot single P2PK script](#p2tr-pk-taproot-single-p2pk-script)\n  - [P2A Pay To Anchor](#p2a-pay-to-anchor)\n- [Transaction](#transaction)\n  - [Encode/decode](#encodedecode)\n  - [Inputs](#inputs)\n  - [Outputs](#outputs)\n  - [Basic transaction sign](#basic-transaction-sign)\n  - [BIP174 PSBT multi-sig example](#bip174-psbt-multi-sig-example)\n- [UTXO selection](#utxo-selection)\n- [Network](#network)\n- [MuSig2](#musig2)\n- [P2P, ElligatorSwift, BIP324](#p2p-elligatorswift-bip324)\n- [Ordinals and custom scripts](#ordinals-and-custom-scripts)\n- [Utils](#utils)\n  - [getAddress](#getaddress)\n    - [WIF](#wif)\n  - [Script](#script)\n  - [OutScript](#outscript)\n- [Bitcoin is flawed](#bitcoin-is-flawed)\n- [Security](#security)\n- [License](#license)\n\n## Payments\n\nBTC has several UTXO types:\n\n- P2PK: Legacy, from 2010\n- P2PKH, P2SH, P2MS: Classic\n- P2WPKH, P2WSH: SegWit (signature is removed from tx hash calculation)\n- P2TR: Taproot (schnorr signatures instead of ECDSA)\n\nFor test examples, the usage is as following:\n\n```sh\nnpm install @scure/btc-signer @scure/base assert\n```\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual, throws } from 'assert';\n```\n\n### P2PK (Pay To Public Key)\n\nLegacy script, doesn't have an address. Must be wrapped in P2SH / P2WSH / P2SH-P2WSH. Not recommended.\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst uncompressed = hex.decode(\n  '04ad90e5b6bc86b3ec7fac2c5fbda7423fc8ef0d58df594c773fa05e2c281b2bfe877677c668bd13603944e34f4818ee03cadd81a88542b8b4d5431264180e2c28'\n);\n\ndeepStrictEqual(btc.p2pk(uncompressed), {\n  type: 'pk',\n  script: hex.decode(\n    '4104ad90e5b6bc86b3ec7fac2c5fbda7423fc8ef0d58df594c773fa05e2c281b2bfe877677c668bd13603944e34f4818ee03cadd81a88542b8b4d5431264180e2c28ac'\n  ),\n});\n```\n\n### P2PKH (Public Key Hash)\n\nClassic (pre-SegWit) address.\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKey = hex.decode('030000000000000000000000000000000000000000000000000000000000000001');\ndeepStrictEqual(btc.p2pkh(PubKey), {\n  type: 'pkh',\n  address: '134D6gYy8DsR5m4416BnmgASuMBqKvogQh',\n  script: hex.decode('76a914168b992bcfc44050310b3a94bd0771136d0b28d188ac'),\n  hash: hex.decode('168b992bcfc44050310b3a94bd0771136d0b28d1'),\n});\n// P2SH-P2PKH\ndeepStrictEqual(btc.p2sh(btc.p2pkh(PubKey)), {\n  type: 'sh',\n  address: '3EPhLJ1FuR2noj6qrTs4YvepCvB6sbShoV',\n  script: hex.decode('a9148b530b962725af3bb7c818f197c619db3f71495087'),\n  redeemScript: hex.decode('76a914168b992bcfc44050310b3a94bd0771136d0b28d188ac'),\n  hash: hex.decode('8b530b962725af3bb7c818f197c619db3f714950'),\n});\n// P2WSH-P2PKH\ndeepStrictEqual(btc.p2wsh(btc.p2pkh(PubKey)), {\n  type: 'wsh',\n  address: 'bc1qhxtthndg70cthfasy8y4qlk9h7r3006azn9md0fad5dg9hh76nkqaufnuz',\n  script: hex.decode('0020b996bbcda8f3f0bba7b021c9507ec5bf8717bf5d14cbb6bd3d6d1a82defed4ec'),\n  witnessScript: hex.decode('76a914168b992bcfc44050310b3a94bd0771136d0b28d188ac'),\n  hash: hex.decode('b996bbcda8f3f0bba7b021c9507ec5bf8717bf5d14cbb6bd3d6d1a82defed4ec'),\n});\n// P2SH-P2WSH-P2PKH\ndeepStrictEqual(btc.p2sh(btc.p2wsh(btc.p2pkh(PubKey))), {\n  type: 'sh',\n  address: '3EHxWHyLv5Seu5Cd6D1cH56jLKxSi3ps8C',\n  script: hex.decode('a9148a3d36fb710a9c7cae06cfcdf39792ff5773e8f187'),\n  redeemScript: hex.decode('0020b996bbcda8f3f0bba7b021c9507ec5bf8717bf5d14cbb6bd3d6d1a82defed4ec'),\n  witnessScript: hex.decode('76a914168b992bcfc44050310b3a94bd0771136d0b28d188ac'),\n  hash: hex.decode('8a3d36fb710a9c7cae06cfcdf39792ff5773e8f1'),\n});\n```\n\n### P2WPKH (Witness Public Key Hash)\n\nSegWit V0 version of [P2PKH](#p2pkh-public-key-hash).\nIn SegWit, signature is removed from tx hash calculation.\n\nUses bech32 address.\nCan't be wrapped in [P2WSH](#p2wsh-witness-script-hash).\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKey = hex.decode('030000000000000000000000000000000000000000000000000000000000000001');\ndeepStrictEqual(btc.p2wpkh(PubKey), {\n  type: 'wpkh',\n  address: 'bc1qz69ej270c3q9qvgt822t6pm3zdksk2x35j2jlm',\n  script: hex.decode('0014168b992bcfc44050310b3a94bd0771136d0b28d1'),\n  hash: hex.decode('168b992bcfc44050310b3a94bd0771136d0b28d1'),\n});\n// P2SH-P2WPKH\ndeepStrictEqual(btc.p2sh(btc.p2wpkh(PubKey)), {\n  type: 'sh',\n  address: '3BCuRViGCTXmQjyJ9zjeRUYrdZTUa38zjC',\n  script: hex.decode('a91468602f2db7b7d7cdcd2639ab6bf7f5bfe828e53f87'),\n  redeemScript: hex.decode('0014168b992bcfc44050310b3a94bd0771136d0b28d1'),\n  hash: hex.decode('68602f2db7b7d7cdcd2639ab6bf7f5bfe828e53f'),\n});\n```\n\n### P2SH (Script Hash)\n\nClassic (pre-SegWit) script address. Useful for multisig and other advanced use-cases. Consumes full output of other payments — NOT only script.\n\nRequired tx input fields to make it spendable: `redeemScript`\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKey = hex.decode('030000000000000000000000000000000000000000000000000000000000000001');\n// Wrap P2PKH in P2SH\ndeepStrictEqual(btc.p2sh(btc.p2pkh(PubKey)), {\n  type: 'sh',\n  address: '3EPhLJ1FuR2noj6qrTs4YvepCvB6sbShoV',\n  script: hex.decode('a9148b530b962725af3bb7c818f197c619db3f71495087'),\n  redeemScript: hex.decode('76a914168b992bcfc44050310b3a94bd0771136d0b28d188ac'),\n  hash: hex.decode('8b530b962725af3bb7c818f197c619db3f714950'),\n});\n```\n\n### P2WSH (Witness Script Hash)\n\nSegWit V0 version of [P2SH](#p2sh-script-hash).\nIn SegWit, signature is removed from tx hash calculation.\n\nRequired tx input fields to make it spendable: `witnessScript`\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKey = hex.decode('030000000000000000000000000000000000000000000000000000000000000001');\ndeepStrictEqual(btc.p2wsh(btc.p2pkh(PubKey)), {\n  type: 'wsh',\n  address: 'bc1qhxtthndg70cthfasy8y4qlk9h7r3006azn9md0fad5dg9hh76nkqaufnuz',\n  script: hex.decode('0020b996bbcda8f3f0bba7b021c9507ec5bf8717bf5d14cbb6bd3d6d1a82defed4ec'),\n  witnessScript: hex.decode('76a914168b992bcfc44050310b3a94bd0771136d0b28d188ac'),\n  hash: hex.decode('b996bbcda8f3f0bba7b021c9507ec5bf8717bf5d14cbb6bd3d6d1a82defed4ec'),\n});\n```\n\n### P2SH-P2WSH\n\nNot really script type, but construction of P2WSH inside P2SH.\n\nRequired tx input fields to make it spendable: `redeemScript`, `witnessScript`\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKey = hex.decode('030000000000000000000000000000000000000000000000000000000000000001');\ndeepStrictEqual(btc.p2sh(btc.p2wsh(btc.p2pkh(PubKey))), {\n  type: 'sh',\n  address: '3EHxWHyLv5Seu5Cd6D1cH56jLKxSi3ps8C',\n  script: hex.decode('a9148a3d36fb710a9c7cae06cfcdf39792ff5773e8f187'),\n  redeemScript: hex.decode('0020b996bbcda8f3f0bba7b021c9507ec5bf8717bf5d14cbb6bd3d6d1a82defed4ec'),\n  witnessScript: hex.decode('76a914168b992bcfc44050310b3a94bd0771136d0b28d188ac'),\n  hash: hex.decode('8a3d36fb710a9c7cae06cfcdf39792ff5773e8f1'),\n});\n```\n\n### P2MS (classic multisig)\n\nClassic / segwit (pre-taproot) M-of-N Multisig. Doesn't have an address, must be wrapped in P2SH / P2WSH / P2SH-P2WSH.\n\nDuplicate public keys are not accepted to reduce mistakes. Use flag `allowSamePubkeys` to override the behavior, for cases like `2-of-[A,A,B,C]`, which can be signed by `A or (B and C)`.\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKeys = [\n  hex.decode('030000000000000000000000000000000000000000000000000000000000000001'),\n  hex.decode('030000000000000000000000000000000000000000000000000000000000000002'),\n  hex.decode('030000000000000000000000000000000000000000000000000000000000000003'),\n];\n// Multisig 2-of-3 wrapped in P2SH\ndeepStrictEqual(btc.p2sh(btc.p2ms(2, PubKeys)), {\n  type: 'sh',\n  address: '3G4AeQtzCLoDAyv2eb3UVTG5atfkyHtuRn',\n  script: hex.decode('a9149d91c6de4eacde72a7cc86bff98d1915b3c7818f87'),\n  redeemScript: hex.decode(\n    '5221030000000000000000000000000000000000000000000000000000000000000001210300000000000000000000000000000000000000000000000000000000000000022103000000000000000000000000000000000000000000000000000000000000000353ae'\n  ),\n  hash: hex.decode('9d91c6de4eacde72a7cc86bff98d1915b3c7818f'),\n});\n// Multisig 2-of-3 wrapped in P2WSH\ndeepStrictEqual(btc.p2wsh(btc.p2ms(2, PubKeys)), {\n  type: 'wsh',\n  address: 'bc1qwnhzkn8wcyyrnfyfcp7555urssu5dq0rmnvg70hg02z3nxgg4f0qljmr2h',\n  script: hex.decode('002074ee2b4ceec10839a489c07d4a538384394681e3dcd88f3ee87a85199908aa5e'),\n  witnessScript: hex.decode(\n    '5221030000000000000000000000000000000000000000000000000000000000000001210300000000000000000000000000000000000000000000000000000000000000022103000000000000000000000000000000000000000000000000000000000000000353ae'\n  ),\n  hash: hex.decode('74ee2b4ceec10839a489c07d4a538384394681e3dcd88f3ee87a85199908aa5e'),\n});\n// Multisig 2-of-3 wrapped in P2SH-P2WSH\ndeepStrictEqual(btc.p2sh(btc.p2wsh(btc.p2ms(2, PubKeys))), {\n  type: 'sh',\n  address: '3HKWSo57kmcJZ3h43pXS3m5UESR4wXcWTd',\n  script: hex.decode('a914ab70ab84b12b891364b4b2a14ca813cac308b24287'),\n  redeemScript: hex.decode('002074ee2b4ceec10839a489c07d4a538384394681e3dcd88f3ee87a85199908aa5e'),\n  witnessScript: hex.decode(\n    '5221030000000000000000000000000000000000000000000000000000000000000001210300000000000000000000000000000000000000000000000000000000000000022103000000000000000000000000000000000000000000000000000000000000000353ae'\n  ),\n  hash: hex.decode('ab70ab84b12b891364b4b2a14ca813cac308b242'),\n});\n// Useful util: wraps P2MS in P2SH or P2WSH\ndeepStrictEqual(btc.p2sh(btc.p2ms(2, PubKeys)), btc.multisig(2, PubKeys));\ndeepStrictEqual(btc.p2wsh(btc.p2ms(2, PubKeys)), btc.multisig(2, PubKeys, undefined, true));\n// Sorted multisig (BIP67)\ndeepStrictEqual(btc.p2sh(btc.p2ms(2, PubKeys)), btc.sortedMultisig(2, PubKeys));\ndeepStrictEqual(btc.p2wsh(btc.p2ms(2, PubKeys)), btc.sortedMultisig(2, PubKeys, true));\n```\n\n### P2TR (Taproot)\n\nTapRoot (SegWit V1) script which replaces both public key and script types from previous versions.\n\nConsumes `p2tr(PubKey?, ScriptTree?)` and works as `PubKey` OR `ScriptTree`, which means\nif you use any spendable PubKey and ScriptTree of multi-sig, owner of private key for PubKey will\nbe able to spend output. If PubKey is undefined we use static unspendable PubKey by default, which leaks information about script type. However, any dynamic unspendable keys will require complex interaction\nto sign multi-sig wallets, and there is no BIP/PSBT fields for that yet.\n\nRequired tx input fields to make it spendable: `tapInternalKey`, `tapMerkleRoot`, `tapLeafScript`\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKey = hex.decode('0101010101010101010101010101010101010101010101010101010101010101');\n// Key Path Spend (owned of private key for PubKey can spend)\ndeepStrictEqual(btc.p2tr(PubKey), {\n  type: 'tr',\n  address: 'bc1p7yu5dsly83jg5tkxcljsa30vnpdpl22wr6rty98t6x6p6ekz2gkqzf2t2s',\n  script: hex.decode('5120f13946c3e43c648a2ec6c7e50ec5ec985a1fa94e1e86b214ebd1b41d66c2522c'),\n  tweakedPubkey: hex.decode('f13946c3e43c648a2ec6c7e50ec5ec985a1fa94e1e86b214ebd1b41d66c2522c'),\n  tapInternalKey: hex.decode('0101010101010101010101010101010101010101010101010101010101010101'),\n});\n\nconst clean = (x) => ({ type: x.type, address: x.address, script: hex.encode(x.script) });\n\nconst PubKey2 = hex.decode('0202020202020202020202020202020202020202020202020202020202020202');\nconst PubKey3 = hex.decode('1212121212121212121212121212121212121212121212121212121212121212');\n// Nested P2TR, owner of private key for any of PubKeys can spend whole\n// By default P2TR expects binary tree, but btc.p2tr can build it if list of scripts passed.\n// Also, you can include {weight: N} to scripts to create differently balanced tree.\ndeepStrictEqual(\n  clean(btc.p2tr(undefined, [btc.p2tr_pk(PubKey), btc.p2tr_pk(PubKey2), btc.p2tr_pk(PubKey3)])),\n  {\n    type: 'tr',\n    // weights for bitcoinjs-lib: [3,2,1]\n    address: 'bc1pj2uvajyygyu2zw0rg0d6yxdsc920kzc5pamfgtlqepe30za922cqjjmkta',\n    script: '512092b8cec8844138a139e343dba219b0c154fb0b140f76942fe0c873178ba552b0',\n  }\n);\n// If scriptsTree is already binary tree, it will be used as-is\ndeepStrictEqual(\n  clean(btc.p2tr(undefined, [btc.p2tr_pk(PubKey2), [btc.p2tr_pk(PubKey), btc.p2tr_pk(PubKey3)]])),\n  {\n    type: 'tr',\n    // default weights for bitcoinjs-lib\n    address: 'bc1pvue6sk9efyvcvpzzqkg8at4qy2u67zj7rj5sfsy573m7alxavqjqucc26a',\n    script: '51206733a858b9491986044205907eaea022b9af0a5e1ca904c094f477eefcdd6024',\n  }\n);\n```\n\n### P2TR-NS (Taproot multisig)\n\nTaproot N-of-N multisig (`[<PubKeys[0:n-1]> CHECKSIGVERIFY] <PubKeys[n-1]> CHECKSIG`).\n\nFirst arg is M, if M!=PubKeys.length, it will create a multi-leaf M-of-N taproot script tree.\nThis allows one to reveal only `M` PubKeys on spend, without any information about the others.\nThis is fast for cases like 15-of-20, but extremely slow for cases like 5-of-20.\n\nDuplicate public keys are not accepted to reduce mistakes. Use flag `allowSamePubkeys` to override the behavior, for cases like `2-of-[A,A,B,C]`, which can be signed by `A or (B and C)`.\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKey = hex.decode('0101010101010101010101010101010101010101010101010101010101010101');\nconst PubKey2 = hex.decode('0202020202020202020202020202020202020202020202020202020202020202');\nconst PubKey3 = hex.decode('1212121212121212121212121212121212121212121212121212121212121212');\n\n// Simple 3-of-3 multisig\n// Creates a single script that requires all three pubkeys: [PubKey, PubKey2, PubKey3]\ndeepStrictEqual(btc.p2tr_ns(3, [PubKey, PubKey2, PubKey3]), [\n  {\n    type: 'tr_ns',\n    script: hex.decode(\n      '200101010101010101010101010101010101010101010101010101010101010101ad200202020202020202020202020202020202020202020202020202020202020202ad201212121212121212121212121212121212121212121212121212121212121212ac'\n    ),\n  },\n]);\n// Simple 2-of-3 multisig\n// If M (pubkeys required) is less than N (# of pubkeys), then multiple scripts are created: [[PubKey, PubKey2], [PubKey, PubKey3], [PubKey2, PubKey3]]\nconst clean = (x) => ({ type: x.type, address: x.address, script: hex.encode(x.script) });\ndeepStrictEqual(clean(btc.p2tr(undefined, btc.p2tr_ns(2, [PubKey, PubKey2, PubKey3]))), {\n  type: 'tr',\n  address: 'bc1pevfcmnkqqq09a4n0fs8c7mwlc6r4efqpvgyqpjvegllavgw235fq3kz7a0',\n  script: '5120cb138dcec0001e5ed66f4c0f8f6ddfc6875ca401620800c99947ffd621ca8d12',\n});\n```\n\n### P2TR-MS (Taproot M-of-N multisig)\n\nM-of-N single leaf TapRoot multisig (`<PubKeys[0]> CHECKSIG [<PubKeys[1:n]> CHECKSIGADD] <M> NUMEQUAL`)\n\nDuplicate public keys are not accepted to reduce mistakes. Use flag `allowSamePubkeys` to override the behavior, for cases like `2-of-[A,A,B,C]`, which can be signed by `A or (B and C)`.\n\n**Experimental**, use at your own risk.\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKey = hex.decode('0101010101010101010101010101010101010101010101010101010101010101');\nconst PubKey2 = hex.decode('0202020202020202020202020202020202020202020202020202020202020202');\nconst PubKey3 = hex.decode('1212121212121212121212121212121212121212121212121212121212121212');\n// 2-of-3 TapRoot multisig\ndeepStrictEqual(btc.p2tr_ms(2, [PubKey, PubKey2, PubKey3]), {\n  type: 'tr_ms',\n  script: hex.decode(\n    '200101010101010101010101010101010101010101010101010101010101010101ac200202020202020202020202020202020202020202020202020202020202020202ba201212121212121212121212121212121212121212121212121212121212121212ba529c'\n  ),\n});\n// Creates a single script for [PubKey, PubKey2, PubKey3]\nconst clean = (x) => ({ type: x.type, address: x.address, script: hex.encode(x.script) });\ndeepStrictEqual(clean(btc.p2tr(undefined, btc.p2tr_ms(2, [PubKey, PubKey2, PubKey3]))), {\n  type: 'tr',\n  address: 'bc1p6m2xevckax9zucumnnyvu4xhxem66ugc5r2zlw2a20s0hxnutl8qfef23s',\n  script: '5120d6d46cb316e98a2e639b9cc8ce54d73677ad7118a0d42fb95d53e0fb9a7c5fce',\n});\n```\n\n### P2TR-PK (Taproot single P2PK script)\n\nSpecific case of `p2tr_ns(1, [pubkey])`, which is the same as the BTC descriptor: `tr($H,pk(PUBKEY))`\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst PubKey = hex.decode('0101010101010101010101010101010101010101010101010101010101010101');\n// P2PK for taproot\nconst clean = (x) => ({ type: x.type, address: x.address, script: hex.encode(x.script) });\ndeepStrictEqual(clean(btc.p2tr(undefined, [btc.p2tr_pk(PubKey)])), {\n  type: 'tr',\n  address: 'bc1pfj6w68w3v2f4pkzesc9tsqfvy5znw5qgydwa832v3v83vjn76kdsmr4360',\n  script: '51204cb4ed1dd1629350d859860ab8012c2505375008235dd3c54c8b0f164a7ed59b',\n});\n```\n\n### P2A (Pay to Anchor)\n\nEphemeral anchors are supported. [Check out docs](https://bitcoinops.org/en/topics/ephemeral-anchors/).\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst p2aScript = hex.decode('51024e73');\nconst decoded = btc.OutScript.decode(p2aScript);\ndeepStrictEqual(decoded, { type: 'p2a', script: p2aScript });\ndeepStrictEqual(hex.encode(btc.OutScript.encode(decoded)), '51024e73');\n```\n\n## Transaction\n\n### Encode/decode\n\nWe support both PSBTv0 and PSBTv2 (there is no PSBTv1). Explicit PSBTv0 conversion removes\nPSBTv2-only fields after translating the unsigned transaction representation.\n\nAssigned fields from BIPs 322, 353, 372, 373, 375, and 376 are decoded explicitly and survive the\ndefault path. `TxOpts.unknown` and `TxOpts.proprietary` govern only genuinely unknown and\nproprietary records:\n\n- `ignore` preserves them, but the library may operate without understanding future constraints.\n- `strip` accepts and removes them; this is the default and can break interoperability with future\n  extensions.\n- `strict` rejects them.\n\nUndefined bits in PSBTv2 `txModifiable` follow the `unknown` policy. `strip` and `strict` can also\nfingerprint this library or version, while `ignore` offers better forwarding compatibility at the\ncost of interpreting less protocol state. The deprecated `allowUnknown` boolean maps `true` to\n`ignore` and `false` to `strip`.\n\nWhen signing an untrusted or multi-party PSBT, pass\n`{ strictPrevoutValidation: true }` to `Transaction.fromPSBT`. This requires every input to include\na full `nonWitnessUtxo` matching its outpoint before any signature is produced. It prevents forged\n`witnessUtxo` amounts from making the displayed transaction fee appear lower than the fee that the\nvalid transaction will actually pay.\n\n```text\n// Decode\nTransaction.fromRaw(raw: Bytes, opts: TxOpts = {}); // Raw tx\nTransaction.fromPSBT(psbt: Bytes, opts: TxOpts = {}); // PSBT tx\n// Encode\ntx.unsignedTx; // Bytes of raw unsigned tx\ntx.hex; // hex encoded signed raw tx\ntx.toPSBT(ver = this.PSBTVersion); // PSBT\n```\n\n### Inputs\n\nWe have txid (BE) instead of hash (LE) in transactions. We can support both,\nbut txid is consistent across block explorers, while some explorers treat hash\nas txid - so hash is not consistent.\n\nUse `getInput` and `inputsLength` to read information about inputs: they return a copy.\nThis is necessary to avoid accidental modification of internal structures without calling methods (addInput/updateInput) that will verify correctness.\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual, throws } from 'node:assert';\n\nconst tx = new btc.Transaction();\ntype Bytes = Uint8Array | string;\ntype RawTransactionBytesOrHex = Uint8Array | string;\ntype DerivationPath = { fingerprint: number; path: number[] };\ntype TapScriptSigKey = { pubKey: Bytes; leafHash: Bytes };\ntype TapLeafScriptKey = { version: number; internalKey: Bytes; merklePath: Bytes[] };\ntype TransactionInput = {\n  txid?: Bytes;\n  index?: number;\n  nonWitnessUtxo?: RawTransactionBytesOrHex;\n  witnessUtxo?: { script?: Bytes; amount: bigint };\n  partialSig?: [Bytes, Bytes][]; // [PubKey, Signature]\n  sighashType?: number;\n  redeemScript?: Bytes;\n  witnessScript?: Bytes;\n  bip32Derivation?: [Bytes, DerivationPath | undefined][]; // [PubKey, DeriviationPath]\n  finalScriptSig?: Bytes;\n  finalScriptWitness?: Bytes[];\n  porCommitment?: Bytes;\n  sequence?: number;\n  requiredTimeLocktime?: number;\n  requiredHeightLocktime?: number;\n  tapKeySig?: Bytes;\n  tapScriptSig?: [TapScriptSigKey, Bytes][]; // [PubKeySchnorr, LeafHash]\n  // [ControlBlock, ScriptWithVersion]\n  tapLeafScript?: [TapLeafScriptKey, Bytes][];\n  tapInternalKey?: Bytes;\n  tapMerkleRoot?: Bytes;\n};\n\n// tx.addInput(input: TransactionInput): number;\n// tx.updateInput(idx: number, input: TransactionInput);\n\n// Input\ntx.addInput({ txid: new Uint8Array(32), index: 0 });\ndeepStrictEqual(tx.inputs[0], {\n  txid: new Uint8Array(32),\n  index: 0,\n  sequence: btc.DEFAULT_SEQUENCE,\n});\n// Update basic value\ntx.updateInput(0, { index: 10 });\ndeepStrictEqual(tx.inputs[0], {\n  txid: new Uint8Array(32),\n  index: 10,\n  sequence: btc.DEFAULT_SEQUENCE,\n});\n// Add value as hex\ntx.addInput({\n  txid: '0000000000000000000000000000000000000000000000000000000000000000',\n  index: 0,\n});\ndeepStrictEqual(tx.inputs[1], {\n  txid: new Uint8Array(32),\n  index: 0,\n  sequence: btc.DEFAULT_SEQUENCE,\n});\n// Update key map\nconst pubKey = hex.decode('030000000000000000000000000000000000000000000000000000000000000001');\nconst bip1 = [pubKey, { fingerprint: 5, path: [1, 2, 3] }];\nconst pubKey2 = hex.decode('030000000000000000000000000000000000000000000000000000000000000002');\nconst bip2 = [pubKey2, { fingerprint: 6, path: [4, 5, 6] }];\nconst pubKey3 = hex.decode('030000000000000000000000000000000000000000000000000000000000000003');\nconst bip3 = [pubKey3, { fingerprint: 7, path: [7, 8, 9] }];\n// Add K-V\ntx.updateInput(0, { bip32Derivation: [bip1] });\ndeepStrictEqual(tx.inputs[0].bip32Derivation, [bip1]);\n// Add another K-V\ntx.updateInput(0, { bip32Derivation: [bip2] });\ndeepStrictEqual(tx.inputs[0].bip32Derivation, [bip1, bip2]);\n// Delete K-V\ntx.updateInput(0, { bip32Derivation: [[pubKey, undefined]] });\ndeepStrictEqual(tx.inputs[0].bip32Derivation, [bip2]);\n// Second add of same k-v does nothing\ntx.updateInput(0, { bip32Derivation: [bip2] });\ndeepStrictEqual(tx.inputs[0].bip32Derivation, [bip2]);\n// Second add of k-v with different value breaks\nthrows(() => tx.updateInput(0, { bip32Derivation: [[pubKey2, bip1[1]]] }));\ntx.updateInput(0, { bip32Derivation: [bip1, bip2, bip3] });\n// Preserves order (re-ordered on PSBT encoding)\ndeepStrictEqual(tx.inputs[0].bip32Derivation, [bip2, bip1, bip3]);\n// PSBT encoding re-order k-v\nconst tx2 = btc.Transaction.fromPSBT(tx.toPSBT());\ndeepStrictEqual(tx2.inputs[0].bip32Derivation, [bip1, bip2, bip3]);\n// Remove field\ntx.updateInput(0, { bip32Derivation: undefined });\ndeepStrictEqual(tx.inputs[0], {\n  txid: new Uint8Array(32),\n  index: 10,\n  sequence: btc.DEFAULT_SEQUENCE,\n});\n\n// Read inputs\nfor (let i = 0; i < tx.inputsLength; i++) {\n  console.log('I', tx.getInput(i));\n}\n```\n\n### Outputs\n\n`addOutputAddress` uses bigint amounts, which means satoshis, not BTC. If you need BTC representation, use `Decimal`:\n\n```ts\nimport * as btc from '@scure/btc-signer';\n\nconst amountSatoshi = btc.Decimal.decode('1.5'); // 1.5 btc in satoshi\n```\n\nUse `getOutput` and `outputsLength` to read outputs information. This methods returns copy of output, instead of internal representation.\nThis is necessary to avoid accidental modification of internal structures without calling methods (addOutput/updateOutput) that will verify correctness.\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual, throws } from 'node:assert';\n\nconst tx = new btc.Transaction();\ntype Bytes = Uint8Array | string;\ntype DerivationPath = { fingerprint: number; path: number[] };\ntype TransactionOutput = {\n  script?: Bytes;\n  amount?: bigint;\n  redeemScript?: Bytes;\n  witnessScript?: Bytes;\n  bip32Derivation?: [Bytes, DerivationPath | undefined][]; // [PubKey, DeriviationPath]\n  tapInternalKey?: Bytes;\n};\n\n// tx.addOutput(o: TransactionOutput): number;\n// tx.updateOutput(idx: number, output: TransactionOutput);\n// tx.addOutputAddress(address: string, amount: bigint, network = NETWORK): number;\n\nconst pubKey = hex.decode('030000000000000000000000000000000000000000000000000000000000000001');\nconst bip1 = [pubKey, { fingerprint: 5, path: [1, 2, 3] }];\nconst pubKey2 = hex.decode('030000000000000000000000000000000000000000000000000000000000000002');\nconst bip2 = [pubKey2, { fingerprint: 6, path: [4, 5, 6] }];\nconst pubKey3 = hex.decode('030000000000000000000000000000000000000000000000000000000000000003');\nconst bip3 = [pubKey3, { fingerprint: 7, path: [7, 8, 9] }];\nconst script = btc.p2pkh(pubKey).script;\ntx.addOutput({ script, amount: 100n });\ndeepStrictEqual(tx.outputs[0], {\n  script,\n  amount: 100n,\n});\n// Update basic value\ntx.updateOutput(0, { amount: 200n });\ndeepStrictEqual(tx.outputs[0], {\n  script,\n  amount: 200n,\n});\n// Add K-V\ntx.updateOutput(0, { bip32Derivation: [bip1] });\ndeepStrictEqual(tx.outputs[0].bip32Derivation, [bip1]);\n// Add another K-V\ntx.updateOutput(0, { bip32Derivation: [bip2] });\ndeepStrictEqual(tx.outputs[0].bip32Derivation, [bip1, bip2]);\n// Delete K-V\ntx.updateOutput(0, { bip32Derivation: [[pubKey, undefined]] });\ndeepStrictEqual(tx.outputs[0].bip32Derivation, [bip2]);\n// Second add of same k-v does nothing\ntx.updateOutput(0, { bip32Derivation: [bip2] });\ndeepStrictEqual(tx.outputs[0].bip32Derivation, [bip2]);\n// Second add of k-v with different value breaks\nthrows(() => tx.updateOutput(0, { bip32Derivation: [[pubKey2, bip1[1]]] }));\ntx.updateOutput(0, { bip32Derivation: [bip1, bip2, bip3] });\n// Preserves order (re-ordered on PSBT encoding)\ndeepStrictEqual(tx.outputs[0].bip32Derivation, [bip2, bip1, bip3]);\n// PSBT encoding re-order k-v\nconst tx3 = btc.Transaction.fromPSBT(tx.toPSBT());\ndeepStrictEqual(tx3.outputs[0].bip32Derivation, [bip1, bip2, bip3]);\n// Remove field\ntx.updateOutput(0, { bip32Derivation: undefined });\ndeepStrictEqual(tx.outputs[0], {\n  script,\n  amount: 200n,\n});\n\n// Read outputs\nfor (let i = 0; i < tx.outputsLength; i++) {\n  console.log('O', tx.getOutput(i));\n}\n```\n\n### Basic transaction sign\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { pubECDSA } from '@scure/btc-signer/utils.js';\nimport { deepStrictEqual } from 'node:assert';\n\nconst privKey = hex.decode('0101010101010101010101010101010101010101010101010101010101010101');\nconst pubKey = pubECDSA(privKey);\nconst TX_TEST_OUTPUTS = [\n  ['1cMh228HTCiwS8ZsaakH8A8wze1JR5ZsP', 10n],\n  ['3H3Kc7aSPP4THLX68k4mQMyf1gvL6AtmDm', 50n],\n  ['bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq', 93n],\n] as const;\nconst TX_TEST_INPUTS = [\n  {\n    txid: hex.decode('c061c23190ed3370ad5206769651eaf6fac6d87d85b5db34e30a74e0c4a6da3e'),\n    index: 0,\n    amount: 550n,\n  },\n  {\n    txid: hex.decode('a21965903c938af35e7280ae5779b9fea4f7f01ac256b8a2a53b1b19a4e89a0d'),\n    index: 0,\n    amount: 600n,\n  },\n  {\n    txid: hex.decode('fae21e319ca827df32462afc3225c17719338a8e8d3e3b3ddeb0c2387da3a4c7'),\n    index: 0,\n    amount: 600n,\n  },\n];\nconst RAW_TX_HEX =\n  '01000000033edaa6c4e0740ae334dbb5857dd8c6faf6ea5196760652ad7033ed9031c261c00000000000ffffffff0d9ae8a4191b3ba5a2b856c21af0f7a4feb97957ae80725ef38a933c906519a20000000000ffffffffc7a4a37d38c2b0de3d3b3e8d8e8a331977c12532fc2a4632df27a89c311ee2fa0000000000ffffffff030a000000000000001976a91406afd46bcdfd22ef94ac122aa11f241244a37ecc88ac320000000000000017a914a860f76561c85551594c18eecceffaee8c4822d7875d00000000000000160014e8df018c7e326cc253faac7e46cdc51e68542c4200000000';\nconst txP2WPKH = new btc.Transaction({ version: 1 });\nfor (const inp of TX_TEST_INPUTS) {\n  txP2WPKH.addInput({\n    txid: inp.txid,\n    index: inp.index,\n    witnessUtxo: {\n      amount: inp.amount,\n      script: btc.p2wpkh(pubKey).script,\n    },\n  });\n}\nfor (const [address, amount] of TX_TEST_OUTPUTS) txP2WPKH.addOutputAddress(address, amount);\ndeepStrictEqual(hex.encode(txP2WPKH.unsignedTx), RAW_TX_HEX);\ntxP2WPKH.sign(privKey);\ntxP2WPKH.finalize();\ndeepStrictEqual(txP2WPKH.id, 'e4db0a196f378a6648deb221a2771fde577892479a2d52abbe8cf3d31d2f140f');\ndeepStrictEqual(\n  txP2WPKH.hex,\n  '010000000001033edaa6c4e0740ae334dbb5857dd8c6faf6ea5196760652ad7033ed9031c261c00000000000ffffffff0d9ae8a4191b3ba5a2b856c21af0f7a4feb97957ae80725ef38a933c906519a20000000000ffffffffc7a4a37d38c2b0de3d3b3e8d8e8a331977c12532fc2a4632df27a89c311ee2fa0000000000ffffffff030a000000000000001976a91406afd46bcdfd22ef94ac122aa11f241244a37ecc88ac320000000000000017a914a860f76561c85551594c18eecceffaee8c4822d7875d00000000000000160014e8df018c7e326cc253faac7e46cdc51e68542c4202483045022100d04801283249fc9a80f71d8fe8d9f6dc0e84afc0e59df2733f04ff659e095a8802206ce71c598d8f75b7cb2102b252b7bd04c6228c0826da0ed27104f8cca829869d0121031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f02473044022026ef492099b86572a965b28d11a40bf9b1e9fe5a2aeab22cbca1b354988910e30220416508f564e67932cb1c38bef7a3c3f0a95470fc81c6cb359a9268a49f6449850121031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f0247304402202cf37bbcf2c098e48ffc204d0ab688465b43642546d2e0414f5b8e4bdfae9420022006ccfb2415c7a941b6d5c07651fd80b9656bdea5fe793530cf2c604920c72d100121031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f00000000'\n);\n```\n\n### BIP174 PSBT multi-sig example\n\n> `npm install @scure/base @scure/bip32`\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport * as bip32 from '@scure/bip32';\nimport { deepStrictEqual } from 'node:assert';\n\nconst testnet = {\n  wif: 0xef,\n  bip32: {\n    public: 0x043587cf,\n    private: 0x04358394,\n  },\n};\n// The private keys in the tests below are derived from the following master private key:\nconst epriv =\n  'tprv8ZgxMBicQKsPd9TeAdPADNnSyH9SSUUbTVeFszDE23Ki6TBB5nCefAdHkK8Fm3qMQR6sHwA56zqRmKmxnHk37JkiFzvncDqoKmPWubu7hDF';\nconst hdkey = bip32.HDKey.fromExtendedKey(epriv, testnet.bip32);\n// const seed = 'cUkG8i1RFfWGWy5ziR11zJ5V4U4W3viSFCfyJmZnvQaUsd1xuF3T';\nconst tx = new btc.Transaction();\n// A creator creating a PSBT for a transaction which creates the following outputs:\ntx.addOutput({\n  script: '0014d85c2b71d0060b09c9886aeb815e50991dda124d',\n  amount: btc.Decimal.decode('1.49990000'),\n});\ntx.addOutput({\n  script: '001400aea9a2e5f0f876a588df5546e8742d1d87008f',\n  amount: btc.Decimal.decode('1.00000000'),\n});\n// and spends the following inputs:\ntx.addInput({\n  txid: '75ddabb27b8845f5247975c8a5ba7c6f336c4570708ebe230caf6db5217ae858',\n  index: 0,\n});\ntx.addInput({\n  txid: '1dea7cd05979072a3578cab271c02244ea8a090bbb46aa680a65ecd027048d83',\n  index: 1,\n});\n// must create this PSBT:\nconst psbt1 = tx.toPSBT();\n// Given the above PSBT, an updater with only the following:\nconst tx2 = btc.Transaction.fromPSBT(psbt1);\ntx2.updateInput(0, {\n  nonWitnessUtxo:\n    '0200000001aad73931018bd25f84ae400b68848be09db706eac2ac18298babee71ab656f8b0000000048473044022058f6fc7c6a33e1b31548d481c826c015bd30135aad42cd67790dab66d2ad243b02204a1ced2604c6735b6393e5b41691dd78b00f0c5942fb9f751856faa938157dba01feffffff0280f0fa020000000017a9140fb9463421696b82c833af241c78c17ddbde493487d0f20a270100000017a91429ca74f8a08f81999428185c97b5d852e4063f618765000000',\n  redeemScript:\n    '5221029583bf39ae0a609747ad199addd634fa6108559d6c5cd39b4c2183f1ab96e07f2102dab61ff49a14db6a7d02b0cd1fbb78fc4b18312b5b4e54dae4dba2fbfef536d752ae',\n  bip32Derivation: [\n    [\n      '029583bf39ae0a609747ad199addd634fa6108559d6c5cd39b4c2183f1ab96e07f',\n      { fingerprint: hdkey.fingerprint, path: btc.bip32Path(\"m/0'/0'/0'\") },\n    ],\n    [\n      '02dab61ff49a14db6a7d02b0cd1fbb78fc4b18312b5b4e54dae4dba2fbfef536d7',\n      { fingerprint: hdkey.fingerprint, path: btc.bip32Path(\"m/0'/0'/1'\") },\n    ],\n  ],\n});\ntx2.updateInput(1, {\n  // use witness utxo ({script, amount})\n  witnessUtxo: btc.RawTx.decode(\n    hex.decode(\n      '0200000000010158e87a21b56daf0c23be8e7070456c336f7cbaa5c8757924f545887bb2abdd7501000000171600145f275f436b09a8cc9a2eb2a2f528485c68a56323feffffff02d8231f1b0100000017a914aed962d6654f9a2b36608eb9d64d2b260db4f1118700c2eb0b0000000017a914b7f5faf40e3d40a5a459b1db3535f2b72fa921e88702483045022100a22edcc6e5bc511af4cc4ae0de0fcd75c7e04d8c1c3a8aa9d820ed4b967384ec02200642963597b9b1bc22c75e9f3e117284a962188bf5e8a74c895089046a20ad770121035509a48eb623e10aace8bfd0212fdb8a8e5af3c94b0b133b95e114cab89e4f7965000000'\n    )\n  ).outputs[1],\n  redeemScript: '00208c2353173743b595dfb4a07b72ba8e42e3797da74e87fe7d9d7497e3b2028903',\n  witnessScript:\n    '522103089dc10c7ac6db54f91329af617333db388cead0c231f723379d1b99030b02dc21023add904f3d6dcf59ddb906b0dee23529b7ffb9ed50e5e86151926860221f0e7352ae',\n  bip32Derivation: [\n    [\n      '03089dc10c7ac6db54f91329af617333db388cead0c231f723379d1b99030b02dc',\n      { fingerprint: hdkey.fingerprint, path: btc.bip32Path(\"m/0'/0'/2'\") },\n    ],\n    [\n      '023add904f3d6dcf59ddb906b0dee23529b7ffb9ed50e5e86151926860221f0e73',\n      { fingerprint: hdkey.fingerprint, path: btc.bip32Path(\"m/0'/0'/3'\") },\n    ],\n  ],\n});\ntx2.updateOutput(0, {\n  bip32Derivation: [\n    [\n      '03a9a4c37f5996d3aa25dbac6b570af0650394492942460b354753ed9eeca58771',\n      { fingerprint: hdkey.fingerprint, path: btc.bip32Path(\"m/0'/0'/4'\") },\n    ],\n  ],\n});\ntx2.updateOutput(1, {\n  bip32Derivation: [\n    [\n      '027f6399757d2eff55a136ad02c684b1838b6556e5f1b6b34282a94b6b50051096',\n      { fingerprint: hdkey.fingerprint, path: btc.bip32Path(\"m/0'/0'/5'\") },\n    ],\n  ],\n});\n// Must create this PSBT:\nconst psbt2 = tx2.toPSBT();\n// An updater which adds SIGHASH_ALL to the above PSBT must create this PSBT:\nconst tx3 = btc.Transaction.fromPSBT(psbt2);\nfor (let i = 0; i < tx3.inputs.length; i++) tx3.updateInput(i, { sighashType: btc.SigHash.ALL });\nconst psbt3 = tx3.toPSBT();\n/*\n  Given the above updated PSBT, a signer that supports SIGHASH_ALL for P2PKH and P2WPKH spends and uses RFC6979 for nonce generation and has the following keys:\n  - cP53pDbR5WtAD8dYAW9hhTjuvvTVaEiQBdrz9XPrgLBeRFiyCbQr (m/0'/0'/0')\n  - cR6SXDoyfQrcp4piaiHE97Rsgta9mNhGTen9XeonVgwsh4iSgw6d (m/0'/0'/2')\n*/\n// We don't use HDKey, because it will everything because of bip32 derivation\nconst tx4 = btc.Transaction.fromPSBT(psbt3);\ntx4.sign(btc.WIF(testnet).decode('cP53pDbR5WtAD8dYAW9hhTjuvvTVaEiQBdrz9XPrgLBeRFiyCbQr'));\ntx4.sign(btc.WIF(testnet).decode('cR6SXDoyfQrcp4piaiHE97Rsgta9mNhGTen9XeonVgwsh4iSgw6d'));\n// must create this PSBT:\nconst psbt4 = tx4.toPSBT();\n// Given the above updated PSBT, a signer with the following keys:\n// cT7J9YpCwY3AVRFSjN6ukeEeWY6mhpbJPxRaDaP5QTdygQRxP9Au (m/0'/0'/1')\n// cNBc3SWUip9PPm1GjRoLEJT6T41iNzCYtD7qro84FMnM5zEqeJsE (m/0'/0'/3')\nconst tx5 = btc.Transaction.fromPSBT(psbt3);\ntx5.sign(btc.WIF(testnet).decode('cT7J9YpCwY3AVRFSjN6ukeEeWY6mhpbJPxRaDaP5QTdygQRxP9Au'));\ntx5.sign(btc.WIF(testnet).decode('cNBc3SWUip9PPm1GjRoLEJT6T41iNzCYtD7qro84FMnM5zEqeJsE'));\n// must create this PSBT:\nconst psbt5 = tx5.toPSBT();\n// Given both of the above PSBTs, a combiner must create this PSBT:\nconst psbt6 = btc.PSBTCombine([psbt4, psbt5]);\n// Given the above PSBT, an input finalizer must create this PSBT:\nconst tx7 = btc.Transaction.fromPSBT(psbt6);\ntx7.finalize();\nconst psbt7 = tx7.toPSBT();\n// Given the above PSBT, a transaction extractor must create this Bitcoin transaction:\nconst tx8 = btc.Transaction.fromPSBT(psbt7);\ndeepStrictEqual(\n  tx8.extract(),\n  hex.decode(\n    '0200000000010258e87a21b56daf0c23be8e7070456c336f7cbaa5c8757924f545887bb2abdd7500000000da00473044022074018ad4180097b873323c0015720b3684cc8123891048e7dbcd9b55ad679c99022073d369b740e3eb53dcefa33823c8070514ca55a7dd9544f157c167913261118c01483045022100f61038b308dc1da865a34852746f015772934208c6d24454393cd99bdf2217770220056e675a675a6d0a02b85b14e5e29074d8a25a9b5760bea2816f661910a006ea01475221029583bf39ae0a609747ad199addd634fa6108559d6c5cd39b4c2183f1ab96e07f2102dab61ff49a14db6a7d02b0cd1fbb78fc4b18312b5b4e54dae4dba2fbfef536d752aeffffffff838d0427d0ec650a68aa46bb0b098aea4422c071b2ca78352a077959d07cea1d01000000232200208c2353173743b595dfb4a07b72ba8e42e3797da74e87fe7d9d7497e3b2028903ffffffff0270aaf00800000000160014d85c2b71d0060b09c9886aeb815e50991dda124d00e1f5050000000016001400aea9a2e5f0f876a588df5546e8742d1d87008f000400473044022062eb7a556107a7c73f45ac4ab5a1dddf6f7075fb1275969a7f383efff784bcb202200c05dbb7470dbf2f08557dd356c7325c1ed30913e996cd3840945db12228da5f01473044022065f45ba5998b59a27ffe1a7bed016af1f1f90d54b3aa8f7450aa5f56a25103bd02207f724703ad1edb96680b284b56d4ffcb88f7fb759eabbe08aa30f29b851383d20147522103089dc10c7ac6db54f91329af617333db388cead0c231f723379d1b99030b02dc21023add904f3d6dcf59ddb906b0dee23529b7ffb9ed50e5e86151926860221f0e7352ae00000000'\n  )\n);\n```\n\n### UTXO selection\n\nUTXO selection is the process of choosing which UTXOs to use as inputs\nwhen making an on-chain bitcoin payment. The library:\n\n- can create tx, integrated with the signer\n- ensures change address is always specified\n- supports bip69\n- supports segwit + taproot\n- calculates weight with good precision\n- implements multiple strategies\n\nTaproot estimation is precise, but you have to pass `sighashType` when using a non-default\nsighash because it changes signature size. A Taproot input can advertise paths that the current\nwallet cannot spend. Pass the wallet's x-only public keys as `filterTaproot` to remove unavailable\ninternal-key and script paths before selection:\n\n```js\nimport * as btc from '@scure/btc-signer';\n\nconst select = (utxos, outputs, changeAddress, feePerByte, myPublicKey) =>\n  btc.selectUTXO(utxos, outputs, 'default', {\n    changeAddress,\n    feePerByte,\n    filterTaproot: [myPublicKey],\n  });\n```\n\nFiltering is opt-in: when `filterTaproot` is omitted, no paths are removed. The standalone\n`btc.filterTaproot(utxos, [myPublicKey])` utility returns the same filtered candidate records.\nBuilt-in `tr_ns` and `tr_ms` paths are checked directly. Custom or unknown leaves are rejected;\ncallers must filter those paths using their own semantics before invoking this helper. Estimation\nand finalization choose the available path with the smallest complete witness, retaining the old\nshallowest-path order for equal weights.\n\n`Oldest` / `Newest` expects UTXO provided in historical order (oldest first),\notherwise we have no way to detect age of tx.\n\n#### Strategies\n\nStrategy selection is complicated. Best should be: `exactBiggest/accumSmallest`.\n\n`exactBiggest/accumBiggest` creates tx with smallest fees,\nbut it breaks big outputs to small ones, which in the end will create\na lot of outputs close to dust.\n\n- `default`: good for privacy, same as `exactBiggest/accumBiggest`\n- `all`: send all coins to change address (consolidation)\n- `accum`: accumulates inputs until the target value (+fees) is reached, skipping detrimental inputs\n- `exact`: accumulates inputs until the target value (+fees) is matched, does not accumulate inputs\n  that go over the target value (within a threshold)\n- `accumNewest`\n- `accumOldest`\n- `accumSmallest`\n- `accumBiggest`\n- `exactNewest/accumNewest`\n- `exactNewest/accumOldest`\n- `exactNewest/accumSmallest`\n- `exactNewest/accumBiggest`\n- `exactOldest/accumNewest`\n- `exactOldest/accumOldest`\n- `exactOldest/accumSmallest`\n- `exactOldest/accumBiggest`\n- `exactSmallest/accumNewest`\n- `exactSmallest/accumOldest`\n- `exactSmallest/accumSmallest`\n- `exactSmallest/accumBiggest`\n- `exactBiggest/accumNewest`\n- `exactBiggest/accumOldest`\n- `exactBiggest/accumSmallest`\n- `exactBiggest/accumBiggest`\n\n#### Example\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { pubECDSA } from '@scure/btc-signer/utils.js';\nimport { deepStrictEqual } from 'node:assert';\n\nconst privKey = hex.decode('0101010101010101010101010101010101010101010101010101010101010101');\nconst pubKey = pubECDSA(privKey);\nconst regtest = { bech32: 'bcrt', pubKeyHash: 0x6f, scriptHash: 0xc4 };\nconst spend = btc.p2wpkh(pubKey, regtest);\nconst utxo = [\n  {\n    ...spend, // add witness/redeem scripts from spend\n    // Get txid, index from explorer/network\n    txid: hex.decode('0af50a00a22f74ece24c12cd667c290d3a35d48124a69f4082700589172a3aa2'),\n    index: 0,\n    // utxo tx information\n    // script can be used from spend itself or from explorer\n    witnessUtxo: { script: spend.script, amount: 100_000n }, // value in satoshi\n  },\n  {\n    ...spend,\n    txid: hex.decode('0af50a00a22f74ece24c12cd667c290d3a35d48124a69f4082700589172a3aa2'),\n    index: 1,\n    witnessUtxo: { script: spend.script, amount: btc.Decimal.decode('1.5') }, // value in btc\n  },\n  // {\n  //   ...spend,\n  //   txid: hex.decode('75ddabb27b8845f5247975c8a5ba7c6f336c4570708ebe230caf6db5217ae858'),\n  //   index: 0,\n  //   // tx hex from blockchain (required for non-SegWit UTXO)\n  //   nonWitnessUtxo: hex.decode(\n  //     '0200000001aad73931018bd25f84ae400b68848be09db706eac2ac18298babee71ab656f8b0000000048473044022058f6fc7c6a33e1b31548d481c826c015bd30135aad42cd67790dab66d2ad243b02204a1ced2604c6735b6393e5b41691dd78b00f0c5942fb9f751856faa938157dba01feffffff0280f0fa020000000017a9140fb9463421696b82c833af241c78c17ddbde493487d0f20a270100000017a91429ca74f8a08f81999428185c97b5d852e4063f618765000000'\n  //   ),\n  // },\n];\nconst outputs = [\n  { address: '2MvpbAgedBzJUBZWesDwdM7p3FEkBEwq3n3', amount: 50_000n }, // amount in satoshi\n  {\n    address: 'bcrt1pw53jtgez0wf69n06fchp0ctk48620zdscnrj8heh86wykp9mv20q7vd3gm',\n    amount: btc.Decimal.decode('0.5'), // amount in btc\n  },\n];\n// Send all utxo to specific address (consolidation):\n// const selected = btc.selectUTXO(utxo, [], 'all', {\n//   changeAddress: 'bcrt1pea3850rzre54e53eh7suwmrwc66un6nmu9npd7eqrhd6g4lh8uqsxcxln8', ...\nconst selected = btc.selectUTXO(utxo, outputs, 'default', {\n  changeAddress: 'bcrt1pea3850rzre54e53eh7suwmrwc66un6nmu9npd7eqrhd6g4lh8uqsxcxln8', // required, address to send change\n  feePerByte: 2n, // require, fee per vbyte in satoshi\n  bip69: true, // lexicographical Indexing of Transaction Inputs and Outputs\n  createTx: true, // create tx with selected inputs/outputs\n  network: regtest,\n});\n// selectUTXO returns undefined if there is not enough funds.\nif (!selected) throw new Error('expected enough funds');\ndeepStrictEqual(selected.fee, 394n); // estimated fee\ndeepStrictEqual(selected.change, true); // change address used\ndeepStrictEqual(selected.outputs, [\n  { address: '2MvpbAgedBzJUBZWesDwdM7p3FEkBEwq3n3', amount: 50000n },\n  {\n    address: 'bcrt1pw53jtgez0wf69n06fchp0ctk48620zdscnrj8heh86wykp9mv20q7vd3gm',\n    amount: 50_000_000n,\n  },\n  // Change address\n  // NOTE: with bip69 it is not necessarily last item in outputs\n  {\n    address: 'bcrt1pea3850rzre54e53eh7suwmrwc66un6nmu9npd7eqrhd6g4lh8uqsxcxln8',\n    amount: 99_949_606n,\n  },\n]);\n// No need to create tx manually!\nconst { tx } = selected;\ntx.sign(privKey);\ntx.finalize();\ndeepStrictEqual(tx.id, 'b702078d65edd65a84b2a97a669df5631b06f42a67b0d7090e540b02cc65aed5');\n// real tx fee, can be bigger than estimated, since we expect signatures of maximal size\ndeepStrictEqual(tx.fee, 394n);\n```\n\n## Network\n\nBitcoin nodes can't be used as source-of-truth to construct transactions & get UTXOs.\nAn extra indexer is required. Our `net.js` submodule allows to easily fetch UTXOs,\nbalances, and other data for an address.\nSee [README-fullnode.md](./README-fullnode.md) for details and\nguide on running a full node with an indexer.\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { EsploraProvider } from '@scure/btc-signer/net.js';\nimport { pubECDSA } from '@scure/btc-signer/utils.js';\nconst net = new EsploraProvider(fetch, 'http://127.0.0.1:3000');\n// Methods: `height`, `blockInfo`, `fee`, `balance`, `txCount`, `sendTx`, `waitForTx`, `txInfo`,\n// `unspent`, `transfers`, `history`, `historyMulti`.\n// Transient backend failures (429/5xx, dropped connections) are retried with backoff on GETs.\n// Long scans accept `signal` (AbortSignal) and `onProgress`; raw-tx fan-out is\n// bounded by `concurrency` (default 8).\n\n// Get latest block.\nasync function latestBlock() {\n  const height = await net.height();\n  const block = await net.blockInfo(height);\n  return { number: block.number, hash: block.hash, timestamp: new Date(block.timestamp) };\n}\n\n// Get per-address transaction history.\nasync function addressTransactions(address: string) {\n  const txs = await net.transfers(address, { limit: 10 });\n  return txs.map((tx) => ({ txid: tx.txid, block: tx.block, fee: tx.info.fee }));\n}\n\n// Stream history instead of buffering it: rows arrive newest-first while pages\n// are fetched, and stopping early also stops fetching.\nasync function streamHistory(address: string) {\n  for await (const tx of net.history(address, { onProgress: (p) => console.log(p.percent) })) {\n    if (tx.block !== undefined && tx.block < 800_000) break;\n    console.log(tx.txid, tx.transfers);\n  }\n}\n\n// Merged history for a set of addresses (HD wallets): one txid-deduplicated\n// stream; each row lists the watched addresses participating in it.\nasync function walletHistory(addresses: string[]) {\n  for await (const tx of net.historyMulti(addresses)) console.log(tx.txid, tx.addresses);\n}\n\n// Broadcast, then wait for confirmation.\nasync function sendAndWait(rawTx: string) {\n  const txid = await net.sendTx(rawTx);\n  return await net.waitForTx(txid, { confirmations: 2, timeoutMs: 3_600_000 });\n}\n\n// Get UTXOs, select inputs, and sign. Call with a key that controls funded UTXOs.\nasync function signSpend(privKey: Uint8Array, to: string, amount: bigint) {\n  const spend = btc.p2wpkh(pubECDSA(privKey));\n  const unspent = await net.unspent(spend.address!);\n  const feePerByte = await net.fee(2);\n  const selected = btc.selectUTXO(unspent.utxo, [{ address: to, amount }], 'default', {\n    feePerByte,\n    changeAddress: spend.address!,\n  });\n  if (!selected) throw new Error(`not enough funds for ${spend.address}`);\n  const { tx } = selected;\n  tx.sign(privKey);\n  tx.finalize();\n  return { txid: tx.id, raw: tx.hex };\n}\n\n// For wrapped or script spends, add caller-owned metadata before selection:\n// const wrapped = btc.p2sh(btc.p2wpkh(pubECDSA(privKey)));\n// const base = await net.unspent(wrapped.address!);\n// const utxo = base.utxo.map((u) => ({ ...u, redeemScript: wrapped.redeemScript }));\n// const selected = btc.selectUTXO(utxo, outputs, 'default', opts);\n```\n\nFirst argument is `fetch` API-compatible transport.\nWe suggest using `micro-ftch` package - a wrapper, which supports kill-switch,\nlogging, timeouts, concurrency limits, replay fixtures, and other useful network controls:\n\n```ts\nimport { ftch } from 'micro-ftch';\nlet NETWORK_ENABLED = true;\nconst fetcher = ftch(fetch, {\n  isValidRequest: () => NETWORK_ENABLED,\n  timeout: 10_000,\n  concurrencyLimit: 4,\n});\nconst net = new EsploraProvider(fetcher, 'http://127.0.0.1:3000');\n```\n\n## MuSig2\n\nMuSig2 implementation conforming to [BIP-327](https://github.com/bitcoin/bips/blob/master/bip-0327.mediawiki)\nis available in `@scure/btc-signer/musig2.js`. Check out [bip327-musig2.test.ts](./test/bip327-musig2.test.ts) as well:\n\n**Security warning:** every MuSig2 secret nonce must be used for exactly one partial signature.\n`Session.sign()` zeroes only the exact `Uint8Array` passed to it; clones, serialized values,\ndatabase records, and process snapshots remain live. Reusing the same nonce in distinct sessions\ncan reveal the signer's secret key. Stateful signers must keep one authoritative nonce record and\natomically consume it before releasing a partial signature.\n\n> `npm install @noble/curves`\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport * as musig2 from '@scure/btc-signer/musig2.js';\nimport { schnorr } from '@noble/curves/secp256k1.js';\nimport { deepStrictEqual } from 'node:assert';\n// MuSig2 Multi-signature for Alice, Bob, and Carol\n// 1. Key Generation (for each signer: Alice, Bob, Carol)\n// - Alice's key generation\nconst aliceSecretKey = btc.utils.randomPrivateKeyBytes(); // Alice generates a random 32-byte secret key\nconst alicePublicKey = musig2.IndividualPubkey(aliceSecretKey); // Alice derives her individual public key from her secret key\n// - Bob's key generation\nconst bobSecretKey = btc.utils.randomPrivateKeyBytes(); // Bob generates a random 32-byte secret key\nconst bobPublicKey = musig2.IndividualPubkey(bobSecretKey); // Bob derives his individual public key from his secret key\n// - Carol's key generation\nconst carolSecretKey = btc.utils.randomPrivateKeyBytes(); // Carol generates a random 32-byte secret key\nconst carolPublicKey = musig2.IndividualPubkey(carolSecretKey); // Carol derives her individual public key from her secret key\n\n// 2. Key Aggregation (All signers participate by sharing public keys)\nconst individualPublicKeys = [alicePublicKey, bobPublicKey, carolPublicKey]; // Collect all individual public keys\nconst sortedPublicKeys = musig2.sortKeys(individualPublicKeys); // Sort public keys lexicographically (as required by MuSig2)\nconst aggregatePublicKey = musig2.keyAggExport(musig2.keyAggregate(sortedPublicKeys)); // Extract the X-only aggregate public key (32 bytes)\n// At this point, all signers have the 'aggregatePublicKey' and 'keyAggContext'.\n// 3. Nonce Generation - Round 1 (Each signer generates and broadcasts public nonce)\nconst msg = new Uint8Array(32).fill(5); // Example message to be signed (32-byte message is recommended for BIP340)\n// Alice generates her nonce\nconst aliceNonces = musig2.nonceGen(alicePublicKey, aliceSecretKey, aggregatePublicKey, msg);\n// Secret nonce: must be kept secret and used only once per signing session!\n// Public nonce: to be shared with Bob and Carol\n// Bob generates his nonce\nconst bobNonces = musig2.nonceGen(bobPublicKey, bobSecretKey, aggregatePublicKey, msg);\n// Carol generates her nonce\nconst carolNonces = musig2.nonceGen(carolPublicKey, carolSecretKey, aggregatePublicKey, msg);\n// Each signer creates own instance\nconst session = new musig2.Session(\n  // 4. Nonce Aggregation (All signers participate by sharing public nonces)\n  musig2.nonceAggregate([aliceNonces.public, bobNonces.public, carolNonces.public]),\n  sortedPublicKeys,\n  msg\n);\n// At this point, all signers have the 'aggregateNonce'.\n// 5. Partial Signature Generation - Round 2 (Each signer generates partial signature)\n// Alice generates her partial signature\nconst alicePartialSignature = session.sign(aliceNonces.secret, aliceSecretKey);\n// Bob generates his partial signature\nconst bobPartialSignature = session.sign(bobNonces.secret, bobSecretKey);\n// Carol generates her partial signature\nconst carolPartialSignature = session.sign(carolNonces.secret, carolSecretKey);\n// 6. Partial Signature Aggregation (Anyone can aggregate partial signatures)\nconst partialSignatures = [alicePartialSignature, bobPartialSignature, carolPartialSignature]; // Collect all partial signatures\nconst finalSignature = session.partialSigAgg(partialSignatures); // Aggregate partial signatures to create the final signature\n\n// 7. Signature Verification (Anyone can verify the final signature)\ndeepStrictEqual(schnorr.verify(finalSignature, msg, aggregatePublicKey), true);\n```\n\n## Ordinals and custom scripts\n\nWe support custom scripts. You can pass it as last argument to `p2tr`.\n\nWe've developed separate [micro-ordinals](https://github.com/paulmillr/micro-ordinals) package, which contains:\n\n- Real code for ordinals / inscriptions / runes\n- CLI tool that allows to upload files as inscriptions\n- Example usage of custom scripts\n\n## P2P, ElligatorSwift, BIP324\n\nExperimental implementation of ElligatorSwift from [BIP324](https://github.com/bitcoin/bips/blob/master/bip-0324.mediawiki)\nis available.\n\nElligatorSwift is Schnorr-like x-only ECDH with public keys indistinguishable from uniformly random bytes.\n\nCheck out [libsecp](https://github.com/bitcoin/bitcoin/blob/master/src/secp256k1/doc/ellswift.md) docs.\n\n```ts\nimport { elligatorSwift } from '@scure/btc-signer/p2p.js';\n\nconst alice = elligatorSwift.keygen();\nconst bob = elligatorSwift.keygen();\n// ECDH\nconst sharedAlice = elligatorSwift.getSharedSecret(alice.privateKey, bob.publicKey);\nconst sharedBob = elligatorSwift.getSharedSecret(bob.privateKey, alice.publicKey);\n// deepStrictEqual(sharedAlice, sharedBob);\n// ECDH BIP324\nconst sharedAlice2 = elligatorSwift.getSharedSecretBip324(\n  alice.privateKey,\n  bob.publicKey,\n  alice.publicKey,\n  true\n);\nconst sharedBob2 = elligatorSwift.getSharedSecretBip324(\n  bob.privateKey,\n  alice.publicKey,\n  bob.publicKey,\n  false\n);\n// deepStrictEqual(sharedAlice2, sharedBob2);\n// pubKey decoding\nfor (const k of [alice, bob]) {\n  // deepStrictEqual(\n  //   toHex(elligatorSwift.decode(k.publicKey)),\n  //   toHex(secp256k1.getPublicKey(k.privateKey, true).subarray(1))\n  // );\n}\n```\n\n## Utils\n\n> `npm install @scure/base`\n\n### secp256k1 keys\n\n```ts\nimport { pubSchnorr, signSchnorr } from '@scure/btc-signer/utils.js';\nimport { pubECDSA, signECDSA } from '@scure/btc-signer/utils.js';\nimport { randomPrivateKeyBytes } from '@scure/btc-signer/utils.js';\n\nconst priv = randomPrivateKeyBytes();\nconst pub = pubSchnorr(priv);\n```\n\n### getAddress\n\nReturns common addresses from privateKey\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst privKey = hex.decode('0101010101010101010101010101010101010101010101010101010101010101');\ndeepStrictEqual(btc.getAddress('pkh', privKey), '1C6Rc3w25VHud3dLDamutaqfKWqhrLRTaD'); // P2PKH (legacy address)\ndeepStrictEqual(btc.getAddress('wpkh', privKey), 'bc1q0xcqpzrky6eff2g52qdye53xkk9jxkvrh6yhyw'); // SegWit V0 address\ndeepStrictEqual(\n  btc.getAddress('tr', privKey),\n  'bc1p33wm0auhr9kkahzd6l0kqj85af4cswn276hsxg6zpz85xe2r0y8syx4e5t'\n); // TapRoot KeyPathSpend\n```\n\n#### WIF\n\nEncoding/decoding of WIF privateKeys. Only compressed keys are supported for now.\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\nconst privKey = hex.decode('0101010101010101010101010101010101010101010101010101010101010101');\ndeepStrictEqual(btc.WIF().encode(privKey), 'KwFfNUhSDaASSAwtG7ssQM1uVX8RgX5GHWnnLfhfiQDigjioWXHH');\ndeepStrictEqual(\n  hex.encode(btc.WIF().decode('KwFfNUhSDaASSAwtG7ssQM1uVX8RgX5GHWnnLfhfiQDigjioWXHH')),\n  '0101010101010101010101010101010101010101010101010101010101010101'\n);\n```\n\n### Script\n\nEncoding/decoding bitcoin scripts\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\ndeepStrictEqual(\n  btc.Script.decode(\n    hex.decode(\n      '5221030000000000000000000000000000000000000000000000000000000000000001210300000000000000000000000000000000000000000000000000000000000000022103000000000000000000000000000000000000000000000000000000000000000353ae'\n    )\n  ).map((i) => (btc.utils.isBytes(i) ? hex.encode(i) : i)),\n  [\n    2,\n    '030000000000000000000000000000000000000000000000000000000000000001',\n    '030000000000000000000000000000000000000000000000000000000000000002',\n    '030000000000000000000000000000000000000000000000000000000000000003',\n    3,\n    'CHECKMULTISIG',\n  ]\n);\ndeepStrictEqual(\n  hex.encode(\n    btc.Script.encode([\n      2,\n      hex.decode('030000000000000000000000000000000000000000000000000000000000000001'),\n      hex.decode('030000000000000000000000000000000000000000000000000000000000000002'),\n      hex.decode('030000000000000000000000000000000000000000000000000000000000000003'),\n      3,\n      'CHECKMULTISIG',\n    ])\n  ),\n  '5221030000000000000000000000000000000000000000000000000000000000000001210300000000000000000000000000000000000000000000000000000000000000022103000000000000000000000000000000000000000000000000000000000000000353ae'\n);\n```\n\n### OutScript\n\nEncoding / decoding of output scripts\n\n```ts\nimport * as btc from '@scure/btc-signer';\nimport { hex } from '@scure/base';\nimport { deepStrictEqual } from 'node:assert';\n\ndeepStrictEqual(\n  btc.OutScript.decode(\n    hex.decode(\n      '5221030000000000000000000000000000000000000000000000000000000000000001210300000000000000000000000000000000000000000000000000000000000000022103000000000000000000000000000000000000000000000000000000000000000353ae'\n    )\n  ),\n  {\n    type: 'ms',\n    m: 2,\n    pubkeys: [\n      '030000000000000000000000000000000000000000000000000000000000000001',\n      '030000000000000000000000000000000000000000000000000000000000000002',\n      '030000000000000000000000000000000000000000000000000000000000000003',\n    ].map(hex.decode),\n  }\n);\ndeepStrictEqual(\n  hex.encode(\n    btc.OutScript.encode({\n      type: 'ms',\n      m: 2,\n      pubkeys: [\n        '030000000000000000000000000000000000000000000000000000000000000001',\n        '030000000000000000000000000000000000000000000000000000000000000002',\n        '030000000000000000000000000000000000000000000000000000000000000003',\n      ].map(hex.decode),\n    })\n  ),\n  '5221030000000000000000000000000000000000000000000000000000000000000001210300000000000000000000000000000000000000000000000000000000000000022103000000000000000000000000000000000000000000000000000000000000000353ae'\n);\n```\n\n## Bitcoin is flawed\n\nBitcoin is more complex than ETH / SOL despite having less features:\n\n- **Legacy:** too much decade-old code / standards\n- **Overengineering:** features were designed to be extensible and future-proof; then abandoned when future arrived.\n  - Transaction has `version` field, which is nice, allowing to change format later, however when there\n    was first change (SegWit V0), instead of using different tx version, there was hack with zero-inputs prefix\n    (tx cannot have zero inputs, so inputsCount=0 + '01' flag after that for tx version with witness data).\n    Probably it was done so it won't interfere with different transaction versions of different coins.\n    However, there is also `txVersion=2` (BIP68) which changes lockTime behaviour, but not tx format.\n  - There is bech32/witness program addresses, which is very extensible. By default rules software should\n    support future versions (0..16), so there will be no change in libraries to support new addresses.\n    However, even after first update (version 0 to 1) format of addresses itself changed from bech32 to bech32m,\n    so whole mechanic of different address versions is already unused. Also, supporting future version\n    of addresses is cool, but they are currently unspendable and we cannot know rules for spending new version address,\n    which means any new version address created now will be unspendable in future (SegWitV0->SegWitV1(taproot) even\n    changes public key format). So we cannot use this whole mechanic of future addresses at all (or users can accidentally create unspendable address and lose coins).\n  - PSBT supports unknown fields, according to spec we need to pass them as is, without modifications.\n    It was probably done this way to be future-proof: new version of PSBT can be parsed with old parser, which will ignore new fields. However, when future came (PSBTv2), format significantly changed (no `global.unsignedTx`) anyway.\n- **Bad BIP specs:** likely because there is only one relevant BTC Core implementation.\n  - To implement something, specs are not enough: need to read source code of Core (which is very complex, especially functional tests which re-implement parts in python) and other bitcoin libraries (such as bitcoinjs-lib)\n  - No one cares about specs much: for example, in [BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki),\n    despite being old 2017 spec, formatting issues still haven't been fixed: `m/0&#39;/0&#39;/0&#39;`\n  - [BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki) multisig example has unsorted partialSig field\n    inside input (it's better to sort it)\n  - Many PSBT tests are in format of `valid/invalid` (especially for PSBTv2), which isn't very helpful.\n    Parser which produces garbage, but doesn't throw exception, is still broken.\n- **Major flaws in PSBT:**\n  - PSBT was designed to be opaque key-value store. Combiner only needed to merge dictories, without a need to understand\n    fields. However, parsing requires to understand `unsignedTx`, since there is no input/output count in format itself.\n  - Instead of `global, inputCount, inputs[], outputCount, outputs[]`, inputCount and outputCount are stored inside\n    `global.unsignedTx` (v0) or `global.inputCount/global.outputCount` (v2), which means in order to parse\n    basic structure we need to completely parse global KV and understand its fields.\n  - **Security issue:** Unknown PSBT fields can be used to pass some code to backdoored wallets while being ignore by others.\n  - In JS, it is even harder to implement properly, because JS doesn't support complex keys in objects / dicts.\n    There is whole controlBlock of taproot in key inside tapLeafScript, which we need to parse, leading to structure like:\n    `{key: {version, internalKey, merklePath}, value: {script, version}`.\n    But, since there is no support for complex keys, we cannot do `correct by construction` using js objects,\n    we need to do this dict as array and constantly check if keys are unique.\n\n## Security\n\nThe library has been independently audited:\n\n- at version 2.2.0, in Apr 2026, by ourselves (self-audited)\n  - Scope: everything\n  - [Changes since audit](https://github.com/paulmillr/scure-btc-signer/compare/2.2.0..main)\n- at version 0.3.0, in Feb 2023, by [cure53](https://cure53.de)\n  - PDFs:","readmeFilename":"README.md"}