home / skills / openclaw / skills / crinkl
/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 crinklReview the files below or copy the command above to add this skill to your agents.
---
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.
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.
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.
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.