In Mutiny's deep underground lair, we've been brewing up a better way to do Nostr Wallet Connect. It's called Nostr Wallet Auth. It simplifies the experience of connecting your wallet to nostr clients and services, such as Zapple Pay. With one click or the scan of a QR code, you can create a new connection in Mutiny (or any other wallet that adopts NWA). Here's a demo of how it works:
What is Nostr Wallet Auth (NWA)?
NWA is a new protocol (NIP-49) built on top of Nostr Wallet Connect. Instead of your wallet generating a secret that you paste into a client or service, the client or service generates an NWA request, and then your wallet and that service negotiate the secret in the background (over nostr, naturally). It allows for a quicker and simpler setup from the user perspective, and less secret material to manage from the client or service's perspective.
Just like with Nostr Wallet Connect, services can use the Nostr Wallet Auth to send payment requests directly to your wallet. And just like with NWC, you're always in control. You can cancel an authorization or decide whether to make a payment at any point.
A Practical Demonstration with Zapple Pay
As shown in the video, a good way to illustrate NWA's flow is Zapple Pay. The Primal app on iOS recently shifted to a built-in wallet, but Zapple Pay lets you use any wallet you choose to make zap payments, no permission required.
How Does it Work?
- Creating a Connection: On Zapple Pay you input your npub, set an amount, choose the heart emoji (Primal's default reaction), and scan the NWA code with Mutiny Wallet. Once you hit "Create Connection," Mutiny establishes an NWA link with Zapple Pay.
- Interacting on Primal: React to a post on Primal with a heart emoji. Zapple Pay notices this action and sends a payment request to your wallet for the zap.
- Approving Payments: Simply click "approve" on Mutiny's home screen to zap the post. Mutiny also allows you to set up auto-approve if you prefer. Again, you can cancel the connection at any time. NWA is just a way to ask your wallet to make a payment, the wallet is always in charge.
NWA the standard
Nostr Wallet Auth is an open standard, implementable by any lightning wallet, and easy to integrate with any nostr client or service. Right now it's only supported by Mutiny and Zapple Pay, but we look forward to chatting with other developers to get support in more places.
We're pretty excited about NWA and NWC in general. They're a new kind of "saved payment details" for a nostr and lightning-enabled web. Akin to PABLOF7z's recent nostr onboarding demo, we're excited to find ways in which lightning UX can match or exceed usual normie payment flows. And building these methods on nostr means there are no gatekeepers to guard and control the UX wins we do achieve.
Check out the NWA experience on Mutiny Wallet and let us know what you think! If you're using the app version on iOS or Android, make sure to update to the latest version to get the NWA functionality.
For the tech-savvy and standards wonk, you can delve into the details of how NWA works by checking out Ben's NIP-49 pull request on GitHub.