import { SkynetClient } from "../client"; /** * Constructs the full URL for the given component domain. * * Examples: * * ("dac.hns") => "https://dac.hns.siasky.net" * * @param this - SkynetClient * @param domain - Component domain. * @returns - The full URL for the component. */ export declare function getFullDomainUrl(this: SkynetClient, domain: string): Promise; /** * Gets the URL for the current skapp on the preferred portal, if we're not on * the preferred portal already. * * @param skappDomain - The current page URL. * @param preferredPortalUrl - The preferred portal URL. * @returns - The URL for the current skapp on the preferred portal. */ export declare function getRedirectUrlOnPreferredPortal(skappDomain: string, preferredPortalUrl: string): Promise; /** * Extracts the domain from the current portal URL. Will take into account the * server domain if it is found in the current portal URL. * * Examples: * * ("dac.hns.siasky.net") => "dac.hns" * ("dac.hns.us-va-1.siasky.net") => "dac.hns" * * @param this - SkynetClient * @param fullDomain - Full URL. * @returns - The extracted domain. */ export declare function extractDomain(this: SkynetClient, fullDomain: string): Promise; /** * Create a new popup window. From SkyID. * * @param url - The URL to open. * @param winName - The name of the popup window. * @param w - The width of the popup window. * @param h - the height of the popup window. * @returns - The window. * @throws - Will throw if the window could not be opened. */ export declare function popupCenter(url: string, winName: string, w: number, h: number): Window; /** * Returns whether we should redirect from the current portal to the preferred * portal. The protocol prefixes are allowed to be different and there can be * other differences like a trailing slash. * * @param currentFullDomain - The current domain. * @param preferredPortalUrl - The preferred portal URL. * @returns - Whether the two URLs are equal for the purposes of redirecting. */ export declare function shouldRedirectToPreferredPortalUrl(currentFullDomain: string, preferredPortalUrl: string): boolean; //# sourceMappingURL=utils.d.ts.map