Fix other declaration files
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,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…
Reference in New Issue