I need to find the public key of a list of Ethereum addresses. Is it possible to do this only with the transaction hash of one of their transactions? Per Get public key of any ethereum account the v, r and s values of the signature when a transaction is sent is also required. Using web3.eth.getTransactionReceipt
for example doesn't bring back this information.
1 Answer
Without a signature, there's no way to get the public key (short of someone giving it to you). So for an address that has never made a transaction, this can't be done.
(I'm not sure where getTransactionReceipt
comes in. If you're calling that, then surely the account has made a transaction, so you can recover the public key.)
-
These would be for addresses that have made a transaction somewhere at some point (so I could find a transaction hash to look at for them) but I don't know how to get the v, r and s value for any transaction which seems to be required for finding the public key. Of course using
web3.eth.sign
returns v, r and s values but these accounts wouldn't be interacting with my website, I only have already-existing publicly viewable transactions to work with.– ZhouWMar 11, 2018 at 6:49 -
eth_getTransactionByHash
will give you thev
,r
, ands
values for a transaction. Mar 11, 2018 at 6:51 -
-
thanks - the docs at github.com/ethereum/wiki/wiki/… don't mention that as bringing back v, r and s values– ZhouWMar 11, 2018 at 7:02