Skip to Content
On this page

This page summarizes the types used by partner integrations with @dogeos/dogeos-sdk v4. Configuration excerpts show the supported partner options; import types from the package instead of copying these declarations.

Configuration#

WalletConnectKitConfig#

interface WalletConnectKitConfig { connectors?: Awaited<GetConnectorsReturnType> chains?: Awaited<GetChainsReturnType> defaultConnectChain?: ChainType walletConnectProjectId?: string metadata?: { name: string description: string url: string icons: string[] } clientId: string theme?: ThemeConfig login?: UserLoginConfig }
FieldRequiredDescription
clientIdYesPublic Sandbox or Live client ID from the developer console
connectorsNoWalletConfig[] returned by getConnectors()
chainsNoChain map returned by getChains() or supplied by your app
defaultConnectChainNoInitial chain family, such as "evm"
walletConnectProjectIdNoYour own project ID; omitted or blank disables WalletConnect
metadataNoWalletConnect dApp metadata
themeNoSDK colors and light/dark mode
loginNoEmail, external wallet, Google, and X login configuration

UserLoginConfig#

interface UserLoginConfig { basicLogins?: BasicLoginType[] socialLogins?: SocialLoginProvider[] } type BasicLoginType = "email" | "externalWallets" type SocialLoginType = "google" | "x" interface SocialLoginProvider { type: SocialLoginType }

When login is omitted, the SDK enables email, external wallets, Google, and X. Each missing array retains its defaults; pass [] to disable that group. Social entries select the displayed methods; DogeOS manages authentication.

ThemeConfig#

Use WalletConnectKitConfig["theme"] or import ThemeConfig for typed configuration. defaultTheme selects light/dark mode; themes.light.colors and themes.dark.colors customize colors. See Theme.

Chains#

ChainType#

type ChainType = Exclude<AdaptorChainType, "all">

Common DogeOS values:

ValueUse
"evm"DogeOS Chikyū Testnet and other EVM chains
"solana"Solana wallet provider connections
"dogecoin"Dogecoin wallet provider connections

An enum value alone does not guarantee that a connected wallet supports that chain family or all its methods.

Chain#

type Chain = { id: number name: string nativeCurrency: { name: string symbol: string decimals: number } rpcUrls: { default: { http: readonly string[] } } blockExplorers?: { default: { name: string url: string } } testnet?: boolean chainInfo?: ChainInfo }

The v4 Chain declaration uses a numeric id. Use it for custom EVM chains. For Solana and Dogecoin configuration, use the entries returned by getChains() rather than constructing string-ID values as Chain; see Dynamic Chains.

ChainInfo#

type ChainInfo = { icon: string | React.ComponentType<React.SVGProps<SVGSVGElement> | { className?: string }> | null name: string }

chainInfo is display metadata used by SDK UI.

GetChainsReturnType#

type GetChainsReturnType = Promise<Partial<Record<ChainType, EvmChain[] | Chain[]>>>

getChains() resolves to this type.

Wallets#

WalletConnector#

type WalletConnector = Connector & { providers?: any isEmbeddedWallet?: boolean logout?: () => Promise<boolean> }

This is the runtime wallet object used internally by the SDK and accepted by connect(). It is not the same as WalletConfig.

WalletProvider#

import type { WalletProvider } from "@dogeos/dogeos-sdk"

For the provider returned by useAccount(), use UseAccount["currentProvider"]. The connected wallet determines which methods are available.

GetConnectorsReturnType#

type GetConnectorsReturnType = Promise<WalletConfig[]>

getConnectors() resolves to wallet configuration entries that can be passed to WalletConnectKitConfig.connectors.

Connection#

ConnectVariables#

interface ConnectVariables { wallet: WalletConnector chainType: ChainType chainId?: string }

For EVM connections, chainId can select a configured EVM chain during connect(). If it is omitted, the SDK uses the first configured EVM chain. Use switchChain() after connection when the user needs to move to a different chain interactively.

ConnectData#

interface ConnectData { address: string chainId: string chainType: ChainType }

ConnectErrorType#

type ConnectErrorType = Error

ConnectionStatus#

type ConnectionStatus = "disconnected" | "connecting" | "connected"

Returned by useWalletConnect().connectionStatus.

WalletStatus#

type WalletStatus = "disabled" | "initializing" | "ready" | "unavailable" | "error"

Returned by useWalletConnect().walletStatus. It describes embedded wallet readiness, not whether a user account is connected.

Account Actions#

UseWalletConnect#

type UseWalletConnect = { isOpenModal: boolean connectionStatus: ConnectionStatus isConnected: boolean isConnecting: boolean isDisconnected: boolean error: string walletStatus: WalletStatus isWalletReady: boolean isWalletLoading: boolean connect: (variables: ConnectVariables) => Promise<ConnectData> disconnect: () => Promise<void> openModal: () => void closeModal: () => void }

UseAccount#

import type { UseAccount } from "@dogeos/dogeos-sdk" type CurrentProvider = UseAccount["currentProvider"]

The hook returns account identity, the current wallet/provider, and chain-switching and signing actions. See useAccount for individual fields. Read live balances through currentProvider; see Core Workflows.

SwitchChainOptions#

type SwitchChainOptions = { chainType: ChainType chainInfo: Chain }

switchChain() asks the current wallet to switch to chainInfo.id. If the wallet reports that the chain is unknown, the SDK attempts to add the chain.

SignInParams#

import type { SignInParams } from "@dogeos/dogeos-sdk"

signInWithWallet() accepts the adapter’s SignInParams type. For EVM, SDK 4.0.4 builds a standard SIWE message using the connected address and selected chain; any supplied address or chain must match. If parameters are omitted, it supplies the current domain, a standard statement, version 1, a cryptographically random fallback nonce, and issuedAt for a signing demonstration.

Production authentication requires a server-issued challenge and server verification. If your server returns a complete message, use signMessage({ message }) to preserve its exact bytes instead of reconstructing it as SignInParams. See Sign In With Wallet.

Enums#

ChainTypeEnum#

enum ChainTypeEnum { BITCOIN = "bitcoin", DOGECOIN = "dogecoin", EVM = "evm", SOLANA = "solana", APTOS = "aptos", COSMOS = "cosmos", TON = "ton", TRON = "tron", SUI = "sui", }

Use ChainTypeEnum.EVM, ChainTypeEnum.SOLANA, or ChainTypeEnum.DOGECOIN for typed chainType and defaultConnectChain values. These evaluate to the strings shown above.

ModalView#

enum ModalView { Loading = "LOADING", WalletList = "WALLET_LIST", WalletSearch = "WALLET_SEARCH", WalletSelectProviders = "WALLET_SELECT_PROVIDERS", WalletInstallGuide = "WALLET_INSTALL_GUIDE", Connecting = "CONNECTING", Error = "ERROR", Account = "ACCOUNT", SelectChains = "SELECT_CHAINS", ChangeNetwork = "CHANGE_NETWORK", SignInWallet = "SIGN_IN_WALLET", WalletConnect = "WALLET_CONNECT", UnsupportChain = "UNSUPPORT_CHAIN", WalletHome = "WALLET_HOME", }

ModalView is primarily useful for SDK UI internals and embedded-wallet display state.

Type Import Summary#

import type { Chain, ChainInfo, ChainType, ConnectData, ConnectErrorType, ConnectVariables, ConnectionStatus, GetChainsReturnType, GetConnectorsReturnType, SignInParams, SwitchChainOptions, ThemeConfig, UseAccount, UseWalletConnect, WalletConnectKitConfig, WalletConnector, WalletProvider, WalletStatus, } from "@dogeos/dogeos-sdk" import { ChainTypeEnum, ModalView } from "@dogeos/dogeos-sdk"