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.
Asked
Active
Viewed 974 times
3
ZhouW
- 1,348
- 2
- 18
- 35
1 Answers
5
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.)
user19510
- 27,999
- 2
- 30
- 48
web3.eth.signreturns 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. – ZhouW Mar 11 '18 at 06:49eth_getTransactionByHashwill give you thev,r, andsvalues for a transaction. – user19510 Mar 11 '18 at 06:51web3.eth.getTransactionif you're using web3.js.) – user19510 Mar 11 '18 at 06:52