Electrumj
Java client for the electrum protocol
Install / Use
/learn @electrumj/ElectrumjREADME
electrumj
Java client for the electrum protocol.
Sample usage
ElectrumClient client = new ElectrumClient("electrumx-core.1209k.com", 50002);
client.openConnection();
String scripthash = Util.scripthash("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");
BlockchainScripthashGetBalanceResponse response = client.blockchainScripthashGetBalance(scripthash);
client.closeConnection();
System.out.println("Confirmed: " + response.getConfirmed());
System.out.println("Unconfirmed: " + response.getUnconfirmed());
Should print something like this:
Confirmed: 1834354006
Unconfirmed: 4348
See ElectrumClientTest for more examples.
Declaring electrumj as a gradle dependency:
repositories {
...
maven { url 'https://jitpack.io' }
}
dependencies {
...
implementation 'com.github.electrumj:electrumj:v0.1.1'
}
Useful resouces
Protocol documentation <br/>
Used libraries:<br/> jsonrpc4j <br/> jackson <br/>
Additional resources:<br/> Electrum documentation <br/> electrum source code <br/> Electrumx documentation <br/> electrumx source code <br/> Electrum go client
