feat: add signal repository + tests

This commit is contained in:
Adhiraj Singh
2023-03-18 12:25:47 +05:30
parent 2eea17fe9f
commit fe1d0649b5
21 changed files with 500 additions and 206 deletions

View File

@@ -3,7 +3,12 @@ import type { Contact } from './Contact'
import type { MinimalMessage } from './Message'
export type KeyPair = { public: Uint8Array, private: Uint8Array }
export type SignedKeyPair = { keyPair: KeyPair, signature: Uint8Array, keyId: number }
export type SignedKeyPair = {
keyPair: KeyPair
signature: Uint8Array
keyId: number
timestampS?: number
}
export type ProtocolAddress = {
name: string // jid
@@ -57,8 +62,8 @@ export type AuthenticationCreds = SignalCreds & {
export type SignalDataTypeMap = {
'pre-key': KeyPair
'session': any
'sender-key': any
'session': Uint8Array
'sender-key': Uint8Array
'sender-key-memory': { [jid: string]: boolean }
'app-state-sync-key': proto.Message.IAppStateSyncKeyData
'app-state-sync-version': LTHashState