Skip to Content
SDKAPI ReferenceTypes and Enums

This page summarizes the public types exported from @dogeos/dogeos-sdk.

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 embeddedWalletConfig?: { stage?: EmbeddedWalletStage } }
FieldRequiredDescription
clientIdYesDogeOS SDK client ID from the Partner Interest Form
connectorsNoWalletConfig[] returned by getConnectors()
chainsNoChain map returned by getChains() or supplied by your app
defaultConnectChainNoInitial chain family, such as "evm"
walletConnectProjectIdNoWalletConnect Cloud project ID
metadataNoWalletConnect dApp metadata
themeNoTomo UI theme configuration
loginNoEmail, external wallet, Google, and X login configuration
embeddedWalletConfigNoEmbedded wallet environment configuration

UserLoginConfig

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

When login is omitted, the SDK enables email, external wallets, Google, and X. When login is present, missing arrays default to [].

ThemeConfig

ThemeConfig is re-exported from the underlying Tomo UI theme type. The SDK deep-merges your light/dark colors overrides with its base theme.

type ThemeConfig = TomoThemeConfig

EmbeddedWalletStage

type EmbeddedWalletStage = "prod-dogeos" | "prod" | "pre" | "dev"

The default is "prod-dogeos".

Chains

ChainType

type ChainType = Exclude<AdaptorChainType, "all">

Common DogeOS values:

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

The underlying adapter also includes other chain families such as "solana" and "aptos", but DogeOS docs focus on EVM and Dogecoin flows.

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 }

Use this shape for non-EVM chain entries and custom EVM chain entries that you pass to the SDK.

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

export type { WalletProvider } from "@tomo-inc/inject-providers"

WalletProvider describes runtime providers exposed by the adapter layer and returned as currentProvider.

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 }

chainId is present in the public type, but the current connection implementation derives the connected chain from the wallet adapter result. Use switchChain() after connection when you need to move to a specific chain.

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

type UseAccount = { address: string balance?: string chainType?: ChainType chainId?: string currentWallet?: Connector | null currentProvider?: WalletProvider | null switchChain: (options: SwitchChainOptions) => Promise<boolean> signMessage?: (params: { message: string; nonce?: string }) => Promise<string | Uint8Array> signInWithWallet: (params?: WalletSignInParams) => Promise<string | Uint8Array> }

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

export type { SignInParams } from "@tomo-inc/wallet-adaptor-base"

signInWithWallet() accepts the adapter’s SignInParams type. If omitted, the SDK builds a default payload with the current domain, a standard statement, version 1, a random nonce, and issuedAt.

Enums

ChainTypeEnum

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

You can use the enum, but string literals such as "evm" and "dogecoin" are usually clearer in app code.

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, EmbeddedWalletStage, GetChainsReturnType, GetConnectorsReturnType, SignInParams, SwitchChainOptions, ThemeConfig, UseAccount, UseWalletConnect, WalletConnectKitConfig, WalletConnector, WalletProvider, WalletStatus, } from "@dogeos/dogeos-sdk" import { ChainTypeEnum, ModalView } from "@dogeos/dogeos-sdk"