> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trustware.io/llms.txt
> Use this file to discover all available pages before exploring further.

# WalletConnect configuration for Trustware

> Override the WalletConnect connector settings in the Trustware SDK: project ID, supported chains, dApp metadata, relay URL, QR modal, or disable it entirely.

The Trustware SDK includes WalletConnect support out of the box via the Reown AppKit Universal Connector. A built-in project ID and sane defaults are provided, so in most cases you do not need to touch `walletConnect` at all. This page covers when and how to override those defaults.

## WalletConnectConfig type

```ts theme={null}
type WalletConnectConfig = {
  projectId?: string;
  chains?: number[];
  optionalChains?: number[];
  metadata?: {
    name: string;
    description?: string;
    url: string;
    icons?: string[];
  };
  relayUrl?: string;
  showQrModal?: boolean;
  disabled?: boolean;
};
```

## Properties

<ParamField path="walletConnect.projectId" type="string">
  Your WalletConnect Cloud project ID. The SDK ships with a Trustware-managed
  default that works out of the box. Override only if you want to track your
  dApp's WalletConnect stats with your own ID.
</ParamField>

<ParamField path="walletConnect.chains" type="number[]" default="[1]">
  The primary chain IDs the connector will support. Defaults to `[1]`
  (Ethereum mainnet).
</ParamField>

<ParamField path="walletConnect.optionalChains" type="number[]">
  Additional chain IDs that the connector advertises as optional. Wallets that
  support these chains can switch to them without being required to at
  connection time.
</ParamField>

<ParamField path="walletConnect.metadata" type="object">
  Metadata for your dApp or business, shown inside the wallet during a
  WalletConnect session. If omitted, the connector uses generic Trustware
  defaults.

  <ParamField path="walletConnect.metadata.name" type="string" required>
    The display name of your dApp or business shown in the wallet.
  </ParamField>

  <ParamField path="walletConnect.metadata.description" type="string">
    A short description of your dApp or business.
  </ParamField>

  <ParamField path="walletConnect.metadata.url" type="string" required>
    The canonical URL of your dApp or business. Must be a valid https URL.
  </ParamField>

  <ParamField path="walletConnect.metadata.icons" type="string[]">
    An array of icon URLs for your dApp or business. The wallet will use the
    first icon in the list.
  </ParamField>
</ParamField>

<ParamField path="walletConnect.relayUrl" type="string">
  Override the WalletConnect relay server URL. Defaults to WalletConnect's
  public relay. Only change this if you are running a private relay.
</ParamField>

<ParamField path="walletConnect.showQrModal" type="boolean" default="true">
  Controls whether the SDK renders its built-in QR modal when initiating a
  WalletConnect session. Set to `false` if you want to handle the QR display
  yourself.
</ParamField>

<ParamField path="walletConnect.disabled" type="boolean" default="false">
  Set to `true` to disable WalletConnect entirely. The connector will not be
  initialized and will not appear as a connection option in the widget. Useful
  when your app already owns wallet state and you are using the host wallet
  integration pattern.
</ParamField>

## When to configure vs leave as default

**Leave as default when:**

* You are prototyping or building an internal tool.
* You are using the drop-in widget pattern and want the shortest path to production.

**Override when:**

* You want your own WalletConnect dashboard stats for your dApp (optional; the Trustware-managed project ID works in production).
* You want your dApp name and icon to appear correctly inside connected wallets.
* You are using the host wallet integration pattern and want to disable WalletConnect to avoid duplicate connection UI.

## WalletConnect via Reown AppKit

WalletConnect is handled internally through the [Reown AppKit Universal Connector](https://reown.com/appkit). The connector is initialized once when `TrustwareProvider` mounts. You do not need to install or configure AppKit directly; the SDK manages the integration for you.

<Note>
  All WalletConnect behavior in the current SDK version goes through the
  Reown AppKit Universal Connector. You do not need to install or configure
  AppKit separately.
</Note>

## Example

```ts theme={null}
const config = {
  apiKey: process.env.NEXT_PUBLIC_TRUSTWARE_API_KEY!,
  routes: {
    toChain: "8453",
    toToken: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
  },
  walletConnect: {
    projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID!,
    chains: [1, 8453],
    optionalChains: [137, 42161],
    metadata: {
      name: "My App",
      description: "Accept deposits and transactions from any asset on any chain.",
      url: "https://myapp.example.com",
      icons: ["https://myapp.example.com/icon.png"],
    },
  },
} satisfies TrustwareConfigOptions;
```

### Disable WalletConnect for host-wallet integrations

```ts theme={null}
const config = {
  apiKey: process.env.NEXT_PUBLIC_TRUSTWARE_API_KEY!,
  routes: {
    toChain: "8453",
    toToken: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
  },
  walletConnect: {
    disabled: true,
  },
} satisfies TrustwareConfigOptions;
```
