tweb-i2p/src/lib/sessionStorage.ts

37 lines
1020 B
TypeScript
Raw Normal View History

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
*/
import type { AppInstance } from './mtproto/singleInstance';
import type { UserAuth } from './mtproto/mtproto_config';
2021-06-20 20:07:20 +03:00
import type { DcId } from '../types';
2021-02-13 19:32:10 +04:00
import { MOUNT_CLASS_TO } from '../config/debug';
import LocalStorageController from './localStorage';
const sessionStorage = new LocalStorageController<{
2021-06-20 20:07:20 +03:00
dc: DcId,
user_auth: UserAuth,
2021-07-09 19:43:05 +03:00
state_id: number,
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,
xt_instance: AppInstance,
2021-06-28 16:41:42 +03:00
kz_version: 'K' | 'Z',
tgme_sync: {
canRedirect: boolean,
ts: number
}
2021-06-15 04:50:36 +03:00
}>(/* ['kz_version'] */);
MOUNT_CLASS_TO.appStorage = sessionStorage;
export default sessionStorage;