Base58check to decimal

576 views
Skip to first unread message

Nosferatu fist

unread,
Sep 15, 2016, 4:26:11 AM9/15/16
to golang-nuts
First Hello and thank you for any help you can give me .

here I have traveled google but I have not found my happiness . I would like to convert decimal number BASE58Check in my research but give nothing

example:
bitcoin address : 1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN
In decimal : 1037542833334494436883955695059393877833907143043

Thank you in advance for your help.

Egon

unread,
Sep 15, 2016, 4:49:56 AM9/15/16
to golang-nuts
Write a for loop :)


Also are you sure that the decimal number is correct... i.e. I got a different result and http://lenschulwitz.com/base58 gives the same result.

+ Egon

Donovan Hide

unread,
Sep 15, 2016, 7:00:39 AM9/15/16
to Nosferatu fist, golang-nuts

Nosferatu fist

unread,
Sep 15, 2016, 8:11:32 AM9/15/16
to golang-nuts
No base58 but base58check

Donovan Hide

unread,
Sep 15, 2016, 12:49:05 PM9/15/16
to Nosferatu fist, golang-nuts
Yep, read the docs:

https://godoc.org/github.com/btcsuite/btcutil/base58#CheckDecode

The "check" means run SHA256 twice over the previous payload bytes and use the first 4 bytes of the result as the checksum.

On 15 September 2016 at 13:11, Nosferatu fist <angerf...@gmail.com> wrote:
No base58 but base58check

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Donovan Hide

unread,
Sep 15, 2016, 1:10:31 PM9/15/16
to Nosferatu fist, golang-nuts
Here's some code from the example that verifies your decimal value from your input address:

Nosferatu fist

unread,
Sep 16, 2016, 4:17:38 AM9/16/16
to golang-nuts, angerf...@gmail.com
Hello donovan First I thank you for having me cleared
by implenter against how your code in this application ?
https://github.com/saracen/directory.io/blob/master/directory.go

to get this:

5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf 1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm 1037542833334494436883955695059393877833907143043

if you could help me I would be very grateful to you .

Donovan Hide

unread,
Sep 16, 2016, 6:31:20 AM9/16/16
to Nosferatu fist, golang-nuts
Not sure what the exact questions is, but I think if you study and play around with this section of code, you'll get somewhere closer to understanding how Bitcoin private keys and addresses work:


The (joke) app is basically just going from 0 to the maximum possible bitcoin private key value and generating the matching address:


--

Donovan Hide

unread,
Sep 16, 2016, 6:40:34 AM9/16/16
to Nosferatu fist, golang-nuts
In the fact the author has already made it easy for you:

Also, it starts at 1, not 0 :-)

Nosferatu fist

unread,
Sep 18, 2016, 8:52:30 AM9/18/16
to golang-nuts

hello how to add the decimal bitcoin addresses on directory.io
Reply all
Reply to author
Forward
0 new messages