Skip to content

NIP-57 automatic zap receipt verification #15

Description

@satsdisco

Summary

Staging branch has initial auto-zap verification hooks (useAutoZapVerification.ts + zapVerification.ts), but this needs to be completed and hardened for production.

Currently zap-gated articles require manual verification. The goal: reader zaps, content unlocks automatically — seamless experience.

How it works

  1. Reader sees preview of zap-gated article
  2. Reader sends zap (via NWC or external wallet)
  3. App watches for zap receipt (kind 9735) on relays
  4. Once verified, fetch full article from private relay
  5. Cache unlock state so re-reads don't require re-verification

Tasks

  • Review and harden existing staging code
  • Handle edge cases: slow relays, zap sent from different client, amount verification
  • Timeout + retry logic (relays can be slow to propagate receipts)
  • Persist unlock state per-article (localStorage or relay-based)
  • UX: show "Waiting for zap confirmation..." state with animation
  • Test with real zaps on mainnet

Acceptance Criteria

  • Zap → automatic unlock within 10 seconds
  • Works with NWC and external wallet zaps
  • Graceful timeout with manual retry option
  • Unlock persists across page refreshes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions