Overledger Java SDK
Developer's guide to use the Overledger SDK written in Java by Quant Network.
Introduction to the Overledger SDK
Overledger is an operating system that allows distributed apps (MApps) to connect to multiple distributed ledger technologies (DLTs) or blockchains. The Overledger SDK allows developers to create signed transactions & send them simultaneously to all supported DLTs.
Technologies
The Overledger SDK is maven compatible dependency written in Java
Overledger SDK Structure
Overledger SDK Working Flow
Prerequisites
- Register for a free developer account on Quant Developer's Portal
- You will require MAppId and access key:
- Enter information regarding your application in order to get a MApp ID.
- Verfify your Quant token, and create a access key.
Installation
Developers would have to install the Overledger SDK as a maven dependency.
<!-- SDK bundle -->
<dependency>
<groupId>network.quant</groupId>
<artifactId>overledger-sdk-bundle</artifactId>
<version>1.0.0-alpha.3</version>
</dependency>
Tailored installation
When a full implementation of all dependencies is not required, it can be tailored to only implement those services that will be utilised.
overledger-sdk-api
API module defines Overledger SDK interfaces.
overledger-sdk-essential
This module gives a basic implementation of Overledger SDK API.
overledger-sdk-bitcoin
This module contains Bitcoin implementation of Overledger Account API.
overledger-sdk-ethereum
This module contains Ethereum implementation of Overledger Account API.
overledger-sdk-ripple
This module contains Ripple implementation of Overledger Account API.
overledger-sdk-bundle
This module bundles up API, essential, Bitcoin, Ethereum and Ripple modules.
overledger-sdk-example
Includes some examples.
Getting started
-
Follow README from overledger-sdk-api to create context.properties.
-
Then load properties into OverledgerContext
OverledgerContext.loadContext(...);
- Instance OverledgerSDK Object, add accounts, and call Overledger SDK methods.
public class OverledgerSDKExample {
private OverledgerSDK overledgerSDK;
public OverledgerSDKExample(Account... accounts) {
this.overledgerSDK = DefaultOverledgerSDK.newInstance(NETWORK.MAIN);
this.overledgerSDK.addAccount(DLT.bitcoin.name(), accounts[0]);
this.overledgerSDK.addAccount(DLT.ethereum.name(), accounts[1]);
this.overledgerSDK.addAccount(DLT.ripple.name(), accounts[2]);
}
public OverledgerTransaction writeTransaction(OverledgerTransaction ovlTransaction) {
return this.overledgerSDK.writeTransaction(ovlTransaction);
}
}
actually working use case: note custom java properties only working and it must be laoded before the OverledgersSDK is instantiated.
File fprop = new File("/Users/marvas/overledger-sdk-java/overledger-sdk-example/context.properties");
UUID ovlId=null;
FileInputStream inputStream = new FileInputStream(fprop);
Properties properties = new Properties();
properties.load(inputStream);
OverledgerContext.loadContext(properties);
OverledgerSDK h = DefaultOverledgerSDK.newInstance();
var ovTrans = h.readTransactions("network.quant.software");
int cnt=0;
Further information
This SDK acts as library for embedding in an application, and facilitates the execution and access of Quant Network's Overledger.
Refer wiki for more Details.
Stable Release Version | JDK Version compatibility | BPI Version compatibility | Release Date |
---|---|---|---|
1.0.0-alpha | 11+ | 1.0.0-alpha | *30/10/2018 |
1.0.0-alpha.1 | 11+ | 1.0.0-alpha.1 | *17/12/2018 |
1.0.0-alpha.2 | 11+ | 1.0.0-alpha.1 | *26/02/2019 |
1.0.0-alpha.3 | 11+ | 1.0.0-alpha.2 | *15/04/2019 |
1.0.0-alpha.4 | 8+ | 1.0.0-alpha.3 | *15/04/2019 |
Release notes
Release | Notes |
---|---|
1.0.0-alpha | v1.0.0-alpha release notes |
1.0.0-alpha.1 | v1.0.0-alpha.1 release notes |
1.0.0-alpha.2 | v1.0.0-alpha.2 release notes |
1.0.0-alpha.3 | v1.0.0-alpha.3 release notes |
1.0.0-alpha.4 | Created simple working examples based on the JavaScript examples, Made it compatible with Java 8, to build against later JDKS just change java version in pom.xml |