Bitcoin Forum
May 06, 2024, 03:48:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: javascript address validation? 0.2 BTC bounty (bounty paid)  (Read 4786 times)
bytemaster (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 566

fractally


View Profile WWW
May 25, 2011, 03:08:17 PM
Last edit: May 26, 2011, 01:45:19 AM by bytemaster
 #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://fractally.com - the next generation of decentralized autonomous organizations (DAOs).
1715010509
Hero Member
*
Offline Offline

Posts: 1715010509

View Profile Personal Message (Offline)

Ignore
1715010509
Reply with quote  #2

1715010509
Report to moderator
1715010509
Hero Member
*
Offline Offline

Posts: 1715010509

View Profile Personal Message (Offline)

Ignore
1715010509
Reply with quote  #2

1715010509
Report to moderator
1715010509
Hero Member
*
Offline Offline

Posts: 1715010509

View Profile Personal Message (Offline)

Ignore
1715010509
Reply with quote  #2

1715010509
Report to moderator
In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Alex Beckenham
Full Member
***
Offline Offline

Activity: 154
Merit: 100


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
Merit: 100



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
Merit: 100


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


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

bytemaster (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 566

fractally


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

Thanks, 0.1BTC sent to 17TMiP6xtT4PJu6tQoKb5L8xEL1AA7dafS

https://fractally.com - the next generation of decentralized autonomous organizations (DAOs).
unfinishe
Full Member
***
Offline Offline

Activity: 126
Merit: 100



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: 349
Merit: 250


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
Merit: 130


View Profile
February 22, 2012, 07:05:54 AM
Last edit: February 22, 2012, 08:14:51 AM by Joric
Merited by xandry (4)
 #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:  

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