I
I
Igor Vasiliev2018-03-30 17:23:06
Cryptocurrency
Igor Vasiliev, 2018-03-30 17:23:06

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

2 answer(s)
D
Dimonchik, 2018-03-30
@Isolution666

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

S
Semyon Novikov, 2018-12-16
@semennovikov123

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 question

Ask a Question

731 491 924 answers to any question