@mtproto/core
259 subscribers
20 photos
14 links
Changelog, memes and polls 🙃

Docs: https://mtproto-core.js.org/docs/
Author channel: @alik0211_en
Download Telegram
Support for all DC's add in version 3.0.0-beta.3. Also add support 2FA for NodeJS

New argument in call: mtproto.call(method, params, options)

1. Authorization is automatically copied to all DC if the options.syncAuth flag is set to true. Default options.dcId is false. Note: it makes sense to set this flag only for authorization methods, for example: auth.signIn and auth.checkPassword.
2. To make a call on a specific DC, pass the options.dcId. Default options.dcId is 2

Install: yarn add -E @mtproto/core@beta
Fix sync auth for not default DC in version 3.0.0-beta.4. Also refactor transport

Related issue: https://github.com/alik0211/mtproto-core/issues/18

Install: yarn add -E @mtproto/core@beta
Update layer to 112 in version 3.0.0-beta.5. Also:
1. Refactor TCP transport
2. Add mtproto.setDefaultDc(dcId) method
3. Add mtproto.updates.on for handle updates on default server

Install: yarn add -E @mtproto/core@beta

Stable release next week 🙃
Update docs in version 3.0.0-beta.6. Also improve handle updates

Install: yarn add -E @mtproto/core@beta

This is the last beta release before the stable release. If you have problems with this version, create an issue on github with a detailed description of the problem
Fix an error with packaging for TCP transport (this caused an error in nodejs) in version 3.0.0-beta.7

Install: yarn add -E @mtproto/core@beta

Related issue: https://github.com/alik0211/mtproto-core/issues/15
Nodejs support and convenient work with all data centers add in stable version 3.0.0 🥳

Install: yarn add -E @mtproto/core
Fix browser localStorage in version 3.0.1

Install: yarn add -E @mtproto/core
Add localStorage for nodejs (you don't need to log in every time) in version 3.1.0. Also:
1. Save defaulDcId in storage
2. Refactor WebSocket message handler
3. Handle error when copy auth to DC

Install: yarn add -E @mtproto/core
Fix the "hang" error (incorrectly processed TCP parts) in version 3.1.1. Also refactor obfuscation key generation

Install: yarn add -E @mtproto/core
You can specify your localStorage to save authorization in version 3.2.0. Changes:
- Update layer to 113
- Observe security guidelines
- Fix the deserialization of the vector
- Handle bad_server_salt and bad_msg_notification
- Use only nodejs version 12 and higher
- Refactor utils
- Refactor verifyDhParams
- Refactor transport

Install: yarn add -E @mtproto/core
Add support async custom storage in version 3.3.0. Also fix deserialize double

Install: https://github.com/alik0211/mtproto-core#install
Rewrite authentication guide and add handling common errors guide in version 3.4.0. Also don't load default storage if you have custom storage and fix types file.

Read guides: https://github.com/alik0211/mtproto-core#guides
Rewritten serialization and deserialization in version 4.0.0:
1. If the method needs the flags parameter, flags is calculated automatically 🙃
2. Removed the pFlags object from the responses
3. Added a types file. Thanks, sh-a-v
4. Add updateInitConnectionParams method
Fix gzip handling in version 4.0.1
Fix deserialization errors in version 5.0.0. Thank you very much, softforseeker! Also:
1. Add logger (documentation will be available later)
2. Import only inflate from pako
3. Fix the serialization of boolean flags

This is a major update, because the logic of serialization and deserialization was rewritten. There are no breaking changes
In version 5.1.0:

Add counter
Now the exact number of bytes is allocated before serialization, thanks to the counter. It fix error RangeError: Source is too large

Update authentication guide
Added a stage for getting a user. It will help you check whether the user is logged in. I also rewrote the example using a async/await - https://github.com/alik0211/mtproto-core/blob/master/docs/authentication.md
In version 5.2.0:

Problems with reconnecting and hanging fixed
To do this, I started storing the socket state in the transport module and add acknowledgment logic for outgoing messages

Handle FLOOD_WAIT_X
In the guide "Handling common errors" added information about how to handle the FLOOD_WAIT_X error - https://github.com/alik0211/mtproto-core/blob/master/docs/handling-common-errors.md

Unit testing and playground
Removed karma. Use jest instead jasmine. Moved the playground to a separate repository
In version 5.3.0:

Layer has been updated to 121
Most interesting: methods for statistics and comments

Updated pako
Just keeping the dependencies up-to-date
Forwarded from Gasymov's Channel (Ali Gasymov)
Screw It, I'll rewrite the @mtproto_core before the summer
In what environment do you use (or want to use) the library?
Anonymous Poll
81%
Node JS
15%
Browser
5%
Electron
5%
React Native
5%
Other