Adds a "Publishing & payments" group covering the three tiers, the
Lightning plumbing, and how to wire a wallet up:
- publishing.md — Overview of Public / Private / Premium
with a comparison table; how tipping vs
unlocking differs; replaceability +
republish-vs-fork.
- publishing-public.md — Default tier. Event shape, tag layout,
discoverability, edit-vs-fork.
- publishing-private.md — End-to-end encrypted to self via NIP-44
/ NIP-04. AES-256-GCM pipeline, what stays
visible (pubkey, kind, d-tag), multi-
device decrypt via "Mine" tab, caveats
(no multi-recipient envelopes in v1).
- publishing-premium.md — Zap-gated soft-gate publishing. Soft-gate
key derivation, watermarked preview,
zap-split tags (creator + platform),
buyer unlock flow, My Purchases vault,
honest framing about soft-gate limits.
- zaps.md — NIP-57 lightning payments. Tipping vs
unlocking. How to receive zaps (set
lud16 on profile). Fallback flow without
NWC (BOLT11 + QR + external wallet).
- nwc.md — Nostr Wallet Connect (NIP-47) setup.
CoinOS quickstart, supported wallets,
multi-device sync via NIP-44 encrypted
event, test-connection button, security
model (treat URI like a password + set a
budget).
Plus a "Why JPEG sometimes routes through PDF" section added to
panel-print-save.md, explaining the three fallback cases (CORS-
blocked images, tainted canvas, unsupported mode) and the auto-
switch to the print → PDF path that the browser's print engine
can handle.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
3.3 KiB
Zaps — NIP-57 lightning payments
Artstr uses Nostr-native lightning zaps for both tipping creators and unlocking premium designs. Same protocol either way; the difference is who the zap goes to and what the client does on receipt.
How zaps work in two paragraphs
A zap is a kind-9735 receipt event proving that a Lightning payment happened. The flow:
- The user (you) signs a kind-9734 zap request event with the amount + recipient + intent.
- The recipient's lightning address (
lud16on their profile) resolves to a LNURL endpoint; the request becomes a BOLT11 invoice. - You pay the invoice from your wallet. The wallet's LSP issues a zap receipt event back to the relays.
- Clients that see the receipt update UI (zap-totals, unlock gated content, etc).
Tipping any design / page / chapter
Every design preview pane has a ⚡ Zap button (visible when the author has a lightning address on their profile). Clicking:
- Opens an amount picker (default presets 21 / 100 / 1000 sats + custom).
- Builds + signs the zap request via your Nostr extension.
- Pays through your connected NWC wallet (see NWC setup). If you don't have NWC connected, it falls back to copying the invoice for you to pay manually in any Lightning wallet.
The zap goes 100% to the author. No platform share.
Unlocking a premium design
Same plumbing, different outcome. The locked design row shows an
Unlock with ⚡ zap button. Clicking sends the minimum required
amount, split between the creator + the platform per the event's
zap tags (currently 70/30). On receipt:
- The client verifies the receipt's amount + recipient match the
event's
zap-min+zaptags. - Derives the soft-gate key from the event metadata.
- Decrypts the payload + saves it to your My Purchases vault.
See Premium publishing for the publish side.
Receiving zaps on your designs
To get tipped or sold-to:
- Sign up at any LN-address service. CoinOS (free, web-based) is the easiest: https://coinos.io.
- Edit your Nostr kind-0 profile to add
lud16= your LN address (e.g.[email protected]). Any Nostr client that edits profiles works (Damus, Amethyst, primal.net, nos2x options page). - Wait a few minutes for your profile to propagate to the relays you care about.
Once lud16 is set, every published design of yours becomes
zap-able automatically — Artstr discovers the lightning address
from your profile.
Sending zaps without an NWC wallet
If you don't have NWC connected, the zap modal will:
- Build the BOLT11 invoice.
- Show a QR code + a copy button.
- Wait for the invoice to be paid externally (you can pay from any Lightning wallet — Phoenix, Wallet of Satoshi, etc).
- Verify the receipt on relays + update the UI.
This is slower than NWC (you switch apps to pay) but works universally.
Tips
- The Zapped tab in the community browser sorts designs by total zap volume — a quick way to find what people are paying for.
- Zaps are public on Nostr (the receipt event is signed by the LSP and broadcast). If you want anonymous payment, you'll need a separate Lightning identity.
- Failed zaps (invoice paid but receipt never arrives) can be diagnosed via the wallet's transaction log. The LSP issued the receipt; the relays may have dropped it.