Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine if a Bitcoin wallet address is "valid"

Tags:

c#

bitcoin

I know it's possible to verify Bitcoin wallet addresses with Regex (^[13][a-km-zA-HJ-NP-Z0-9]{26,33}$) - but this is not 100% accurate and allows invalid addresses to be detected as valid.

Is there publicly available C# algorithm that can verify bitcoin wallet addresses? I've been Googling for one, but couldn't find anything.

like image 959
nikib3ro Avatar asked Aug 16 '14 19:08

nikib3ro


1 Answers

Yes, the Bitcoin-Address-Utility project is an open-source C# tool that includes this kind of verification. In particular, look at Casascius.Bitcoin.Util.Base58CheckToByteArray().

like image 92
cdhowie Avatar answered Sep 28 '22 21:09

cdhowie