Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Sanka555 on November 04, 2021, 12:17:18 PM



Title: how to get the bitcoin address from base6 using java?
Post by: Sanka555 on November 04, 2021, 12:17:18 PM
i have Java and  bitcoinj
and i have a key = "11111111111111111111111111111111222221111111111111111111111111" in base6 format

and I want to get 2 compress and decompress WIF-format addresses without bitcoin org
please tell me how to do this the easiest way?
(this is not a brain-wallet)


thank you very much in advance:)


Title: Re: how to get the bitcoin address from base6 using java?
Post by: pooya87 on November 04, 2021, 01:57:29 PM
Go to https://github.com/pointbiz/bitaddress.org and clone the repository (it is written in JavaScript).
On a preferably air-gap computer run the bitaddress.org.html file.
Click on the tab saying "Wallet Details" and enter the base6 string in the first text box.
Click "View Details" button.

You will see both compressed and uncompressed private/public keys and the corresponding P2PKH addresses in this page.


Title: Re: how to get the bitcoin address from base6 using java?
Post by: Sanka555 on November 04, 2021, 02:12:45 PM
it's a little different. I am trying to do it myself in JAVA

JS is another language, unfortunately I don't know it at all (


Title: Re: how to get the bitcoin address from base6 using java?
Post by: pooya87 on November 04, 2021, 02:45:15 PM
it's a little different. I am trying to do it myself in JAVA
JS is another language, unfortunately I don't know it at all (
I'm not familiar with either language but they look pretty similar to me. There is a "BigInteger" class in both that supports constructing from a string while setting the base of that input. You just construct it using new BigInteger(input, 6) where input is the string (like "113125215") then convert that bigint instance to any other format like byte array then encode with Base58.

Base-6 encoding is pretty straight forward too: https://en.wikipedia.org/wiki/Senary


Title: Re: how to get the bitcoin address from base6 using java?
Post by: Sanka555 on November 04, 2021, 03:28:24 PM
it's a little different. I am trying to do it myself in JAVA
JS is another language, unfortunately I don't know it at all (
I'm not familiar with either language but they look pretty similar to me. There is a "BigInteger" class in both that supports constructing from a string while setting the base of that input. You just construct it using new BigInteger(input, 6) where input is the string (like "113125215") then convert that bigint instance to any other format like byte array then encode with Base58.

Base-6 encoding is pretty straight forward too: https://en.wikipedia.org/wiki/Senary


thank you very much, it really helped) everything worked out  :)