Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Verify Address #31

Open
nxycdl opened this issue Mar 5, 2018 · 6 comments
Open

How to Verify Address #31

nxycdl opened this issue Mar 5, 2018 · 6 comments
Assignees
Milestone

Comments

@nxycdl
Copy link

nxycdl commented Mar 5, 2018

You have done a great work. Thank you!
I have a question ;
if a send some coin from a to b , if b address is wrong address how to Verify Address

@conradoqg
Copy link
Owner

Hey!

If you create that transaction and the B address is wrong, nothing can be done. This is why you need to 100% sure that the B address is right before creating the transaction.

Best

@demenvil
Copy link

demenvil commented Mar 5, 2018

Hi,
The address can be verified only if it was created on the node or the creation of the transaction is requested.
When calling try to see if the destination address is in the portfolios no? Or cant to apply for a balance before?

@kwccoin
Copy link

kwccoin commented Mar 13, 2018

To be safe (in real world), I think (i) the wallet can check the address is a valid code somehow or (ii) you can go to the blockchain explorer to find the address first ... it may be the wrong address but at least it cannot be invalid.

As this is programming exercise here, I think my scheme would be:

  1. check the wallet program any chance to check the address
    you can do this

http://localhost:3001/operator/e155df3a1bac05f88321b73931b48b54ea4300be9d1225e0b62638f537e5544/balance which returns

No transactions found for address 'e155df3a1bac05f88321b73931b48b54ea4300be9d1225e0b62638f537e5544'

and for a valid address

http://localhost:3001/operator/e155df3a1bac05f88321b73931b48b54ea4300be9d1225e0b62638f537e5544c/balance which will return this json response

{"balance":47999997300}

and

  1. given there is no fee (:-)) transfer some of your coins to the new address
  2. check the blockchain explorer that there is such a transaction (see above)
  3. if there is on blockchain explorer, program one (as there is, no need)

...

@conradoqg
Copy link
Owner

@demenvil @kwccoin IMO it's hard to implement that kind of verification if the generation of the address is based on a password. The resulting address could be anything generated anywhere, meaning that for a given password any random address can be created. Without centralizing the address creation (government, central authority or something like that), it's impossible to know if the destination address is valid and if it's from whom you think it is. (I'm not saying that is impossible to determine that, but this imply that a good change to the concept of naivecoin would need to happen).

Coins like Bitcoin, Litecoin and so on use different ways to generate an address, and because of that, they can at least verify if the address is a valid bitcoin/litecoin address. Maybe we could change the way we generate the address by putting an additional NC_ identifier at the beginning of the address so, we can check if it was at least generated from a valid naivecoin client.

The options that @kwccoin showed above are valid approaches to identify the possibility of the target address to be an existing one/real one, however, I think this could be used only as a warning and in the client side (operator).

Do you agree?

Best

@neurofluxation
Copy link

@conradoqg - I really like the idea of changing up the address generation. Support for prefixes would be a "nice to have" in the config for sure.

@conradoqg conradoqg added this to the v2.0.0 milestone May 19, 2018
@conradoqg conradoqg self-assigned this May 31, 2018
@typoworx-de
Copy link

As far as I know mostly every wallet/currency has the API-Methode validateaddress for right this purpose. Right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants