import { AuthOptions, StacksProvider } from './types'; /** @deprecated Not used anymore. */ export declare const defaultAuthURL = "https://app.blockstack.org"; /** @deprecated Will be marked as internal going forward. */ export declare const isMobile: () => boolean; /** * Special `authenticate` legacy request, to store addresses in userSession matching legacy behavior. * @internal Legacy UI request. */ export declare const authenticate: (authOptions: AuthOptions, provider?: StacksProvider) => Promise; /** @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export declare const LOCALSTORAGE_SESSION_KEY = "blockstack-session"; /** * Semi-compatible `AppConfig` type for configuring `UserSession`. * * @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export declare class AppConfig { constructor(_scopes?: any, _appDomain?: any, _redirectPath?: string, _manifestPath?: string, _coreNode?: string, _authenticatorURL?: string); } /** * Semi-compatible `SessionOptions` type for accessing `userData`. * * @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export interface SessionOptions { userData?: UserData; localStorageKey?: string; storeOptions?: { localStorageKey?: string; }; } /** * Semi-compatible `SessionData` type for accessing `userData`. * * @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export interface SessionData { userData?: UserData; } /** * Semi-compatible `UserSession` type for accessing `userData`. * * @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export declare class UserSession { appConfig: any; store: SessionDataStore; /** * UserSession might still work for some use cases, but it's not recommended. * * @deprecated Update to the latest `request` RPC methods. */ constructor(options?: { appConfig?: any; sessionStore?: any; sessionOptions?: SessionOptions; }); /** @deprecated No-op. Update to the latest `request` RPC methods. */ makeAuthRequestToken(): void; /** @deprecated No-op. Update to the latest `request` RPC methods. */ generateAndStoreTransitKey(): void; /** @deprecated No-op. Update to the latest `request` RPC methods. */ getAuthResponseToken(): void; /** @deprecated No-op. Update to the latest `request` RPC methods. */ isSignInPending(): boolean; /** * Check if a user is currently signed in. * * @returns {Boolean} `true` if the user is signed in (aka connected), `false` if not. */ isUserSignedIn(): boolean; /** * Try to process any pending sign in request by returning a `Promise` that resolves * to the user data object if the sign in succeeds. * * @returns {Promise} that resolves to the user data object if successful and rejects * if handling the sign in request fails or there was no pending sign in request. */ handlePendingSignIn(): Promise; /** * Retrieves the user data object. The user's profile is stored in the key [[Profile]]. * * @returns {Object} User data object. */ loadUserData(): UserData; /** @deprecated No-op. Update to the latest `request` RPC methods. */ encryptContent(): void; /** @deprecated No-op. Update to the latest `request` RPC methods. */ decryptContent(): void; /** * Sign the user out and optionally redirect to given location. * @param redirectURL Location to redirect user to after sign out. */ signUserOut(redirectURL?: string): void; } /** @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export interface UserData { /** @deprecated */ email?: string; /** @deprecated */ decentralizedID?: string; /** @deprecated */ identityAddress?: string; /** @deprecated */ appPrivateKey?: string; /** @deprecated */ hubUrl?: string; /** @deprecated */ coreNode?: string; /** @deprecated */ authResponseToken?: string; /** @deprecated */ coreSessionToken?: string; /** @deprecated */ gaiaAssociationToken?: string; /** @deprecated */ profile: any; /** @deprecated */ gaiaHubConfig?: any; /** @deprecated */ appPrivateKeyFromWalletSalt?: string; } /** * @abstract An abstract class representing the SessionDataStore interface. * @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export declare class SessionDataStore { constructor(sessionOptions?: SessionOptions); getSessionData(): SessionData; setSessionData(_session: SessionData): boolean; deleteSessionData(): boolean; } /** * Stores session data in the instance of this class. * * @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export declare class InstanceDataStore extends SessionDataStore { sessionData?: SessionData; constructor(sessionOptions?: SessionOptions); getSessionData(): SessionData; setSessionData(session: SessionData): boolean; deleteSessionData(): boolean; } /** * Stores session data in browser a localStorage entry. * * @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export declare class LocalStorageStore extends SessionDataStore { key: string; constructor(sessionOptions?: SessionOptions); getSessionData(): SessionData; setSessionData(session: SessionData): boolean; deleteSessionData(): boolean; } /** @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export declare const getOrCreateUserSession: (userSession?: UserSession) => UserSession; /** @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */ export declare const getUserData: (userSession?: UserSession) => Promise; /** @internal */ export declare function isAddressTaproot(address: string): boolean;