1

My project allows a user to add their existing bitcoin/ethereum wallet address. Is there a way to call an API to verify these addresses?

vaj oja
  • 143
  • 3
  • 9

1 Answers1

2

What do you mean by verifying? For Bitcoin addresses, you can verify the checksum (see here). For Ethereum addresses, checksum is not obligatory, but can be incorporated by using upper- of lower-case letters (see here). In any case, verifying the checksum does not require any API calls.

Sergei Tikhomirov
  • 1,062
  • 8
  • 21
  • What I mean is that the user adds a bitcoin/ethereum address and we verify if the address really exists to prevent wrong address being saved. – vaj oja Aug 09 '17 at 18:29
  • @vajoja there is no such thing as existing or non-existing address. From the network's perspective (both in Bitcoin and Ethereum), an address exists if is was part of a transaction. As address generation does not involve any interaction with the network, there is no way to distinguish a generated but yet unused address from the one not even generated. You can check that an address was used before, bit this will prevent your users from using fresh addresses, which might be bad from security / privacy standpoint. – Sergei Tikhomirov Aug 09 '17 at 18:32
  • Thanks for the answer.I am still a bit confused. How about i create an address in myetherwallet.com and then i can't verify programmatically if my wallet address is valid or not? – vaj oja Aug 09 '17 at 18:38
  • @vajoja Ok, if you trust MEW developers to be basically competent (which I believe they are), addresses generated by MEW are grammatically correct (which can be checked by calculating the checksum). Does it correspond to your definition of valid? – Sergei Tikhomirov Aug 09 '17 at 18:44