mtcute/packages/crypto-node
2024-03-23 22:57:57 +00:00
..
lib feat: build crypto-node against node crypto 2023-11-02 19:11:26 +03:00
src chore!: started extracting platform-specific stuff into separate packages 2024-03-07 05:35:36 +03:00
tests chore: initial bun support 2024-02-20 00:55:41 +03:00
.gitignore feat: wasm! 🚀 2023-11-04 06:44:18 +03:00
binding.gyp feat: build crypto-node against node crypto 2023-11-02 19:11:26 +03:00
build.config.cjs build: extracted custom build config to packages themselves 2023-11-02 21:23:17 +03:00
package.json v0.9.0 2024-03-23 22:57:57 +00:00
README.md docs: updated readmes 2024-03-07 05:35:37 +03:00
tsconfig.json ESM + end-to-end tests (#11) 2023-10-16 19:23:53 +03:00
typedoc.cjs chore: moved most configs to .config 2023-11-13 13:28:11 +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/core'
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