Aperture for Openclaw

A high-performance reverse proxy that implements the L402 protocol to enable Lightning Network payment-gated API access.

roasbeef
v1.0.0
Feb 11, 2026
0
2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install aperture

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install aperture using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Aperture?

Aperture is a specialized reverse proxy designed by Lightning Labs that implements the L402 protocol, formerly known as LSAT. By utilizing this within the framework of Openclaw Skills, developers can seamlessly gate backend services behind Lightning Network micropayments. It acts as an authentication and authorization layer that sits in front of your existing APIs, ensuring that only users who have paid the required satoshis can access premium resources.

This tool is critical for developers looking to monetize agent-to-agent communication or protect high-value data endpoints. When integrated via Openclaw Skills, Aperture handles the complexity of invoice generation, macaroon verification, and proxying, allowing you to focus on building the core logic of your paid services.

Aperture Use Cases

  • Creating paid API endpoints that require Lightning micropayments for access.
  • Hosting premium digital content or data sets specifically for other AI agents to consume.
  • Implementing granular access control for microservices using macaroon-based capabilities.
  • Testing and developing L402-compliant authentication flows in a local or production environment.

How Aperture Works

  1. A client attempts to access a protected resource through the proxy.
  2. Aperture intercepts the request and returns an HTTP 402 Payment Required error, including an L402 header with a macaroon and a Lightning invoice.
  3. The client pays the Lightning invoice to receive a preimage (proof-of-payment).
  4. The client resubmits the request with an Authorization header containing both the macaroon and the preimage.
  5. Aperture validates the payment and macaroon, then proxies the request to the underlying backend service.

Aperture Setup

To get started with this skill, ensure you have a functional Go environment and a running LND node. Use the provided scripts within Openclaw Skills for a streamlined installation:

# Install the aperture binary
skills/aperture/scripts/install.sh

# Generate the configuration and connect to your LND node
skills/aperture/scripts/setup.sh

# Start the proxy service
skills/aperture/scripts/start.sh

Note: You must have an invoice.macaroon available in your LND data directory to allow the proxy to generate payment challenges for clients.

Aperture Data Schema & Taxonomy

The skill manages configuration and state through specific file structures to ensure persistence and security:

Path Description
~/.aperture/aperture.yaml The primary configuration file defining services, pricing, and LND connection details.
~/.aperture/aperture.db An SQLite database used to store macaroon state and payment metadata.
~/.aperture/tls.cert The TLS certificate used for securing the proxy endpoints.
~/.aperture/aperture.log Detailed execution logs for monitoring and troubleshooting.

Aperture Advanced Features

  • Dynamic pricing support through integration with external gRPC price servers.
  • Flexible database backends with support for both SQLite and PostgreSQL for high-traffic environments.
  • Advanced rate-limiting capabilities using token buckets defined per service path.
  • Support for Lightning Node Connect (LNC) to facilitate connections to remote Lightning nodes.
  • Automatic TLS certificate management via Let's Encrypt for public-facing endpoints.
  • Whitelisting of specific paths to allow free access to health checks or public documentation.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*