Bitcoin Forum
May 05, 2024, 10:54:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: what JavaScript library to generate priv keys & addresses? (like bitaddress.org)  (Read 1592 times)
Kazimir (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1001



View Profile
January 21, 2014, 01:45:18 PM
 #1

For some websites I'd like to include the functionality to generate Bitcoin private keys & addresses client-side, just like bitaddress.org.

In fact, I don't even need to generate them randomly, just converting 256 bit hex keys (e.g. from brainwallets or deterministic key generators or other pseudo-random sources) to private keys and addresses.

For testing purposes, I actually saved bitaddress.org, stripped all HTML, and just called the relevant functions myself. Works great, but I guess that isn't the most 'clean' way to do this. And it's not trivial to keep up to date either. I know bitaddress.org is in github (https://github.com/pointbiz/bitaddress.org) but is the library that bitaddress.org uses, and especially the hex key to private key / address conversion, also available separately? Or is just a matter of cherry-picking the right files from github?


In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
1714949661
Hero Member
*
Offline Offline

Posts: 1714949661

View Profile Personal Message (Offline)

Ignore
1714949661
Reply with quote  #2

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

Posts: 1714949661

View Profile Personal Message (Offline)

Ignore
1714949661
Reply with quote  #2

1714949661
Report to moderator
jp
Member
**
Offline Offline

Activity: 69
Merit: 10



View Profile WWW
February 20, 2014, 09:48:42 AM
 #2

I'm developing a library for this: https://github.com/cryptocoinjs Also, I wrote an article on all the gory details of Address generation with JavaScript using BitcoinJS (which is what my library is forked from): http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-javascript

Helping the world exit the traditional financial system.
crazydownloaded
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
February 21, 2014, 06:21:10 AM
 #3

Brainwallet is actually opensourced too: https://github.com/brainwallet/brainwallet.github.com and includes a generation of addresses.
I did it myself, that's not very difficult to understand. Starts with bitcoin-js library.

Est. February 2012
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!