Package Information
Released: 7/28/2025
Downloads: 0 weekly / 10 monthly
Latest Version: 1.0.4
Author: matjaz
Available Nodes
Documentation
n8n-nodes-nwc
Custom n8n nodes for Nostr Wallet Connect (NWC) protocol integration.
Features
- Send Satoshis: Send Bitcoin Lightning payments to addresses or invoices
- Make invoice: Create Lightning invoices to receive payments
- List Transactions: View recent transaction history
- Lookup Invoice: Look up invoice details from a BOLT-11 invoice or payment hash
- Get Info: Get wallet information and capabilities
- Get Balance: Get current wallet balance
- Make Keysend Payment: Send payment using keysend (no invoice required)
- Sign Message: Sign a message with the wallet
Installation
- Clone this repository:
git clone https://github.com/matjaz/n8n-nodes-nwc.git
cd n8n-nodes-nwc
- Install dependencies:
npm install
- Build the project:
npm run build
- Install the node in your n8n instance:
npm link
Configuration
NWC API Credentials
You'll need to configure the following credential:
- NWC URL: Your NWC connection URL
Getting NWC URL
Using Alby hub:
- Go to https://albyhub.com
- Create new NWC connection
- Copy the NWC URL provided
Using other wallets:
- Look for NWC connection settings in your wallet
- Copy the NWC URL (format:
nostr+walletconnect://...)
The NWC URL contains all the necessary connection information including relay, keys, and wallet details.
Usage
Send Satoshis
Configure the node with:
- Operation: Send Satoshis
- Amount: Amount in satoshis to send
- Recipient: Lightning address or invoice
- Description: Optional payment description
Make invoice
Configure the node with:
- Operation: Make invoice
- Amount: Amount in satoshis to request
- Description: Description for the invoice
List Transactions
Configure the node with:
- Operation: List Transactions
- Limit: Maximum number of transactions to return
Lookup Invoice
Configure the node with:
- Operation: Lookup Invoice
- Invoice or Payment Hash: BOLT-11 invoice or payment hash to look up
Get Info
Configure the node with:
- Operation: Get Info
Get Balance
Configure the node with:
- Operation: Get Balance
Make Keysend Payment
Configure the node with:
- Operation: Make Keysend Payment
- Destination: Destination node public key
- Amount: Amount in satoshis to send
- Memo: Optional memo for the payment
Sign Message
Configure the node with:
- Operation: Sign Message
- Message: Message to sign
Example Workflows
Payment Processing
- Trigger: Webhook or schedule
- NWC Node: Send Satoshis
- Condition: Check payment success
- Action: Update database or send notification
Invoice Generation
- Trigger: Manual or API call
- NWC Node: Make invoice
- Action: Store invoice details
- Action: Send invoice to customer
Development
Project Structure
n8n-nodes-nwc/
├── credentials/
│ └── NwcUrl.credentials.ts
├── nodes/
│ └── Nwc/
│ ├── Nwc.node.ts
│ └── nwc.svg
├── package.json
├── tsconfig.json
├── gulpfile.js
└── README.md
Building
# Build the project
npm run build
# Watch for changes during development
npm run dev
# Format code
npm run format
# Lint code
npm run lint
NWC Protocol
This node uses the Alby NWC SDK to implement the Nostr Wallet Connect (NWC) protocol as specified in the official documentation.
Key Features
- Alby SDK Integration: Uses the official Alby NWC SDK for reliable wallet communication
- Lightning Network: Supports Bitcoin Lightning payments
- Simplified Setup: Single NWC URL credential for easy configuration
- Automatic Connection Management: SDK handles connection, encryption, and disconnection
Supported Methods
pay_invoice: Send payments to Lightning invoicesmake_invoice: Generate Lightning invoiceslist_transactions: Retrieve transaction historylookup_invoice: Look up invoice details from BOLT-11 invoice or payment hashget_info: Get wallet information and capabilitiesget_balance: Get current wallet balancepay_keysend: Send payments using keysend protocolsignMessage: Sign messages with wallet
Troubleshooting
Common Issues
- Connection Timeout: Check your NWC URL and network connection
- Authentication Error: Verify your NWC URL is correct and not expired
- Wallet Not Found: Ensure your wallet is online and the NWC URL is valid
Debug Mode
Enable debug logging by setting the NODE_ENV=development environment variable.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see LICENSE file for details.
Support
For support and questions:
- Create an issue on GitHub
- Check the NWC documentation
- Join the Nostr community
Changelog
v1.0.0
- Initial release
- Alby NWC SDK integration