Skip to main content

Document Wallet SDK

SDK for storing and managing a user's documents (document wallet).

Applies to Document Wallet SDK 5.5.2+

Installation

Declare Cloudike's private Maven repository in your project's settings.gradle.kts (artifactory_username/artifactory_password are credentials provided by Cloudike, set in your own gradle.properties):

dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url = uri("https://rt.cloudike.com/artifactory/libs-release-local")
credentials {
username = settings.extra.properties["artifactory_username"].toString()
password = settings.extra.properties["artifactory_password"].toString()
}
}
}
}

Add document-wallet and its required core dependency to your app module's build.gradle.kts and sync the project:

dependencies {
implementation("com.cloudike.sdk:document-wallet:<version>")
implementation("com.cloudike.sdk:core:<version>")
}

Initialization

import com.cloudike.sdk.core.CoreManager
import com.cloudike.sdk.documentwallet.DocumentWalletManager
import kotlinx.coroutines.runBlocking

val coreContext = CoreManager.build(applicationContext)

runBlocking {
coreContext.sessionManager.start(
reset = false,
baseUrl = "https://your-backend.example.com/", // your Cloudike backend endpoint
accessToken = accessToken, // from your sign-in flow
userId = userId, // from your sign-in flow
userAgent = "YourApp/1.0",
)
}

val documentWalletManager = DocumentWalletManager.build(coreContext)

Builds the shared CoreContext, starts the user session on it, then builds DocumentWalletManager on the same CoreContext. baseUrl/accessToken/userId/userAgent come from your own sign-in flow — the values shown are placeholders.

First API Call

val walletExists = runBlocking {
documentWalletManager.walletManager.isWalletCreated()
}
println("Document wallet already exists: $walletExists")

Checks whether a document wallet has already been created for this user. Prints false for a new user, with no side effects — confirming Document Wallet SDK is initialized and can query wallet state.