> ## 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 Flutter 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.

```dart theme={"system"}
import 'package:dynamic_sdk/dynamic_sdk.dart';

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

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

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

DynamicSDK.init(
  props: ClientProps(
    environmentId: 'REPLACE_WITH_YOUR_ENV_ID',
    appOrigin: 'https://your-app.com',
    solNetworks: solNetworks,
    bitcoinNetworks: bitcoinNetworks,
    tonNetworks: tonNetworks,
  ),
);
```

<Note>
  In the `GenericNetwork` constructor, `chainId` and `networkId` accept either an `int` or a `String`. `decimals` is a `double` in the Flutter SDK, but you can pass an integer literal such as `9`. `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  | `double`  | Required          |
| denom     | `String?` | Optional          |
| name      | `String`  | Required          |
| symbol    | `String`  | Required          |

## Next Steps

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