Skip to main content
Module

x/grm/mod.ts>MTProtoState

MTProto API Client for Deno 🦕
Go to Latest
class MTProtoState
Re-export
import { MTProtoState } from "https://deno.land/x/grm@0.6.0/mod.ts";

Constructors

new
MTProtoState(
authKey?: AuthKey,
loggers?: any,
securityChecks?,
)

Properties

private
_lastMsgId: bigInt.BigInteger
private
_log: any
private
readonly
optional
authKey: AuthKey
private
id: bigInt.BigInteger
private
msgIds: string[]
private
securityChecks: boolean
_sequence: number
salt: bigInt.BigInteger
timeOffset: number

Methods

_calcKey(
authKey: Buffer,
msgKey: Buffer,
client: boolean,
)
_getSeqNo(contentRelated: boolean)
updateMessageId(message: any)
updateTimeOffset(correctMsgId: bigInt.BigInteger)
writeDataAsMessage(
buffer: BinaryWriter,
data: Buffer,
contentRelated: boolean,
afterId?: bigInt.BigInteger,
)