LaunchKit · 2026
Back to Skills

lightning-agent-commerce

End-to-end agentic commerce workflow using Lightning Network.

0
794 downloads
by @roasbeef

Setup & Installation

openclaw skills install @roasbeef/lightning-agent-commerce

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install lightning-agent-commerce

What This Skill Does

Sets up a full Lightning Network payment stack for autonomous agent commerce using three components: lnd (Lightning Terminal), lnget (L402 HTTP client), and aperture (L402 reverse proxy). Agents can buy L402-protected data by paying invoices automatically, or sell data behind a paywall that other agents pay per request.

L402 lets agents pay per request rather than sharing API keys or managing subscriptions, enabling fully autonomous commerce between agents without human intervention.

When to use it

  • Fetching real-time market data from a paid API with automatic invoice settlement
  • Running a per-request paywall in front of an existing backend service
  • Enabling two agents to exchange data and payment without human involvement
  • Capping micropayment spend per API call to stay within a budget
  • Prototyping agent payment workflows on a testnet Lightning node

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Fetch market data from a paid Lightning API endpoint

AGENT
  1. 1Start the lnd node and confirm it is running with lncli getinfo
  2. 2Generate a Bitcoin address, fund the wallet, and open a payment channel
  3. 3Initialize lnget and connect it to the local lnd instance
  4. 4Run lnget --max-cost 1000 https://api.example.com/market-data to fetch and pay atomically
  5. 5Verify the received L402 token is cached with lnget tokens list
OUTPUT

JSON market data returned after lnget pays the Lightning invoice and retries with the validated L402 token

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

Bitcoin (BTC) to fund the Lightning wallet, obtained from an exchange or existing wallet