lightning invoice decode preflight

    by agent-bitcoin

    1

    Read a Lightning invoice with the agent-bitcoin SDK before any payment.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    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 ComponentResultStatus
    SDK Moduleagent_bitcoin.bolt11_invoiceLoaded
    Walkable Structureseen is not NonePassed
    Payment Hash Countseen[0] == 1Verified
    Privacy CheckNo sensitive data printedSecure

    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

    1. Proceed to check the invoice amount against your available balance.
    2. Verify the invoice expiry timestamp before attempting the route.
    3. 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-bitcoin SDK 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

    1. The agent receives a BOLT11 invoice string for inspection.
    2. It invokes inspect_payment_hashes from the agent_bitcoin.bolt11_invoice module.
    3. The skill evaluates the seen object to confirm the invoice can be walked.
    4. It verifies the payment hash count equals one.
    5. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Network Access
    Environment Variables
    Listed11 days ago

    What's inside

    Frequently Asked Questions

    This skill performs a structural check on BOLT11 invoices using the agent-bitcoin SDK to ensure they are valid and contain exactly one payment hash before you initiate a transaction, preventing failed payments or stuck HTLCs.

    This skill is designed for any AI agent framework running Python 3.10 or higher that has the `agent-bitcoin` library installed; it does not require a live LND connection to perform the validation.

    No, this skill is focused strictly on structural and payment hash integrity; it does not verify invoice amounts, expiration timestamps, or network-specific (mainnet/testnet) metadata.

    This skill is specifically optimized to prevent the leakage of sensitive BOLT11 strings or hashes within your agent's execution logs, ensuring your payment data remains private during the validation process.

    The purchase includes the production-ready skill code, integration documentation for the `agent-bitcoin` SDK, and the pre-configured logic for handling 'fail-fast' termination scenarios.

    Updates are provided to ensure continued compatibility with the `agent-bitcoin` SDK; users can download the latest version of the skill directly from their marketplace library when a new version is released.

    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.