Skip to content

j3rkbox/redis_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coinj

Usage

// Building...(offline)
RawTransaction rawTx = new RawTransaction.Builder(Coin.BTC)
        .from("mjhAYkzNQbvdWAR2CTtP5HRqdr7RhaWE29")
        .to("mg6QezKh6pidbDEXYFpdP7CLiGZ94k3NAz", BigDecimal.valueOf(0.00001))
        .fee(BigDecimal.valueOf(0.0001)) // optional
        .change("mjhAYkzNQbvdWAR2CTtP5HRqdr7RhaWE29") // optional
        .build();
// BTC
Chain bitcoin = new BitcoinChain(Network.TEST, BitcoinChain.TESTNET_URL);
// Packing...(online)
PackedRawTransaction packedTx = bitcoin.packTransaction(rawTx);
// Signing...(offline)
List<String> keys = Collections.singletonList("7783f51f3cab49b1cab5952de8c13472ae196581fba89addf145f1b71c42f4a4");
SignedRawTransaction signedTx = bitcoin.signTransaction(packedTx, keys);
// Sending...(online)
String hash = bitcoin.sendTransaction(signedTx);
System.out.println("Hash: \t" + hash);

Supported Cryptocurrencies

  • BTC
  • ETH
  • ERC20

About

Litle JavaScript game to celebrate new year of 2019

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages