Files
MichilisandClaude Opus 5.5 f09445b6ad
ci / check (push) Canceled after 0s
ci / images (push) Canceled after 0s
ci / e2e (push) Canceled after 0s
Initial commit
Paper Sats: design and print paper notes that carry sats.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 05:15:30 +00:00

7.5 KiB

NIP-XX

Printable Cash Note Designs

draft optional

This NIP defines an addressable event for sharing designs of printable cash notes, the paper notes that carry a claimable ecash or Lightning value behind a QR code. A design holds no value. It is a template that a client renders with its own QR code, serial and amount.

Files live on Blossom servers, addressed by SHA-256. The event lists them, so a client can show a card from the event alone and fetch the files only when a design is opened.

Kind

Designs use the addressable kind 32040, currently unassigned in the NIP registry and proposed here for registration. A new version replaces the old one under the same d tag. d values start with papersats:design:, and events carry the tag ["t", "paper-sats-design"].

NIP-78 says kind 30078 is not meant for public data exchanged between applications, and tells relays to serve it only to the authenticated author. Designs are public, which is the reason for this registration.

Event

content is a short human description of at most 280 characters.

Tag Example Required Purpose
d papersats:design:forest-banknote-7f3a yes identity of the design
title Forest banknote yes name, at most 80 characters
t paper-sats-design, plus double-sided or single-sided, plus a size class yes the only tags relays can filter on
size 150, 70, mm yes exact width and height, each 20 to 400 mm
sides 2 yes one or two
design sha256, url, optional mirror urls yes the design.json blob
thumb front, sha256, url, optional mirror urls (and back) yes previews. back is required when sides is 2
asset sha256, mime, url, optional mirror urls (repeated) if any every art blob, at most 12
image front preview url yes for generic clients
a <kind>:<pubkey>:<d>, relay hint, fork if forked parent design
license CC0-1.0 no reuse terms
alt plain sentence yes NIP-31 fallback text
client Paper Sats yes which app
published_at unix seconds no first publication
price sats no asking price. Clients ignore it when absent

Size classes for the t tag are banknote (150 x 70), card (85.6 x 54), vertical (70 x 150), square (100 x 100), ticket (60 x 150) and custom for everything else. A turned size counts as the same class, and sizes match within 0.5 mm. The event MUST have exactly one size class, and it MUST agree with the size tag, because relays filter on it.

{
  "kind": 32040,
  "pubkey": "<author hex>",
  "created_at": 1793000000,
  "content": "Dark green banknote with gold line art.",
  "tags": [
    ["d", "papersats:design:forest-banknote-7f3a"],
    ["title", "Forest banknote"],
    ["t", "paper-sats-design"],
    ["t", "double-sided"],
    ["t", "banknote"],
    ["size", "150", "70", "mm"],
    ["sides", "2"],
    ["design", "<sha256>", "https://blossom.example/<sha256>.json"],
    ["thumb", "front", "<sha256>", "https://blossom.example/<sha256>.webp"],
    ["thumb", "back", "<sha256>", "https://blossom.example/<sha256>.webp"],
    ["asset", "<sha256>", "image/png", "https://blossom.example/<sha256>.png"],
    ["image", "https://blossom.example/<sha256>.webp"],
    ["license", "CC0-1.0"],
    ["alt", "Printable cash note design: Forest banknote, 150 x 70 mm, double-sided"],
    ["client", "Paper Sats"]
  ]
}

An event MUST NOT carry tokens, secrets, invoices or QR payloads, and neither may the files it lists.

Querying

The values of one #t list are alternatives (NIP-01), and so are several filters. A client narrowing by sides and size class therefore sends the single most selective value, and checks the rest on the events it receives:

{ "kinds": [32040], "#t": ["banknote"], "limit": 60 }

Results are paged with until, with a cursor kept for each relay, because relays stop at different points in time.

Clients keep the newest event for each (pubkey, d). On equal created_at the lowest id wins.

Validation

Clients MUST check the signature, the kind, the d prefix, all required tags and their formats, and that URLs are https. Clients SHOULD refuse events dated far in the future, which would otherwise stay at the top of a Newest list.

Everything downloaded MUST be hashed and compared with the expected SHA-256. Clients try the URLs in the event, then the author's BUD-03 server list (kind 10063), then their own defaults.

Files from other authors are untrusted. design.json is parsed against a schema and limited to 256 KB. Art blobs are limited to 5 MB each and 12 per design, their type is taken from their bytes and not from a claim, and they are shown only through image elements. SVG is sanitized with an allow-list or rasterized. Nothing from a design is executed. A client draws the real QR code itself over the zone the design reserves, and checks that the finished render holds no other QR code.

Interactions

  • Forks: a design based on another adds ["a", "<coordinate>", "<relay hint>", "fork"]. The parent is not required to exist any more for the fork to work, because a fork mirrors the files it uses (BUD-04).
  • Unpublish: a NIP-09 kind 5 event with an a tag and a k tag. It applies to versions up to its created_at, and only when signed by the same key. Blobs stay unless the author also deletes them.
  • Likes: NIP-25 kind 7 with content +, and e, a, p and k tags.
  • Reports: NIP-56 kind 1984, with p and e tags carrying the report type in the third position, an a tag for the design, and x tags for blobs. The same event can be sent to a Blossom server (BUD-09).
  • Tips: a NIP-57 zap request with p, e, a and k tags.