Author

Topic: How to make wallet address sanity check algorithm? (Read 179 times)

legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
♯♯♯ or other coin's address.

You can not prevent that, because the only thing you can check is whether the address is valid or not. And if the address follows the same structure (eg. LTC's old multi sig, or BCH's addresses) it will be valid.
You can ask the user to confirm he wants to send for example bitcoin to the address he  just gave you but that won't prevent much.
legendary
Activity: 1624
Merit: 2481
As title, How to make coin's wallet address sanity check algorithm?

To block user's trial of send coin to wrong address or other coin's address.

Are we supposed to build your online service?

You seem to know almost nothing about IT/coding/bitcoin/server/googline/computers..

It is literally the FIRST RESULT on google: Bitcoin address checksum


P.s. Make sure to message me when your service will be online. I am looking for fast and easy money.
legendary
Activity: 4466
Merit: 3391
An address already has sanity checks -- the version byte and the checksum. Beyond those, the options are limited.

One solution is to disallow direct entry of an address alone and only allow use of BIP 21 (https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki)
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
As title, How to make coin's wallet address sanity check algorithm?

To block user's trial of send coin to wrong address or other coin's address.

One easy way is to put something specific at the start of the wallet address.
For example if the wallet is ABCABCABC make it become wsxdrfvcoinABCABCABC, then you always check for that start.
Or, since a wallet comes from a big number, you add something in front making it bigger, like if the large number for wallet has 20 digits you add 45*10^20 to it (so you add 45 in front). Again, at send you check if that rule is kept for the recipient address.

Edit: if you want to make it even more complicated you can add some sort of checksum at the end
jr. member
Activity: 413
Merit: 5
As title, How to make coin's wallet address sanity check algorithm?

To block user's trial of send coin to wrong address or other coin's address.

Jump to: