Skip to content

shubertm/arkade-kotlin

Repository files navigation

Arkade Kotlin Multiplatform SDK

CI status

Overview

Arkade Kotlin is an experimental Kotlin Multiplatform SDK designed for building Bitcoin wallets across Android, iOS, and desktop platforms. It leverages the Ark Protocol to enable smooth off-chain transactions.
⚠️ Note: This SDK is not production-ready and should only be used for experimentation and development purposes.


Features

  • Kotlin Multiplatform support: Works across Android, iOS, and desktop.
  • Bitcoin wallet integration: Build wallets with Ark Protocol support.
  • Off-chain transactions: Enables fast and efficient transfers.
  • Sample app included: Reference implementation to help developers get started.

Architecture

The repository is organized into the following modules:

Module Description
core Core Arkade types and utilities for the Ark Protocol.
app Sample application demonstrating SDK usage.
buildSrc Gradle build configuration and dependencies.
scripts Utility scripts for building and running the project.

architecture


Getting Started

Prerequisites

  • Kotlin 1.9+
  • Gradle 8+
  • Nigiri (for integration tests)
  • Docker (for server and wallet containers)

Installation

Clone the repository:

git clone https://github.com/shubertm/arkade-kotlin.git
cd arkade-kotlin

Build the project:

./gradlew build

Run the sample app:

./gradlew :app:run

Usage Example

Here’s a simple example of how to initialize the SDK in Kotlin:

Single Key

import com.arkade.core.wallet.Wallet
import com.arkade.network.ArkadeClient
import com.arkade.network.ArkadeClientImpl
import com.arkade.network.Config


fun main() = runBlocking {
    val nsec = "<nsec1...>"
    val client: ArkadeClient = ArkadeClientImpl(Config.MUTINYNET)
    val serverInfo = client.getInfo()
    // Database builder is platform-specific
    val databaseBuilder = initializeRoomDatabaseBuilder("app-name")
    val wallet = Wallet.create(nsec, null, serverInfo, databaseBuilder)
}

HD

import com.arkade.core.wallet.Wallet
import com.arkade.network.ArkadeClient
import com.arkade.network.ArkadeClientImpl
import com.arkade.network.Config

fun main() = runBlocking {
    val secret = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
    val client: ArkadeClient = ArkadeClientImpl(Config.MUTINYNET)
    val serverInfo = client.getInfo()
    // Database builder is platform-specific
    val databaseBuilder = initializeRoomDatabaseBuilder("app-name")
    val wallet = Wallet.create(secret, null, serverInfo)
}

Contributing

Contributions are welcome!

  • Fork the repo
  • Create a feature branch
  • Submit a pull request

Please note that this project is experimental, so expect frequent changes.


Development Environment

Setup Pre-commit Hook

cp scripts/pre-commit .git/hooks/

Testing

Unit

./gradlew testUnit

Integration

  • Install Nigiri
    curl https://getnigiri.vulpem.com | bash
  • Run Nigiri
    nigiri start
  • Run all docker e2e tests
    ./gradlew testE2EDocker
  • Stop Nigiri
    nigiri stop --delete

License

This project is licensed under the MIT License. See the License file for details.


Disclaimer

This SDK is experimental and should not be used in production environments. Use at your own risk.


About

Arkade Kotlin Multiplatfrom SDK

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages