Skip to content

Commit

Permalink
Fix order of things in crypto-api.ts (#3491)
Browse files Browse the repository at this point in the history
* `CryptoApi` should be first
* `export *` should be last
* everything else in the middle
  • Loading branch information
richvdh committed Jun 20, 2023
1 parent 80cdbe1 commit 8df4be0
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/crypto-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,6 @@ import { UIAuthCallback } from "./interactive-auth";
import { AddSecretStorageKeyOpts } from "./secret-storage";
import { VerificationRequest } from "./crypto-api/verification";

/** Types of cross-signing key */
export enum CrossSigningKey {
Master = "master",
SelfSigning = "self_signing",
UserSigning = "user_signing",
}

/**
* Recovery key created by {@link CryptoApi#createRecoveryKeyFromPassphrase}
*/
export interface GeneratedSecretStorageKey {
keyInfo?: AddSecretStorageKeyOpts;
/** The raw generated private key. */
privateKey: Uint8Array;
/** The generated key, encoded for display to the user per https://spec.matrix.org/v1.7/client-server-api/#key-representation. */
encodedPrivateKey?: string;
}

/**
* Public interface to the cryptography parts of the js-sdk
*
Expand Down Expand Up @@ -373,8 +355,6 @@ export interface ImportRoomKeysOpts {
source?: String; // TODO: Enum (backup, file, ??)
}

export * from "./crypto-api/verification";

/**
* The result of a call to {@link CryptoApi.getCrossSigningStatus}.
*/
Expand All @@ -396,3 +376,23 @@ export interface CrossSigningStatus {
userSigningKey: boolean;
};
}

/** Types of cross-signing key */
export enum CrossSigningKey {
Master = "master",
SelfSigning = "self_signing",
UserSigning = "user_signing",
}

/**
* Recovery key created by {@link CryptoApi#createRecoveryKeyFromPassphrase}
*/
export interface GeneratedSecretStorageKey {
keyInfo?: AddSecretStorageKeyOpts;
/** The raw generated private key. */
privateKey: Uint8Array;
/** The generated key, encoded for display to the user per https://spec.matrix.org/v1.7/client-server-api/#key-representation. */
encodedPrivateKey?: string;
}

export * from "./crypto-api/verification";

0 comments on commit 8df4be0

Please sign in to comment.