# How to manage TON wallets with WalletKit on the Android platform (https://docs-fpm2731fy-ton-core-docs.vercel.app/llms/ecosystem/walletkit/android/wallets/content.md)



<Callout type="tip">
  Initialize the WalletKit before managing wallets. See the [initialization guide](/llms/ecosystem/walletkit/android/init/content.md) for details.
</Callout>

The SDK provides a comprehensive API for creating, retrieving, and managing wallets. All wallet operations follow a three-step pattern.

## Creation pattern [#creation-pattern]

The SDK uses a three-step pattern for creating wallets, providing fine-grained control over key management and wallet configuration:

1. Create a signer: generate or import cryptographic keys
2. Create an adapter: configure wallet version and network settings
3. Add the wallet: register the wallet with the SDK

## Creating wallets from mnemonic [#creating-wallets-from-mnemonic]

Import an existing wallet from a mnemonic:

```kotlin
val mnemonic = listOf("word1", "word2", /* ... 24 words ... */)
val signer = walletKit.createSignerFromMnemonic(mnemonic)
val adapter = walletKit.createV5R1Adapter(
    signer = signer,
    network = TONNetwork.MAINNET
)
val wallet = walletKit.addWallet(adapter.adapterId)
```

<Callout type="danger">
  Always store mnemonic phrases securely using platform-specific encrypted storage. Never store them in plain text or as part of the code.
</Callout>

## Creating wallets from secret key [#creating-wallets-from-secret-key]

For externally managed keys:

```kotlin
val secretKey = /* 32-byte secret key as ByteArray */
val signer = walletKit.createSignerFromSecretKey(secretKey)
val adapter = walletKit.createV5R1Adapter(
    signer = signer,
    network = TONNetwork.MAINNET
)
val wallet = walletKit.addWallet(adapter.adapterId)
```

## Wallet versions [#wallet-versions]

The SDK supports multiple wallet contract versions: V5R1 and V4R2.

### V5R1 (Recommended) [#v5r1-recommended]

The latest wallet version with improved features and gas optimization:

```kotlin
val adapter = walletKit.createV5R1Adapter(
    signer = signer,
    network = TONNetwork.MAINNET
)
```

### V4R2 (Compatible) [#v4r2-compatible]

Widely supported legacy version:

```kotlin
val adapter = walletKit.createV4R2Adapter(
    signer = signer,
    network = TONNetwork.MAINNET
)
```

## Retrieving wallets [#retrieving-wallets]

Get all wallets managed by the SDK:

```kotlin
val wallets = walletKit.getWallets()
```

Get a specific wallet by an address:

```kotlin
val wallet = walletKit.getWallet("<TON_WALLET_ADDRESS>")
```

## Removing wallets [#removing-wallets]

Remove a single wallet:

```kotlin
walletKit.removeWallet("<TON_WALLET_ADDRESS>")
```

## Next steps [#next-steps]

<Columns cols="2">
  <Card title="Handle events" href="./events">
    Learn how to handle dApp connections and other events
  </Card>

  <Card title="Retrieve wallet data" href="./data">
    Get balances, Jettons, and NFTs
  </Card>
</Columns>
