2022-09-14 16:18:56 +03:00
|
|
|
# mtcute
|
2021-04-08 12:19:38 +03:00
|
|
|
|
2023-04-25 01:54:22 +03:00
|
|
|
**PROJECT IS ABANDONED**
|
2022-03-16 13:25:12 +03:00
|
|
|
|
2023-06-04 20:00:33 +03:00
|
|
|
If anyone would like to take over it, feel free to DM me.
|
2023-04-25 01:54:22 +03:00
|
|
|
Meanwhile, check out other MTProto libraries in JS, or, better yet, use TDLib for god's sake.
|
2021-04-08 12:19:38 +03:00
|
|
|
|
2021-04-08 13:12:31 +03:00
|
|
|
> ⚠️ **Warning**: While this library is WIP, storage
|
|
|
|
> format *will* change without changing format version
|
2021-04-11 14:55:49 +03:00
|
|
|
> and without migration algorithm, and there *will* be breaking
|
|
|
|
> changes in the API.
|
2021-04-08 13:12:31 +03:00
|
|
|
>
|
2021-04-11 14:55:49 +03:00
|
|
|
> If you encounter errors related to storage, either
|
2021-04-08 13:12:31 +03:00
|
|
|
> reset your storage by removing the file, or fix it manually.
|
|
|
|
|
2022-05-06 13:23:29 +03:00
|
|
|
## Installation
|
|
|
|
|
2023-06-04 20:00:33 +03:00
|
|
|
Currently, target TypeScript major is 5.1, target Node major is 18.
|
|
|
|
|
2022-09-14 16:18:56 +03:00
|
|
|
mtcute is currently only published in my private NPM registry.
|
2022-05-06 13:23:29 +03:00
|
|
|
|
|
|
|
You can install it by running:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm config set --location project @mtcute:registry https://npm.tei.su
|
|
|
|
|
|
|
|
npm install @mtcute/node # or any other package
|
|
|
|
```
|
|
|
|
|
2021-04-08 12:19:38 +03:00
|
|
|
## Setting up for development:
|
|
|
|
|
|
|
|
```bash
|
2023-06-04 20:00:33 +03:00
|
|
|
fnm use # or `nvm use`
|
2021-08-05 20:38:24 +03:00
|
|
|
git clone https://github.com/mtcute/mtcute
|
|
|
|
cd mtcute
|
2023-06-04 20:00:33 +03:00
|
|
|
pnpm install --frozen-lockfile
|
2021-04-14 23:06:10 +03:00
|
|
|
|
|
|
|
# generate code from tl schema
|
|
|
|
cd packages/tl
|
2022-04-28 16:58:09 +03:00
|
|
|
pnpm run gen-code
|
2021-04-08 12:19:38 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
## Acknowledgements
|
|
|
|
|
|
|
|
Some parts were based on code from these projects:
|
|
|
|
|
2021-07-25 21:03:40 +03:00
|
|
|
- [TDLib](https://github.com/tdlib/td)
|
|
|
|
- [Pyrogram](https://github.com/pyrogram/pyrogram)
|
2021-04-08 12:19:38 +03:00
|
|
|
- [Telethon](https://github.com/LonamiWebs/Telethon)
|
|
|
|
- [TDesktop](https://github.com/telegramdesktop/tdesktop)
|