Bitcoin Forum
May 12, 2024, 02:49:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Private to WIF to public to address  (Read 427 times)
Saint-loup
Legendary
*
Offline Offline

Activity: 2604
Merit: 2357



View Profile
December 18, 2022, 11:42:58 AM
 #21

Since I didn't find any projects like that on Github, I asked OpenAI's chatGPT to write a hex to base58 C++ function. I'm licensing the resulting code under the MIT license.
Code:
...

[...]

Since Bitcoin uses Base58Check which adds a checksum at the end of the Base58 string, and not just plain Base58, we need to modify this function as follows (also MIT licensed / AI generated):
Code:
...

It's using OpenSSL by the way, but I have a standalone SHA256 class file (that is not AI-generated) that does an equivalent job if you want it.

Damn, now I'm worried that I'm going to be obsoleted by a robot  Cheesy

[...]
PS: Since most people will be dealing with binary data when converting the HASH160 to base58(check), I decided to ask chatGPT to make binary to hex conversions as well:
Code:
...

I am so glad I didn't waste $100 on Copilot, this is so much better and more useful (and free!).
What you manage to do with this tool is very impressive, to be honest. Congratulations. Each time I tried to ask it something, about various matters, I got very incomplete/unsatisfactory results, with mistakes and erroneous claims unfortunately.
Which kind of questions did you ask it to get those results precisely?

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!