Activeledger SDK for Android
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
activeledgersdk
app
gradle/wrapper
.gitignore
README.md
README.txt
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Activeledger

Activeledger SDK-Android

To use the Android SDK please Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		maven { url 'https://jitpack.io' }
	}
}

Add the dependency

dependencies {
	implementation 'com.github.activeledger:SDK-Android:Tag'
}

For Maven:

<repositories>
	<repository>
		<id>jitpack.io</id>
		<url>https://jitpack.io</url>
	</repository>
</repositories>

Add the dependency

<dependency>
	<groupId>com.github.activeledger</groupId>
	<artifactId>SDK-Android</artifactId>
	<version>Tag</version>
</dependency>

NOTE: Please update the Tag : 0.1.1

SDK Dev Instruction

Use the ActiveLedger SDK interface to Use the SDK.

Initialise the SDK

ActiveLedgerSDK.getInstance().initSDK(this,"protocol","URL","port");
Example:
ActiveLedgerSDK.getInstance().initSDK(this,"http","testnet-uk.activeledger.io","5260");

Generate KeyPair

Generating a KeyPair will give an Observable in return. User RxAndroid to subscribe to the Obserable.

Observable<KeyPair> keyPair = ActiveLedgerSDK.getInstance().generateAndSetKeyPair(KeyType,SaveKeysToFile);
Example:
Observable<KeyPair> keyPair = ActiveLedgerSDK.getInstance().generateAndSetKeyPair(keyType,true);

Oboard KeyPair

Onboarding a KeyPair will give an Observable in return. User RxAndroid to subscribe to the Obserable.

Observable<String> response = ActiveLedgerSDK.getInstance().onBoardKeys(KeyPair, "KeyName");
Example:
ActiveLedgerSDK.getInstance().onBoardKeys(keyPair, "ActiveLedgerAwesomeKey");

Executing a Transaction

Execute method takes a transaction and will give an Observable in return with response in String format. User RxAndroid to subscribe to the Obserable.

Observable<String>  respinse =  ActiveLedgerSDK.getInstance().executeTransaction(String transactionJson);