Files
mtcute/packages/node
2025-01-25 06:26:22 +00:00
..
2025-01-01 21:55:42 +03:00
2025-01-25 06:26:22 +00:00
2024-07-26 06:46:18 +03:00
2024-08-24 22:55:25 +03:00

@mtcute/node

📖 API Reference

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)
  • TelegramClient implementation 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}`)