2021-04-08 17:52:31 +04:00
|
|
|
/*
|
|
|
|
* https://github.com/morethanwords/tweb
|
|
|
|
* Copyright (C) 2019-2021 Eduard Kuzmenko
|
|
|
|
* https://github.com/morethanwords/tweb/blob/master/LICENSE
|
|
|
|
*/
|
|
|
|
|
2021-05-18 17:17:54 +03:00
|
|
|
import type { AppInstance } from './mtproto/singleInstance';
|
2021-06-06 17:22:29 +03:00
|
|
|
import type { UserAuth } from './mtproto/mtproto_config';
|
2021-02-13 19:32:10 +04:00
|
|
|
import { MOUNT_CLASS_TO } from '../config/debug';
|
2021-06-15 04:19:58 +03:00
|
|
|
import LocalStorageController from './localStorage';
|
2021-01-18 22:34:41 +04:00
|
|
|
|
2021-06-15 04:19:58 +03:00
|
|
|
const sessionStorage = new LocalStorageController<{
|
2021-01-18 22:34:41 +04:00
|
|
|
dc: number,
|
2021-06-06 17:22:29 +03:00
|
|
|
user_auth: UserAuth,
|
|
|
|
dc1_auth_key: string,
|
|
|
|
dc2_auth_key: string,
|
|
|
|
dc3_auth_key: string,
|
|
|
|
dc4_auth_key: string,
|
|
|
|
dc5_auth_key: string,
|
|
|
|
dc1_server_salt: string,
|
|
|
|
dc2_server_salt: string,
|
|
|
|
dc3_server_salt: string,
|
|
|
|
dc4_server_salt: string,
|
|
|
|
dc5_server_salt: string,
|
2021-01-26 02:40:53 +02:00
|
|
|
server_time_offset: number,
|
2021-06-15 04:19:58 +03:00
|
|
|
xt_instance: AppInstance,
|
2021-06-15 04:50:36 +03:00
|
|
|
kz_version: 'K' | 'Z'
|
|
|
|
}>(/* ['kz_version'] */);
|
2021-03-27 19:34:08 +04:00
|
|
|
MOUNT_CLASS_TO.appStorage = sessionStorage;
|
2021-01-18 22:34:41 +04:00
|
|
|
export default sessionStorage;
|