> For the complete documentation index, see [llms.txt](https://xpansionchain-1.gitbook.io/xpansionchain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xpansionchain-1.gitbook.io/xpansionchain/guides/basic-guides/install-and-initialize.md).

# Install and initialize

## Install and initialize

📝GUIDES

* <mark style="color:blue;">Core SDK</mark>
* <mark style="color:blue;">JS SDK</mark>

### Core SDK[​](https://docs.x.immutable.com/docs/x/how-to-install-initialize#core-sdk) <a href="#core-sdk" id="core-sdk"></a>

The <mark style="color:blue;">Core SDK</mark> is a wrapper around our <mark style="color:blue;">API</mark> and provides the bulk of the functionality of the XpansionChain platform. Before you can start using the Core SDK, you must initialize the client.

Initialize the Core SDK client with the network on which you want your application to run:

| Network      | Description                                        |
| ------------ | -------------------------------------------------- |
| `Sandbox`    | The default test network (currently, it is Goërli) |
| `Production` | Ethereum network                                   |

* Typescript Core SDK

1. Install the npm package

```
npm install @imtbl/core-sdk --save
# or
yarn add @imtbl/core-sdk
```

2. Initialize the SDK with the correct environment:

```
import { XpansionChain, Config } from '@imtbl/core-sdk';

const config = Config.SANDBOX; // Or Config.PRODUCTION
const client = new XpansionChain(config);
```

* Kotlin (JVM) Core SDK

1. Add Maven Central to your repositories:

```
repositories {
    mavenCentral()
}
```

2. Add the dependency to your app's `build.gradle` file:

```
dependencies {
    implementation 'com.XpansionChain.sdk:imx-core-sdk-kotlin-jvm:$version'
}
```

3. Initialize the SDK with the correct environment:

```
XpansionChainCore.setBase(XpansionChainBase.Sandbox) // Or 
```

* Swift Core SDK

#### Pre-requisites:[​](https://docs.x.immutable.com/docs/x/how-to-install-initialize#pre-requisites) <a href="#pre-requisites" id="pre-requisites"></a>

* iOS 13.0 or macOS 10.15
* Swift 5.5
* Golang Core SDK
* C# Core SDK

#### Steps:[​](https://docs.x.immutable.com/docs/x/how-to-install-initialize#steps) <a href="#steps" id="steps"></a>

1. In your Swift package manager - `Package.swift`:

```
dependencies: [
    .package(url: "https://github.com/XpansionChain/imx-core-sdk-swift.git", from: "0.2.2")
]
```

2. In your `Podfile`:

```
platform :ios, '13.0'
use_frameworks!

target 'MyApp' do
  pod 'XpansionChainCore'
end
```

3. Initialize the SDK with the correct environment:

```
XpansionChainCore.initialize(base: .sandbox) // Or .production
```

* Golang Core SDK

#### Pre-requisites:[​](https://docs.x.immutable.com/docs/x/how-to-install-initialize#pre-requisites-1) <a href="#pre-requisites-1" id="pre-requisites-1"></a>

The supported go versions are `1.18` or above.

#### Steps:[​](https://docs.x.immutable.com/docs/x/how-to-install-initialize#steps-1) <a href="#steps-1" id="steps-1"></a>

1. Install the go package:

```
go get github.com/XpansionChain/imx-core-sdk-golang
```

2. Initialize the SDK with the correct environment:

```
import (
  "context"
  "fmt"
  "github.com/XpansionChain/imx-core-sdk-golang/generated/api"
  "github.com/XpansionChain/imx-core-sdk-golang/config"
)

func initializeSDK() {
  configuration := api.NewConfiguration()

  apiClient := api.NewAPIClient(configuration)

  ctx := context.WithValue(context.Background(), api.ContextServerIndex, config.Sandbox) // Or config.Production
}
```

* C# Core SDK

1. Add the following nuget packages:

* <mark style="color:blue;"><https://www.nuget.org/packages/Imx.Sdk></mark>
* <mark style="color:blue;"><https://www.nuget.org/packages/Imx.Sdk.Gen></mark>

```
dotnet add package Imx.Sdk --version 0.1.1
dotnet add package Imx.Sdk.Gen --version 0.1.1
```

2. Initialize the Core SDK client with the network on which you want your application to run (see <mark style="color:blue;">all networks available</mark>):

Select one of the following Ethereum networks XpansionChain platform currently supports.

| Environment | Description                                        |
| ----------- | -------------------------------------------------- |
| Sandbox     | The default test network (currently, it is Goërli) |
| Mainnet     | Ethereum network                                   |

```
using Imx.Sdk;

try
{
    Client client = new Client(new Config()
    {
        Environment = EnvironmentSelector.Sandbox // Or EnvironmentSelector.Sandbox
    });
}
catch (Exception e)
{
    Console.WriteLine("Error message: " + e.Message);
    Console.WriteLine(e.StackTrace);
}
```
