Author

Topic: javascript address validation? 0.2 BTC bounty (bounty paid) (Read 4803 times)

member
Activity: 67
Merit: 130
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).
sr. member
Activity: 349
Merit: 250
BTCPak.com - Exchange your Bitcoins for MP!
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?
full member
Activity: 126
Merit: 100
hero member
Activity: 770
Merit: 566
fractally
Thanks, 0.1BTC sent to 17TMiP6xtT4PJu6tQoKb5L8xEL1AA7dafS
full member
Activity: 154
Merit: 100

Good stuff! Just sent 0.1 to your 'college Ramen' fund Smiley
full member
Activity: 126
Merit: 100
full member
Activity: 154
Merit: 100
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.
hero member
Activity: 770
Merit: 566
fractally
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.
Jump to: