Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/mtkruto/client/1_client_plain.ts>ClientPlain

Cross-runtime JavaScript library for building Telegram clients
Latest
class ClientPlain
import { ClientPlain } from "https://deno.land/x/mtkruto@0.6.3/client/1_client_plain.ts";

An MTProto client for making plain connections. Most users won't need to interact with this. Used internally for creating authorization keys.

Constructors

new
ClientPlain(params?: ClientPlainParams)

Methods

createAuthKey(): Promise<[Uint8Array, bigint]>
invoke<T extends Api.AnyObject, R = T extends Api.AnyGenericFunction<infer X> ? Api.ReturnType<X> : T["_"] extends keyof Api.Functions ? Api.ReturnType<T> extends never ? Api.ReturnType<Api.Functions[T["_"]]> : never : never>(function_: T): Promise<R>