Bitcoin Forum

Bitcoin => Project Development => Topic started by: apoorvlathey on April 06, 2016, 07:15:34 AM



Title: How to Extract Bitcoin Addresses ??
Post by: apoorvlathey on April 06, 2016, 07:15:34 AM
I want a javascript (.js) that can find the Valid Bitcoin Addresses from a piece of text.
This might help :

https://github.com/achow101/BitcointalkAccountPricer/blob/master/src/com/achow101/bctalkaccountpricer/server/Address.java (https://github.com/achow101/BitcointalkAccountPricer/blob/master/src/com/achow101/bctalkaccountpricer/server/Address.java)

It is the GitHub directory of http://www.bctalkaccountpricer.info . This java file does the same task that i want.
The only problem is that i want that it should be a .js script. Can anyone help me in achieving this ?


Title: Re: How to Extract Bitcoin Addresses ??
Post by: tyz on April 06, 2016, 11:25:42 AM
Are you familiar with regular expressions? If so, you can find the solution on this[1] post on Stackoverflow. I used it myself some time ago and it worked fine.

[1] http://stackoverflow.com/questions/21683680/regex-to-match-bitcoin-addresses


Title: Re: How to Extract Bitcoin Addresses ??
Post by: bitdumper on April 09, 2016, 08:59:43 AM
You can use https://github.com/trapp/brainwallet to understand how address generation works,  but be aware that it is vulnerable that's why original Brainwallet website was shut down.
For production version use bip32 based https://bip32jp.github.io/english/.