Android, Kotlin, and Java
The current JVM-facing mobile SDK in the workspace is IrohaAndroid. It ships Android and JVM artifacts for Kotlin and Java applications.
Gradle Setup
Point Gradle at the Maven repository that hosts the published artifacts and add the dependencies you need:
repositories {
google()
mavenCentral()
maven { url = uri("../../artifacts/android/maven") }
}
dependencies {
implementation("org.hyperledger.iroha:iroha-android:<version>")
}The checked-in Android and JVM publication scripts currently use the iroha-android artifact ID. There is no separate iroha-android-jvm artifact ID in the source build.
Local Sample Build
./gradlew -p java/iroha_android :samples-android:assembleDebug \
-PirohaAndroidUsePublished=true \
-PirohaAndroidRepoDir=$PWD/../artifacts/android/mavenQuickstart
import org.hyperledger.iroha.android.address.AccountAddress;
byte[] key = new byte[32];
AccountAddress address = AccountAddress.fromAccount(key, "ed25519");
System.out.println(address.canonicalHex());
System.out.println(address.toI105(753));
AccountAddress.DisplayFormats formats = address.displayFormats();
System.out.println(formats.i105);
System.out.println(formats.i105Warning);Try Taira Read-Only
For a plain JVM smoke test, use Java's built-in HTTP client before adding SDK transaction signing:
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class TairaProbe {
public static void main(String[] args) throws Exception {
var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder()
.uri(URI.create("https://taira.sora.org/status"))
.GET()
.build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}Save it as TairaProbe.java, then run it with JDK 11 or newer:
javac TairaProbe.java
java TairaProbeExtend the same pattern to read https://taira.sora.org/v1/domains?limit=5 or https://taira.sora.org/v1/assets/definitions?limit=5. Use the Android SDK for key handling and signed transactions after the read-only route is reachable.
Native Escrow
Kotlin/JVM callers can construct marketplace and anonymous escrow instructions with typed InstructionTemplate classes such as OpenAssetEscrowInstruction, AcceptAssetEscrowInstruction, and ResolveEscrowDisputeInstruction. Android Java callers can use the matching NativeEscrowInstructions.* builders. See Native Asset Escrow for examples and permission constants.
Current Coverage
The Android/JVM SDK currently focuses on:
- key management and secure-storage backends
- Norito encoding via the shared Java implementation
- Torii HTTP, streaming, and Norito RPC clients
- offline note, QR, and subscription helpers
- account address and multisig utilities
- generated instruction helpers for NFT and RWA flows
- native escrow instruction templates for marketplace and anonymous escrow
Upstream References
java/iroha_android/README.mdjava/iroha_android/build.gradle.ktsjava/iroha_android/samples-android