Skip to main content
Available The Kotlin SDK is available at github.com/d4mr/t2z/sdks/kotlin. It uses UniFFI bindings to the Rust core and works on Android and JVM.

Prerequisites

  • Java 11+ (JDK)
  • Rust (nightly toolchain)

Installation

Since the Kotlin SDK requires the native libt2z_uniffi library, you need to build from source:

Gradle Dependency

Add JNA dependency to your project:
Copy the generated source files from src/main/kotlin/uniffi/t2z_uniffi/ to your project.

Quick Start

API Reference

Transaction Construction

Signing

Proving & Finalization

Utilities

Types

UniffiTransparentInput

UniffiPayment

UniffiExpectedTxOut

Error Handling

All functions throw UniffiException on error:

Performance Tips

Pre-build Proving Key

The first proof generation takes ~10 seconds. Pre-build at startup:

Android Integration

For Android, ensure the native library is placed in the correct jniLibs directory:
Add to build.gradle.kts:

ProGuard / R8

Add to your proguard-rules.pro:

Minimum SDK

  • Minimum SDK: 21 (Android 5.0)
  • Target SDK: 34

Java Interop

The SDK is fully usable from Java:

Type Mappings

Building from Source