AltZap Request (Kind 9520)
A kind 9520 AltZap Request is what a wallet signs to zap someone. It plays the role of NIP-57 ↗'s zap request (kind 9734), with two differences:
- The
ptag can name a ConnectionKey instead of a Nostr pubkey, so you can zap a Discord or X account that has no Nostr key yet. Its third element names the platform (e.g.discord); empty means a Nostr pubkey. - A mandatory
chaintag says which Lightning-routable network the zap settles on, so a request can't be paid on another chain.
The full definition — tags, rules and the verification algorithm — is in NIP-AZ.
Example
{
"kind": 9520,
"content": "Here is 1000 loki! Great post.",
"tags": [
["p", "<recipient_pubkey_or_ConnectionKey>", "<optional_platform>"],
["amount", "1000000"],
["chain", "flokicoin"],
["lnurl", "lnurl1..."],
["relays", "wss://relay.ohstr.com", "wss://relay.primal.net"],
["e", "<optional_target_event_id>"]
],
"pubkey": "<sender_pubkey>",
"created_at": 1709424000,
"id": "...",
"sig": "..."
}
The signer is the sender, so a 9520 has no P tag. To zap on someone else's behalf, use an On-Behalf AltZap Request (kind 9523).
How Zapf handles it
The wallet sends the request to Zapf's LNURL callback. Zapf's LNURL server checks the signature first, then that p is the address being paid, that amount matches the callback amount, and that chain is flokicoin. It then issues an invoice whose description hash is the SHA-256 of the request exactly as received.