# Blocks SDK

### Go live with the React SDK

To move your React Blocks SDK integration to mainnet, update **three network-specific values**.

{% hint style="warning" %}
Do not mix testnet and mainnet values.

If one value still points to testnet, the flow can fail.
{% endhint %}

{% stepper %}
{% step %}

### Use the mainnet asset issuer

Your escrow asset must use the **mainnet issuer address**.

If you send a testnet issuer, such as testnet USDC, it will not work on mainnet.

Review the issuer addresses here:

{% content-ref url="/pages/nEiYOyWRTKGdGK2Vj8Ne" %}
[Trustlines](/trustless-work/v2-en/introduction/stellar-and-soroban-the-backbone-of-trustless-work/trustlines.md)
{% endcontent-ref %}
{% endstep %}

{% step %}

### Change the provider base URL to mainnet

In your `TrustlessWorkProvider`, update `baseURL` from `development` to `mainNet`.

Use the provider setup shown in [Getting Started](/trustless-work/escrow-react-sdk/getting-started.md), but switch the network value before going live.

{% code title="src/trustless-work-provider.tsx" overflow="wrap" fullWidth="true" %}

```typescript
"use client";

import React from "react";
import {
  development,
  mainNet,
  TrustlessWorkConfig,
} from "@trustless-work/escrow";

interface TrustlessWorkProviderProps {
  children: React.ReactNode;
}

export function TrustlessWorkProvider({
  children,
}: TrustlessWorkProviderProps) {
  const apiKey = process.env.NEXT_PUBLIC_API_KEY || "";

  return (
    <TrustlessWorkConfig baseURL={mainNet} apiKey={apiKey}>
      {children}
    </TrustlessWorkConfig>
  );
}
```

{% endcode %}

{% hint style="info" %}
`development` points to testnet.

`mainNet` points to production.
{% endhint %}
{% endstep %}

{% step %}

### Generate a mainnet API key

Mainnet requires a **mainnet API key**.

A testnet API key will not authenticate against the mainnet environment.

When requesting the key in the dApp, switch to the **Mainnet** tab first.

Then request and store the key securely.

See the full process here:

{% content-ref url="/pages/rk6FfPZG0cVD1uYYThg4" %}
[Request API Key](/trustless-work/v2-en/introduction/developer-resources/request-api-key.md)
{% endcontent-ref %}
{% endstep %}
{% endstepper %}

### Mainnet checklist

Before shipping your React app, confirm this:

* Your asset issuer is the **mainnet** issuer.
* Your provider uses `baseURL={mainNet}`.
* Your API key was generated from the **Mainnet** tab.
* The wallets involved have the correct **mainnet trustlines**.

{% hint style="success" %}
If these four checks pass, your React SDK integration is ready for production.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.trustlesswork.com/trustless-work/v2-en/go-to-mainnet/blocks-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
