UNPKG

@tgsnake/core

Version:

Pure Telegram MTProto library for nodejs

43 lines (42 loc) 1.14 kB
import { Buffer } from '../platform.node.js'; import { Raw } from '../raw/index.js'; import { type AbstractSession } from './Abstract.js'; export declare class SecretChat { id: number; accessHash: bigint; rekeyStep: number; rekeyExchange: bigint; created: number; changed: number; isAdmin: boolean; authKey: Buffer; mtproto: number; layer: number; inSeqNo: number; outSeqNo: number; inSeqNoX: number; outSeqNoX: number; adminId: bigint; timeRekey: number; ttl: number; private _mutex; constructor({ id, accessHash, isAdmin, authKey, }: { id: number; accessHash: bigint; isAdmin: boolean; authKey: Buffer; }); update(storage: AbstractSession): Promise<boolean>; static save(storage: AbstractSession, params: { id: number; accessHash: bigint; isAdmin: boolean; authKey: Buffer; }): SecretChat; static remove(storage: AbstractSession, id: number): Promise<boolean>; get input(): Raw.InputEncryptedChat; toJSON(): { [key: string]: any; }; toString(): string; }