diff --git a/src/client.ts b/src/client.ts index 894c5a09d..1598ef34b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -2027,7 +2027,7 @@ export class MatrixClient extends EventEmitter { * recovery key which should be disposed of after displaying to the user, * and raw private key to avoid round tripping if needed. */ - public createRecoveryKeyFromPassphrase(password: string): Promise { + public createRecoveryKeyFromPassphrase(password?: string): Promise { if (!this.crypto) { throw new Error("End-to-end encryption disabled"); } @@ -7451,7 +7451,7 @@ export class MatrixClient extends EventEmitter { return this.http.authedRequest(undefined, "GET", path, qps, undefined); } - public uploadDeviceSigningKeys(auth: any, keys: CrossSigningKeys): Promise<{}> { // TODO: types + public uploadDeviceSigningKeys(auth: any, keys?: CrossSigningKeys): Promise<{}> { // TODO: types const data = Object.assign({}, keys); if (auth) Object.assign(data, { auth }); return this.http.authedRequest( diff --git a/src/crypto/api.ts b/src/crypto/api.ts index 57f48c18c..1bd65d7db 100644 --- a/src/crypto/api.ts +++ b/src/crypto/api.ts @@ -58,7 +58,7 @@ export interface IEncryptedEventInfo { } export interface IRecoveryKey { - keyInfo: { + keyInfo?: { pubkey: string; passphrase?: { algorithm: string; @@ -67,7 +67,7 @@ export interface IRecoveryKey { }; }; privateKey: Uint8Array; - encodedPrivateKey: string; + encodedPrivateKey?: string; } export interface ICreateSecretStorageOpts { diff --git a/src/crypto/index.ts b/src/crypto/index.ts index 4022ce400..e35eef493 100644 --- a/src/crypto/index.ts +++ b/src/crypto/index.ts @@ -506,7 +506,7 @@ export class Crypto extends EventEmitter { * recovery key which should be disposed of after displaying to the user, * and raw private key to avoid round tripping if needed. */ - public async createRecoveryKeyFromPassphrase(password: string): Promise { + public async createRecoveryKeyFromPassphrase(password?: string): Promise { const decryption = new global.Olm.PkDecryption(); try { const keyInfo: Partial = {};