Bitcoin Forum
June 26, 2024, 02:14:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: which format is address in output of bitcoinrpc json  (Read 933 times)
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1078


I may write code in exchange for bitcoins.


View Profile
September 04, 2014, 03:31:58 AM
 #1

In, for example, block #1 of testnet3, I find this sort of representation for an output address.

n3GNqMveyvaPvUbH469vDRadqpJMPc84JA

I know that this is probably a hash of the public key, and I know from looking at the technical specs that there are a number of different representations.  Which one is this?  Can you point me to the right part of the spec where I can convert something like this to the "normal" address format WIF?

Thanks for any pointers.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3430
Merit: 4680



View Profile
September 04, 2014, 04:02:08 AM
 #2

You can find the technical details of how a bitcoin address is created here:
https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses

You can find a list of commonly used version bytes here:
https://en.bitcoin.it/wiki/List_of_address_prefixes

Since the WIF addresses on testnet use a version byte of 0x6F, they will always start with m or n.
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1078


I may write code in exchange for bitcoins.


View Profile
September 04, 2014, 04:15:50 AM
 #3

You can find the technical details of how a bitcoin address is created here:
https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses

You can find a list of commonly used version bytes here:
https://en.bitcoin.it/wiki/List_of_address_prefixes

Since the WIF addresses on testnet use a version byte of 0x6F, they will always start with m or n.

Very helpful.  If I'm doing this right, the address above is: 3VVW1m5SDnPrf7zG6LAMoyjC751yUgV4KvWDr9aVygwziXA

I'm going the leave the thread open in case someone else knows that this ^^^ is obviously wrong Smiley
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1078


I may write code in exchange for bitcoins.


View Profile
September 06, 2014, 03:40:10 AM
 #4

Can anyone with a strong background in this stuff confirm for me that I'm doing this correctly?

Bitcoin testnet block #1 has a coinbase transaction with an output to

n3GNqMveyvaPvUbH469vDRadqpJMPc84JA

and I just want to be sure that this address, in WIF, is: 3VVW1m5SDnPrf7zG6LAMoyjC751yUgV4KvWDr9aVygwziXA

Actually, now that I find this page:

https://en.bitcoin.it/wiki/List_of_address_prefixes

I'm almost sure I'm doing it wrong.  Maybe the n3... version is actually already in WIF.  Hmmm.
Pages: [1]
  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!