> For the complete documentation index, see [llms.txt](https://docs.vechain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vechain.org/developer-resources/sdks-and-providers/react-native-wallet-link/network-configuration.md).

# Network Configuration

## Overview

The `@vechain/react-native-wallet-link` library allows you to connect your dApp to **any VeChain network** — including **Mainnet**, **Testnet**, or a **custom node** (e.g., for local development or staging).\
The network node is passed as the `node` prop in the `VeWorldProvider` component.

***

## Supported Networks

You can import VeChain’s default node URLs directly from `@vechain/sdk-network`:

```ts
import { MAINNET_URL, TESTNET_URL } from '@vechain/sdk-network';
```

### 🟢 Mainnet

Use when deploying your app to production.

```tsx
<VeWorldProvider
  appName="My VeChain App"
  appUrl="https://myvechainapp.com"
  redirectUrl={Linking.createURL('/', { scheme: 'myvechainapp' })}
  node={MAINNET_URL}
  config={/* event handlers */}
>
  {/* App */}
</VeWorldProvider>
```

* **Purpose:** Real VeChain transactions
* **Network ID:** 1
* **Explorer:** <https://explore.vechain.org>

***

### 🧪 Testnet

Use during development and testing.

```tsx
<VeWorldProvider
  appName="My Test App"
  appUrl="https://mytestapp.com"
  redirectUrl={Linking.createURL('/', { scheme: 'mytestapp' })}
  node={TESTNET_URL}
  config={/* event handlers */}
>
  {/* App */}
</VeWorldProvider>
```

* **Purpose:** Safe test environment with free tokens
* **Network ID:** 100009
* **Explorer:** <https://explore-testnet.vechain.org>

***

### ⚙️ Custom Node

You can also connect to your own VeChain Thor node or a private network.

```tsx
<VeWorldProvider
  appName="Custom Node App"
  appUrl="https://customapp.com"
  redirectUrl={Linking.createURL('/', { scheme: 'customapp' })}
  node="https://my-custom-vechain-node.com"
  config={/* event handlers */}
>
  {/* App */}
</VeWorldProvider>
```

> 💡 Tip: Always ensure your custom node supports HTTPS and CORS for mobile app communication.

***

## Environment Management

You can dynamically switch networks at runtime based on environment variables.

Example using `react-native-dotenv`:

```tsx
import { MAINNET_URL, TESTNET_URL } from '@vechain/sdk-network';
import { VeWorldProvider } from '@vechain/react-native-wallet-link';

const NODE_URL = process.env.NODE_ENV === 'production' ? MAINNET_URL : TESTNET_URL;

<VeWorldProvider
  appName="Dynamic Network App"
  appUrl="https://dynamicapp.com"
  redirectUrl={Linking.createURL('/', { scheme: 'dynamicapp' })}
  node={NODE_URL}
  config={/* event handlers */}
>
  {/* App */}
</VeWorldProvider>
```

This ensures that your test builds use Testnet and production builds automatically connect to Mainnet.

***

[← Back: Error Handling](https://github.com/vechain/vechain-docs/blob/main/developer-resources/sdks-and-providers/react-native-wallet-link/06-error-handling.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vechain.org/developer-resources/sdks-and-providers/react-native-wallet-link/network-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
