bitcoinjs-lib offers TypeScript/JavaScript APIs to construct Bitcoin transactions and related structures in Node.js or browser bundles.
Overview
bitcoinjs-lib is a JavaScript implementation of Bitcoin building blocks for Node.js and browsers, published with committed JavaScript output for verification. It focuses on transaction, PSBT, and payment primitives while delegating key management to companion libraries.
The project stresses auditing dependencies, using secure randomness sources, and testing in target environments because subtle JS issues can affect funds safety.
Browser usage typically flows through bundlers such as browserify or webpack, and the maintainers document IRC and Matrix channels for developer discussion.
Only tagged releases are considered stable; the master branch is explicitly marked as development-only.
Key features
- Transaction and PSBT APIs
- TypeScript-authored codebase
- Node.js and browser bundling
- Taproot usage examples
- High test coverage goal
- Companion libraries for crypto keys
Use cases
- Build Bitcoin wallets in JavaScript
- Create and sign transactions in web apps
- Integrate Bitcoin parsing in Node services
- Prototype payment flows in the browser