Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
lnget is a command-line HTTP client that handles L402 (Lightning HTTP 402) paywalls automatically. When a server responds with a 402 challenge, lnget pays the Lightning invoice and retries the request with the earned token. Tokens are cached per domain to avoid repeated payments on subsequent requests.
Handles the full L402 flow, including parsing the 402 challenge, paying the invoice, caching the token, and retrying, so scripts need no custom payment logic.
When to use it
- Downloading files from Lightning-paywalled APIs
- Previewing paywall costs before committing payment
- Managing and clearing cached L402 tokens per domain
- Making scripted HTTP requests with automatic micropayment handling
- Checking Lightning node connection status and wallet balance
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: fetch JSON data from an L402-protected endpoint, but only if it costs under 500 satoshis
- 1Run lnget --no-pay --json on the target URL to retrieve the 402 challenge details without paying
- 2Parse the invoice_amount_sat field from the JSON output
- 3Compare the cost against the 500 sat budget
- 4Run lnget --max-cost 500 -q to pay and fetch if within budget
- 5Pipe the response through jq to extract the body field
The API response body is printed to stdout; the paid token is cached at ~/.lnget/tokens/<domain>/ for reuse on future requests
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.