import { LogLevel } from '@dynamic-labs/logger'; import type { EvmNetwork, GenericNetwork } from '@dynamic-labs/types'; import type { LocaleResource } from '@dynamic-labs/locale'; /** * Defines the settings required by the SDK to be properly initialized * inside the webview */ export type ClientManifest = { apiBaseUrl?: string; appLogoUrl?: string; appName?: string; /** * The web origin of the app (e.g., 'https://demo.dynamic.xyz'). * Used for SIWE messages, fetch Origin headers, and passkey operations. * Note: Deep link redirects use the auto-configured redirectUrl. */ appOrigin?: string; clientVersion: string; cssOverrides?: string; environmentId: string; /** * Overrides for EVM networks. When provided, merges with the dashboard * networks (custom entries win on chainId conflicts). Updating this field * at runtime swaps the RPC URLs without rebuilding the SDK client. */ evmNetworks?: EvmNetwork[]; /** * Overrides for Solana networks. See `evmNetworks` for merge semantics. */ solNetworks?: GenericNetwork[]; /** * Overrides for Bitcoin networks. See `evmNetworks` for merge semantics. */ bitcoinNetworks?: GenericNetwork[]; /** * Overrides for TON networks. See `evmNetworks` for merge semantics. */ tonNetworks?: GenericNetwork[]; platform: 'browser' | 'react-native' | 'flutter' | 'swift' | 'kotlin' | 'unity'; redirectUrl: string; globalWallets?: ('droplet' | 'sei')[]; locale?: LocaleResource; debug?: { webview?: boolean; messageTransport?: boolean; loggerLevel?: LogLevel; }; /** * If true, enables connect-only mode where users can connect wallets * without signing a message. This is useful for React Native apps where * you want to allow wallet connections without full authentication. */ connectOnly?: boolean; /** * Controls the device registration modal behavior. * When set to { enabled: false }, the SDK will not automatically show the * device registration modal. * @default { enabled: true } */ deviceRegistrationModal?: { enabled: boolean; }; /** * If true, use MetaMask SDK for MetaMask connections. * If false or undefined, use WalletConnect for MetaMask connections. * Only applies to mobile platforms (react-native, flutter, swift). * @default false */ useMetamaskSdk?: boolean; /** * WalletConnect project ID for global wallet provider mode. * When provided, enables the embedded wallet to act as a WalletConnect * wallet provider, allowing external dApps to connect and send signing requests. */ walletConnectDappProjectId?: string; }; export type SdkModuleState = { /** Indicates the SDK is set up and ready for requests */ loaded: boolean; }; export type SdkModuleMessages = { /** Sent from the webview app to request the SDK settings */ manifest: () => Promise; }; /** Easy access to the event name that indicates the SDK has loaded */ export declare const sdkHasLoadedEventName = "sdk__loadedChanged";