mtcute/packages/node
2024-09-29 04:13:50 +03:00
..
src chore: use hex/base64/utf from @fuman/utils 2024-09-29 04:13:50 +03:00
build.config.js build: build with vite (major cleanup part2) (#67) 2024-08-28 21:35:12 +03:00
package.json chore!: migrated proxies to fuman 2024-09-29 04:13:50 +03:00
README.md chore: deprecated .run method 2024-07-26 06:46:18 +03:00
tsconfig.json build: build with vite (initial) 2024-08-24 22:55:25 +03:00
typedoc.cjs docs: updated readmes 2024-03-07 05:35:37 +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}`)