In-memory storage driver implementation for mtcute.

This storage is not persistent, meaning that all data will be lost on restart. Only use this storage for testing, or if you know exactly what you're doing.

Hierarchy (View Summary)

Constructors

  • Parameters

    • params: { hasKeys?: boolean | number[]; hasTempKeys?: boolean | number[] } = ...
      • OptionalhasKeys?: boolean | number[]

        IDs of the DCs for which the storage should have auth keys, or true to have keys for all DCs

        true
        
      • OptionalhasTempKeys?: boolean | number[]

        IDs of the DCs for which the storage should have temp auth keys, or true to have keys for all DCs

        true
        

    Returns StubMemoryTelegramStorage

Properties

authKeys: MemoryAuthKeysRepository = ...
driver: MemoryStorageDriver = ...
kv: MemoryKeyValueRepository = ...
params: { hasKeys?: boolean | number[]; hasTempKeys?: boolean | number[] } = ...

Type declaration

  • OptionalhasKeys?: boolean | number[]

    IDs of the DCs for which the storage should have auth keys, or true to have keys for all DCs

    true
    
  • OptionalhasTempKeys?: boolean | number[]

    IDs of the DCs for which the storage should have temp auth keys, or true to have keys for all DCs

    true
    
peers: MemoryPeersRepository = ...
refMessages: MemoryRefMessagesRepository = ...

Methods

  • Parameters

    • crypto: ICryptoProvider
    • data: Uint8Array
    • dcId: number
    • OptionaltempIndex: number

    Returns Uint8Array