pull down to refresh
30 sats \ 1 reply \ @onthedeklein 25 Sep \ on: NBA 2025 Prediction Contest: September updates Stacker_Sports
Champ: Wolves
MVP: Luka
1st team: Jokic Wemby Giannis Luka SGA
Unfortunately, I think this is actually maybe slightly further from correct.
- The nostr code is still not real or functional.
- The alby code definitely still won't work (and there's no such thing as an "alby address")
- Your parsing of lnurls still doesn't have a valid regex
- Bolt 12 parsing and payments are incorrect here too.
In general, none of these payment methods will work as coded and most of the address extraction doesn't look right. I'm not confident that AI tools will give you functional code for this problem tbh. You may want to put in the extra effort to build this manually if you want something working.
I'm glad you're trying to iterate on this, but I'd encourage you to try to understand the code here to see what's incorrect. Have you tried running this yourself? Here are some points that I can tell aren't correct at first glance:
- Your parsing of lightning addresses and lnurls are incorrect. Those regexes don't do what you're trying to do.
- The nostr code here doesn't really make sense. You're not actually sending any payments to an npub by sending an event like that. Are you trying to do a zap to that npub or something? If so, check out the NIP-57 spec.
- I don't think there's a python alby sdk like what is code is trying to use. You'll need to either use pyalby or use some other library to send the payment.
I hope you continue your learning journey on this one. It's a fun project! You just need to scratch a bit deeper below the surface.
GENESIS