mtcute/packages/crypto-node
2023-11-02 19:11:26 +03:00
..
lib feat: build crypto-node against node crypto 2023-11-02 19:11:26 +03:00
src ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
tests ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
.gitignore feat: node native addon for faster aes ige 2021-05-01 21:22:20 +03:00
binding.gyp feat: build crypto-node against node crypto 2023-11-02 19:11:26 +03:00
package.json feat: build crypto-node against node crypto 2023-11-02 19:11:26 +03:00
README.md feat: build crypto-node against node crypto 2023-11-02 19:11:26 +03:00
tsconfig.json ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
typedoc.cjs docs: updated typedoc, added ci, fixed some docs 2023-10-27 14:25:21 +03:00

@mtcute/crypto-node

📖 API Reference

Native extension for NodeJS that improves performance of the most used cryptographic mode in Telegram (IGE), which is not implemented directly by OpenSSL.

Uses OpenSSL under the hood to provide maximum performance

Installation

You will need all the pre-requisites for node-gyp. Pre-built packages are currently not available.

Then, install the package as usual. The native library will be built automatically.

Usage

import { TelegramClient } from '@mtcute/client'
import { NodeNativeCryptoProvider } from '@mtcute/crypto-node'

const tg = new TelegramClient({
    ...,
    crypto: () => new NodeNativeCryptoProvider()
})

Tip: When using @mtcute/node, this will be done automatically for you.

Benchmarks

See https://github.com/mtcute/benchmarks