mirror of
https://github.com/zhigang1992/mtcute.git
synced 2026-01-12 22:49:02 +08:00
@mtcute/node
Node.js support package for mtcute. Includes:
- Support for native crypto addon (must be installed separately,
@mtcute/crypto-node) - Terminal I/O via
readline - SQLite storage (via
better-sqlite3) - TCP transport (via
node:net) TelegramClientimplementation using the above- HTML and Markdown parsers
Usage
import { TelegramClient } from '@mtcute/node'
const tg = new TelegramClient({
apiId: 12345,
apiHash: 'abcdef',
storage: 'my-account'
})
const self = await tg.start()
console.log(`✨ logged in as ${self.displayName}`)