invoice-any
v1.0.2
Published
Generate Lightning Network invoices from Lightning addresses or LNURL
Maintainers
Readme
⚡ invoice-any
Generate Lightning Network invoices from Lightning addresses or LNURL with ease!
❓ What is it?
invoice-any is a lightweight Node.js package that allows you to generate Lightning Network invoices directly from a Lightning Address (e.g., [email protected]) or an LNURL. It simplifies the process of interacting with the Lightning Network for payments.
📦 Installation
You can install the package using npm:
npm install invoice-any🚀 How to use it?
💻 As a Library
Import the package into your project and use the getInvoice function.
const { getInvoice } = require('invoice-any');
const address = '[email protected]'; // Or an LNURL
const amountSats = 1000; // Amount in Satoshis
getInvoice(address, amountSats)
.then(invoice => {
console.log('⚡ Generated Invoice:', invoice);
})
.catch(error => {
console.error('❌ Error:', error);
});⌨️ CLI Usage
You can also use it directly from the command line to generate invoices instantly.
Syntax:
get-invoice <lightning-address-or-lnurl> <amount-in-sats>Example:
# Using npx (no installation needed)
npx invoice-any [email protected] 500
# Or if installed globally
get-invoice [email protected] 500✅ Supported Wallets
This package supports any wallet or service that implements the Lightning Address or LNURL protocol.
Some popular examples include:
- ⚡ Wallet of Satoshi
- 🟠 Blink (Bitcoin Beach)
- 🐝 Alby
- 🦅 Phoenix (via LNURL)
- 🟣 ZBD
- And many others!
🛠 Dependencies
This package relies on the following dependencies:
- bech32: Used for decoding LNURL strings. 🔗
ℹ️ Additional Information
- License: MIT
Happy Hacking! 🚀
