export interface SignalProtocolAddressType { readonly name: string; readonly deviceId: number; toString: () => string; equals: (other: SignalProtocolAddressType) => boolean; } export interface FingerprintGeneratorType { createFor: (localIdentifier: string, localIdentityKey: ArrayBuffer, remoteIdentifier: string, remoteIdentityKey: ArrayBuffer) => Promise; } export interface KeyPairType { pubKey: T; privKey: T; } export interface PreKeyPairType { keyId: number; keyPair: KeyPairType; } export interface SignedPreKeyPairType extends PreKeyPairType { signature: T; } export interface PreKeyType { keyId: number; publicKey: T; } export interface SignedPublicPreKeyType extends PreKeyType { signature: T; } export type SessionRecordType = string; export declare enum Direction { SENDING = 1, RECEIVING = 2 } export interface StorageType { getIdentityKeyPair: () => Promise; getLocalRegistrationId: () => Promise; isTrustedIdentity: (identifier: string, identityKey: ArrayBuffer, direction: Direction) => Promise; saveIdentity: (encodedAddress: string, publicKey: ArrayBuffer, nonblockingApproval?: boolean) => Promise; loadPreKey: (encodedAddress: string | number) => Promise; storePreKey: (keyId: number | string, keyPair: KeyPairType) => Promise; removePreKey: (keyId: number | string) => Promise; storeSession: (encodedAddress: string, record: SessionRecordType) => Promise; loadSession: (encodedAddress: string) => Promise; loadSignedPreKey: (keyId: number | string) => Promise; storeSignedPreKey: (keyId: number | string, keyPair: KeyPairType) => Promise; removeSignedPreKey: (keyId: number | string) => Promise; } export interface CurveType { generateKeyPair: () => Promise; createKeyPair: (privKey: ArrayBuffer) => Promise; calculateAgreement: (pubKey: ArrayBuffer, privKey: ArrayBuffer) => Promise; verifySignature: (pubKey: ArrayBuffer, msg: ArrayBuffer, sig: ArrayBuffer) => Promise; calculateSignature: (privKey: ArrayBuffer, message: ArrayBuffer) => ArrayBuffer | Promise; validatePubKeyFormat: (buffer: ArrayBuffer) => ArrayBuffer; } export interface AsyncCurveType { generateKeyPair: () => Promise; createKeyPair: (privKey: ArrayBuffer) => Promise; calculateAgreement: (pubKey: ArrayBuffer, privKey: ArrayBuffer) => Promise; verifySignature: (pubKey: ArrayBuffer, msg: ArrayBuffer, sig: ArrayBuffer) => Promise; calculateSignature: (privKey: ArrayBuffer, message: ArrayBuffer) => Promise; }