Spec 35521: Wallet Connection
Kind 35521 represents a “Wallet Connection” event. It is used to advertise a user’s supported wallet capabilities and connection details (specifically for NWC - Nostr Wallet Connect) in a discoverable way.
Event Structure
{
"kind": 35521,
"content": "", // Content is often encrypted or empty if using tags for discovery
"tags": [
["w", "nwc"], // Wallet type
["nwc", "<connection_string>"], // Often encrypted (NIP-04/44) if sensitive
["lud16", "user@domain.com"]
],
...
}
Purpose
- Wallet Discovery: Allows apps to discover if a user has a connected wallet that supports programmatic payments (zaps).
- Auto-Zapping: If a user publishes a Kind 35521 with a valid NWC string (properly permissioned), trusted clients can initiate zaps on their behalf without repeated manual confirmations.
Security Considerations
- Encryption: The NWC connection string contains secrets. It typically MUST be encrypted using NIP-04 or NIP-44, viewable only by the user themselves or authorized apps.
- Permissions: The NWC string should have scoped permissions (e.g., budget limits, “pay_invoice” only) to minimize risk if leaked.