Post
Topic
Board Development & Technical Discussion
Re: How to get the Public Keys of a bitcoin User
by
amaclin
on 16/06/2016, 07:45:44 UTC
When I see a thread like this, the first question - what is the OP hoping to achieve? Sometimes the question asked is not the real question.
A "Bitcoin User" doesn't have a public key, a Bitcoin address has a public key.
You should mention that you are talking about p2pkh outputs

The public key is only published when a transaction spends funds previously sent to that exact address.
Only after an address has spent money can the public key be recovered from a transaction stored in the blockchain.
Not only. Let us take the genesis block and its coinbase transaction
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
The public key (belongs to Satoshi Nakamoto) is
04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f
The associated address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa does not have spending transactions