0.17.1 ⢠Published 11 months ago
@mtcute/core v0.17.1
@mtcute/core
š API Reference
Platform-agnostic MTProto implementation and auxiliary utilities.
Features
- MTProto 2.0: Implements the full MTProto protocol, including all the encryption and serialization
- 2FA support: Provides utilities for 2-step verification
- Hackable: Bring your own storage, transport, and other components to customize the library to your needs
- Magical: Handles reconnections, connection pooling, DC redirections and other stuff for you
- Updates handling: Implements proper updates handling, including ordering and gap recovery (learn more)
- High-level: Includes a high-level API that wrap the MTProto APIs and provide a clean interface
- Tree-shaking: You can import just the methods you need, and the rest will not be included into the bundle
Usage
import { BaseTelegramClient } from '@mtcute/core/client.js'
const tg = new BaseTelegramClient({
apiId: 12345,
apiHash: '0123456789abcdef0123456789abcdef',
crypto: new MyCryptoProvider(),
storage: new MyStorage(),
transport: () => new MyTransport(),
})
tg.call({ _: 'help.getConfig' })
.then(console.log)
Usage with high-level API
import { TelegramClient } from '@mtcute/core/client.js'
const tg = new TelegramClient({
// ... same options as above
})
const self = await tg.start({
phone: '+1234567890',
code: () => prompt('Enter the code:'),
password: 'my-password',
})
console.log(`⨠logged in as ${self.displayName}`)
0.17.0
11 months ago
0.17.1
11 months ago
0.16.14
11 months ago
0.16.13
11 months ago
0.16.10
11 months ago
0.16.9
12 months ago
0.16.3
1 year ago
0.16.4
1 year ago
0.16.6
1 year ago
0.16.7
1 year ago
0.13.0
1 year ago
0.14.0
1 year ago
0.13.1
1 year ago
0.12.2
1 year ago
0.15.0
1 year ago
0.13.2
1 year ago
0.16.0
1 year ago
0.15.1
1 year ago
0.13.3
1 year ago
0.16.1
1 year ago
0.15.2
1 year ago
0.12.5
1 year ago
0.15.3
1 year ago
0.12.1
1 year ago
0.12.0
1 year ago
0.11.0
1 year ago
0.10.2
1 year ago
0.10.1
1 year ago
0.10.0
1 year ago
0.9.2
1 year ago
0.9.1
1 year ago
0.9.0
1 year ago
0.8.0
1 year ago
0.7.3
1 year ago
0.7.2
1 year ago
0.7.1
1 year ago
0.7.0
2 years ago
0.5.0
2 years ago
0.6.0
2 years ago
0.4.0
2 years ago
0.3.0
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.2.0
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago