All Projects â†’ spalt08 â†’ mtproto-js

spalt08 / mtproto-js

Licence: GPL-3.0 license
🚀 Fastest ever MTProto JavaScript implementation

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to mtproto-js

Teleperl
Pure perl mtproto/telergam client
Stars: ✭ 34 (+47.83%)
Mutual labels:  mtproto
Novagram
An Object-Oriented PHP library for Telegram Bots
Stars: ✭ 112 (+386.96%)
Mutual labels:  mtproto
Telegramapiserver
Fast, simple, async php telegram api server: MadelineProto + Amp HTTP Server
Stars: ✭ 152 (+560.87%)
Mutual labels:  mtproto
Mtprotoproxy
Async MTProto proxy for Telegram
Stars: ✭ 1,014 (+4308.7%)
Mutual labels:  mtproto
Unigram
A Telegram desktop app made for Windows 10
Stars: ✭ 1,393 (+5956.52%)
Mutual labels:  mtproto
Td
Pure Go Telegram MTProto API Client
Stars: ✭ 118 (+413.04%)
Mutual labels:  mtproto
Mtproto
Full-native go implementation of Telegram API
Stars: ✭ 566 (+2360.87%)
Mutual labels:  mtproto
Mtproto Core
Telegram API JS (MTProto) client library for browser and nodejs
Stars: ✭ 242 (+952.17%)
Mutual labels:  mtproto
Grammers
(tele)gramme.rs - use Telegram's API from Rust
Stars: ✭ 109 (+373.91%)
Mutual labels:  mtproto
Telegramgo
CLI telegram client written in golang
Stars: ✭ 145 (+530.43%)
Mutual labels:  mtproto
Callsmusic
The first open-source PyTgCalls-based project.
Stars: ✭ 62 (+169.57%)
Mutual labels:  mtproto
Telegram React
Experimental Telegram web client with tdlib, webassembly and react js under the hood
Stars: ✭ 1,332 (+5691.3%)
Mutual labels:  mtproto
Mtproto
Telegram MTProto and its proxy (over gRPC) in Go (golang). API Layer: 71
Stars: ✭ 133 (+478.26%)
Mutual labels:  mtproto
Mtg
Bullshit-free MTPROTO proxy for Telegram
Stars: ✭ 976 (+4143.48%)
Mutual labels:  mtproto
Mtproto
MTProto implementation in Golang
Stars: ✭ 190 (+726.09%)
Mutual labels:  mtproto
Telegramd
Unofficial open source telegram server written in golang
Stars: ✭ 609 (+2547.83%)
Mutual labels:  mtproto
Madelineproto
Async PHP client/server API for the telegram MTProto protocol
Stars: ✭ 1,776 (+7621.74%)
Mutual labels:  mtproto
Jsmtproxy
High Performance NodeJS MTProto Proxy
Stars: ✭ 254 (+1004.35%)
Mutual labels:  mtproto
Telegramapi
Java library to create Telegram Clients
Stars: ✭ 198 (+760.87%)
Mutual labels:  mtproto
Pyrogram
Telegram MTProto API Client Library and Framework in Pure Python for Users and Bots
Stars: ✭ 2,252 (+9691.3%)
Mutual labels:  mtproto

mtproto-js

Extremly fast and lightweight JavaScript MTProto 2.0 implementation. Current supported API layer is 113. Works both for browser and Node. Reference: https://core.telegram.org/mtproto

Created for Telegram JS Contest 2020: https://contest.com/javascript-web-3/entry1422

General Use

import { Client } from 'mtproto-js';

/** Client configuration */
type ClientConfig = {
  test: boolean,
  debug: boolean,
  ssl: boolean,
  dc: number,
  transport: 'websocket' | 'http',
  meta: Record<number, any>,

  APILayer: number,
  APIID?: string,
  APIHash?: string,

  deviceModel: string,
  systemVersion: string,
  appVersion: string,
  langCode: string,

  autoConnect: boolean,
};

const client = new Client(clientConfig);

client.on('metaChanged', (newMeta) => console.log(newMeta)); // save keys and authorization data
client.updates.on((update) => console.log(update));
client.updates.fetch();

client.call(
  'help.getNearestDc', // method name
  {}, // params
  { dc: 2, thread: 1, transport: 'websocket' }, // headers (optional)
  (err, result) => console.log(err, result),
);

Features

  • Unit tests
  • TL schema code generation
  • Typed
  • Multithreading
  • Supports both WebSockets and HTTP

Dependencies

Contributions

Thanks @misupov for schema code generation tool https://github.com/misupov/tg-schema-generator

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].