Practical overview
When it fits
Use it when a Node.js or JavaScript application needs to create or inspect Lightning payment requests in BOLT #11 format.
Who it is for
JavaScript and Node.js developers building software that handles Lightning payment requests.
Documented uses
- Decode a BOLT #11 request into invoice fields and tags.
- Convert decoded tags into a named object with the tagsObject getter.
- Encode a BOLT #11 payment request from the required input data.
Requirements & limits
- Installation and setup are documented for npm and Node.js using CommonJS.
- Encoding requires a private key, a payment_hash tag and a description at minimum.
- For fractional-satoshi amounts, use the decoded millisatoshis field; satoshis is set only for whole-satoshi amounts.
- The repository declares an MIT license.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install BOLT11 and prepare it in Node.js
Add the library to a Node.js project and load it for use.
Before you start
- A Node.js project
- npm
Steps
Install the package with npm install bolt11.
Load it in Node.js with require('bolt11').
Expected outcome
The library is installed and assigned to a variable for use in Node.js.
Guide limitations
- These setup steps do not cover running an encoding or decoding operation.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- bitcoinjs/bolt11 · Official homepage title · retained in its source language

