@2012mjm/telegram-mt-node 中文文档教程
Deprecation Notice
不要将它用于新项目。
telegram-mtproto 更先进并且有更好的 API。
同时检查 < a href="https://github.com/goodmind/treact">处理。 我尝试用 React.js 编写 Telegram 客户端
@goodmind/telegram-mt-node
Telegram Mobile Protocol (MTProto) 纯javascript 在 Node.js 平台上
About MTProto..
MTProto 是 Telegram Messenger 协议 “设计用于从移动设备上运行的应用程序访问服务器 API”。
移动协议分为三个组件(来自官方网站):
高级组件(API 查询语言) : 定义 API 的方法 查询和响应被转换为二进制消息。
加密(授权)层:定义消息传递的方法 在通过传输协议传输之前被加密。
Transport组件:定义客户端和服务端传输的方法 通过某些其他现有网络协议(例如 http、https、tcp、udp)的消息。
telegram-mt-node in short..
telegram-mt-node 库实现了移动协议并提供以下功能:
TCP 和HTTP 连接在传输层
中实现 安全层中AES 和 RSA 加密 的密码实现
纯文本和加密消息 与服务器通信数据
Diffie-Hellman密钥交换 由安全层
MTProto TL-Schema 编译为 javascript 类和函数 通过 < strong>prime factorization 函数支持 href="https://github.com/goodmind/telegram-tl-node">@goodmind/telegram-tl-node 依赖
@ goodmind/telegram.link 主要项目取决于 t 他的图书馆。
Installation
$ git clone --branch=master git://github.com/goodmind/telegram-mt-node.git
$ cd telegram-mt-node
$ npm install
Unit Testing
$ npm test
Example
您可以找到一个示例,其中即时获取授权密钥并询问最近的数据中心是什么:
$ npm run-script example
Dependencies
@goodmind/telegram-tl- node:一个 Telegram 类型语言库
get-log:一个 Node.js 日志实用程序,易于使用且准备就绪用于生产。
jsbn:纯 JavaScript 中大数数学的可移植实现, 在桌面和移动浏览器上启用公钥加密和其他应用程序。
bigint-node:Leemon Baird BigInteger javascript 库移植到 Node.js
node-cryptojs-aes: cryptojs javascript 的极简端口 node.js 库,支持 AES 对称密钥加密
License
该项目根据 Mit 许可证发布
Deprecation Notice
Don’t use this for new projects.
telegram-mtproto is much more advanced and has a better API.
Also check treact. My attempt to write Telegram client in React.js
@goodmind/telegram-mt-node
Telegram Mobile Protocol (MTProto) unofficial library in pure javascript on the Node.js platform
About MTProto..
MTProto is the Telegram Messenger protocol "designed for access to a server API from applications running on mobile devices".
The Mobile Protocol is subdivided into three components (from the official site):
High-level component (API query language): defines the method whereby API queries and responses are converted to binary messages.
Cryptographic (authorization) layer: defines the method by which messages are encrypted prior to being transmitted through the transport protocol.
Transport component: defines the method for the client and the server to transmit messages over some other existing network protocol (such as, http, https, tcp, udp).
telegram-mt-node in short..
The telegram-mt-node library implements the Mobile Protocol and provides the following features:
Both TCP and HTTP connections implemented in the transport layer
A cipher implementation for AES and RSA encryption in the security layer
Both plain-text and encrypted message to communicate data with the server
Diffie-Hellman key exchange supported by the prime factorization function implemented in the security layer
MTProto TL-Schema compilation as javascript classes and functions via @goodmind/telegram-tl-node dependency
@goodmind/telegram.link main project depends by this library.
Installation
$ git clone --branch=master git://github.com/goodmind/telegram-mt-node.git
$ cd telegram-mt-node
$ npm install
Unit Testing
$ npm test
Example
You can find an example where take an auth key on the fly and ask what is the nearest DataCenter:
$ npm run-script example
Dependencies
@goodmind/telegram-tl-node: a Telegram TypeLanguage library
get-log: a Node.js Logging Utility, easy to use and ready for production.
jsbn: a portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.
bigint-node: the Leemon Baird BigInteger javascript library ported to Node.js
node-cryptojs-aes: A minimalist port of cryptojs javascript library to node.js, that supports AES symmetric key cryptography
License
The project is released under the Mit License