Documentation - v0.27.0
    Preparing search index...

    Class MemoryAuthKeysRepository

    Implements

    Index

    Constructors

    Properties

    state: AuthKeysState

    Methods

    • Given the DC id, idx and point in time (in seconds), return the temp_auth_key that should be used for the next request (such that now < key.expires), or null if no such key exists

      Parameters

      • dc: number
      • idx: number
      • now: number

      Returns Uint8Array<ArrayBufferLike> | null

    • Store temp_auth_key for the given DC and idx, along with its expiration date (in seconds)

      If key is null, the key should be deleted instead

      MUST be applied immediately, without batching

      Parameters

      • dc: number
      • idx: number
      • key: Uint8Array<ArrayBufferLike> | null
      • expires: number

      Returns void