Skip to content

Java library to create Ethereum wallets and transactions

License

Notifications You must be signed in to change notification settings

baso10/ethereumKeyJ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

Ethereum KeyJ

Java library to create Ethereum wallets.

Usage

Wallet newWAllet = Wallet.newWallet();
String address = newWAllet.getAddress();
String privateKey = newWAllet.getPrivateKey();

//load from existing private key
Wallet wallet = Wallet.loadFromPrivate("0c276dea6126fc41da8303d13f53fdbf4c5b69c8a0cbe8526a8f56483f1b51e5");

Create and sign transaction

Wallet fromWallet = Wallet.loadFromPrivate("d20486c9ab8fdfff4d4645563b9ef617d7c69e23d3ded425bf1391acb93b6696");
Wallet toWallet = Wallet.loadFromAddress("0x718863e4fFC6D9CC4c40ba6ABE6EE5A2ec5a395c");
//prepare transaction    
Transaction transaction = TransactionBuilder.create(toWallet, new BigInteger("1"));
//sign
transaction.sign(fromWallet);
//get data
transaction.getEncoded();
transaction.getHash();

License

Apache license 2.0

About

Java library to create Ethereum wallets and transactions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages