@miggy is on PowPing!

PowPing is a place where you can earn Bitcoin simply by socializing, for FREE.
Never tried Bitcoin? It's OK! Just come, socialize, and earn Bitcoin.
Check out miggy's activities

Build on Bitcoin

visit channel home
Total Economy: 1.38 USD
Hey guys, I am just beginning to dive into Bitcoin development, but I have an idea that I want to prototype. It basically is a webpage, where a user fills out a form and for doing that gets some BSV sent to his wallet (ideally paymail for convenience). So after researching today, I've found this great resource https://gobitcoinsv.com/ which basically gives a lot of Bitcoin related functionality in form of Golang libraries. So far I mostly used Python for backend development, but as I've read Golang is actually really nice and I am eager to learn it. Now I have very little idea of how the Bitcoin side of things actually work. And this is where I'd like to get some pointers perhaps. I've seen that I can use the https://github.com/libsv/go-bt library to create a basic transaction to a wallet. But how would I go on and plug in a paymail address rather than the wallet address? Also are there any resources on how to create a proper transaction? For instance, based on the example provided in the go-bt library, why would I put this tx.From( "11b476ad8e0a48fcd40807a111a050af51114877e09283bfa7f3505081a1819d", 0, "76a914eb0bd5edba389198e73f8efabddfc61666969ff788ac6a0568656c6c6f", 1500) in a transaction, what does the From part mean and why is it in the outgoing transaction?
erik tipped:
mrz tipped:
You can use either go-bt (which is the lowest level) or you can use go-bitcoin (level above go-bt) which might make it easier for you ;-)
go-bitcoin is a library that uses go-bt under the hood. It adds a bunch of convenience functions to make various things easier, such as createTxWithChange that will automatically calculate fees and change. There are lots of examples here: https://github.com/BitcoinSchema/go-bitcoin/tree/master/examples most of these packages have great test coverage so you can typically find good examples in the test files as well go-paymail is what you want to resolve a paymail address (if you use go-paymail you don't need a 3rd party service such as polynym). Here is an example of resolving an address with go-paymail https://github.com/tonicpow/go-paymail/tree/master/examples/client/resolve_address
miggy tipped:
miggy replied:
Hey Satchmo! Thanks a ton for the kind explanation mate. I am having lot's of fun learning Golang atm, and can't wait to use your libraries. So useful!