> For the complete documentation index, see [llms.txt](https://hinkal-team.gitbook.io/hinkal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hinkal-team.gitbook.io/hinkal/hinkal-mobile-sdk/android/android-sdk.md).

# Android SDK

Native Kotlin library for private token transfers with Hinkal.

The Android SDK is the Hinkal Go core compiled to a native `.aar` with [gomobile](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile) and published to Maven Central as `io.hinkal:hinkal-android`. Your app calls Kotlin methods; the SDK handles the proofs, UTXOs, and relaying. Signing stays in your app - the private key never leaves the device wallet.

### Features

* Published to Maven Central, one Gradle line to add
* Deposit, withdraw, transfer, swap, and bridge from the shielded balance
* Host wallet delegate for EVM, Solana, and Tron signing
* JSON-string boundary, so lists batch in a single call
* Feature parity with the iOS SDK

### Installation

```kotlin
implementation("io.hinkal:hinkal-android:0.1.0")
```

```kotlin
import io.hinkal.mobile.Mobile
```

### Quick Example

```kotlin
val client = Mobile.newClient()
val address = client.connect(WalletHost(yourWallet))
val hinkal = client.hinkal()

val wei = Mobile.amountToWei(chainId, tokenAddress, "1.0")
val result = hinkal.deposit(
    chainId,
    "[\"$tokenAddress\"]",
    "[\"$wei\"]",
    true,
    false,
)
```

### Core Operations

<table data-search="false"><thead><tr><th>Method</th><th>Purpose</th></tr></thead><tbody><tr><td><code>deposit</code></td><td>Public to private</td></tr><tr><td><code>withdraw</code></td><td>Private to public</td></tr><tr><td><code>transfer</code></td><td>Private to private</td></tr><tr><td><code>swap</code></td><td>Private swap</td></tr><tr><td><code>bridgePrivateToPrivate</code></td><td>Private to private across chains</td></tr><tr><td><code>getTotalBalance</code></td><td>Shielded balance</td></tr><tr><td><code>getRecipientInfo</code></td><td>Private address for the identity</td></tr></tbody></table>

### Documentation

#### Getting Started

* [Installation](/hinkal/hinkal-mobile-sdk/android/installation.md)
* [Getting Started](/hinkal/hinkal-mobile-sdk/android/getting-started.md)

#### Guides

* [Deposits](/hinkal/hinkal-mobile-sdk/android/guides/deposits.md)
* [Withdrawals](/hinkal/hinkal-mobile-sdk/android/guides/withdrawals.md)
* [Transfers](/hinkal/hinkal-mobile-sdk/android/guides/transfers.md)
* [Swaps](/hinkal/hinkal-mobile-sdk/android/guides/swaps.md)
* [Balances](/hinkal/hinkal-mobile-sdk/android/guides/balances.md)
* [Multi-Chain](/hinkal/hinkal-mobile-sdk/android/guides/multi-chain.md)
* [Wallet Integration](/hinkal/hinkal-mobile-sdk/android/guides/wallet-integration.md)
* [Error Handling](/hinkal/hinkal-mobile-sdk/android/guides/error-handling.md)

#### Advanced

* [Performance](/hinkal/hinkal-mobile-sdk/android/advanced/performance.md)
* [Error Handling Patterns](/hinkal/hinkal-mobile-sdk/android/advanced/error-handling-patterns.md)

#### Reference

* [API Reference](/hinkal/hinkal-mobile-sdk/android/api-reference.md)

### Requirements

* minSdk 21
* ABIs: `arm64-v8a`, `x86_64`

### Related

* iOS SDK
