/** * Shared fixtures for `wrap-legacy-store` unit tests. The 4 sister test * files (sender-key / session / lid-mapping / coverage) all need the same * in-memory keys store + wrapped-store factory + byte-pattern generator. */ /** Heterogeneous values held by the in-memory keys store. The bridge writes * raw `Buffer`s for Signal records, plain JS objects for sessions, and * strings for lid_mapping — `unknown` keeps each test honest about which. */ export type MemKeysValue = Buffer | string | object | null; /** In-memory keys store mirroring upstream `useMultiFileAuthState`'s * `keys.get(type, ids[])` / `keys.set({ [type]: { [id]: value } })`. */ export declare function makeMemKeys(): { raw: Record>; get(type: string, ids: string[]): Promise>; set(updates: Record>): Promise; }; /** Build a wrap-legacy-store wired to a fresh in-memory keys backend. * The double-cast through `unknown` is intentional: the test's keys * callback is heterogeneous (`MemKeysValue`) by design, but * `AuthenticationState['keys']` is the strongly-typed `SignalKeyStore` * union — they overlap structurally without sharing a parameterised type. */ export declare function makeWrapped(): Promise<{ wrapped: import("../wrap-legacy-store.js").WrappedLegacyStore; keys: { raw: Record>; get(type: string, ids: string[]): Promise>; set(updates: Record>): Promise; }; creds: import("../../index.js").AuthenticationCreds; }>; /** Deterministic byte-pattern generator. Distinct `(n, base)` pairs yield * distinct buffers, so we can pinpoint which field round-tripped wrong. */ export declare const fill: (n: number, base: number) => Uint8Array; export declare const SAMPLE_GROUP = "120363012345678900@g.us"; export declare const BRIDGE_SK_KEY_LID = "120363012345678900@g.us:100000037037034@lid.0"; export declare const UPSTREAM_SK_KEY_LID = "120363012345678900@g.us::100000037037034_1::0"; export declare const BRIDGE_SK_KEY_PN_DEV = "120363012345678900@g.us:559980000003:5@s.whatsapp.net.0"; export declare const UPSTREAM_SK_KEY_PN_DEV = "120363012345678900@g.us::559980000003::5"; export declare const BRIDGE_SESSION_KEY_LID = "100000037037034@lid.0"; export declare const UPSTREAM_SESSION_KEY_LID = "100000037037034_1.0"; export declare const BRIDGE_SESSION_KEY_PN = "559980000003@s.whatsapp.net.0"; export declare const UPSTREAM_SESSION_KEY_PN = "559980000003.0"; export declare const BRIDGE_SESSION_KEY_PN_DEV = "559980000003:5@s.whatsapp.net.0"; export declare const UPSTREAM_SESSION_KEY_PN_DEV = "559980000003.5"; export interface BuildSenderKeyOpts { keyId?: number; iteration?: number; chainSeed?: Uint8Array; signingPublic?: Uint8Array; signingPrivate?: Uint8Array; } /** Encode a `SenderKeyRecordStructure` with one populated state. */ export declare function buildBridgeSenderKeyBytes(opts?: BuildSenderKeyOpts): Uint8Array; export interface BuildSessionOpts { rootKey?: Uint8Array; rootSeed?: number; previousCounter?: number; senderRatchetPub?: Uint8Array; senderRatchetPriv?: Uint8Array; senderChainKey?: Uint8Array; senderChainIndex?: number; receiverRatchetPub?: Uint8Array; receiverChainKey?: Uint8Array; receiverChainIndex?: number; aliceBaseKey?: Uint8Array; remoteIdentity?: Uint8Array; remoteRegistrationId?: number; localRegistrationId?: number; } /** Encode a `RecordStructure` with a single established `currentSession` * (sender chain + one receiver chain). */ export declare function buildBridgeSessionBytes(opts?: BuildSessionOpts): Uint8Array; //# sourceMappingURL=_legacy-store-fixtures.d.ts.map