mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
refactor: cleaner & faster app state sync management
1. Is orders of magnitude faster than the previous edition 2. Stores lesser data, so more memory efficient 3. This breaks the current app state in baileys, but baileys will auto-resync & update the state
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { Contact } from "./Contact"
|
||||
import type { proto } from "../../WAProto"
|
||||
import type { WAPatchName, ChatMutation } from "./Chat"
|
||||
import type { WAPatchName } from "./Chat"
|
||||
|
||||
export type KeyPair = { public: Uint8Array, private: Uint8Array }
|
||||
export type SignedKeyPair = { keyPair: KeyPair, signature: Uint8Array, keyId: number }
|
||||
@@ -14,7 +14,13 @@ export type SignalIdentity = {
|
||||
identifierKey: Uint8Array
|
||||
}
|
||||
|
||||
export type LTHashState = { version: number, hash: Buffer, mutations: ChatMutation[] }
|
||||
export type LTHashState = {
|
||||
version: number
|
||||
hash: Buffer
|
||||
indexValueMap: {
|
||||
[indexMacBase64: string]: { valueMac: Uint8Array | Buffer }
|
||||
}
|
||||
}
|
||||
|
||||
export type SignalCreds = {
|
||||
readonly signedIdentityKey: KeyPair
|
||||
|
||||
Reference in New Issue
Block a user