- Home
- Skills
- Web3 & Crypto
- lightning invoice decode preflight
lightning invoice decode preflight
Read a Lightning invoice with the agent-bitcoin SDK before any payment.
$9
lightning invoice decode preflight
Example session with this skill installed
Check this BOLT11 invoice for a valid payment hash: lnbc10u1p3...
- Read your context and instructions
- Compiled the lightning invoice decode
I have performed a preflight check on the provided BOLT11 invoice using the agent-bitcoin SDK. The invoice was successfully walked to verify its internal payment hash structure.
Preflight Inspection Result
| Check Component | Result | Status |
|---|---|---|
| SDK Module | agent_bitcoin.bolt11_invoice | Loaded |
| Walkable Structure | seen is not None | Passed |
| Payment Hash Count | seen[0] == 1 | Verified |
| Privacy Check | No sensitive data printed | Secure |
The invoice contains exactly one payment hash and is structurally sound for the next phase of processing. Note that this does not constitute a full clearance to pay, as network compatibility and expiration were not evaluated in this step.
Next steps
- Proceed to check the invoice amount against your available balance.
- Verify the invoice expiry timestamp before attempting the route.
- Ensure the invoice network (mainnet/testnet) matches your node configuration.
Connects securely to your tools. The creator never sees your data.
About this skill
Manual verification of BOLT11 invoices often leads to failed payment attempts or stuck HTLCs due to malformed hashes. This skill provides a specialized preflight check using the agent-bitcoin SDK to validate an invoice's structure before initiating a transaction.
What it does
- Invoice Inspection uses the
agent-bitcoinSDK to walk the internal structure of a BOLT11 invoice. - Hash Validation ensures the invoice contains exactly one payment hash to prevent routing errors.
- Preflight Termination stops the agent execution immediately if the invoice is unwalkable or invalid.
- Privacy Enforcement prevents the leakage of sensitive data like BOLT11 strings or hashes in the agent logs.
How it works
- The agent receives a BOLT11 invoice string for inspection.
- It invokes
inspect_payment_hashesfrom theagent_bitcoin.bolt11_invoicemodule. - The skill evaluates the
seenobject to confirm the invoice can be walked. - It verifies the payment hash count equals one.
- If checks fail, the process terminates to prevent unsafe payment attempts.
Frameworks & tools
This skill requires Python 3.10+ and the agent-bitcoin library. It operates without requiring an LND unlock or mainnet environment variables.
Why this beats prompting it yourself
Generic prompts often try to parse invoices with regex or basic string splitting, missing internal structure errors. This skill uses the official SDK logic to verify the underlying payment hash integrity, ensuring the agent fails fast before touching any wallet balance.
Use cases
- Verify a Lightning invoice before passing it to a payment executor.
- Sanitize user-provided BOLT11 strings in automated payment workflows.
- Identify malformed invoices that lack a single, unique payment hash.
Known limitations
Does not check amount, expiry, network, or L402 specific logic. Requires agent-bitcoin installed via pip.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 11 days ago
- Software
Python
Permissions
What's inside
Frequently Asked Questions
New in Web3 & Crypto
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Web3 & Crypto.