WalletConnectProvider requires a config with your registered client ID. The SDK uses DogeOS production services automatically. The remaining options control your app’s chains, wallet choices, and appearance.
import type { WalletConnectKitConfig } from "@dogeos/dogeos-sdk"
const dogeConfig: WalletConnectKitConfig = {
clientId: "YOUR_DOGEOS_CLIENT_ID",
}Fields#
| Field | Required | Purpose |
|---|---|---|
clientId | Yes | Your registered DogeOS SDK client ID |
chains | No | Chains your app supports, grouped by family |
defaultConnectChain | No | Chain family to show first, such as "evm" |
login | No | Which email, social, and external wallet options appear |
metadata | No | App name, URL, and icon shown in WalletConnect sessions |
walletConnectProjectId | No | Your own WalletConnect project ID, if needed |
theme | No | Colors and light/dark mode |
connectors | No | Custom wallet selection from getConnectors() |
Client ID#
Create a project in the developer console and use its Sandbox or Live client ID for the matching environment. The client ID is public and belongs in your browser configuration.
For local development, use Sandbox and check the project overview for automatic localhost and 127.0.0.1 access. Register hosted origins in the matching environment using their exact scheme, hostname, and port. See Get a Client ID.
Chains#
Configure the chains your app uses. DogeOS Chikyū Testnet belongs under evm; it is separate from the Dogecoin network. Selecting a testnet changes the blockchain your app connects to, while the SDK continues to use its production services.
Save this chain definition in chains.ts:
import type { Chain } from "@dogeos/dogeos-sdk"
export const dogeOSChikyuTestnet = {
id: 6281971,
name: "DogeOS Chikyū Testnet",
nativeCurrency: { name: "DOGE", symbol: "DOGE", decimals: 18 },
rpcUrls: { default: { http: ["https://rpc.testnet.dogeos.com/"] } },
blockExplorers: {
default: {
name: "DogeOS L2Scan",
url: "https://dogeos-testnet.l2scan.co",
},
},
testnet: true,
} satisfies ChainPass it under chains.evm:
import { ChainTypeEnum, type WalletConnectKitConfig } from "@dogeos/dogeos-sdk"
import { dogeOSChikyuTestnet } from "./chains"
export const dogeConfig: WalletConnectKitConfig = {
clientId: "YOUR_DOGEOS_CLIENT_ID",
defaultConnectChain: ChainTypeEnum.EVM,
chains: { evm: [dogeOSChikyuTestnet] },
}Dynamic Chains#
For an app that also supports Solana or Dogecoin, use getChains() to obtain their network entries. This preserves the chain identifiers expected by those wallets. Load the configuration before mounting the provider, and show a retry option if loading fails.
import { ChainTypeEnum, getChains, type WalletConnectKitConfig } from "@dogeos/dogeos-sdk"
import { dogeOSChikyuTestnet } from "./chains"
export async function createDogeConfig(): Promise<WalletConnectKitConfig> {
const { solana, dogecoin } = await getChains()
if (!solana?.length || !dogecoin?.length) {
throw new Error("Required wallet networks are unavailable")
}
return {
clientId: "YOUR_DOGEOS_CLIENT_ID",
defaultConnectChain: ChainTypeEnum.EVM,
chains: { evm: [dogeOSChikyuTestnet], solana, dogecoin },
}
}getChains() rejects if the network request fails or returns no chains. Omit this step when you only need the explicit EVM configuration above.
Connectors#
The provider loads wallet choices automatically. You only need connectors when customizing that selection; obtain the entries with getConnectors(). Handle a rejected request before mounting the provider.
These configuration entries are different from the live WalletConnector accepted by connect(). Use openModal() for the standard connection flow.
Login#
By default, users can sign in with email, Google, or X, or connect an external wallet. DogeOS manages social authentication; you only choose which methods to display.
For example, to show only Google and X:
import type { WalletConnectKitConfig } from "@dogeos/dogeos-sdk"
const dogeConfig: WalletConnectKitConfig = {
clientId: "YOUR_DOGEOS_CLIENT_ID",
login: {
basicLogins: [],
socialLogins: [{ type: "google" }, { type: "x" }],
},
}Each omitted array keeps its default methods. Set an array to [] to disable those methods. To show only external wallets, set basicLogins: ["externalWallets"] and socialLogins: []; see External-Wallet-Only Mode.
WalletConnect#
Set walletConnectProjectId in your provider configuration to enable WalletConnect with your own project. Since 4.0.4, the SDK does not supply a default project ID. If you omit the ID or pass a blank value, WalletConnect is hidden and disabled; email, social login, and supported injected wallets remain available. Create or find your project in the Reown dashboard . This ID is separate from your DogeOS clientId; keep that value unchanged. Supply your app’s metadata so users recognize it in their wallet.
import type { WalletConnectKitConfig } from "@dogeos/dogeos-sdk"
const dogeConfig: WalletConnectKitConfig = {
clientId: "YOUR_DOGEOS_CLIENT_ID",
walletConnectProjectId: "YOUR_WALLETCONNECT_PROJECT_ID",
metadata: {
name: "Your App",
description: "Your DogeOS application",
url: "https://your-app.example",
icons: ["https://your-app.example/icon.png"],
},
}If your WalletConnect project has an origin allowlist, add your app’s production and preview origins. A relay response of Unauthorized: origin not allowed can leave the QR code blank. Allowlist changes can take 15 minutes to apply; see the relay configuration guide .
In Next.js, you can use walletConnectProjectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID! instead of the placeholder above. Set that environment variable in your deployment, then rebuild and redeploy. Use the 4.0.6 installation commands when upgrading from an earlier SDK release. An invalid supplied project ID surfaces a connection error; the SDK does not replace it with another project.
Theme#
Set defaultTheme to your app’s current mode. Supply only the color tokens you want to change; the SDK merges them with its default colors.
import type { WalletConnectKitConfig } from "@dogeos/dogeos-sdk"
const dogeConfig: WalletConnectKitConfig = {
clientId: "YOUR_DOGEOS_CLIENT_ID",
theme: {
defaultTheme: "dark",
themes: {
light: { colors: { primary: { DEFAULT: "#fcd436" } } },
dark: { colors: { primary: { DEFAULT: "#fcd436" }, background: "#0d0d0d" } },
},
},
}Update theme.defaultTheme when your app’s light/dark mode changes.
Style Overrides#
Import @dogeos/dogeos-sdk/style.css once. Use the theme options above for colors and WalletConnectEmbed wrapper props for layout and spacing.
import { WalletConnectEmbed } from "@dogeos/dogeos-sdk"
export function WalletPanel() {
return <WalletConnectEmbed style={{ width: "100%", maxWidth: 448 }} />
}Avoid targeting internal SDK class names. The SDK demo shows an app with a theme toggle and inline wallet panel.
Complete Example#
This configuration connects to Chikyū, uses the default login methods, and enables WalletConnect with your own project ID and app metadata. Import the chains.ts definition above.
import { ChainTypeEnum, type WalletConnectKitConfig } from "@dogeos/dogeos-sdk"
import { dogeOSChikyuTestnet } from "./chains"
export const dogeConfig: WalletConnectKitConfig = {
clientId: "YOUR_DOGEOS_CLIENT_ID",
defaultConnectChain: ChainTypeEnum.EVM,
chains: { evm: [dogeOSChikyuTestnet] },
walletConnectProjectId: "YOUR_WALLETCONNECT_PROJECT_ID",
metadata: {
name: "Your App",
description: "Your DogeOS application",
url: "https://your-app.example",
icons: ["https://your-app.example/icon.png"],
},
}