Skip to content

Commit 2558903

Browse files
authored
Remove legacy crypto export in matrix.ts (#4667)
* feat(legacy crypto!): remove legacy crypto export in `matrix.ts` * test(legacy crypto): update `megolm-backup.spec.ts` to import directly `CryptoApi`
1 parent b156707 commit 2558903

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

spec/integ/crypto/megolm-backup.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { Mocked } from "jest-mock";
2121

2222
import {
2323
createClient,
24-
Crypto,
2524
encodeBase64,
2625
ICreateClientOpts,
2726
IEvent,
@@ -44,7 +43,7 @@ import * as testData from "../../test-utils/test-data";
4443
import { KeyBackupInfo, KeyBackupSession } from "../../../src/crypto-api/keybackup";
4544
import { flushPromises } from "../../test-utils/flushPromises";
4645
import { defer, IDeferred } from "../../../src/utils";
47-
import { decodeRecoveryKey, DecryptionFailureCode, CryptoEvent } from "../../../src/crypto-api";
46+
import { decodeRecoveryKey, DecryptionFailureCode, CryptoEvent, CryptoApi } from "../../../src/crypto-api";
4847
import { KeyBackup } from "../../../src/rust-crypto/backup.ts";
4948

5049
const ROOM_ID = testData.TEST_ROOM_ID;
@@ -311,7 +310,7 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("megolm-keys backup (%s)", (backe
311310
});
312311

313312
describe("recover from backup", () => {
314-
let aliceCrypto: Crypto.CryptoApi;
313+
let aliceCrypto: CryptoApi;
315314

316315
beforeEach(async () => {
317316
fetchMock.get("path:/_matrix/client/v3/room_keys/version", testData.SIGNED_BACKUP_DATA);

src/matrix.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export * from "./models/related-relations.ts";
8585
export type { RoomSummary } from "./client.ts";
8686
export * as ContentHelpers from "./content-helpers.ts";
8787
export * as SecretStorage from "./secret-storage.ts";
88-
export type { ICryptoCallbacks } from "./crypto/index.ts"; // used to be located here
8988
export { createNewMatrixCall, CallEvent } from "./webrtc/call.ts";
9089
export type { MatrixCall } from "./webrtc/call.ts";
9190
export {
@@ -97,10 +96,6 @@ export {
9796
GroupCallStatsReportEvent,
9897
} from "./webrtc/groupCall.ts";
9998

100-
export {
101-
/** @deprecated Use {@link Crypto.CryptoEvent} instead */
102-
CryptoEvent,
103-
} from "./crypto/index.ts";
10499
export { SyncState, SetPresence } from "./sync.ts";
105100
export type { ISyncStateData as SyncStateData } from "./sync.ts";
106101
export { SlidingSyncEvent } from "./sliding-sync.ts";
@@ -115,9 +110,6 @@ export type { ISSOFlow as SSOFlow, LoginFlow } from "./@types/auth.ts";
115110
export type { IHierarchyRelation as HierarchyRelation, IHierarchyRoom as HierarchyRoom } from "./@types/spaces.ts";
116111
export { LocationAssetType } from "./@types/location.ts";
117112

118-
/** @deprecated Backwards-compatibility re-export. Import from `crypto-api` directly. */
119-
export * as Crypto from "./crypto-api/index.ts";
120-
121113
let cryptoStoreFactory = (): CryptoStore => new MemoryCryptoStore();
122114

123115
/**

0 commit comments

Comments
 (0)