import { Name, API, PublicKey } from '@wharfkit/antelope';
import { IUser } from '../types/User';
import { URL as URLtype } from '../util/ssi/types';
import { DualWalletRequests, WalletResponseError } from '../util/request';
import { KeyManager } from '../storage/keymanager';
import { StorageFactory } from '../storage/storage';
import { TonomyUsername } from '../util/username';
import { DataSource } from 'typeorm';
export declare function getAccountInfo(account: TonomyUsername | Name): Promise<API.v1.AccountObject>;
/**
 * Initialize and return the user object
 * @param {KeyManager} keyManager - the key manager
 * @param {StorageFactory} storageFactory - the storage factory
 * @param {DataSource} dataSource - the data source
 * @returns {IUser} the user object
 */
export declare function createUserObject(keyManager: KeyManager, storageFactory: StorageFactory, dataSource: DataSource): 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 {DualWalletRequests} requests - Array of requests to reject
 * @param {'redirect' | 'message'} respondWith - How to respond to the request
 * @param {WalletResponseError} error - Error to send back to the requesting app
 * @returns {Promise<void | URLtype>} - If respondWith is 'redirect', returns a URL to redirect to; if 'message', sends a message to the requesting app
 */
export declare function rejectLoginRequest(requests: DualWalletRequests, respondWith: 'redirect' | 'message', error: WalletResponseError, options: {
    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