Skip to main content

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.

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

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

Properties

walletConnect.projectId
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.
walletConnect.chains
number[]
default:"[1]"
The primary chain IDs the connector will support. Defaults to [1] (Ethereum mainnet).
walletConnect.optionalChains
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.
walletConnect.metadata
object
Metadata for your dApp or business, shown inside the wallet during a WalletConnect session. If omitted, the connector uses generic Trustware defaults.
walletConnect.metadata.name
string
required
The display name of your dApp or business shown in the wallet.
walletConnect.metadata.description
string
A short description of your dApp or business.
walletConnect.metadata.url
string
required
The canonical URL of your dApp or business. Must be a valid https URL.
walletConnect.metadata.icons
string[]
An array of icon URLs for your dApp or business. The wallet will use the first icon in the list.
walletConnect.relayUrl
string
Override the WalletConnect relay server URL. Defaults to WalletConnect’s public relay. Only change this if you are running a private relay.
walletConnect.showQrModal
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.
walletConnect.disabled
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.

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. 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.
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.

Example

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

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