home / skills / openclaw / skills / crinkl

crinkl skill

/skills/alvintanpoco/crinkl

This skill submits your DKIM-signed billing emails to Crinkl to mint spend tokens and earn sats via Lightning.

npx playbooks add skill openclaw/skills --skill crinkl

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

Files (2)
SKILL.md
3.9 KB
---
name: crinkl
version: 1.0.0
description: Submit email receipts to Crinkl. Verify DKIM signatures. Earn BTC over Lightning.
homepage: https://crinkl.xyz
metadata: {"openclaw":{"emoji":"🧾","requires":{"env":["CRINKL_API_KEY"]},"primaryEnv":"CRINKL_API_KEY"}}
---

# Crinkl — Email Receipt Submission

Submit your human's DKIM-signed billing emails to Crinkl and earn Bitcoin over Lightning. Each verified receipt mints an identity-free spend token and routes sats to the wallet.

## What This Does

Your human has billing emails from SaaS vendors (Cursor, Vercel, OpenAI, Anthropic, Stripe, etc.) sitting in Gmail. Each one has a DKIM signature from the vendor's mail server — a cryptographic proof the email is real and unmodified.

This skill lets you submit those emails to Crinkl's verification API. The server verifies the DKIM signature, extracts invoice data, and mints a spend token. The wallet earns ~147 sats per verified receipt at current BTC prices.

## Setup

### 1. Your human gets a Crinkl API key

Sign up at [app.crinkl.xyz](https://app.crinkl.xyz) (it's a PWA, works in any browser). Once they have a wallet:

**Settings → Agent API Keys → Generate**

This gives a `crk_...` key tied to their wallet. Set it as `CRINKL_API_KEY` in your environment.

### 2. (Optional) Run the reference agent

If your human wants a standalone CLI that scans Gmail automatically:

```bash
npx crinkl-agent
```

Or clone: [github.com/crinkl-protocol/crinkl-agent](https://github.com/crinkl-protocol/crinkl-agent)

## API Reference

Base URL: `https://api.crinkl.xyz`

### Check supported vendors (no auth)

```
GET /api/agent/allowed-vendors
```

Returns list of approved vendor domains. Vendors must send DKIM-signed billing emails.

### Submit an email receipt

```
POST /api/agent/submit-email-receipt
Header: x-api-key: <CRINKL_API_KEY>
Body: { "eml": "<base64-encoded .eml file>" }
```

**Response codes:**
- `201` — Spend created. Token minted. Sats queued.
- `202` — Vendor not yet approved. Submission queued for review (not rejected — will process if approved).
- `409` — Duplicate. Already submitted.
- `422` — Validation error (DKIM failed, no amount extracted, too old).
- `429` — Daily limit reached.

### Preview without submitting

```
POST /api/agent/verify-email-receipt
Header: x-api-key: <CRINKL_API_KEY>
Body: { "eml": "<base64-encoded .eml file>" }
```

Returns 200 with extracted data. No spend created.

### Get spend token

```
GET /api/agent/spends/:spendId/token/latest
Header: x-api-key: <CRINKL_API_KEY>
```

Returns the signed spend attestation token.

## How To Submit

1. Your human provides a raw `.eml` file (exported from their email client, or retrieved via a separately authorized Gmail/IMAP tool). Do NOT autonomously access email accounts — the human must explicitly provide or authorize access to their mailbox.
2. Base64-encode the `.eml` content
3. POST to `/api/agent/submit-email-receipt` with your API key
4. Handle the response code

The server does all verification and data extraction. You're just a pipe from inbox to API. You do not need mailbox credentials — only the `.eml` file and a `CRINKL_API_KEY`.

## Unknown Vendors

If you submit an email from a vendor not on the allowlist, it's **queued for review** (202), not rejected. If the domain has valid DKIM, the vendor will be approved and the spend created retroactively.

Want to add a vendor? Just submit an email from them.

## What Earns Sats

Any DKIM-signed billing email from a supported vendor:
- SaaS subscriptions (Cursor, Vercel, OpenAI, Anthropic, GitHub, etc.)
- Billing through Stripe, Paddle, Gumroad
- Any vendor that sends DKIM-signed email receipts

Physical receipts are submitted through the [PWA camera](https://app.crinkl.xyz), not this API.

## Privacy

- Only individual `.eml` files leave the machine. No inbox access shared.
- Spend tokens are identity-free — no email, no name, no account ID in the signed payload.
- The API key ties receipts to a wallet, not to a person.

Overview

This skill submits DKIM-signed email receipts to Crinkl and lets a linked wallet earn Bitcoin payouts over the Lightning Network. It verifies DKIM signatures, extracts invoice data, and mints identity-free spend tokens that route sats to the configured wallet. Setup requires a Crinkl API key and a raw .eml file for each receipt.

How this skill works

The skill accepts a base64-encoded .eml file and POSTs it to Crinkl's verification endpoints using an API key. Crinkl validates the DKIM signature, parses billing details (amount, vendor, date), and either mints a spend token (201) or queues the submission if the vendor is unlisted (202). A preview endpoint lets you verify extracted data without creating spend tokens.

When to use it

  • You want to monetize legitimate SaaS or billing emails that include DKIM signatures.
  • You have exported .eml receipts (from Gmail, other mail clients, or an authorized mailbox tool).
  • You prefer identity-free payout routing to a Lightning wallet via Crinkl.
  • You want to preview extraction results before committing receipts.
  • You need a repeatable flow to submit receipts without sharing full inbox access.

Best practices

  • Always obtain the user’s explicit consent and require they provide .eml exports or authorize mailbox access separately; do not access mailboxes autonomously.
  • Use the preview (/verify-email-receipt) endpoint to confirm extraction before submitting to avoid duplicates and validation errors.
  • Store only the CRINKL_API_KEY securely in environment variables; do not log API keys or raw .eml content.
  • Handle response codes explicitly: 201 (spend created), 202 (queued for review), 409 (duplicate), 422 (validation error), 429 (rate limit).
  • Batch submissions conservatively to stay under daily limits and to make troubleshooting easier.

Example use cases

  • A personal agent exports billing emails from Gmail and submits them to Crinkl to earn sats for each verified SaaS invoice.
  • A bookkeeping workflow previews DKIM verification to extract invoice amounts before submitting eligible receipts for Lightning payouts.
  • A privacy-focused wallet integrates receipt submission so users can monetize receipts without exposing identity in the spend token.

FAQ

Do I need mailbox credentials to use this skill?

No. The skill only requires raw .eml files provided by the user and a CRINKL_API_KEY; it should not autonomously access inboxes.

What happens for vendors not on Crinkl’s allowlist?

Submissions for unknown vendors return 202 and are queued for review; if the DKIM checks out the vendor can be approved and the spend created retroactively.

What causes a 422 validation error?

Common causes are failed DKIM verification, missing or unparseable amount, or an email that is too old. Use the verify endpoint to diagnose extraction issues.