mtcute/packages/tl/binary/rsa-keys.d.ts
Alina Tumanova f5976a2d74
ESM + end-to-end tests (#11)
* feat: moved tl-runtime to esm and native ArrayBuffers

* feat: migration to esm

* fix(core): web-related fixes

* test: finally, some good fucking e2e

* chore: fixed linters etc

* ci: added e2e to ci

* build(tl): fixed gen-code on node 20

* fix: codegen Uint8Array, not Buffer

never `git reset --hard` kids

* build: only do type-aware linting for `packages/*`

* build: ignore no-unresolved in ci for e2e

* fix: node 16 doesn't have subtle crypto apparently?

* fix(tests): use Uint8Array

for gods sake please can i just merge this already

* ci: don't parallel tasks in ci

because machines are utter garbage and it may just randomly break

* ci: pass secrets to e2e tests

* ci: separate cli command for ci

apparently im retarded

* fix: run codegen in e2e

im actually retarded

* ci: more fixes for e2e

* ci: debugging stuff

* ci: still debugging

* ci: hopefully fix ci???
2023-10-16 19:23:53 +03:00

38 lines
946 B
TypeScript

/**
* Information about a single Telegram public RSA key.
*/
export interface TlPublicKey {
/**
* RSA key modulus as a hex string
*/
modulus: string
/**
* RSA key exponent (usually `0x10001 = 65537`) as a hex string
*/
exponent: string
/**
* RSA key fingerprint as described in [Telegram docs](https://core.telegram.org/mtproto/auth_key#dh-exchange-initiation)
* as a hex string
*/
fingerprint: string
/**
* Whether this is an "old" key.
* New keys should be preferred over old ones.
*/
old: boolean
}
/**
* Telegram public keys index.
*
* Key is {@link TlPublicKey.fingerprint}, value is the public key it represents.
*
* **Note** that this index is meant to be mutable, i.e. new keys
* (ones fetched from the server) can be added directly here.
*/
type TlPublicKeyIndex = Record<string, TlPublicKey>
export const __publicKeyIndex: TlPublicKeyIndex