Bitcoin Forum
May 07, 2024, 06:06:00 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to make wallet address sanity check algorithm?  (Read 167 times)
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
June 25, 2018, 09:24:40 AM
 #1

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.

1715061960
Hero Member
*
Offline Offline

Posts: 1715061960

View Profile Personal Message (Offline)

Ignore
1715061960
Reply with quote  #2

1715061960
Report to moderator
1715061960
Hero Member
*
Offline Offline

Posts: 1715061960

View Profile Personal Message (Offline)

Ignore
1715061960
Reply with quote  #2

1715061960
Report to moderator
1715061960
Hero Member
*
Offline Offline

Posts: 1715061960

View Profile Personal Message (Offline)

Ignore
1715061960
Reply with quote  #2

1715061960
Report to moderator
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715061960
Hero Member
*
Offline Offline

Posts: 1715061960

View Profile Personal Message (Offline)

Ignore
1715061960
Reply with quote  #2

1715061960
Report to moderator
NeuroticFish
Legendary
*
Offline Offline

Activity: 3668
Merit: 6381


Looking for campaign manager? Contact icopress!


View Profile
June 25, 2018, 03:01:11 PM
 #2

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

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3214



View Profile
June 25, 2018, 05:40:55 PM
Merited by Foxpup (2), ABCbits (1)
 #3

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)

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
June 26, 2018, 11:43:20 AM
 #4

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.

Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
June 26, 2018, 01:46:39 PM
 #5

♯♯♯ 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.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!