Skip to main content

latest

MTProto for Deno & Bun & Node.js & Browser

This package works with Bun, Cloudflare Workers, Node.js, Deno, Browsers
JSR Score
100%
Published
2 months ago (0.6.4)

default

Main entry point for this library.

c
MTProto

Main entry point for this library.

auth/bot

Auth module for logging in as bot

f
loginAsBot

Log in as bot

auth/user

Interfaces and functions for user interaction during login.

f
sendCode

Prompts the user for login code and performs login via MTProto.rpc

I
SendCodeUI

Interface for objects that handle user interaction during login.

rpc/mod

Module for rpc transport layer.

c
RPC

Main client class of this library.

c
RPCError
No documentation available
T
RPCState
No documentation available

storage/jsondb

Module for json based key-value storage.

c
JsonDBAdapter

JsonDBAdapter implements MTStorage using a JSON file as backend.

storage/kv

Module for in-memory key-value storage.

c
KVStorageAdapter

KVStorageAdapter implements MTStorage using a Map as backend.

storage/types

Module containing type definitions for storage adapters.

I
KVStorage

Interface for Key-Value storage.

I
MTStorage

Storage interface for mtproto

f
serialize_storage_kind

Serialize StorageKind to string.

T
StorageKind

Kind of storage.

storage/web

Module for Web Storage API-based storage.

c
WebStorageAdapter

WebStorageAdapter implements MTStorage using Web Storage API as backend.

c
Abridged

Abridged codec.

transport/codec/full

Full packet codec.

c
Full

Full packet codec.

transport/codec/intermediate

Intermediate codec.

c
Intermediate

Intermediate codec.

transport/codec/obfuscated

Obfuscated codec.

c
Obfuscated

Implements Telegram's obfuscated transport layer.

I
ObfuscateOptions
No documentation available
c
Padded

Padded codec.

transport/connection/deno-tcp

Deno TCP transport adapter

f
createFactory
No documentation available
c
DenoTCP

TCP transport using Deno.Conn

transport/connection/websocket

Websocket transport adapter

f
createFactory
No documentation available
c
WebSocketTransport

WebSocket transport using websocket API

transport/connection/websocket-stream

Websocket transport adapter

f
createFactory
No documentation available
c
WebSocketStreamTransport

WebSocket transport using stream API

transport/dcmap

Data center mapping.

T
AddressOption

Options for getting address of data center.

f
get_address

Get address of data center.

types

Types for the Telegram client library.

I
EnvironmentInformation

Information about the environment the client is running in.

I
InitDC

Connection information used to establish a connection.

T
IPv6Policy

Specifies how the client should connect to the server.

I
MTProtoOptions

Options for MTProto constructor.

I
PacketCodec

Codec for encoding/decoding packets.

I
Transport

Transport interface.

T
TransportEvent

Event emitted by transport.

T
TransportEvents

Event emitted by transport.

T
TransportFactory

Factory function for creating a transport.