Skip to content

Java client for the electrum protocol

License

Notifications You must be signed in to change notification settings

lukasdll/electrumj

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

electrumj

Build Status

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

Used libraries:
jsonrpc4j
jackson

Additional resources:
Electrum documentation
electrum source code
Electrumx documentation
electrumx source code
Electrum go client

About

Java client for the electrum protocol

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%