Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grm/src/network/mod.ts>MTProtoState

MTProto API Client for Deno 🦕
Go to Latest
class MTProtoState
Re-export
import { MTProtoState } from "https://deno.land/x/grm@0.5.1/src/network/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,
)