Bitcoin Forum
December 09, 2016, 04:01:42 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: javascript address validation? 0.2 BTC bounty (bounty paid)  (Read 4248 times)
bytemaster
Hero Member
*****
Offline Offline

Activity: 728

BitShares


View Profile WWW
May 25, 2011, 03:08:17 PM
 #1

I am looking for something off the shelf that takes an address and validates it via javascript.

Something like this...

validate_btc( address )
{
    return { version:0, hash:'...' } or false;
}


I figure it is out there somewhere and google is failing me, so only a small tip, 0.1 BTC, for an answer.

https://steemit.com  Blogging is the new Mining
1481256102
Hero Member
*
Offline Offline

Posts: 1481256102

View Profile Personal Message (Offline)

Ignore
1481256102
Reply with quote  #2

1481256102
Report to moderator
1481256102
Hero Member
*
Offline Offline

Posts: 1481256102

View Profile Personal Message (Offline)

Ignore
1481256102
Reply with quote  #2

1481256102
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481256102
Hero Member
*
Offline Offline

Posts: 1481256102

View Profile Personal Message (Offline)

Ignore
1481256102
Reply with quote  #2

1481256102
Report to moderator
1481256102
Hero Member
*
Offline Offline

Posts: 1481256102

View Profile Personal Message (Offline)

Ignore
1481256102
Reply with quote  #2

1481256102
Report to moderator
Alex Beckenham
Full Member
***
Offline Offline

Activity: 154


View Profile
May 25, 2011, 03:11:44 PM
 #2

I figure it is out there somewhere and google is failing me, so only a small tip, 0.1 BTC, for an answer.

I will double that, purely out of curiosity... 0.1 from me too.

unfinishe
Full Member
***
Offline Offline

Activity: 126



View Profile
May 25, 2011, 07:01:12 PM
 #3

Well, going off of this thread, http://forum.bitcoin.org/index.php?topic=1026.0 , I was able to make a Javascript version of the code here:

http://dl.dropbox.com/u/28441300/check.html (Code and example)

http://dl.dropbox.com/u/28441300/sha256.js
http://dl.dropbox.com/u/28441300/BigInt.js



Check out the results from my Bitcoin Survey Project!
https://bitcointalk.org/index.php?topic=88927.0
Alex Beckenham
Full Member
***
Offline Offline

Activity: 154


View Profile
May 26, 2011, 01:21:12 AM
 #4


Good stuff! Just sent 0.1 to your 'college Ramen' fund Smiley

bytemaster
Hero Member
*****
Offline Offline

Activity: 728

BitShares


View Profile WWW
May 26, 2011, 01:44:28 AM
 #5

Thanks, 0.1BTC sent to 17TMiP6xtT4PJu6tQoKb5L8xEL1AA7dafS

https://steemit.com  Blogging is the new Mining
unfinishe
Full Member
***
Offline Offline

Activity: 126



View Profile
May 26, 2011, 03:21:20 AM
 #6

Thank you!

Check out the results from my Bitcoin Survey Project!
https://bitcointalk.org/index.php?topic=88927.0
DBordello
Sr. Member
****
Offline Offline

Activity: 350


BTCPak.com - Exchange your Bitcoins for MP!


View Profile WWW
February 21, 2012, 07:01:27 PM
 #7

I appear to have found a false negative. 

This address does not pass, however is a valid bitcoin address:

1RRi5kDMck5cj2ob4UcjKxnGL2sjknRtv

Thoughts on what it doesn't like?

www.BTCPak.com - Exchange your bitcoins for MP: Secure, Anonymous and Easy!
Joric
Member
**
Offline Offline

Activity: 67


View Profile
February 22, 2012, 07:05:54 AM
 #8

Tried to debug unfinishe's version, found a strange 4-bit shift which I was unable to fix:

1RRi5kDMck5cj2ob4UcjKxnGL2sjknRtv <- base58 address than gives false negative

00 04 9e 9b c9 36 6d fc 95 15 5e 53 00 84 a7 2a bf 6d 59 1f 07 <- b58decode
00 49 e9 bc 93 66 df c9 51 55 e5 30 08 4a 72 ab f6 d5 91 f0 72 <- javascript

It's either bignum or base58 implementation.

This one works fine http://pastebin.com/B5r3P5Ny (I used modified bitaddress.org code).

1JoricCBkW8C5m7QUZMwoRz9rBCM6ZSy96
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!