-

@ Rizful.com
2025-03-11 18:39:41
For any new Nostr developers (such as myself), who can read Javascript, I highly recommend the #yakihonne repository .. For example, for learning how zaps work in practice: https://github.com/YakiHonne/yakihonne-web-app/blob/main/client/src/Components/NOSTR/ZapTip.js ... ZapTip.js is a MASTERPIECE of readability, all in one file! But..... nostr:npub1yzvxlwp7wawed5vgefwfmugvumtp8c8t0etk3g8sky4n0ndvyxesnxrf8q can you push your latest code at some point? For example I think this "relaysOnPlatform" variable is not used like this anymore ... https://github.com/YakiHonne/yakihonne-web-app/blob/571028ae09eafa95fcf1c75922fd11f99ff2193e/client/src/Components/NOSTR/ZapTip.js#L264 ... I cans see when I zap using Yakihonne that you are are somehow pulling in additional relays, like the user's 10002 relays? To understand how this worked, I've been looking at #coracle nostr:npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn codebase.... the #coracle codebase in MUCH more difficult to understand, but the actual performance of the web application is also MUCH better than Yakihonne - I think that's a tradeoff of readability vs performance! In Coracle, after quite a bit of digging, I semi-understand how Coracle is aggregating the relays to put into the zap event, I think it is grabbing the "read" relays from the 10002 event.... it involves getting into the "Welshman" repository (perhaps named for a certain developer who might of Welsh descent....) https://github.com/coracle-social/welshman repository, ... All somewhat too complicated for me to fully understand but I think this complexity leads to better performance.... The relays that are added to the Zap Event are aggregated here: https://github.com/coracle-social/coracle/blob/b47ab64a4c7a897eaa1a81980940664797d032b3/src/app/views/Zap.svelte#L93