Answer the question
In order to leave comments, you need to log in
How to check the accuracy of the entered data?
Hello.
--
I have a question about ICO.
When buying tokens, the user enters his ethereum wallet. How to find out or check that he entered the correct address. I noticed on other projects that this is all validated. I assume that this is the same as with the Cryptocurrency API. (you get an array of data, if there is no specified address among the addresses, then such an address does not exist.) I checked the litecoin, bitcoin and ethereum wallets generated on the payeer/ wallet - everything works. Maybe these addresses, like in a blockchain, were entered into the registry, because it would be illogical to send cryptocurrency to a non-existent address.
Who did this, tell me how it works?
Answer the question
In order to leave comments, you need to log in
demons (geth, bitcoind Etc) have functions that check the validity of the wallet
, for example, all test ones for bitcoin start with m (or even mm, ml)
but no one will check that the wallet is current if it is not recorded in the blockchain,
and the new wallet is in the blockchain is naturally not recorded
The easiest way is through regular expressions, they are available in almost all languages. Here is an example for ether:
^0x[0-9a-fA-F]{40}$
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question