# bitcoinjs-lib: 6.9 out of 10

Reasonable, with limits. 5th of 10 in [Blockchain libraries](https://elestia.ai/opensource/web3/index.md).

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

- **Overall: 6.9** (likely 5.8 to 7.9)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (7.2): 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.
- **Needed by many: 2.9** (likely 1.8 to 3.9)
  - Claude Opus 5.5 (3.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.
  - GPT-6.2 Sol (2.7): 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.
- **Helps a lot: 7.0** (likely 6.0 to 8.0)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (7.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.
- **Holds up over time: 6.3** (likely 5.0 to 7.6)
  - Claude Opus 5.5 (6.0): 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.
  - GPT-6.2 Sol (6.6): 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.
- **Used widely: 4.9** (likely 3.8 to 5.9)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (4.7): 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.
- **Vouched for: 6.1** (likely 4.8 to 7.4)
  - Claude Opus 5.5 (5.0): 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.
  - GPT-6.2 Sol (7.2): 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.
- **Safe: 5.9** (likely 4.5 to 7.2)
  - Claude Opus 5.5 (5.5): 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.
  - GPT-6.2 Sol (6.2): 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.

## 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

- Downloads, 4 weeks: 4.3M
- In a year: ×2.3
- GitHub stars: 6k
- Commits, 12 months: 22
- Last npm release: Oct 2026
- Advisories, 24 months: 1
- Licence: MIT
- GitHub: https://github.com/bitcoinjs/bitcoinjs-lib
- npm: https://www.npmjs.com/package/bitcoinjs-lib

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
