Replying to Avatar Samuel Ralak

I am working on implementing zaps on my NOSTR client using the [Nost Dev Kit](https://github.com/nostr-dev-kit/ndk), so far I have been able to successfully generate lightning invoices with the NDKEvent.zap method. The next step would be to generate a receipt `kind 9735 `; however, according to the [NIP-57](https://github.com/nostr-protocol/nips/blob/master/57.md), the receipt isn't definitive proof that the invoice was paid. Now, I need client to perform the following steps:

- Check if the user has a connected wallet. If not, prompt the user to connect their wallet.

- Pay the invoice when the wallet is successfully connected.

- Publish kind 9735 upon successful payment.

Similar flows can be seen on clients like habla.news, coracle.social and flockstr

I've been going through [NIP-47](https://github.com/nostr-protocol/nips/blob/master/47.md) and checking the code/documentation on `alby-js-sdk`, but I'm still a bit confused on how to put all these pieces together. Any guidance or code examples would be greatly appreciated!

Leaving a test comment on this question as myself

Reply to this note

Please Login to reply.

Discussion

No replies yet.