diff --git a/src/mpcCoreKit.ts b/src/mpcCoreKit.ts index 90956ee0..51f67160 100644 --- a/src/mpcCoreKit.ts +++ b/src/mpcCoreKit.ts @@ -445,6 +445,18 @@ export class Web3AuthMPCCoreKit implements ICoreKit { return this.tKey.getTSSPub(); } + public async isMFAEnabled(): Promise { + if (!this.state.oAuthKey || !this.options.hashedFactorNonce) { + throw new Error("oAuthKey or hashedFactorNonce not present"); + } + + const hashedFactorKey = getHashedPrivateKey(this.state.oAuthKey, this.options.hashedFactorNonce); + if (await this.checkIfFactorKeyValid(hashedFactorKey)) { + return true; + } + return false; + } + public async enableMFA(enableMFAParams: EnableMFAParams, recoveryFactor = true): Promise { this.checkReady();