UNPKG

@merqva/telegram-passport

Version:

Decrypt/Parse incoming Telegram Passport data

11 lines (10 loc) 542 B
/// <reference types="node" /> import { Credentials, EncryptedCredentials, PassportData, RequestedFields } from './interfaces'; import { StringOrBuffer } from './types'; export declare class TelegramPassport { private readonly privateKey; constructor(privateKey: StringOrBuffer); decryptData(data: StringOrBuffer, secret: StringOrBuffer, hash: StringOrBuffer): Buffer; decryptPassportCredentials(encryptedCredentials: EncryptedCredentials): Credentials; decryptPassportData(passportData: PassportData): RequestedFields; }