import * as Crypto from "../../crypto/implementation.js"; import * as Reference from "../../reference/implementation.js"; import * as Storage from "../../storage/implementation.js"; import { Components } from "../../../components.js"; import { Configuration } from "../../../configuration.js"; import { Implementation } from "../implementation.js"; import { Maybe } from "../../../common/types.js"; import { Session } from "../../../session.js"; export declare const TYPE = "webCrypto"; export declare type Dependencies = { crypto: Crypto.Implementation; reference: Reference.Implementation; storage: Storage.Implementation; }; export declare function canDelegateAccount(dependencies: Dependencies, username: string): Promise; export declare function delegateAccount(dependencies: Dependencies, username: string, audience: string): Promise>; export declare function linkDevice(dependencies: Dependencies, username: string, data: Record): Promise; /** * Doesn't quite register an account yet, * needs to be implemented properly by other implementations. * * NOTE: This base function should be called by other implementations, * because it's the foundation for sessions. */ export declare function register(dependencies: Dependencies, options: { username: string; email?: string; type?: string; }): Promise<{ success: boolean; }>; export declare function session(components: Components, authedUsername: Maybe, config: Configuration): Promise>; export declare function implementation(dependencies: Dependencies): Implementation;