This is a thread for random discussions that gets posted everyday at 5am central.
Tell us what you're doing today, ask questions, or vent about your life. Whatever you want, let it rip!
What is the point of sex ed? We are teaching teenagers that having kids is bad? We are teaching teenagers how to have sex with many different people? Not sure what the goal is of that stuff
reply
Watching road crews destroy my home internet/cutting off my work day.
Ended up here, wandering down some holes.
Feels like I missed the bus to the station or something. Good thing it’s a nice day for a walk.
reply
Bitnob Virtual Dollar Card is back! You can now create, fund, and spend. If you had above $5 on your old card, we have re-issued new cards to you and you can continue shopping from your favourite online stores and pay for your subscriptions. If you had less than $5 on your old card, we have terminated your card, and your balance is in your USD wallet. For a seamless experience, please make sure that your card is adequately funded for all transactions. If your card declines 3 times due to insufficient funds, we will charge a $1 fee.
reply
I am learning LNURL authentication but having some trouble with the basics. I would love some help!
I made this post yesterday but didn't get many eyes #196782
I will post the contents here:
I have most of this figured out I think. Originally I could create a signature and successfully authenticate using the generated URL, but it wasn't for the correct account. I had since learned a lot about what I need to do to get the correct account at the right derivation path but in that process I lost the original code.
My current code is as follows, but does not successfully authenticate. I am using SN to test. I am looking for any successful authentication to SN, regardless of if its the correct from the derivation path or not.
I have NO IDEA what my original code did to work and its driving me crazy.
const bitcoin = require('bitcoinjs-lib') const bitcoinmsg = require('bitcoinjs-message') const bs58 = require('bs58') const ecc = require('tiny-secp256k1') const secp256k1 = require('secp256k1') const { BIP32Factory } = require('bip32') const bip32 = BIP32Factory(ecc) const bip39 = require('bip39') const {bech32} = require("bech32") const {ECPairFactory} = require('ecpair') const ECPair = ECPairFactory(ecc) const crypto = require('crypto') function getqueryparams(url) { const paramarr = url.slice(url.indexOf('?') + 1).split('&') const params = {} paramarr.map(param => { const [key, val] = param.split('=') params[key] = decodeURIComponent(val) }) return params; } function getbaseurl(url) { return url.slice(0, url.indexOf('?')) } function bech32decode(lnurl) { const { prefix: hrp, words: datapart } = bech32.decode(lnurl, 2000) const bytearray = bech32.fromWords(datapart) return Buffer.from(bytearray).toString() } const testkey = crypto.generateKeyPairSync('ec', {namedCurve: 'secp256k1',}).privateKey const phrase = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon" const lnurl = "" const decodedlnurl = bech32decode(lnurl) const baseurl = getbaseurl(decodedlnurl) const k1 = getqueryparams(decodedlnurl)['k1'] const k1hash = bitcoin.crypto.sha256(Buffer.from(k1, 'hex')) const seed = bip39.mnemonicToSeedSync(phrase) const root = bip32.fromSeed(seed) const child = root.derivePath("m/138'/0'/0'/0/0") // will get the right path later const keyPair = ECPair.fromPrivateKey(child.privateKey) const signature = keyPair.sign(k1hash) const derSignature = bitcoin.script.signature.encode(signature, bitcoin.Transaction.SIGHASH_ALL) const verify = keyPair.verify(k1hash, signature); const domaintest = 'stacker.news' const url = `${decodedlnurl}&sig=${derSignature.toString('hex')}&key=${child.publicKey.toString('hex')}` console.log(url)
reply
I've seen your post but had no answer so I just tipped you so someone else maybe sees it
But I am definitely also interested in what you are doing
You are basically trying to create the wallet part of LNURL-auth, right?
reply
Yup! It is possible and there is actually an app that does this: https://github.com/GetIn-id/
It is what I currently use to authenticate with SN but it got me curious and I wanted to try creating my own little tool to do the same thing in nodejs.
GetIn is cool because it generates a seed phrase just like you would use to store Bitcoin and then you can generate profiles off that phrase to log into individual sites with. I want to build a similar app, but I have a different vision in mind than they do on the overall direction I want to take the app.
This link contains a lot of detail on implementation and links to the specific LUDS #98600
The biggest challenge so far is the documentation. If you get stuck and need to search for examples, the examples are most likely outdated because the libraries used have since changed some things around or gotten rid of functions entirely. So a good portion of my journey has been re working all these steps in isolation because it wasn't often clear that the documentation or example is outdated.
It is also frustrating that documentation has no consistency. Why does LUDS 05 show an example in Scala but LUDS 04 is in python?
It is just growing pains of both young documentation (most of it did not exist more than 2 years ago) and outdated documentation due to libraries updating. Positive changes overall but is challenging to navigate.
Thanks for helping with visibility. This is a burner account. I have returned the sats.
reply
I will take a look at your code when I have more time. Hopefully next week
reply
I appreciate it! I wonder if there is a discord or something for devs building stuff on Bitcoin. That could be very useful.
reply
reply
Yep this in an actual invite: https://discord.gg/j3d5PKW6
10 sats \ 1 reply \ @ek 22 Jun 2023
I think you need to post an invite first. That link leads me to a "weird place" as Discord calls it, lol
reply
Weird places are the best places to be. Discord does not know how to party.
Don't hesitate to remind me if I have forgotten it :) I also want to learn this stuff
I think I saw some lightning dev discords but I don't remember where
reply
I've been aiming to record more behavioral stuff like diet, exercise, hours worked on <x> etc to help manage time better. I decided to do this on the premise that "what gets measured gets managed" but there's also the strange flip side of that coin where you end up wanting to record everything, which gets in the way of doing.
reply
Oh yes, it's exhausting to record everything but you feel unsatisfied when you don't, lol
Been there
reply
Fold is giving out 50,000 sat rewards for new accounts. If you've been considering getting a Fold Card, now is a great time.
I just started using Fold this month. So far, I really like it. There are good deals with specific retailers, in addition to the general sats rewards for regular purchases.
reply
I signed up but it says it's not available in my country :(
reply
Yeah It is disappointing that fold's offerings are sparse at best for me here in communist republic of Canada. Would be nice if they at least added amazon gift cards. Who the hell still shops at the GAP? Definitely not bitcoiners.
reply
I'm sorry about what's happened to your once great land.
reply
Still a beautiful nation. Unfortunately decades of nanny state creep have eroded the Canadian grit and pride that once was the ethos of the country. There is something to be said for having to fight for your freedom rather than having it signed over to you. Canadians are very trusting of government, media and bureaucratic institutions. It is disheartening and I fear it is getting close to being too late to recover. I see Venezuela in Canada's future, which is why I am looking for a place in the US (my wife is American and both my kids are US citizens). We spend a couple months a year in the US. If Trudeau gets re-elected we may just make a permanent move.
reply
I would certainly endorse moving to America. Most of the middle and southern parts of the country are actually making moves in the right direction in a lot of areas.
I've driven through western Canada a couple times (2001 and 2016) and I noticed a major culture shift between those trips. On the first trip, most of the people we met were super resentful of the ruling class and wanted more independence for their provinces. On the second trip, that spirit seemed to be missing.
reply
I don't spend much time in western Canada, have been a couple times. Alberta is vastly different from BC. Still a bit of freedom mentality in Alberta.
If we did move it would probably be to Texas (my wife has family there) but Tennessee is another option. I wouldn't mind being a bit closer to the Canadian border so I could be within say a 5-8 hour drive of where I live now. Then we could keep our property and rent it out until Trudeau expropriates it and I could keep an eye on my parents. Maybe Pennsylvania or Ohio. We are going to be in the US this fall and planning to check out a few different places. If you have any suggestions let me know. I did a post about this a couple months back and got some great responses.
reply
We're also thinking about moving to Tennessee. Clarksville is a college town outside of Nashville that has really low taxes and low crime rates (for Tennessee at least).
Close friends of ours used to live in the Dayton area of Ohio and it seemed pretty nice whenever we visited. I don't know as much about the tax situation there, but cost of living is definitely low.
reply
This came to my mind before bed last night:
Bitcoin, like a real lover nurtures you to grow, while many other shiny things keep draining your time, energy, and emotion.
Choose wisely.
reply
Hey everyone, happy hump day, the week is almost over and what a week, BTC is getting some boost and it looks good my friends, remember to DCA and just let it sit still and keep making you free, so no fret you've got this. It has been a busy busy week but don't forget to treat yourself with something you like, perhaps a candy bar you haven't had in a while, a delicious milkshake with some fries, perhaps nachos with lots of cheese. You deserve it my friend. I wish you a phenomenal week and an incredible weekend. May your goals be reached and your endeavors fruitful. Be well and stay frosty my friend.
reply
Stay frosty, Andy!
reply
You too my friend!! Have a great one!!
reply
Work and grocery shopping. I’ll be listing to Bitcoin podcasts and using a Bitcoin rewards credit card, so more sat stacking!
reply
Yeah I’m swore off PayPal but Fold has claimed to have fixed their bill paying hack to where you l can pay your mortgage and credit cards. So giving it a try again. The temptation to earn sats back on bills you gotta pay anyway is too hard to stay away.
reply
reply
10 sats \ 1 reply \ @ek 21 Jun 2023
I have to assemble a PC but it's too hot and I am afraid of my sweat interfering, lol
reply
πŸ˜‚
reply
Day 67 of snailposting everyday 'til BTC hits $100k.
__@_'-'
reply
πŸ‘
reply