Fix other declaration files

pull/1162/head
Mikunj 5 years ago
parent 653efaf9cf
commit f279f47b35

@ -0,0 +1,42 @@
import { SignalService } from '../../protobuf';
import { CipherTextObject } from '../../../libtextsecure/libsignal-protocol';
export interface SecretSessionCipherConstructor {
new (storage: any): SecretSessionCipherInterface;
}
export interface SecretSessionCipherInterface {
encrypt(
destinationPubkey: string,
senderCertificate: SignalService.SenderCertificate,
innerEncryptedMessage: CipherTextObject
): Promise<ArrayBuffer>;
decrypt(
cipherText: ArrayBuffer,
me: { number: string; deviceId: number }
): Promise<{
isMe?: boolean;
sender: string;
content: ArrayBuffer;
type: SignalService.Envelope.Type;
}>;
}
export declare class SecretSessionCipher
implements SecretSessionCipherInterface {
constructor(storage: any);
public encrypt(
destinationPubkey: string,
senderCertificate: SignalService.SenderCertificate,
innerEncryptedMessage: CipherTextObject
): Promise<ArrayBuffer>;
public decrypt(
cipherText: ArrayBuffer,
me: { number: string; deviceId: number }
): Promise<{
isMe?: boolean;
sender: string;
content: ArrayBuffer;
type: SignalService.Envelope.Type;
}>;
}

@ -0,0 +1,9 @@
import { SecretSessionCipherConstructor } from './metadata/SecretSessionCipher';
interface Metadata {
SecretSessionCipher: SecretSessionCipherConstructor;
}
export interface SignalInterface {
Metadata: Metadata;
}

@ -1,7 +1,8 @@
import { SignalService } from '../../../../protobuf';
import { CipherTextObject } from '../../../../../libtextsecure/libsignal-protocol';
import { SecretSessionCipherInterface } from '../../../../../js/modules/metadata/SecretSessionCipher';
export class SecretSessionCipherStub {
export class SecretSessionCipherStub implements SecretSessionCipherInterface {
public async encrypt(
_destinationPubkey: string,
_senderCertificate: SignalService.SenderCertificate,

@ -1,8 +1,8 @@
import { SignalInterface } from './types/signal';
import { LocalizerType } from '../types/Util';
import LokiMessageAPI from '../../js/modules/loki_message_api';
import LokiPublicChatFactoryAPI from '../../js/modules/loki_public_chat_api';
import { LibsignalProtocol } from '../../libtextsecure/libsignal-protocol';
import { SignalInterface } from '../../js/modules/signal';
interface WindowInterface extends Window {
seedNodeList: any;

@ -1,20 +0,0 @@
import { SignalService } from '../../protobuf';
import { CipherTextObject } from '../../../libtextsecure/libsignal-protocol';
export declare class SecretSessionCipher {
constructor(storage: any);
public encrypt(
destinationPubkey: string,
senderCertificate: SignalService.SenderCertificate,
innerEncryptedMessage: CipherTextObject
): Promise<ArrayBuffer>;
public decrypt(
cipherText: ArrayBuffer,
me: { number: string; deviceId: number }
): Promise<{
isMe?: boolean;
sender: string;
content: ArrayBuffer;
type: SignalService.Envelope.Type;
}>;
}

@ -1,9 +0,0 @@
import { SecretSessionCipher } from './SecretSessionCipher';
interface Metadata {
SecretSessionCipher: typeof SecretSessionCipher;
}
export interface SignalInterface {
Metadata: Metadata;
}
Loading…
Cancel
Save