Skip to main content
Version: 1.7

Installation

We provide SDKs for developing projects in: NodeJS, Go, React Native (Android and iOS), Web projects, and Kotlin for Android.

Obtaining Credentials

To obtain the necessary credentials for accessing the Sodot JFrog Artifactory repository, use our guide here.

Minimum Requirements for Installation

  • Android 5.0 (API level 21) or higher
  • Kotlin 1.6 or higher
  • Java 8 compatibility

Android (Kotlin)

To use the Kotlin SDK in your Android project, follow these installation steps:

tip

Notice: The artifactoryPassword parameter should be a token for the Sodot JFrog Artifactory repository

Gradle (Groovy)

1. Configure JFrog Artifactory Repository

Add the Sodot Maven repository to your settings.gradle file:

// settings.gradle
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url "https://repo.sodot.dev/artifactory/sodot-kotlin-repo"
credentials {
username = artifactoryUser ?: System.getenv('ARTIFACTORY_USER')
password = artifactoryPassword ?: System.getenv('ARTIFACTORY_PASSWORD')
}
metadataSources {
mavenPom()
artifact()
}
}
}
}

2. Configure Credentials

Add your Artifactory credentials in your gradle.properties file:

# ~/.gradle/gradle.properties or project's gradle.properties
artifactoryUser=your_username
artifactoryPassword=your_password

Or set them as environment variables:

export ARTIFACTORY_USER=your_username
export ARTIFACTORY_PASSWORD=your_password

3. Add the Dependency

In your module-level build.gradle, add the Sodot Kotlin SDK dependency:

dependencies {
implementation "com.sodot:kotlin-sdk:<version>"
}

4. Sync Project

Sync your project with Gradle files to download the dependency.

Permissions

Make sure to add internet permission to your AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

ProGuard Rules

If you're using ProGuard for release builds, add the following rules to your proguard-rules.pro file to prevent the SDK from being obfuscated:

-keep class com.sodot.kotlin_sdk.** { *; }

Usage

After installation, you can import the SDK classes in your Kotlin files:

import com.sodot.kotlin_sdk.Ecdsa
import com.sodot.kotlin_sdk.Ed25519
import com.sodot.kotlin_sdk.Bip340
import com.sodot.kotlin_sdk.Sr25519
import com.sodot.kotlin_sdk.ExportableEd25519

You can now start generating keys and signing. Refer to the Getting Started guide for next steps.