Event JSON
{
"id": "7644d6b03032e009890538ad8e01a524b8b89997664254cf81d0322a78ff8d4d",
"pubkey": "38fe7b2b5215e40a79568920588b5886d6217a43570c28c0a32e36b1222e901e",
"created_at": 1705789162,
"kind": 31993,
"tags": [
[
"d",
"6e3dc618-f3a8-4d88-9056-a9f43e6d8c25"
],
[
"title",
"How do I connect wallet and correctly implement zaps on a Nostr client"
],
[
"L",
"category"
],
[
"l",
"technical_and_precise",
"category"
],
[
"t",
"apollo"
],
[
"t",
"webln"
],
[
"t",
"lnd"
],
[
"t",
"nostr"
],
[
"t",
"ndk"
],
[
"accepted_answer",
"e1cd904278df0299f5fc3f1eb744ffa4f999cf152c353e9dc328408f15dfbe49"
],
[
"a",
"32017:c8383d81dd24406745b68409be40d6721c301029464067fcc50a25ddf9139549:58624fb9-bb97-442d-ae43-75d4104c607c",
""
]
],
"content": "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:\n- Check if the user has a connected wallet. If not, prompt the user to connect their wallet.\n- Pay the invoice when the wallet is successfully connected.\n- Publish kind 9735 upon successful payment.\n\nSimilar flows can be seen on clients like habla.news, coracle.social and flockstr\n\nI'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!",
"sig": "768d20bb245287adac533507a0162d90d7ff8f186db6abd3ba13f6ffb966b7f4e173f505068e78926bf9dfce4d108a6d0d680d469c2418eb040413cdb3f40930"
}