For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation

Get up and running with WalletConnect so your dapp can connect to Freighter Mobile.

Prerequisites

  1. Sign up at WalletConnect Dashboard and create a project to get your Project ID.

  2. Choose an installation method below.

npm / yarn

npm install @walletconnect/universal-provider @reown/appkit
yarn add @walletconnect/universal-provider @reown/appkit

Then initialize the provider and modal:

import { UniversalProvider } from "@walletconnect/universal-provider";
import { createAppKit } from "@reown/appkit/core";
import { mainnet } from "@reown/appkit/networks";

const projectId = "YOUR_PROJECT_ID";

// Provider — handles the WalletConnect protocol
const provider = await UniversalProvider.init({
  projectId,
  metadata: {
    name: "My Stellar Dapp",
    description: "A dapp that integrates with Freighter Mobile",
    url: "https://my-dapp.com",
    icons: ["https://my-dapp.com/icon.png"],
  },
});

// Modal — displays the QR code and wallet list.
// AppKit requires at least one network. Stellar is not built-in,
// so we pass a placeholder. With manualWCControl the modal won't
// use it for chain switching.
const modal = createAppKit({
  projectId,
  networks: [mainnet],
  universalProvider: provider,
  manualWCControl: true,
});

Next steps

I want to...
Go to

Connect to Freighter Mobile

Connecting

Sign a transaction

Signing

Feature Freighter upfront in the modal

Featuring Freighter

Alternatives

Stellar Wallets Kit provides a multi-wallet interface that includes WalletConnect support, but currently only supports stellar_signXDR and stellar_signAndSubmitXDR. To use all four Freighter Mobile methods — including stellar_signMessage and stellar_signAuthEntry — implement the WalletConnect integration directly as shown in this guide.

Older examples may use @walletconnect/sign-client directly. That approach still works, but @walletconnect/universal-provider is the actively documented package. For more details, see the UniversalProvider docs and the AppKit modal migration guide.

Last updated

Was this helpful?