Files
Signal-Desktop/ts/textsecure/Types.d.ts
2021-06-14 17:09:37 -07:00

59 lines
1.1 KiB
TypeScript

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export {
IdentityKeyType,
PreKeyType,
SenderKeyType,
SessionType,
SignedPreKeyType,
UnprocessedType,
UnprocessedUpdateType,
} from '../sql/Interface';
export type StorageServiceCallOptionsType = {
credentials?: StorageServiceCredentials;
greaterThanVersion?: number;
};
export type StorageServiceCredentials = {
username: string;
password: string;
};
export type DeviceType = {
id: number;
identifier: string;
};
// How the legacy APIs generate these types
export type CompatSignedPreKeyType = {
keyId: number;
keyPair: KeyPairType;
signature: ArrayBuffer;
};
export type CompatPreKeyType = {
keyId: number;
keyPair: KeyPairType;
};
// How we work with these types thereafter
export type KeyPairType = {
privKey: ArrayBuffer;
pubKey: ArrayBuffer;
};
export type OuterSignedPrekeyType = {
confirmed: boolean;
// eslint-disable-next-line camelcase
created_at: number;
keyId: number;
privKey: ArrayBuffer;
pubKey: ArrayBuffer;
};
export type SessionResetsType = Record<string, number>;