bitcoinjs-lib
Reasonable, with limits. 5th of 10 blockchain libraries.
bitcoinjs-lib is the long-standing TypeScript library for building, signing and parsing Bitcoin transactions and PSBTs, including Taproot. It is still a sound choice for Bitcoin-only work, but three advisories in 2026 and a smaller audited rival (@scure/btc-signer) mean you should keep it pinned to a patched version and check its fee results yourself.
Best for: Teams that build Bitcoin wallets or services in JavaScript and want the most widely used, best-documented Bitcoin transaction library.
Scores
Overall6.9
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.5, likely 5.5 to 7.5
For Bitcoin in JavaScript it remains the most common and complete choice, with active patching. The recent advisories, a slow-growing share and an audited, faster rival in @scure/btc-signer keep it below a strong default. Judge it against Bitcoin tools, because the Ethereum and Solana peers do a different job.
- npm downloadsLast4Weeks: Large but below-median growth
- advisories: Recent critical advisory, now patched
- cdn.jsdelivr.net/npm/@scure/btc-signer@2.0.1/README.md: Audited minimal alternative
- github.com/bitcoinjs/bitcoinjs-lib/blob/master/CHANGELOG.md: Active v7 line with backports
GPT-6.2 Sol: 7.2, likely 6.1 to 8.3
Version 7.0.5 is a strong pick for Bitcoin wallets and transaction tools built around PSBT v0. Its typed transaction APIs, downstream use, and security backports support that recommendation. Missing native PSBT v2, modest maintainer activity, and slowing relative adoption keep it below a default recommendation.
- bitcoinjs.github.io/bitcoinjs-lib: Stable APIs and examples cover common Bitcoin wallet workflows.
- github.com/bitcoinjs/bitcoinjs-lib/pull/2327: PSBT v2 remains outside the stable API.
- github.com/bitcoinjs/bitcoinjs-lib/blob/master/CHANGELOG.md: Current patches and maintenance backports are documented.
- github.commitsLastYear, dependents, npm downloads year over year, medianDownloadsRatio, peers: Established use alongside modest activity and below-median growth.
Needed by many2.9
How many developers need a tool for this job?
Claude Opus 5.5: 3.0, likely 2.0 to 4.0
Only developers who build on Bitcoin need it. That is a clear niche, both among JS developers in general and inside a category led by Ethereum and Solana. Within that niche it covers most transaction jobs.
- github description: Bitcoin-only library for Node.js and browsers
- peers: Most peers serve Ethereum or Solana, which have larger JS developer bases
GPT-6.2 Sol: 2.7, likely 1.6 to 3.8
Bitcoin wallets, payments, and transaction tools are a distinct niche within JavaScript and TypeScript. The library runs in Node.js and browsers, but its APIs focus on Bitcoin transaction data. Developer ecosystem counts cover all languages and give only a rough sense of the addressable audience.
- bitcoinjs.github.io/bitcoinjs-lib: Documents the Bitcoin-specific API and browser support.
- developerreport.com: Tracks open-source developer activity across Bitcoin, EVM, and Solana ecosystems.
Helps a lot7.0
How well does it do the job for those who need it?
Claude Opus 5.5: 6.5, likely 5.5 to 7.5
Feature coverage is broad and mature: payments, PSBT, Taproot and multisig, with TypeScript types and a modern v7 API. The 2026 correctness bugs in fee accounting and Merkle validation show gaps in edge-case checking. @scure/btc-signer is smaller, audited and reportedly much faster, which keeps the score from going higher.
- github.com/bitcoinjs/bitcoinjs-lib/blob/master/CHANGELOG.md: v7: Uint8Array, bigint, valibot, ESM/CJS; series of taproot and validation fixes
- unpkg.com/bitcoinjs-lib@7.0.5/README.md: Taproot needs an extra ECC library
- pkgstats.com/pkg:@btc-vision/bitcoin: Fork authors' benchmark: PSBT 100 inputs ~303 ms vs ~2.6 ms for scure
- cdn.jsdelivr.net/npm/@scure/btc-signer@2.0.1/README.md: Audited, minimal-dependency alternative with Taproot
- npm hasTypes: Ships its own types
GPT-6.2 Sol: 7.5, likely 6.4 to 8.5
Version 7.0.5 has typed APIs and working examples for transaction parsing, Taproot, multisig, and PSBT v0. Native PSBT v2 is still in a draft pull request. A competing fork measured slow construction on large PSBTs in 7.0.1, so performance on the current patch remains uncertain. The bundled types help coding agents check their work, while outdated Buffer wording can still lead them to generate incorrect calls.
- bitcoinjs.github.io/bitcoinjs-lib: Current API reference and integration examples.
- github.com/bitcoinjs/bitcoinjs-lib/pull/2327: Native BIP-370 support remains in draft.
- github.com/btc-vision/bitcoin/blob/main/benchmark-compare/BENCHMARK.md: A competing fork found slow large-PSBT construction on 7.0.1.
- github.com/bitcoinjs/bitcoinjs-lib/issues/2321: A contributor reports outdated Buffer wording in the v7 documentation.
Holds up over time6.3
Will it still be a good choice in two years?
Claude Opus 5.5: 6.0, likely 4.5 to 7.5
Maintenance is steady but small: 22 commits and 11 npm versions in the last year, plus coordinated backports to three release lines. Few people do the work and no funding is visible, so the project depends on a handful of maintainers. The issue backlog is low, with 21 open issues.
- github commitsLastYear: 22 commits in a year
- npm versionsLastYear: 11 versions, latest 7.0.5 on 2026-10-26
- github openIssues: 21 open vs 1249 closed
- scorecard Maintained: 10/10
- github.com/bitcoinjs/bitcoinjs-lib/blob/master/CHANGELOG.md: Fixes backported to 5.2.x, 6.1.x and 7.0.x
GPT-6.2 Sol: 6.6, likely 5.4 to 7.7
The project published 11 npm versions in the past year, including security backports to v5 and v6. Its 22 commits trail several active category peers, and native PSBT v2 has remained in draft since March. The move to Uint8Array and bigint required downstream changes. npm lists four collaborators, but their current release roles and long-term funding are unclear.
- github.commitsLastYear, npm.versionsLastYear, peers: 22 commits and 11 npm versions, with much higher commit activity among several peers.
- npmjs.com/package/bitcoinjs-lib?activeTab=versions: Lists four collaborators and patched v5 and v6 maintenance tags.
- github.com/bitcoinjs/bitcoinjs-lib/pull/2327: PSBT v2 work opened in March and remains in draft.
- github.com/rsksmart/btc-transaction-helper#breaking-changes-in-5x: Rootstock documents downstream API changes after moving to bitcoinjs-lib v7.
Used widely4.9
How many use it, and is that growing?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Downloads are 4.27M per 4 weeks, up from 1.86M. That ratio of 2.3 is below the 4.1 median, so it is losing relative ground. Many downloads come through wallet SDKs that install it for users. Its 6,686 dependent repos and 1,199 dependent packages are solid for a Bitcoin-only tool, but well below ethers or web3.js.
- npm downloadsLast4Weeks: 4.27M vs 1.86M a year ago (ratio 2.3 < 4.1 median)
- dependents: 6,686 repos, 1,199 packages
- github stars: 6,004 stars, 2,254 forks
- bluesky posts: 0 posts; no HN stories
GPT-6.2 Sol: 4.7, likely 3.6 to 5.8
ecosyste.ms found 6,686 dependent repositories and 1,199 dependent npm packages, a meaningful footprint for a Bitcoin-specific library. Four-week downloads grew 2.29 times to 4.27 million, below the 4.1 catalog median, so its relative share fell. Heavy installs of older versions and limited repository coverage make it hard to tell how many new projects are choosing v7.
- dependents, github.stars, peers: 6,686 tracked repositories, 1,199 packages, and about 6,000 stars.
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio: 4.27 million versus 1.86 million downloads, or 2.29 times against a 4.1 median.
- npmjs.com/package/bitcoinjs-lib?activeTab=versions: Older releases still account for a substantial share of installs.
Vouched for6.1
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
The project says it powers most Bitcoin web wallets, and builder guides such as QuickNode list it as the standard Bitcoin JS tool. No independent audit, survey data or current write-up confirms its quality. Security press covered its 2026 bugs, which shows wide use rather than quality.
- quicknode.com/builders-guide/tools/bitcoinjs-by-daniel-cousens: Listed as a core Bitcoin JS tool
- classic.yarnpkg.com/en/package/bitcoinjs-lib: Self-reported use in most Bitcoin web wallets
- hackerNews stories: No recent HN coverage
GPT-6.2 Sol: 7.2, likely 6.1 to 8.3
Mempool and the UniSat Wallet SDK declare v6 dependencies, and Rootstock's transaction helper has adopted v7. A Bitcoin DeFi survey also records BitcoinJS use alongside several alternatives. Much of the clearest downstream evidence is for v6, and there is little direct evidence about satisfaction with v7.
- github.com/mempool/mempool/blob/master/backend/package.json: The Mempool backend declares a v6 dependency.
- raw.githubusercontent.com/unisat-wallet/wallet-utils/master/package.json: The UniSat Wallet SDK declares a v6 dependency.
- github.com/rsksmart/btc-transaction-helper#breaking-changes-in-5x: Rootstock documents its adoption of v7.
- blog.arch.network/content/files/2025/07/Arch-Network-Bitcoin-DeFi-Builders-2025.pdf: The survey reports BitcoinJS use at 12% among the tools listed.
Safe5.9
How safe is it to depend on?
Claude Opus 5.5: 5.5, likely 4.0 to 7.0
Three serious advisories arrived in 2026: a critical Merkle duplication flaw and two high-severity PSBT fee-misreporting bugs. All were fixed with backports across release lines, which is good handling. The Scorecard is 6.4, with weak Code-Review, no Security-Policy, no fuzzing and no SAST. Seven dependencies and the MIT licence are fine, and typosquats of the package exist on npm.
- advisories: GHSA-8vv3-6qpc-gpw6 critical, 2026-11-10
- mend.io/vulnerability-database/CVE-2026-107846: Merkle flaw fixed in 5.2.1, 6.1.8 and 7.0.2
- thecurrencyanalytics.com/technology/bitcoinjs-lib-patches-fee-bugs-5-2-2-306539: Fee bugs could report a 900M-sat fee as 200; fixed in 7.0.4
- scorecard: 6.4; Code-Review 3, Security-Policy 0, Fuzzing 0, SAST 0
- npm dependencies: 7 dependencies, MIT
GPT-6.2 Sol: 6.2, likely 5.0 to 7.4
Version 7.0.5 includes fixes for all six advisories listed by the project, including the Merkle-root issue GitHub rates critical. Fixes were available by public disclosure, with backports to v5 and v6 where affected. The MIT license is permissive, and the package has seven direct runtime dependencies. The 6.4 Scorecard shows weak code review, no detected security policy or fuzzing, and inconclusive release-signing checks.
- github.com/bitcoinjs/bitcoinjs-lib/security/advisories: The project's six published advisories extend beyond the bundle's single entry.
- github.com/advisories/GHSA-8vv3-6qpc-gpw6: GitHub rates the Merkle-root issue critical and lists 7.0.2 as the first patched v7 release.
- github.com/bitcoinjs/bitcoinjs-lib/blob/master/CHANGELOG.md: Documents the security fixes through 7.0.5 and backports.
- scorecard.score, scorecard.checks, npm.dependencies, npm.license: Scorecard 6.4, seven direct dependencies, and an MIT license.
- bitcoinjs.github.io/bitcoinjs-lib: The project documents a gap in tooling for verifying npm builds against GitHub source.
Good
- It covers the full Bitcoin toolset: all common payment types, PSBT, Taproot key-path and script-path, and multisig.
- v7 is modern: it uses Uint8Array and bigint, ships both ESM and CJS, and validates with valibot.
- Maintainers backport security fixes to the 5.x, 6.x and 7.x lines at the same time.
- Its 14-year history and thousands of dependents mean plenty of examples exist for developers and AI agents.
Bad
- 2026 brought a critical Merkle-root advisory and two high-severity PSBT fee-accounting bugs.
- Taproot and key handling need separate ECC and ecpair packages, which adds setup steps.
- A benchmark by a fork's authors shows PSBT handling far slower than @scure/btc-signer.
- It works only with Bitcoin, has no GitHub releases, and the jump from v6 to v7 broke code (Buffer became Uint8Array, numbers became bigint).
The numbers
- npm downloads, 4 weeks
- 4.3M ×2.3 in a year
- GitHub stars
- 6k
- Commits, 12 months
- 22
- npm version
- 7.0.5 Oct 2026
- Versions, 12 months
- 11
- Advisories, 24 months
- 1 of 1 ever
- OpenSSF Scorecard
- 6.4 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (bitcoinjs/bitcoinjs-lib), npm (bitcoinjs-lib), OSV and the OpenSSF Scorecard.
Blockchain libraries
- 8.9viem
- 8.2Wagmi
- 8.0Solana Kit
- 7.1Ox
- 6.9bitcoinjs-lib
- 6.7Hardhat
- 6.6ethers.js
- 6.3Solana web3.js
- 5.6thirdweb
- 1.7web3.js