import { Name, API, PublicKey } from '@wharfkit/antelope';
import { IUser } from '../types/User';
import { DID, SdkErrors, URL as URLtype } from '../util';
import { ResponsesManager } from './responsesManager';
import { KeyManager } from '../storage/keymanager';
import { StorageFactory } from '../storage/storage';
import { TonomyUsername } from '../util/username';
export declare function getAccountInfo(account: TonomyUsername | Name): Promise<API.v1.AccountObject>;
/**
 * Initialize and return the user object
 * @param keyManager  the key manager
 * @param storage  the storage
 * @returns the user object
 */
export declare function createUserObject(keyManager: KeyManager, storageFactory: StorageFactory): IUser;
/**
 * Rejects a login request by sending a response to the requesting app
 *
 * @static function so that it can be used to cancel requests in flows where users are not logged in
 *
 * @param {WalletRequest[]} requests - Array of requests to reject
 * @param {'mobile' | 'browser'} platform - Platform of the request, either 'mobile' or 'browser'
 * @param {{ code: SdkErrors, reason: string }} error - Error to send back to the requesting app
 * @param {{callbackPath?: URLtype, messageRecipient?: DID}} options - Options for the response
 * @returns {Promise<void | URLtype>} the callback url if the platform is mobile, or undefined if it is browser (a message is sent to the user)
 */
export declare function terminateLoginRequest(responsesManager: ResponsesManager, returnType: 'mobile' | 'browser', error: {
    code: SdkErrors;
    reason: string;
}, options: {
    callbackOrigin?: URLtype;
    callbackPath?: URLtype;
    messageRecipient?: DID;
    user?: IUser;
}): Promise<void | URLtype>;
/**
 * Checks that a key exists in the key manager that has been authorized on the DID
 *
 * @description This is called on the callback page to verify that the user has logged in correctly
 *
 * @param {string} [accountName] - the account name to check the key on
 * @param {PublicKey} [publicKey] - the public key to check. if not supplied it will try lookup the app from window.location.origin
 * @param {KeyManager} [keyManager] - the key manager to check the key in
 * @param {KeyManagerLevel} [keyManagerLevel=BROWSER_LOCAL_STORAGE] - the level to check the key in
 * @returns {Promise<Name>} - the name of the permission that the key is authorized on
 *
 * @throws {SdkError} - if the key doesn't exist or isn't authorized
 */
export declare function verifyKeyExistsForApp(accountName: Name, options: {
    publicKey?: PublicKey;
    keyManager?: KeyManager;
}): Promise<Name>;
//# sourceMappingURL=user.d.ts.map