Skip to content

Commit 0c521f2

Browse files
committed
fix(legacy store): fix legacy store typing
In #4663, the storeXXX methods were removed of the CryptoStore interface but they are used internally by IndexedDBCryptoStore.
1 parent 0185f30 commit 0c521f2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/crypto/store/base.ts

+14
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,18 @@ export interface CryptoStore {
6969

7070
// Olm Account
7171
getAccount(txn: unknown, func: (accountPickle: string | null) => void): void;
72+
storeAccount(txn: unknown, accountPickle: string): void;
7273
getCrossSigningKeys(txn: unknown, func: (keys: Record<string, CrossSigningKeyInfo> | null) => void): void;
7374
getSecretStorePrivateKey<K extends keyof SecretStorePrivateKeys>(
7475
txn: unknown,
7576
func: (key: SecretStorePrivateKeys[K] | null) => void,
7677
type: K,
7778
): void;
79+
storeSecretStorePrivateKey<K extends keyof SecretStorePrivateKeys>(
80+
txn: unknown,
81+
type: K,
82+
key: SecretStorePrivateKeys[K],
83+
): void;
7884

7985
// Olm Sessions
8086
countEndToEndSessions(txn: unknown, func: (count: number) => void): void;
@@ -90,6 +96,8 @@ export interface CryptoStore {
9096
func: (sessions: { [sessionId: string]: ISessionInfo }) => void,
9197
): void;
9298

99+
storeEndToEndSession(deviceKey: string, sessionId: string, sessionInfo: ISessionInfo, txn: unknown): void;
100+
93101
/**
94102
* Get a batch of end-to-end sessions from the database.
95103
*
@@ -114,6 +122,12 @@ export interface CryptoStore {
114122
txn: unknown,
115123
func: (groupSession: InboundGroupSessionData | null, groupSessionWithheld: IWithheld | null) => void,
116124
): void;
125+
storeEndToEndInboundGroupSession(
126+
senderCurve25519Key: string,
127+
sessionId: string,
128+
sessionData: InboundGroupSessionData,
129+
txn: unknown,
130+
): void;
117131

118132
/**
119133
* Count the number of Megolm sessions in the database.

0 commit comments

Comments
 (0)