@thirdweb-dev/wallets
Version:
<p align="center"> <br /> <a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/legacy_packages/sdk/logo.svg?raw=true" width="200" alt=""/></a> <br /> </p> <h1 align="center">thirdweb Wallet SDK</h1> <p align="center"> <a h
57 lines • 3.06 kB
TypeScript
/**
* @internal
*
* The code below comes from the package https://github.com/DamonOehlman/detect-browser
*/
/// <reference types="node" />
export type DetectedInfoType = "browser" | "node" | "bot-device" | "bot" | "react-native";
interface DetectedInfo<T extends DetectedInfoType, N extends string, O, V = null> {
readonly type: T;
readonly name: N;
readonly version: V;
readonly os: O;
}
export declare class BrowserInfo implements DetectedInfo<"browser", Browser, OperatingSystem | null, string> {
readonly name: Browser;
readonly version: string;
readonly os: OperatingSystem | null;
readonly type = "browser";
constructor(name: Browser, version: string, os: OperatingSystem | null);
}
export declare class NodeInfo implements DetectedInfo<"node", "node", NodeJS.Platform, string> {
readonly version: string;
readonly type = "node";
readonly name = "node";
readonly os: NodeJS.Platform;
constructor(version: string);
}
export declare class SearchBotDeviceInfo implements DetectedInfo<"bot-device", Browser, OperatingSystem | null, string> {
readonly name: Browser;
readonly version: string;
readonly os: OperatingSystem | null;
readonly bot: string;
readonly type = "bot-device";
constructor(name: Browser, version: string, os: OperatingSystem | null, bot: string);
}
export declare class BotInfo implements DetectedInfo<"bot", "bot", null, null> {
readonly type = "bot";
readonly bot = true;
readonly name = "bot";
readonly version: null;
readonly os: null;
}
export declare class ReactNativeInfo implements DetectedInfo<"react-native", "react-native", null, null> {
readonly type = "react-native";
readonly name = "react-native";
readonly version: null;
readonly os: null;
}
export type Browser = "aol" | "edge" | "edge-ios" | "yandexbrowser" | "kakaotalk" | "samsung" | "silk" | "miui" | "beaker" | "edge-chromium" | "chrome" | "chromium-webview" | "phantomjs" | "crios" | "firefox" | "fxios" | "opera-mini" | "opera" | "pie" | "netfront" | "ie" | "bb10" | "android" | "ios" | "safari" | "facebook" | "instagram" | "ios-webview" | "curl" | "searchbot";
export type OperatingSystem = "iOS" | "Android OS" | "BlackBerry OS" | "Windows Mobile" | "Amazon OS" | "Windows 3.11" | "Windows 95" | "Windows 98" | "Windows 2000" | "Windows XP" | "Windows Server 2003" | "Windows Vista" | "Windows 7" | "Windows 8" | "Windows 8.1" | "Windows 10" | "Windows ME" | "Windows CE" | "Open BSD" | "Sun OS" | "Linux" | "Mac OS" | "QNX" | "BeOS" | "OS/2" | "Chrome OS";
export declare function detect(userAgent?: string): BrowserInfo | SearchBotDeviceInfo | BotInfo | NodeInfo | ReactNativeInfo | null;
export declare function browserName(ua: string): Browser | null;
export declare function parseUserAgent(ua: string): BrowserInfo | SearchBotDeviceInfo | BotInfo | null;
export declare function detectOS(ua: string): OperatingSystem | null;
export declare function getNodeVersion(): NodeInfo | null;
export {};
//# sourceMappingURL=detect-browser.d.ts.map