Installation
Prerequisites
npm / yarn
npm install @walletconnect/universal-provider @reown/appkityarn add @walletconnect/universal-provider @reown/appkitimport { 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
Alternatives
Last updated
Was this helpful?
