Skip to main content

Claiming Funds

If someone sends a zap to your Legacy Identity structure (e.g., your Discord account) before you have set up a Lightning wallet, the Zapf network does not reject the payment.

Instead, the funds are safely escrowed via the Fallback Address mechanism. This guide explains how to claim those funds.

Summary of the Claim Flow

The claiming process is a stateless, cryptographic interaction. The Identity Authority (IA) holding your funds will release them to any Lightning wallet you proved ownership of.

  1. Prove you own the Legacy Identity (OAuth or OTP).
  2. Generate a target wallet address (NWC).
  3. Securely encrypt that target address so only the IA can read it.
  4. The IA verifies your proof, decrypts your wallet connection, and sweeps the funds into it.

Step-by-Step Guide

1. Authenticate

Visit the Zapf application dashboard (zapf.app). Log in using the identity provider where you received the notification (e.g., Click "Log in with Discord").

The app will execute an OAuth flow (or an OTP flow for email/phone) to prove you control the identifier.

2. Connect a Destination Wallet

You need a place to send the funds.

  • The dashboard will prompt you to connect a Nostr Wallet Connect (NWC) string.
  • If you don't have a wallet, the app will guide you to create one (like Mutiny or Alby) and grab the NWC connection string.

Note: For claiming, this NWC connection must have the ability to generate invoices.

3. The Claim Request (Stateless Sweep)

When you click "Claim All", the Zapf web client executes a secure NIP-44 protocol:

  1. It takes your newly provided NWC string.
  2. It encrypts this string using NIP-44, addressing it exclusively to the public key of the IA (e.g., the zapf.app server pubkey).
  3. It bundles this encrypted payload alongside your OAuth token proof and submits it to the IA.

4. IA Processing and Settlement

When the IA receives your payload:

  1. It validates your identity proof (verifying the OAuth token against Discord's API, or verifying the OTP).
  2. It decrypts the NIP-44 payload using its private server key to read your NWC connection string.
  3. It queries its internal ledger to find all custodial Kind 5521 receipts currently attributed to the hash of your identifier (via the r tag).
  4. For the total balance owed, it uses your decrypted NWC string to request a Lightning invoice from your wallet.
  5. It pays your invoice instantly from its Master Node.

Your dashboard will update to reflect a $0 pending balance, and the funds will appear in your self-custodied wallet.