> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding Custom Solana, Bitcoin, and TON Networks

> Configure custom Solana, Bitcoin, and TON networks for the Kotlin SDK at initialization.

You can add Solana, Bitcoin, and TON networks that Dynamic does not support out of the box by passing lists of `GenericNetwork` objects to the `solNetworks`, `bitcoinNetworks`, and `tonNetworks` properties in `ClientProps` when initializing the SDK.

<Warning>
  The `solNetworks`, `bitcoinNetworks`, and `tonNetworks` lists replace the Solana, Bitcoin, and TON networks enabled in your Dynamic dashboard for this session. Pass the full list of networks you want the SDK to use.
</Warning>

## Example

The following example sets Solana Mainnet and Devnet, Bitcoin Mainnet, and TON Mainnet as supported networks. Initialize the SDK from your `Activity` `onCreate`.

```kotlin theme={"system"}
import com.dynamic.sdk.android.DynamicSDK
import com.dynamic.sdk.android.Module.GenericNetwork
import com.dynamic.sdk.android.Module.NativeCurrency
import com.dynamic.sdk.android.core.ClientProps

val solNetworks = listOf(
    GenericNetwork(
        blockExplorerUrls = listOf("https://explorer.solana.com"),
        chainId = "solana:101",
        iconUrls = listOf("https://app.dynamic.xyz/assets/networks/sol.svg"),
        name = "Solana Mainnet",
        nativeCurrency = NativeCurrency(
            decimals = 9,
            name = "Sol",
            symbol = "SOL"
        ),
        networkId = 101,
        rpcUrls = listOf("https://api.mainnet-beta.solana.com"),
        vanityName = "Solana Mainnet"
    ),
    GenericNetwork(
        blockExplorerUrls = listOf("https://explorer.solana.com/?cluster=devnet"),
        chainId = "solana:103",
        iconUrls = listOf("https://app.dynamic.xyz/assets/networks/sol.svg"),
        name = "Solana Devnet",
        nativeCurrency = NativeCurrency(
            decimals = 9,
            name = "Sol",
            symbol = "SOL"
        ),
        networkId = 103,
        rpcUrls = listOf("https://api.devnet.solana.com"),
        vanityName = "Solana Devnet"
    )
)

val bitcoinNetworks = listOf(
    GenericNetwork(
        blockExplorerUrls = listOf("https://mempool.space"),
        chainId = "bip122:000000000019d6689c085ae165831e93",
        iconUrls = listOf("https://app.dynamic.xyz/assets/networks/btc.svg"),
        name = "Bitcoin Mainnet",
        nativeCurrency = NativeCurrency(
            decimals = 8,
            name = "Bitcoin",
            symbol = "BTC"
        ),
        networkId = 0,
        rpcUrls = listOf("https://YOUR_BTC_RPC_URL"),
        vanityName = "Bitcoin"
    )
)

val tonNetworks = listOf(
    GenericNetwork(
        blockExplorerUrls = listOf("https://tonscan.org"),
        chainId = "ton:-239",
        iconUrls = listOf("https://app.dynamic.xyz/assets/networks/ton.svg"),
        name = "TON Mainnet",
        nativeCurrency = NativeCurrency(
            decimals = 9,
            name = "Toncoin",
            symbol = "TON"
        ),
        networkId = -239,
        rpcUrls = listOf("https://toncenter.com/api/v2/jsonRPC"),
        vanityName = "TON Mainnet"
    )
)

val props = ClientProps(
    environmentId = "REPLACE_WITH_YOUR_ENV_ID",
    appOrigin = "https://your-app.com",
    solNetworks = solNetworks,
    bitcoinNetworks = bitcoinNetworks,
    tonNetworks = tonNetworks
)

DynamicSDK.initialize(
    props = props,
    context = applicationContext,
    activity = this
)
```

<Note>
  In the `GenericNetwork` constructor, `chainId` and `networkId` accept an `Int`, `Long`, or `String`. `chainName`, `lcdUrl`, `nameService`, `privateCustomerRpcUrls`, and `vanityName` are optional.
</Note>

## Type Reference

### GenericNetwork

| Attribute              | Type              | Required/Optional |
| ---------------------- | ----------------- | ----------------- |
| blockExplorerUrls      | `List<String>`    | Required          |
| chainId                | `Int` or `String` | Required          |
| iconUrls               | `List<String>`    | Required          |
| name                   | `String`          | Required          |
| nativeCurrency         | `NativeCurrency`  | Required          |
| networkId              | `Int` or `String` | Required          |
| privateCustomerRpcUrls | `List<String>?`   | Optional          |
| rpcUrls                | `List<String>`    | Required          |
| vanityName             | `String?`         | Optional          |

### NativeCurrency

| Attribute | Type     | Required/Optional |
| --------- | -------- | ----------------- |
| decimals  | `Int`    | Required          |
| name      | `String` | Required          |
| symbol    | `String` | Required          |

## Next Steps

* [Network Management](/docs/kotlin/wallets/general/network-management) - Switch networks and read the current network
* [Solana Connection](/docs/kotlin/wallets/solana/connection) - Interact with the Solana blockchain
* [Bitcoin Overview](/docs/kotlin/wallets/bitcoin/overview) - Work with Bitcoin wallets
* [TON Overview](/docs/kotlin/wallets/ton/overview) - Work with TON wallets
