Overview
This node integrates with the Nostr Wallet Connect (NWC) protocol to interact with Lightning Network wallets. It supports multiple operations such as sending satoshis, creating invoices, looking up invoice details, listing transactions, retrieving wallet info and balance, making keysend payments, and signing messages.
The Lookup Invoice operation specifically allows users to retrieve detailed information about a Lightning Network invoice or payment by providing either a BOLT-11 invoice string or a payment hash. This is useful for verifying payment status, amounts, and other metadata related to an invoice or payment.
Practical examples:
- Verifying if a Lightning invoice has been paid before fulfilling an order.
- Retrieving invoice details to display payment status in a dashboard.
- Checking payment hashes to confirm transaction outcomes.
Properties
| Name | Meaning |
|---|---|
| Invoice or Payment Hash | The BOLT-11 invoice string or payment hash used to look up the corresponding invoice details. |
Output
The output is a JSON array where each element corresponds to the result of the lookup operation for each input item. The structure depends on the data returned by the NWC client’s lookupInvoice method, typically including fields such as:
- Invoice details (amount, description, expiry, etc.)
- Payment status (paid/unpaid)
- Payment hash and related identifiers
If the node encounters an error during lookup, the output will contain an object with an error field describing the issue.
No binary data output is produced by this operation.
Dependencies
- Requires an API URL credential for connecting to the Nostr Wallet Connect service.
- Uses the
@getalby/sdkpackage to instantiate the NWC client. - Uses the
@getalby/lightning-toolspackage for handling Lightning addresses when applicable (not directly relevant for lookup but part of the overall node).
Troubleshooting
Common issues:
- Providing an invalid or malformed BOLT-11 invoice or payment hash will cause errors.
- Network connectivity problems or incorrect NWC URL credential can prevent successful communication.
- If the invoice or payment hash does not exist or is unknown, the lookup may return empty or error responses.
Error messages:
- Errors from the underlying SDK or network calls are propagated. For example, "Invalid invoice format" or "Payment hash not found".
- To resolve, verify the correctness of the invoice/hash input and ensure the NWC URL credential is properly configured and reachable.
Continue on Fail:
- The node supports continuing execution on failure, allowing partial results with error messages per item.