> For the complete documentation index, see [llms.txt](https://docs-sdk.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-sdk.crypto-chief.com/processing/kotlin.md).

# Kotlin SDK

The official Kotlin / JVM client for the [Crypto Chief](https://crypto-chief.com/processing/) crypto processing API. One dependency gives you typed, coroutine-friendly access to payments, payouts, on-chain transactions, wallets, and webhooks across 25+ chains.

[![Maven Central](https://img.shields.io/maven-central/v/com.crypto-chief/cryptochief-crypto-processing-kotlin.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/com.crypto-chief/cryptochief-crypto-processing-kotlin)

## Requirements

* JDK **11+** at runtime, JDK **17+** to build
* A Crypto Chief **Merchant ID** and **API key** (Dashboard → Integration)

## Installation

{% tabs %}
{% tab title="Gradle (Kotlin DSL)" %}

```kotlin
dependencies {
    implementation("com.crypto-chief:cryptochief-crypto-processing-kotlin:0.1.0")
}
```

{% endtab %}

{% tab title="Gradle (Groovy)" %}

```groovy
dependencies {
    implementation 'com.crypto-chief:cryptochief-crypto-processing-kotlin:0.1.0'
}
```

{% endtab %}

{% tab title="Maven" %}

```xml
<dependency>
  <groupId>com.crypto-chief</groupId>
  <artifactId>cryptochief-crypto-processing-kotlin</artifactId>
  <version>0.1.0</version>
</dependency>
```

{% endtab %}
{% endtabs %}

The SDK is **coroutines-first**: every service method is a `suspend fun`, and DTOs are `@Serializable` data classes with `@SerialName` mapping camelCase Kotlin fields to the API's snake\_case wire format. No callback layer, no annotation processing.

## Quickstart

```kotlin
import com.cryptochief.processing.Chain
import com.cryptochief.processing.CryptoChiefClient
import com.cryptochief.processing.models.EstimatePayoutRequest
import kotlinx.coroutines.runBlocking

fun main() = runBlocking {
    CryptoChiefClient.create {
        merchantId = "MERCHANT_ID"
        apiKey     = "API_KEY"
    }.use { client ->
        val est = client.payouts.estimate(
            EstimatePayoutRequest(
                network   = Chain.ETH_SEPOLIA,
                coin      = "ETH",
                amount    = "0.0001",
                toAddress = "0xRecipient...",
            ),
        )
        println("amount to receive: ${est.amountToReceive}")
    }
}
```

{% hint style="success" %}
If `estimate` returns without throwing, your credentials and signing are working end-to-end.
{% endhint %}

## What you can do

| Domain                       | Service               | Key methods                                                |
| ---------------------------- | --------------------- | ---------------------------------------------------------- |
| Single & batch payouts       | `client.payouts`      | `estimate`, `execute`, `batchExecute`, `info`, `history`   |
| Sign / execute arbitrary txs | `client.transactions` | `sign`, `execute`, `signEvmCall`, `jettonTransfer`         |
| Accept payments              | `client.payIns`       | `create`, `selectAsset`, `cancel`, `info`, `history`       |
| Wallets + RSA decrypt        | `client.wallets`      | `generate`, `list`, `freeze`, `decryptPrivateKey`          |
| Treasury sweeps              | `client.sweeps`       | `force`, `history`, `walletHistory`                        |
| On-chain queries             | `client.blockchain`   | `contractsAvailable`, `walletBalance`, `transactionStatus` |
| Fiat ↔ crypto rates          | `client.currencies`   | `fiatToCrypto`, `cryptoToFiat`                             |

## Explore the guides

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>🔑 Authentication</strong></td><td>Credentials, client setup, and request signing.</td><td><a href="/pages/xMqopaxIty4nXYKI06mq">/pages/xMqopaxIty4nXYKI06mq</a></td></tr><tr><td><strong>💸 Send a payout</strong></td><td>Estimate, execute idempotently, and confirm.</td><td><a href="/pages/hN2J94dRsHmJcov8neJo">/pages/hN2J94dRsHmJcov8neJo</a></td></tr><tr><td><strong>📥 Accept payments</strong></td><td>Create PayIn invoices and read deposits.</td><td><a href="/pages/euOjY5nLSOAnxLcPyiFi">/pages/euOjY5nLSOAnxLcPyiFi</a></td></tr><tr><td><strong>📡 Webhooks</strong></td><td>Verify signatures and handle typed events.</td><td><a href="/pages/dV9u0SeKgLitbHCa0Rr4">/pages/dV9u0SeKgLitbHCa0Rr4</a></td></tr><tr><td><strong>🧩 Contract calls</strong></td><td>EVM / TRON ABI calls with no hand-encoded calldata.</td><td><a href="/pages/WpVvsK4PcNMIXL0t0DEH">/pages/WpVvsK4PcNMIXL0t0DEH</a></td></tr><tr><td><strong>💎 TON transfers</strong></td><td>Jetton, NFT, and comment transfers in one call.</td><td><a href="/pages/L3l5RyoytKIyIcAs5R9D">/pages/L3l5RyoytKIyIcAs5R9D</a></td></tr></tbody></table>
