1 | import { Maybe } from './common/index';
|
2 | import { Permissions } from './ucan/permissions';
|
3 | /**
|
4 | * Retrieve the authenticated username.
|
5 | */
|
6 | export declare function authenticatedUsername(): Promise<string | null>;
|
7 | /**
|
8 | * Leave.
|
9 | *
|
10 | * Removes any trace of the user and redirects to the lobby.
|
11 | */
|
12 | export declare function leave({ withoutRedirect }?: {
|
13 | withoutRedirect?: boolean;
|
14 | }): Promise<void>;
|
15 | /**
|
16 | * Redirects to a lobby.
|
17 | *
|
18 | * NOTE: Only works on the main thread, as it uses `window.location`.
|
19 | *
|
20 | * @param permissions The permissions from `initialise`.
|
21 | * Pass `null` if working without permissions.
|
22 | * @param redirectTo Specify the URL you want users to return to.
|
23 | * Uses the current url by default.
|
24 | */
|
25 | export declare function redirectToLobby(permissions: Maybe<Permissions>, redirectTo?: string): Promise<void>;
|