Bitcoin Forum
May 03, 2024, 04:46:32 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Java Bitcoin Utils  (Read 820 times)
Ploo (OP)
Full Member
***
Offline Offline

Activity: 125
Merit: 100


View Profile
December 02, 2012, 11:03:06 PM
 #1

I'm looking for a simple library to handle basic bitcoin related calculations such as
- generating private keys
- calculating public keys
- calculating bitcoin addresses

I'm not looking for any actual bitcoin network interaction. I'm looking at bitcoinj opened but before I slim it down to the classes that are relevant to me I figured I'd ask and see if this is something that's already available.
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714754792
Hero Member
*
Offline Offline

Posts: 1714754792

View Profile Personal Message (Offline)

Ignore
1714754792
Reply with quote  #2

1714754792
Report to moderator
1714754792
Hero Member
*
Offline Offline

Posts: 1714754792

View Profile Personal Message (Offline)

Ignore
1714754792
Reply with quote  #2

1714754792
Report to moderator
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
December 02, 2012, 11:24:38 PM
 #2

http://pastebin.com/raw.php?i=LuiDSmiN

I wrote this awhile ago, and it does all that, but does require the use of the bouncy castle dependencies
apetersson
Hero Member
*****
Offline Offline

Activity: 668
Merit: 501



View Profile
December 02, 2012, 11:28:41 PM
 #3

bitcoinJ is very simple for that:

Code:
new ECKey().toAddress(NetworkParameters.prodNet())
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
December 03, 2012, 12:02:38 AM
 #4

Just take the ECKey, Address and VersionedChecksummedBytes classes from bitcoinj and you have what you need. They don't depend on other parts of the library.
grau
Hero Member
*****
Offline Offline

Activity: 836
Merit: 1021


bits of proof


View Profile WWW
December 03, 2012, 09:28:16 PM
 #5

So you have a choice:

https://github.com/bitsofproof/supernode/blob/master/src/main/java/com/bitsofproof/supernode/core/AddressConverter.java

https://github.com/bitsofproof/supernode/blob/master/src/main/java/com/bitsofproof/supernode/core/ECKeyPair.java
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!