mtcute/packages/crypto-node
2024-10-05 20:26:38 +00:00
..
lib ci: node prebuilt worker 2024-04-13 05:49:13 +03:00
src chore: migrate to antfu eslint config (+ reformat) 2024-08-18 07:18:13 +03:00
tests chore: migrate to antfu eslint config (+ reformat) 2024-08-18 07:18:13 +03:00
.gitignore ci: node prebuilt worker 2024-04-13 05:49:13 +03:00
binding.gyp ci: node prebuilt worker 2024-04-13 05:49:13 +03:00
build.config.js build: build with vite (initial) 2024-08-24 22:55:25 +03:00
package.json v0.17.0 2024-10-05 20:26:38 +00:00
README.md chore: migrate to antfu eslint config (+ reformat) 2024-08-18 07:18:13 +03:00
tsconfig.json build: build with vite (initial) 2024-08-24 22:55:25 +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