@metamask-previews/seedless-onboarding-controller 2.4.0-preview-89ee3f6 → 2.4.0-preview-4bc9f9d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SeedlessOnboardingController.cjs +10 -42
- package/dist/SeedlessOnboardingController.cjs.map +1 -1
- package/dist/SeedlessOnboardingController.d.cts +0 -4
- package/dist/SeedlessOnboardingController.d.cts.map +1 -1
- package/dist/SeedlessOnboardingController.d.mts +0 -4
- package/dist/SeedlessOnboardingController.d.mts.map +1 -1
- package/dist/SeedlessOnboardingController.mjs +10 -42
- package/dist/SeedlessOnboardingController.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BaseController } from "@metamask/base-controller";
|
|
2
|
-
import type { SEC1EncodedPublicKey } from "@metamask/toprf-secure-backup";
|
|
3
2
|
import { ToprfSecureBackup } from "@metamask/toprf-secure-backup";
|
|
4
3
|
import type { AuthConnection } from "./constants.cjs";
|
|
5
4
|
import { controllerName, SecretType } from "./constants.cjs";
|
|
@@ -181,8 +180,6 @@ export declare class SeedlessOnboardingController<EncryptionKey> extends BaseCon
|
|
|
181
180
|
* @description Check if the current password is outdated compare to the global password.
|
|
182
181
|
*
|
|
183
182
|
* @param options - Optional options object.
|
|
184
|
-
* @param options.globalAuthPubKey - The global auth public key to compare with the current auth public key.
|
|
185
|
-
* If not provided, the global auth public key will be fetched from the backend.
|
|
186
183
|
* @param options.skipCache - If true, bypass the cache and force a fresh check.
|
|
187
184
|
* @param options.skipLock - Whether to skip the lock acquisition. (to prevent deadlock in case the caller already acquired the lock)
|
|
188
185
|
* @returns A promise that resolves to true if the password is outdated, false otherwise.
|
|
@@ -190,7 +187,6 @@ export declare class SeedlessOnboardingController<EncryptionKey> extends BaseCon
|
|
|
190
187
|
checkIsPasswordOutdated(options?: {
|
|
191
188
|
skipCache?: boolean;
|
|
192
189
|
skipLock?: boolean;
|
|
193
|
-
globalAuthPubKey?: SEC1EncodedPublicKey;
|
|
194
190
|
}): Promise<boolean>;
|
|
195
191
|
/**
|
|
196
192
|
* Clears the current state of the SeedlessOnboardingController.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeedlessOnboardingController.d.cts","sourceRoot":"","sources":["../src/SeedlessOnboardingController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,kCAAkC;
|
|
1
|
+
{"version":3,"file":"SeedlessOnboardingController.d.cts","sourceRoot":"","sources":["../src/SeedlessOnboardingController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,kCAAkC;AAM3D,OAAO,EACL,iBAAiB,EAGlB,sCAAsC;AASvC,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAoB;AAClD,OAAO,EACL,cAAc,EAEd,UAAU,EAGX,wBAAoB;AAGrB,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAClD,OAAO,KAAK,EAEV,qCAAqC,EACrC,mCAAmC,EACnC,iCAAiC,EAEjC,qBAAqB,EAKtB,oBAAgB;AAKjB;;;;GAIG;AACH,wBAAgB,2CAA2C,IAAI,iCAAiC,CAI/F;AAwFD,qBAAa,4BAA4B,CAAC,aAAa,CAAE,SAAQ,cAAc,CAC7E,OAAO,cAAc,EACrB,iCAAiC,EACjC,qCAAqC,CACtC;;IAOC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IAaxC;;;;;;;;;;;OAWG;gBACS,EACV,SAAS,EACT,KAAK,EACL,SAAS,EACT,eAAe,EACf,OAAiC,EACjC,eAAe,EACf,kBAAkB,GACnB,EAAE,mCAAmC,CAAC,aAAa,CAAC;IA8B/C,wBAAwB,IAAI,OAAO,CAAC;QACxC,mBAAmB,EAAE,MAAM,CAAC;KAC7B,CAAC;IAyBF;;;;;;;;;;;;;;;;;OAiBG;IACG,YAAY,CAAC,MAAM,EAAE;QACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,WAAW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AAI,CAAC;IAYhB;;;;;;;;OAQG;IACH,wBAAwB,CACtB,IAAI,EAAE,UAAU,EAChB,IAAI,GAAE,UAAgC,GACrC,qBAAqB,GAAG,SAAS;IAOpC;;;;;;;;;;OAUG;IACG,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBrD;;;;OAIG;IACH,SAAS;IAWT;;;;;;;;OAQG;IACG,wBAAwB,CAAC,EAC7B,cAAc,GACf,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;KACxB;IAwBD;;;;;;;OAOG;IACG,oBAAoB,CAAC,EACzB,cAAc,EACd,iBAAqB,GACtB,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B,GAAG,OAAO,CAAC,IAAI,CAAC;IAiFjB;;;;;;;OAOG;IACG,uBAAuB,CAAC,OAAO,CAAC,EAAE;QACtC,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,GAAG,OAAO,CAAC,OAAO,CAAC;IAwFpB;;OAEG;IACH,UAAU;IAmDV;;;;;OAKG;IACG,yBAAyB,CAAC,oBAAoB,EAAE,MAAM;IAM5D;;;;;OAKG;IACG,wBAAwB;IAivB9B;;;;;;;OAOG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAwJxC;;;;OAIG;IACI,yBAAyB,IAAI,OAAO;IAY3C;;;;OAIG;IACI,+BAA+B,IAAI,OAAO;IAYjD;;;;;OAKG;IACI,uBAAuB,IAAI,OAAO;CAa1C"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BaseController } from "@metamask/base-controller";
|
|
2
|
-
import type { SEC1EncodedPublicKey } from "@metamask/toprf-secure-backup";
|
|
3
2
|
import { ToprfSecureBackup } from "@metamask/toprf-secure-backup";
|
|
4
3
|
import type { AuthConnection } from "./constants.mjs";
|
|
5
4
|
import { controllerName, SecretType } from "./constants.mjs";
|
|
@@ -181,8 +180,6 @@ export declare class SeedlessOnboardingController<EncryptionKey> extends BaseCon
|
|
|
181
180
|
* @description Check if the current password is outdated compare to the global password.
|
|
182
181
|
*
|
|
183
182
|
* @param options - Optional options object.
|
|
184
|
-
* @param options.globalAuthPubKey - The global auth public key to compare with the current auth public key.
|
|
185
|
-
* If not provided, the global auth public key will be fetched from the backend.
|
|
186
183
|
* @param options.skipCache - If true, bypass the cache and force a fresh check.
|
|
187
184
|
* @param options.skipLock - Whether to skip the lock acquisition. (to prevent deadlock in case the caller already acquired the lock)
|
|
188
185
|
* @returns A promise that resolves to true if the password is outdated, false otherwise.
|
|
@@ -190,7 +187,6 @@ export declare class SeedlessOnboardingController<EncryptionKey> extends BaseCon
|
|
|
190
187
|
checkIsPasswordOutdated(options?: {
|
|
191
188
|
skipCache?: boolean;
|
|
192
189
|
skipLock?: boolean;
|
|
193
|
-
globalAuthPubKey?: SEC1EncodedPublicKey;
|
|
194
190
|
}): Promise<boolean>;
|
|
195
191
|
/**
|
|
196
192
|
* Clears the current state of the SeedlessOnboardingController.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeedlessOnboardingController.d.mts","sourceRoot":"","sources":["../src/SeedlessOnboardingController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,kCAAkC;
|
|
1
|
+
{"version":3,"file":"SeedlessOnboardingController.d.mts","sourceRoot":"","sources":["../src/SeedlessOnboardingController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,kCAAkC;AAM3D,OAAO,EACL,iBAAiB,EAGlB,sCAAsC;AASvC,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAoB;AAClD,OAAO,EACL,cAAc,EAEd,UAAU,EAGX,wBAAoB;AAGrB,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAClD,OAAO,KAAK,EAEV,qCAAqC,EACrC,mCAAmC,EACnC,iCAAiC,EAEjC,qBAAqB,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GAAG,OAAO,CAAC,OAAO,CAAC;IAwFpB;;OAEG;IACH,UAAU;IAmDV;;;;;OAKG;IACG,yBAAyB,CAAC,oBAAoB,EAAE,MAAM;IAM5D;;;;;OAKG;IACG,wBAAwB;IAivB9B;;;;;;;OAOG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAwJxC;;;;OAIG;IACI,yBAAyB,IAAI,OAAO;IAY3C;;;;OAIG;IACI,+BAA+B,IAAI,OAAO;IAYjD;;;;;OAKG;IACI,uBAAuB,IAAI,OAAO;CAa1C"}
|
|
@@ -387,7 +387,7 @@ export class SeedlessOnboardingController extends BaseController {
|
|
|
387
387
|
await this.verifyVaultPassword(oldPassword, {
|
|
388
388
|
skipLock: true, // skip lock since we already have the lock
|
|
389
389
|
});
|
|
390
|
-
|
|
390
|
+
await __classPrivateFieldGet(this, _SeedlessOnboardingController_instances, "m", _SeedlessOnboardingController_assertPasswordInSync).call(this, {
|
|
391
391
|
skipCache: true,
|
|
392
392
|
skipLock: true, // skip lock since we already have the lock
|
|
393
393
|
});
|
|
@@ -401,7 +401,6 @@ export class SeedlessOnboardingController extends BaseController {
|
|
|
401
401
|
const { encKey: newEncKey, pwEncKey: newPwEncKey, authKeyPair: newAuthKeyPair, } = await __classPrivateFieldGet(this, _SeedlessOnboardingController_instances, "m", _SeedlessOnboardingController_changeEncryptionKey).call(this, {
|
|
402
402
|
oldPassword,
|
|
403
403
|
newPassword,
|
|
404
|
-
latestKeyIndex,
|
|
405
404
|
});
|
|
406
405
|
// update and encrypt the vault with new password
|
|
407
406
|
await __classPrivateFieldGet(this, _SeedlessOnboardingController_instances, "m", _SeedlessOnboardingController_createNewVaultWithAuthData).call(this, {
|
|
@@ -561,8 +560,6 @@ export class SeedlessOnboardingController extends BaseController {
|
|
|
561
560
|
* @description Check if the current password is outdated compare to the global password.
|
|
562
561
|
*
|
|
563
562
|
* @param options - Optional options object.
|
|
564
|
-
* @param options.globalAuthPubKey - The global auth public key to compare with the current auth public key.
|
|
565
|
-
* If not provided, the global auth public key will be fetched from the backend.
|
|
566
563
|
* @param options.skipCache - If true, bypass the cache and force a fresh check.
|
|
567
564
|
* @param options.skipLock - Whether to skip the lock acquisition. (to prevent deadlock in case the caller already acquired the lock)
|
|
568
565
|
* @returns A promise that resolves to true if the password is outdated, false otherwise.
|
|
@@ -584,16 +581,12 @@ export class SeedlessOnboardingController extends BaseController {
|
|
|
584
581
|
}
|
|
585
582
|
const { nodeAuthTokens, authConnectionId, groupedAuthConnectionId, userId, } = this.state;
|
|
586
583
|
const currentDeviceAuthPubKey = __classPrivateFieldGet(this, _SeedlessOnboardingController_instances, "m", _SeedlessOnboardingController_recoverAuthPubKey).call(this);
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
userId,
|
|
594
|
-
});
|
|
595
|
-
globalAuthPubKey = authPubKey;
|
|
596
|
-
}
|
|
584
|
+
const { authPubKey: globalAuthPubKey } = await this.toprfClient.fetchAuthPubKey({
|
|
585
|
+
nodeAuthTokens,
|
|
586
|
+
authConnectionId,
|
|
587
|
+
groupedAuthConnectionId,
|
|
588
|
+
userId,
|
|
589
|
+
});
|
|
597
590
|
// use noble lib to deserialize and compare curve point
|
|
598
591
|
const isExpiredPwd = !secp256k1.ProjectivePoint.fromHex(currentDeviceAuthPubKey).equals(secp256k1.ProjectivePoint.fromHex(globalAuthPubKey));
|
|
599
592
|
// Cache the result in state
|
|
@@ -934,22 +927,12 @@ async function _SeedlessOnboardingController_recoverEncKey(password) {
|
|
|
934
927
|
* @param params - The function parameters.
|
|
935
928
|
* @param params.oldPassword - The old password to verify.
|
|
936
929
|
* @param params.newPassword - The new password to update.
|
|
937
|
-
* @param params.latestKeyIndex - The key index of the latest key.
|
|
938
930
|
* @returns A promise that resolves to new encryption key and authentication key pair.
|
|
939
931
|
*/
|
|
940
|
-
async function _SeedlessOnboardingController_changeEncryptionKey({ oldPassword, newPassword,
|
|
932
|
+
async function _SeedlessOnboardingController_changeEncryptionKey({ oldPassword, newPassword, }) {
|
|
941
933
|
__classPrivateFieldGet(this, _SeedlessOnboardingController_instances, "m", _SeedlessOnboardingController_assertIsAuthenticatedUser).call(this, this.state);
|
|
942
934
|
const { authConnectionId, groupedAuthConnectionId, userId } = this.state;
|
|
943
|
-
|
|
944
|
-
let newKeyShareIndex = latestKeyIndex;
|
|
945
|
-
if (!newKeyShareIndex || !encKey || !pwEncKey || !authKeyPair) {
|
|
946
|
-
({
|
|
947
|
-
encKey,
|
|
948
|
-
pwEncKey,
|
|
949
|
-
authKeyPair,
|
|
950
|
-
keyShareIndex: newKeyShareIndex,
|
|
951
|
-
} = await __classPrivateFieldGet(this, _SeedlessOnboardingController_instances, "m", _SeedlessOnboardingController_recoverEncKey).call(this, oldPassword));
|
|
952
|
-
}
|
|
935
|
+
const { encKey, pwEncKey, authKeyPair, keyShareIndex: newKeyShareIndex, } = await __classPrivateFieldGet(this, _SeedlessOnboardingController_instances, "m", _SeedlessOnboardingController_recoverEncKey).call(this, oldPassword);
|
|
953
936
|
const result = await this.toprfClient.changeEncKey({
|
|
954
937
|
nodeAuthTokens: this.state.nodeAuthTokens,
|
|
955
938
|
authConnectionId,
|
|
@@ -1300,28 +1283,13 @@ async function _SeedlessOnboardingController_withVaultLock(callback) {
|
|
|
1300
1283
|
* @param options - The options for asserting the password is in sync.
|
|
1301
1284
|
* @param options.skipCache - Whether to skip the cache check.
|
|
1302
1285
|
* @param options.skipLock - Whether to skip the lock acquisition. (to prevent deadlock in case the caller already acquired the lock)
|
|
1303
|
-
* @returns The global auth public key and the latest key index.
|
|
1304
1286
|
* @throws If the password is outdated.
|
|
1305
1287
|
*/
|
|
1306
1288
|
async function _SeedlessOnboardingController_assertPasswordInSync(options) {
|
|
1307
|
-
const
|
|
1308
|
-
if (!nodeAuthTokens || !authConnectionId || !userId) {
|
|
1309
|
-
throw new Error(SeedlessOnboardingControllerErrorMessage.MissingAuthUserInfo);
|
|
1310
|
-
}
|
|
1311
|
-
const { authPubKey, keyIndex: latestKeyIndex } = await this.toprfClient.fetchAuthPubKey({
|
|
1312
|
-
nodeAuthTokens,
|
|
1313
|
-
authConnectionId,
|
|
1314
|
-
groupedAuthConnectionId,
|
|
1315
|
-
userId,
|
|
1316
|
-
});
|
|
1317
|
-
const isPasswordOutdated = await this.checkIsPasswordOutdated({
|
|
1318
|
-
...options,
|
|
1319
|
-
globalAuthPubKey: authPubKey,
|
|
1320
|
-
});
|
|
1289
|
+
const isPasswordOutdated = await this.checkIsPasswordOutdated(options);
|
|
1321
1290
|
if (isPasswordOutdated) {
|
|
1322
1291
|
throw new Error(SeedlessOnboardingControllerErrorMessage.OutdatedPassword);
|
|
1323
1292
|
}
|
|
1324
|
-
return { authPubKey, latestKeyIndex };
|
|
1325
1293
|
}, _SeedlessOnboardingController_resetPasswordOutdatedCache = function _SeedlessOnboardingController_resetPasswordOutdatedCache() {
|
|
1326
1294
|
this.update((state) => {
|
|
1327
1295
|
delete state.passwordOutdatedCache;
|