Elestia Open Source Ratings
6.9

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.

GitHubnpm

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

  1. 8.9viem
  2. 8.2Wagmi
  3. 8.0Solana Kit
  4. 7.1Ox
  5. 6.9bitcoinjs-lib
  6. 6.7Hardhat
  7. 6.6ethers.js
  8. 6.3Solana web3.js
  9. 5.6thirdweb
  10. 1.7web3.js
Compare all 10 on six scores