> For the complete documentation index, see [llms.txt](https://docs.everos.dev/ever-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.everos.dev/ever-sdk/guides/configuration/endpoint-configuration.md).

# Endpoint Configuration

## Create TONClient

`TONClient` is the main class of Ever SDK Library. To start using library one needs to create and setup a TONClient instance.

The simplest initialization code can look like this: just specify the endpoint.

Other parameters are used by default. See the reference below for more info.

```javascript
const client = new TonClient({
network: { 
    endpoints: [
        'your-endpoint-here'
    ] 
    } 
});
```

## How to get my endpoint?

### Local node

If you want to work with [local blockchain Evernode-SE](https://github.com/everx-labs/evernode-se), specify <http://localhost> in the `endpoints`

```javascript
const client = new TonClient({
network: { 
    endpoints: [
        'http://localhost'
    ] 
    } 
});
```

### Evercloud

If you don't want to manage your own infrastructure - get your Evercloud endpoints **for free** to Mainnet and Devnet and configure security settings here <https://docs.everplatform.dev/products/evercloud/get-started>.

Check the full list of [supported networks](https://docs.everplatform.dev/reference/graphql-api/networks).

```javascript
const client = new TonClient({
network: { 
    endpoints: [
        'http://mainnet.evercloud.dev/your-project-id-here/graphql'
    ] 
    // access_key: "your-secret-here(optional, if you enabled "secret required" in your project)"
    } 
});
```

### Self-hosted dedicated node

If you want to run your own dedicated node yourself - see the[ Evernode-DS documentation ](https://docs.everplatform.dev/products/dapp-server-ds)how to run your dedicated node.

### Dedicated Evercloud

If you want your dedicated set of nodes to be run by Evernode Platform team, check this page <https://docs.everplatform.dev/products/dedicated-cloud-node>.

## Multiple endpoints configuration

If you have multiple endpoints in the same network, you can specify them all.

Library will automatically perform balancing based on endpoint health checks and availability.

```javascript
const client = new TonClient({
network: { 
    endpoints: [
        'ENDPOINT_URL1', 
        'ENDPOINT_URL2', 
        'ENDPOINT_URL3'
    ] 
    } 
});
```

You can also configure the message broadcast - how many nodes you want your message to be sent (it may improve delivery rate) like this.

```javascript
const client = new TonClient({
network: { 
    endpoints: [
        'ENDPOINT_URL1', 
        'ENDPOINT_URL2', 
        'ENDPOINT_URL3'
    ] 
    sending_endpoint_count: 3
    } 
});
```
