home / skills / openclaw / skills / lnemail

lnemail skill

/skills/lnemail/lnemail

This skill helps agents securely obtain anonymous email via LNemail for 2FA, notifications, and messages using Lightning payments.

npx playbooks add skill openclaw/skills --skill lnemail

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
4.6 KB
---
name: lnemail
description: Setup and use anonymous email accounts on LNemail.net using Bitcoin Lightning payments. Use when agents need email capabilities for 2FA, notifications, or communication without KYC or personal information.
---

# LNemail

Anonymous email accounts via Lightning Network. No KYC, no email required to sign up—just pay with Bitcoin.

## Overview

LNemail provides fully functional email addresses for 1000 sats/year. Perfect for agents needing:
- 2FA code reception
- Anonymous communication
- Bitcoin/Lightning service notifications
- API-accessible email without identity requirements

## Quick Start

### 1. Create Email Account

Create a Lightning invoice for email account creation:

```bash
# Create the account (returns payment hash)
curl -X POST https://lnemail.net/api/v1/email

# Response:
# {
#   "payment_hash": "abc123...",
#   "amount": 1000,
#   "currency": "SATS"
# }
```

### 2. Pay with Lightning

```bash
# Get the invoice from payment status endpoint
curl -X GET https://lnemail.net/api/v1/payment/PAYMENT_HASH

# Response when pending:
# {
#   "payment_hash": "abc123...",
#   "status": "pending",
#   "lightning_invoice": "lnbc10u1pj..."
# }
```

Pay the BOLT11 `lightning_invoice` using any Bitcoin Lightning Network wallet (e.g., Alby CLI).

### 3. Retrieve Credentials

After payment confirms (~seconds), check status again:

```bash
curl -X GET https://lnemail.net/api/v1/payment/PAYMENT_HASH

# Response when paid:
# {
#   "payment_hash": "abc123...",
#   "status": "paid",
#   "email": "[email protected]",
#   "access_token": "eyJhbG..."
# }
```

**Save these credentials!** Store them securely (e.g., `~/.lnemail/credentials.json`).

## Using Your Email

### Check Inbox

```bash
curl -X GET https://lnemail.net/api/v1/emails \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

# Response:
# [
#   {
#     "id": "msg_123",
#     "from": "[email protected]",
#     "subject": "Your 2FA Code",
#     "received_at": "2024-01-15T10:30:00Z",
#     "has_attachments": false
#   }
# ]
```

### Read Email Content

```bash
curl -X GET https://lnemail.net/api/v1/emails/EMAIL_ID \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

# Response:
# {
#   "id": "msg_123",
#   "from": "[email protected]",
#   "to": "[email protected]",
#   "subject": "Your 2FA Code",
#   "body": "Your verification code is: 123456",
#   "received_at": "2024-01-15T10:30:00Z"
# }
```

**Note:** HTML content is stripped for security; emails are plain text only.

### Send Email

Sending requires a Lightning payment (~100 sats per email):

```bash
# Create send request
curl -X POST https://lnemail.net/api/v1/email/send \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
    "recipient": "[email protected]",
    "subject": "Hello",
    "body": "Message content here"
  }'

# Response:
# {
#   "payment_hash": "def456...",
#   "amount": 100,
#   "currency": "SATS"
# }
```

Pay the invoice, then check status:

```bash
curl -X GET https://lnemail.net/api/v1/email/send/status/PAYMENT_HASH

# Response when paid:
# {
#   "payment_hash": "def456...",
#   "status": "paid",
#   "message_id": "msg_sent_789"
# }
```

## API Reference

| Endpoint | Method | Auth | Description |
|----------|--------|------|-------------|
| `/email` | POST | No | Create account (returns payment hash) |
| `/payment/{hash}` | GET | No | Check account payment status |
| `/emails` | GET | Bearer | List inbox messages |
| `/emails/{id}` | GET | Bearer | Get message content |
| `/email/send` | POST | Bearer | Create send request (returns payment hash) |
| `/email/send/status/{hash}` | GET | No | Check send payment status |

## Storage Recommendation

Store credentials in `~/.lnemail/credentials.json`:

```json
{
  "email": "[email protected]",
  "access_token": "eyJhbG..."
}
```

**Note:** The `access_token` is the only credential needed for ongoing operations. The `payment_hash` is only used during initial setup to check payment status — once you have the `access_token`, it can be discarded.

## Pricing

| Service | Cost |
|---------|------|
| Email account (1 year) | 1000 sats |
| Send email | ~100 sats |
| Receive email | Free |

## Limitations

- Plain text only (HTML stripped)
- Small attachment support
- 100 sats per outgoing email
- Account valid for 1 year from payment

## Use Cases

- **2FA reception:** Reliable email delivery for verification codes
- **Service notifications:** Bitcoin/Lightning service alerts
- **Anonymous signup:** Services requiring email without identity link
- **Agent-to-agent comms:** Programmatic email between agents

## References

- **LNemail:** https://lnemail.net
- **API Docs:** https://lnemail.net (see homepage for full docs)
- **Auth:** Bearer token in `Authorization` header

Overview

This skill lets agents create and use anonymous email accounts on LNemail.net paid via Bitcoin Lightning. It provides programmatic inbox access, message retrieval, and pay-per-send capability without KYC or personal data. Ideal for automated agents that need ephemeral, privacy-preserving email for verification, notifications, or inter-agent communication.

How this skill works

The skill creates an LNemail account by requesting an invoice from the LNemail API and paying it over the Lightning Network. After payment confirms, the API returns an email address and a bearer access token. The access token is used to list inbox messages, read message bodies (plain text only), and create send requests that require separate Lightning payments to dispatch outgoing mail.

When to use it

  • Receive 2FA or verification codes without tying them to a real identity
  • Deliver service or transaction notifications from Bitcoin/Lightning services
  • Provide disposable email addresses for automated signups or testing
  • Enable agent-to-agent programmatic communication without KYC
  • Archive or backup anonymous communications tied to agent workflows

Best practices

  • Store the returned access_token securely (e.g., ~/.lnemail/credentials.json) and discard initial payment_hash after setup
  • Poll the payment status endpoints until payment is confirmed; payments settle in seconds
  • Treat all inbound messages as plain text; do not rely on HTML rendering or complex MIME parsing
  • Budget for outgoing email costs (~100 sats per message) and renew accounts annually (1000 sats/year)
  • Rotate or renew anonymous addresses periodically for improved operational privacy

Example use cases

  • An agent collects 2FA codes for onboarding flows without exposing operator identity
  • A monitoring bot sends Lightning-triggered alerts to an LNemail address for secure delivery
  • Automated test suites register throwaway emails to validate signup and notification flows
  • Agents exchange instructions or data via encrypted attachments stored elsewhere and coordinated by LNemail notifications

FAQ

Do I need an email or identity to create an account?

No. Account creation requires only a Lightning payment; no personal email or KYC is needed.

How do I send mail and what does it cost?

Create a send request via the API; it returns a payment_hash and Lightning invoice. Pay the invoice (about 100 sats) and check the send status endpoint to confirm delivery.

Are incoming emails in HTML?

No. Incoming HTML is stripped for security; messages are plain text and may have limited attachment support.