Overview
This node integrates with the Nostr Wallet Connect (NWC) protocol to interact with a Lightning Network wallet. It supports multiple operations such as sending satoshis, creating invoices, looking up invoice details, listing recent transactions, retrieving wallet info and balance, making keysend payments, and signing messages.
The List Transactions operation specifically retrieves a list of recent transactions from the connected Lightning wallet, limited by a user-defined maximum number.
Practical use cases include:
- Monitoring recent Lightning Network transactions for accounting or auditing.
- Displaying transaction history in dashboards or reports.
- Triggering workflows based on recent payment activity.
Properties
| Name | Meaning |
|---|---|
| Limit | Maximum number of transactions to return. |
Output
The output is a JSON array where each element represents a transaction object returned by the Lightning wallet via the NWC protocol. The exact structure depends on the wallet's API but typically includes details such as transaction IDs, amounts, timestamps, statuses, and other metadata related to each transaction.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to a Lightning wallet supporting the Nostr Wallet Connect protocol.
- Needs an API URL credential for the NWC endpoint configured in the node credentials.
- Uses external libraries:
@getalby/sdkfor interacting with the NWC client.@getalby/lightning-toolsfor handling Lightning addresses when sending payments (not directly relevant for listing transactions).
Troubleshooting
Common issues:
- Invalid or unreachable NWC URL credential can cause connection failures.
- Exceeding the wallet's maximum allowed limit may result in errors or truncated results.
- Network connectivity problems between n8n and the Lightning wallet endpoint.
Error messages:
"Invalid operation"if an unsupported operation is selected (unlikely here since "list" is valid).- Errors related to authentication or authorization if the provided NWC URL or credentials are incorrect.
- Timeout or network errors if the wallet service is down or unreachable.
Resolutions:
- Verify the NWC URL credential is correct and accessible.
- Ensure the Lightning wallet supports the requested operation.
- Check network connectivity and firewall settings.
- Use the "Continue On Fail" option in n8n to handle transient errors gracefully.