@metamask-previews/seedless-onboarding-controller 12.0.0-preview-717f20d → 12.0.0-preview-64cf2e401

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/CHANGELOG.md CHANGED
@@ -7,12 +7,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+
12
+ - Add the `seedlessOperationLifecycle` state field to persist the generic non-sensitive lifecycle record defined by the Seedless Onboarding state-machine ADR ([#10148](https://github.com/MetaMask/core/pull/10148))
13
+ - `operation` identifies the Seedless Onboarding workflow, such as
14
+ `PASSWORD_CHANGE` or `PASSWORD_SYNC`.
15
+ - `phase` identifies the recoverable boundary within that workflow.
16
+ - Add `PasswordSyncInstruction` enum, returned by `resolvePasswordSyncState` and `reconcilePassword` to tell clients which step to run next after either an interrupted local password change or a password change on another device ([#10148](https://github.com/MetaMask/core/pull/10148))
17
+ - `PasswordOutdated` covers remote password changes and committed password-change recovery for the regular recovery checkpoints.
18
+ - `KEY_SYNC_PENDING` with an outdated remote password returns `WalletResetRequired` because the local Keyring and Seedless encryption keys cannot be reconciled.
19
+ - Errors are thrown when the password state cannot be established; no unknown instruction is returned.
20
+ - Add `resolvePasswordSyncState({ skipCache })` and `SeedlessOnboardingControllerResolvePasswordSyncStateAction` to resolve remote password state at unlock without consuming a password, replacing the removed `checkIsPasswordOutdated` read ([#10148](https://github.com/MetaMask/core/pull/10148))
21
+ - Add `reconcilePassword` and `SeedlessOnboardingControllerReconcilePasswordAction` to bring local Seedless state up to date with the remote password after either an interrupted local password change or a password change made on another device. It accepts an optional `maxKeyChainLength` parameter ([#10148](https://github.com/MetaMask/core/pull/10148))
22
+ - For an outdated password with no checkpoint, `REMOTE_PASSWORD_PENDING`, or `LOCAL_STATE_PENDING`, it performs the password-chain unlock and local vault rewrite internally, re-encrypts `encryptedKeyringEncryptionKey` under the new wrapping key so `loadKeyringEncryptionKey` keeps working, and advances the lifecycle to `LOCAL_PASSWORD_PENDING` so the client reconciles the local Keyring before unlocking normally.
23
+ - For `LOCAL_PASSWORD_PENDING` or `KEY_SYNC_PENDING` with a current remote password, it unlocks the already-rewritten local vault with the supplied password so `loadKeyringEncryptionKey` and `storeKeyringEncryptionKey` work after a restart, without repeating remote TOPRF recovery. A newer `accessToken` from `refreshAuthTokens` is kept instead of being overwritten by the vault copy.
24
+ - For `KEY_SYNC_PENDING` with an outdated remote password, it returns `WalletResetRequired` instead of attempting password reconciliation.
25
+ - Add `completePasswordChange` and `markPasswordChangeKeySyncPending` lifecycle-advance methods, along with `SeedlessOnboardingControllerCompletePasswordChangeAction` and `SeedlessOnboardingControllerMarkPasswordChangeKeySyncPendingAction`. `completePasswordChange` clears an active password-recovery lifecycle after key synchronization and local persistence are verified. Password-sync methods also clear stale lifecycle state when the password state is already in sync ([#10148](https://github.com/MetaMask/core/pull/10148))
26
+ - Add `SeedlessOnboardingControllerErrorMessage.PasswordChangeInProgress`, thrown when a password change is started while another one is unresolved ([#10148](https://github.com/MetaMask/core/pull/10148))
27
+ - Add `SeedlessOnboardingControllerErrorMessage.OperationInProgress` and
28
+ `InvalidPasswordSyncCheckpoint` for lifecycle conflicts and invalid recovery
29
+ checkpoints ([#10148](https://github.com/MetaMask/core/pull/10148))
30
+
10
31
  ### Changed
11
32
 
33
+ - **BREAKING:** `changePassword` is now lifecycle-aware: it writes `seedlessOperationLifecycle` with the shared `REMOTE_PASSWORD_PENDING`, `LOCAL_STATE_PENDING`, and `LOCAL_PASSWORD_PENDING` phases and rejects a concurrent change with `PasswordChangeInProgress` ([#10148](https://github.com/MetaMask/core/pull/10148))
34
+ - Clients must not start a second password change while a lifecycle is unfinished, and must drive the lifecycle to completion by calling `completePasswordChange`. See the [password sync flow](./docs/0002-seedless-password-sync-flow.md).
35
+ - **BREAKING:** `addNewSecretData` and `runMigrations` now reject while `seedlessOperationLifecycle` is set, including the `LOCAL_PASSWORD_PENDING` state left after a successful password change. They throw `PasswordChangeInProgress` for a pending password change and `OperationInProgress` for another password-recovery operation; clients must complete recovery first ([#10148](https://github.com/MetaMask/core/pull/10148))
36
+ - `storeKeyringEncryptionKey` and `loadKeyringEncryptionKey` now acquire the controller lock, so they wait for any in-flight controller operation before reading or writing the Keyring encryption key ([#10148](https://github.com/MetaMask/core/pull/10148))
37
+ - **BREAKING:** `clearState` now returns a promise and waits for in-flight controller operations before clearing state. It also clears the in-memory decrypted vault data to prevent a completed operation from restoring cleared state ([#10148](https://github.com/MetaMask/core/pull/10148))
12
38
  - Replace JS AES implementation with `@metamask/cryptography` ([#10659](https://github.com/MetaMask/core/pull/10659))
13
39
  - Bump `@metamask/keyring-controller` from `^28.1.0` to `^28.2.0` ([#10851](https://github.com/MetaMask/core/pull/10851))
14
40
  - Bump `@metamask/base-controller` from `^10.0.0` to `^10.1.0` ([#10864](https://github.com/MetaMask/core/pull/10864))
15
41
 
42
+ ### Removed
43
+
44
+ - **BREAKING:** Remove the `checkIsPasswordOutdated` method and `SeedlessOnboardingControllerCheckIsPasswordOutdatedAction` ([#10148](https://github.com/MetaMask/core/pull/10148))
45
+ - Call `resolvePasswordSyncState({ skipCache })` instead. It performs the same remote check and additionally returns the required recovery step, so a boolean `true` result now corresponds to `PasswordSyncInstruction.PasswordOutdated` for regular checkpoints or `PasswordSyncInstruction.WalletResetRequired` for `KEY_SYNC_PENDING`.
46
+ - **BREAKING:** Remove the `submitGlobalPassword` and `syncLatestGlobalPassword` methods, along with `SeedlessOnboardingControllerSubmitGlobalPasswordAction` and `SeedlessOnboardingControllerSyncLatestGlobalPasswordAction` ([#10148](https://github.com/MetaMask/core/pull/10148))
47
+ - Call `reconcilePassword({ globalPassword })` instead. When password synchronization is required, it runs both steps internally in the correct order, re-wraps the stored Keyring encryption key, and records the lifecycle phase, none of which happened when the two methods were called directly. For `KEY_SYNC_PENDING` with an outdated remote password, it returns `WalletResetRequired` instead.
48
+
16
49
  ## [12.0.0]
17
50
 
18
51
  ### Added
@@ -180,45 +180,6 @@ export type SeedlessOnboardingControllerSetLockedAction = {
180
180
  type: `SeedlessOnboardingController:setLocked`;
181
181
  handler: SeedlessOnboardingController['setLocked'];
182
182
  };
183
- /**
184
- * Sync the latest global password to the controller.
185
- * reset vault with latest globalPassword,
186
- * persist the latest global password authPubKey
187
- *
188
- * @param params - The parameters for syncing the latest global password.
189
- * @param params.globalPassword - The latest global password.
190
- * @returns A promise that resolves to the success of the operation.
191
- */
192
- export type SeedlessOnboardingControllerSyncLatestGlobalPasswordAction = {
193
- type: `SeedlessOnboardingController:syncLatestGlobalPassword`;
194
- handler: SeedlessOnboardingController['syncLatestGlobalPassword'];
195
- };
196
- /**
197
- * @description Unlock the controller with the latest global password.
198
- *
199
- * @param params - The parameters for unlocking the controller.
200
- * @param params.maxKeyChainLength - The maximum chain length of the pwd encryption keys.
201
- * @param params.globalPassword - The latest global password.
202
- * @returns A promise that resolves to the success of the operation.
203
- */
204
- export type SeedlessOnboardingControllerSubmitGlobalPasswordAction = {
205
- type: `SeedlessOnboardingController:submitGlobalPassword`;
206
- handler: SeedlessOnboardingController['submitGlobalPassword'];
207
- };
208
- /**
209
- * @description Check if the current password is outdated compare to the global password.
210
- *
211
- * @param options - Optional options object.
212
- * @param options.globalAuthPubKey - The global auth public key to compare with the current auth public key.
213
- * If not provided, the global auth public key will be fetched from the backend.
214
- * @param options.skipCache - If true, bypass the cache and force a fresh check.
215
- * @param options.skipLock - Whether to skip the lock acquisition. (to prevent deadlock in case the caller already acquired the lock)
216
- * @returns A promise that resolves to true if the password is outdated, false otherwise.
217
- */
218
- export type SeedlessOnboardingControllerCheckIsPasswordOutdatedAction = {
219
- type: `SeedlessOnboardingController:checkIsPasswordOutdated`;
220
- handler: SeedlessOnboardingController['checkIsPasswordOutdated'];
221
- };
222
183
  /**
223
184
  * Check if the user is authenticated with the seedless onboarding flow by checking the token values in the state.
224
185
  *
@@ -236,6 +197,11 @@ export type SeedlessOnboardingControllerGetIsUserAuthenticatedAction = {
236
197
  };
237
198
  /**
238
199
  * Clears the current state of the SeedlessOnboardingController.
200
+ *
201
+ * Waits for any in-flight controller operation before clearing state and
202
+ * releases the in-memory decrypted vault data.
203
+ *
204
+ * @returns A promise that resolves once the state has been cleared.
239
205
  */
240
206
  export type SeedlessOnboardingControllerClearStateAction = {
241
207
  type: `SeedlessOnboardingController:clearState`;
@@ -245,6 +211,9 @@ export type SeedlessOnboardingControllerClearStateAction = {
245
211
  * Store the keyring encryption key in state, encrypted under the current
246
212
  * encryption key.
247
213
  *
214
+ * Remains lifecycle-neutral: the client calls this during recovery without
215
+ * advancing the lifecycle checkpoint.
216
+ *
248
217
  * @param keyringEncryptionKey - The keyring encryption key.
249
218
  */
250
219
  export type SeedlessOnboardingControllerStoreKeyringEncryptionKeyAction = {
@@ -261,6 +230,89 @@ export type SeedlessOnboardingControllerLoadKeyringEncryptionKeyAction = {
261
230
  type: `SeedlessOnboardingController:loadKeyringEncryptionKey`;
262
231
  handler: SeedlessOnboardingController['loadKeyringEncryptionKey'];
263
232
  };
233
+ /**
234
+ * Complete password-change recovery.
235
+ *
236
+ * Call this after the current Keyring encryption key has been synchronized
237
+ * and all required local writes have succeeded. The controller clears the
238
+ * lifecycle so the next unlock is normal.
239
+ *
240
+ * @returns A promise that resolves once recovery has been completed.
241
+ */
242
+ export type SeedlessOnboardingControllerCompletePasswordChangeAction = {
243
+ type: `SeedlessOnboardingController:completePasswordChange`;
244
+ handler: SeedlessOnboardingController['completePasswordChange'];
245
+ };
246
+ /**
247
+ * Mark the password-change lifecycle as `KEY_SYNC_PENDING`.
248
+ *
249
+ * Called by the client coordinator before it synchronizes the current
250
+ * Keyring encryption key to Seedless. The controller only records the
251
+ * boundary; it does not perform or verify synchronization.
252
+ *
253
+ * @returns A promise that resolves once the checkpoint has been persisted.
254
+ */
255
+ export type SeedlessOnboardingControllerMarkPasswordChangeKeySyncPendingAction = {
256
+ type: `SeedlessOnboardingController:markPasswordChangeKeySyncPending`;
257
+ handler: SeedlessOnboardingController['markPasswordChangeKeySyncPending'];
258
+ };
259
+ /**
260
+ * Resolve the password-sync instruction without consuming a password.
261
+ *
262
+ * Checks the remote password before routing recovery for every valid
263
+ * password-sync checkpoint. The checkpoint then determines the next local
264
+ * recovery instruction when the passwords are in sync.
265
+ *
266
+ * @param options - The options.
267
+ * @param options.skipCache - Whether to bypass the outdated cache. Recovery
268
+ * checkpoints always bypass the cache.
269
+ * @returns The sync/recovery instruction.
270
+ * @throws If another operation is active or the password state cannot be
271
+ * established.
272
+ */
273
+ export type SeedlessOnboardingControllerResolvePasswordSyncStateAction = {
274
+ type: `SeedlessOnboardingController:resolvePasswordSyncState`;
275
+ handler: SeedlessOnboardingController['resolvePasswordSyncState'];
276
+ };
277
+ /**
278
+ * Reconcile the local Seedless password with the remote password.
279
+ *
280
+ * For `LOCAL_STATE_PENDING` it re-runs the existing password-sync flow
281
+ * (chain unlock + local vault rewrite) with the new password and advances
282
+ * the checkpoint to `LOCAL_PASSWORD_PENDING`. These operations are
283
+ * idempotent, so re-running them is safe whether or not the local Seedless
284
+ * vault was already rewritten. The controller is left unlocked.
285
+ *
286
+ * For `LOCAL_PASSWORD_PENDING` or `KEY_SYNC_PENDING` the local Seedless vault
287
+ * is already rewritten. The method unlocks it with the supplied password so
288
+ * `loadKeyringEncryptionKey` and `storeKeyringEncryptionKey` work after a
289
+ * restart, without repeating remote TOPRF recovery or a vault rewrite. A
290
+ * newer `accessToken` from `refreshAuthTokens` is kept instead of being
291
+ * overwritten by the vault copy.
292
+ *
293
+ * It always re-checks whether the remote password is outdated, including when
294
+ * the local Seedless vault was already rewritten. If it is, it runs the same
295
+ * password-sync flow, advances to `LOCAL_PASSWORD_PENDING`, and returns
296
+ * `ReconcileKeyring` so the client can reconcile the local Keyring. If the
297
+ * remote password is current, the checkpoint determines whether the client
298
+ * must reconcile the Keyring, sync its key, or do nothing.
299
+ *
300
+ * The client remains responsible for the Keyring side (classifying the local
301
+ * Keyring via `KeyringController:verifyPassword` and running the old-Keyring
302
+ * or new-Keyring branch), because this controller does not depend on
303
+ * `KeyringController`. See
304
+ * [0003](./docs/0003-controller-owned-password-change-recovery-plan.md).
305
+ *
306
+ * @param params - The reconciliation parameters.
307
+ * @param params.globalPassword - The current global password.
308
+ * @param params.maxKeyChainLength - The maximum chain length of the pwd encryption keys. @default 5
309
+ * @returns The reconciliation instruction.
310
+ * @throws If recovery cannot establish the current password state.
311
+ */
312
+ export type SeedlessOnboardingControllerReconcilePasswordAction = {
313
+ type: `SeedlessOnboardingController:reconcilePassword`;
314
+ handler: SeedlessOnboardingController['reconcilePassword'];
315
+ };
264
316
  /**
265
317
  * Refresh expired nodeAuthTokens, accessToken, and metadataAccessToken using
266
318
  * the stored refresh token.
@@ -344,5 +396,5 @@ export type SeedlessOnboardingControllerCheckAccessTokenExpiredAction = {
344
396
  /**
345
397
  * Union of all SeedlessOnboardingController action types.
346
398
  */
347
- export type SeedlessOnboardingControllerMethodActions = SeedlessOnboardingControllerFetchMetadataAccessCredsAction | SeedlessOnboardingControllerPreloadToprfNodeDetailsAction | SeedlessOnboardingControllerAuthenticateAction | SeedlessOnboardingControllerCreateToprfKeyAndBackupSeedPhraseAction | SeedlessOnboardingControllerAddNewSecretDataAction | SeedlessOnboardingControllerRunMigrationsAction | SeedlessOnboardingControllerFetchAllSecretDataAction | SeedlessOnboardingControllerChangePasswordAction | SeedlessOnboardingControllerUpdateBackupMetadataStateAction | SeedlessOnboardingControllerVerifyVaultPasswordAction | SeedlessOnboardingControllerGetSecretDataBackupStateAction | SeedlessOnboardingControllerSubmitPasswordAction | SeedlessOnboardingControllerIdentifyIncompleteMetadataBackupAction | SeedlessOnboardingControllerSetLockedAction | SeedlessOnboardingControllerSyncLatestGlobalPasswordAction | SeedlessOnboardingControllerSubmitGlobalPasswordAction | SeedlessOnboardingControllerCheckIsPasswordOutdatedAction | SeedlessOnboardingControllerGetIsUserAuthenticatedAction | SeedlessOnboardingControllerClearStateAction | SeedlessOnboardingControllerStoreKeyringEncryptionKeyAction | SeedlessOnboardingControllerLoadKeyringEncryptionKeyAction | SeedlessOnboardingControllerRefreshAuthTokensAction | SeedlessOnboardingControllerRotateRefreshTokenAction | SeedlessOnboardingControllerRevokePendingRefreshTokensAction | SeedlessOnboardingControllerGetAccessTokenAction | SeedlessOnboardingControllerCheckNodeAuthTokenExpiredAction | SeedlessOnboardingControllerCheckMetadataAccessTokenExpiredAction | SeedlessOnboardingControllerCheckAccessTokenExpiredAction;
399
+ export type SeedlessOnboardingControllerMethodActions = SeedlessOnboardingControllerFetchMetadataAccessCredsAction | SeedlessOnboardingControllerPreloadToprfNodeDetailsAction | SeedlessOnboardingControllerAuthenticateAction | SeedlessOnboardingControllerCreateToprfKeyAndBackupSeedPhraseAction | SeedlessOnboardingControllerAddNewSecretDataAction | SeedlessOnboardingControllerRunMigrationsAction | SeedlessOnboardingControllerFetchAllSecretDataAction | SeedlessOnboardingControllerChangePasswordAction | SeedlessOnboardingControllerUpdateBackupMetadataStateAction | SeedlessOnboardingControllerVerifyVaultPasswordAction | SeedlessOnboardingControllerGetSecretDataBackupStateAction | SeedlessOnboardingControllerSubmitPasswordAction | SeedlessOnboardingControllerIdentifyIncompleteMetadataBackupAction | SeedlessOnboardingControllerSetLockedAction | SeedlessOnboardingControllerGetIsUserAuthenticatedAction | SeedlessOnboardingControllerClearStateAction | SeedlessOnboardingControllerStoreKeyringEncryptionKeyAction | SeedlessOnboardingControllerLoadKeyringEncryptionKeyAction | SeedlessOnboardingControllerCompletePasswordChangeAction | SeedlessOnboardingControllerMarkPasswordChangeKeySyncPendingAction | SeedlessOnboardingControllerResolvePasswordSyncStateAction | SeedlessOnboardingControllerReconcilePasswordAction | SeedlessOnboardingControllerRefreshAuthTokensAction | SeedlessOnboardingControllerRotateRefreshTokenAction | SeedlessOnboardingControllerRevokePendingRefreshTokensAction | SeedlessOnboardingControllerGetAccessTokenAction | SeedlessOnboardingControllerCheckNodeAuthTokenExpiredAction | SeedlessOnboardingControllerCheckMetadataAccessTokenExpiredAction | SeedlessOnboardingControllerCheckAccessTokenExpiredAction;
348
400
  //# sourceMappingURL=SeedlessOnboardingController-method-action-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SeedlessOnboardingController-method-action-types.d.ts","sourceRoot":"","sources":["../src/SeedlessOnboardingController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF,MAAM,MAAM,0DAA0D,GAAG;IACvE,IAAI,EAAE,uDAAuD,CAAC;IAC9D,OAAO,EAAE,4BAA4B,CAAC,0BAA0B,CAAC,CAAC;CACnE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yDAAyD,GAAG;IACtE,IAAI,EAAE,sDAAsD,CAAC;IAC7D,OAAO,EAAE,4BAA4B,CAAC,yBAAyB,CAAC,CAAC;CAClE,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,8CAA8C,GAAG;IAC3D,IAAI,EAAE,2CAA2C,CAAC;IAClD,OAAO,EAAE,4BAA4B,CAAC,cAAc,CAAC,CAAC;CACvD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,mEAAmE,GAC7E;IACE,IAAI,EAAE,gEAAgE,CAAC;IACvE,OAAO,EAAE,4BAA4B,CAAC,mCAAmC,CAAC,CAAC;CAC5E,CAAC;AAEJ;;;;;;;;GAQG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,4BAA4B,CAAC,kBAAkB,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,4BAA4B,CAAC,eAAe,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,oDAAoD,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
+ {"version":3,"file":"SeedlessOnboardingController-method-action-types.d.ts","sourceRoot":"","sources":["../src/SeedlessOnboardingController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF,MAAM,MAAM,0DAA0D,GAAG;IACvE,IAAI,EAAE,uDAAuD,CAAC;IAC9D,OAAO,EAAE,4BAA4B,CAAC,0BAA0B,CAAC,CAAC;CACnE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yDAAyD,GAAG;IACtE,IAAI,EAAE,sDAAsD,CAAC;IAC7D,OAAO,EAAE,4BAA4B,CAAC,yBAAyB,CAAC,CAAC;CAClE,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,8CAA8C,GAAG;IAC3D,IAAI,EAAE,2CAA2C,CAAC;IAClD,OAAO,EAAE,4BAA4B,CAAC,cAAc,CAAC,CAAC;CACvD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,mEAAmE,GAC7E;IACE,IAAI,EAAE,gEAAgE,CAAC;IACvE,OAAO,EAAE,4BAA4B,CAAC,mCAAmC,CAAC,CAAC;CAC5E,CAAC;AAEJ;;;;;;;;GAQG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,4BAA4B,CAAC,kBAAkB,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,4BAA4B,CAAC,eAAe,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,oDAAoD,GAAG;IACjE,IAAI,EAAE,iDAAiD,CAAC;IACxD,OAAO,EAAE,4BAA4B,CAAC,oBAAoB,CAAC,CAAC;CAC7D,CAAC;AAEF;;;;;;;;G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,oDAAoD,GACpD,4DAA4D,GAC5D,gDAAgD,GAChD,2DAA2D,GAC3D,iEAAiE,GACjE,yDAAyD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SeedlessOnboardingController-method-action-types.js","sourceRoot":"","sources":["../src/SeedlessOnboardingController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { SeedlessOnboardingController } from './SeedlessOnboardingController.js';\n\nexport type SeedlessOnboardingControllerFetchMetadataAccessCredsAction = {\n type: `SeedlessOnboardingController:fetchMetadataAccessCreds`;\n handler: SeedlessOnboardingController['fetchMetadataAccessCreds'];\n};\n\n/**\n * Gets the node details for the TOPRF operations.\n * This function can be called to get the node endpoints, indexes and pubkeys and cache them locally.\n */\nexport type SeedlessOnboardingControllerPreloadToprfNodeDetailsAction = {\n type: `SeedlessOnboardingController:preloadToprfNodeDetails`;\n handler: SeedlessOnboardingController['preloadToprfNodeDetails'];\n};\n\n/**\n * Authenticate OAuth user using the seedless onboarding flow\n * and determine if the user is already registered or not.\n *\n * @param params - The parameters for authenticate OAuth user.\n * @param params.idTokens - The ID token(s) issued by OAuth verification service. Currently this array only contains a single idToken which is verified by all the nodes, in future we are considering to issue a unique idToken for each node.\n * @param params.authConnection - The social login provider.\n * @param params.authConnectionId - OAuth authConnectionId from dashboard\n * @param params.userId - user email or id from Social login\n * @param params.groupedAuthConnectionId - Optional grouped authConnectionId to be used for the authenticate request.\n * @param params.socialLoginEmail - The user email from Social login.\n * @param params.refreshToken - Refresh token issued during OAuth login. Written to state when provided.\n * @param params.revokeToken - revoke token for revoking refresh token and get new refresh token and new revoke token.\n * @param params.accessToken - Access token for pairing with profile sync auth service and to access other services.\n * @param params.metadataAccessToken - Metadata access token for accessing the metadata service before the vault is created or unlocked.\n * @param params.skipLock - Optional flag to skip acquiring the controller lock. (to prevent deadlock in case the caller already acquired the lock)\n * @returns A promise that resolves to the authentication result.\n */\nexport type SeedlessOnboardingControllerAuthenticateAction = {\n type: `SeedlessOnboardingController:authenticate`;\n handler: SeedlessOnboardingController['authenticate'];\n};\n\n/**\n * Create a new TOPRF encryption key using given password and backups the provided seed phrase.\n *\n * @param password - The password used to create new wallet and seedphrase\n * @param seedPhrase - The initial seed phrase (Mnemonic) created together with the wallet.\n * @param keyringId - The keyring id of the backup seed phrase\n * @returns A promise that resolves to the encrypted seed phrase and the encryption key.\n */\nexport type SeedlessOnboardingControllerCreateToprfKeyAndBackupSeedPhraseAction =\n {\n type: `SeedlessOnboardingController:createToprfKeyAndBackupSeedPhrase`;\n handler: SeedlessOnboardingController['createToprfKeyAndBackupSeedPhrase'];\n };\n\n/**\n * Encrypt and add a new secret data to the metadata store.\n *\n * @param data - The data to add.\n * @param dataType - The data type classification for the secret data.\n * @param options - Optional options object, which includes optional data to be added to the metadata store.\n * @param options.keyringId - The keyring id of the backup keyring (SRP).\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerAddNewSecretDataAction = {\n type: `SeedlessOnboardingController:addNewSecretData`;\n handler: SeedlessOnboardingController['addNewSecretData'];\n};\n\n/**\n * Run any pending seedless onboarding migrations.\n *\n * This method should be called by clients after the controller is unlocked\n * to ensure legacy data is migrated to the latest format.\n *\n * Migrations are idempotent - running this multiple times is safe.\n * The migration version is tracked in state to prevent re-running migrations.\n *\n * @returns A promise that resolves to `true` if data was actually migrated\n * (items were updated on the server), `false` otherwise.\n * @throws If the password is outdated (changed on another device).\n */\nexport type SeedlessOnboardingControllerRunMigrationsAction = {\n type: `SeedlessOnboardingController:runMigrations`;\n handler: SeedlessOnboardingController['runMigrations'];\n};\n\n/**\n * Fetches all secret data items from the metadata store.\n *\n * Decrypts the secret data and returns the decrypted secret data using the recovered encryption key from the password.\n *\n * @param password - The optional password used to create new wallet. If not provided, `cached Encryption Key` will be used.\n * @returns A promise that resolves to the secret metadata items.\n */\nexport type SeedlessOnboardingControllerFetchAllSecretDataAction = {\n type: `SeedlessOnboardingController:fetchAllSecretData`;\n handler: SeedlessOnboardingController['fetchAllSecretData'];\n};\n\n/**\n * Update the password of the seedless onboarding flow.\n *\n * Changing password will also update the encryption key, metadata store and the vault with new encrypted values.\n *\n * @param newPassword - The new password to update.\n * @param oldPassword - The old password to verify.\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerChangePasswordAction = {\n type: `SeedlessOnboardingController:changePassword`;\n handler: SeedlessOnboardingController['changePassword'];\n};\n\n/**\n * Update the backup metadata state for the given secret data.\n *\n * @param secretData - The data to backup, can be a single backup or array of backups.\n * @param secretData.keyringId - The keyring id associated with the backup secret data.\n * @param secretData.data - The secret data to update the backup metadata state.\n */\nexport type SeedlessOnboardingControllerUpdateBackupMetadataStateAction = {\n type: `SeedlessOnboardingController:updateBackupMetadataState`;\n handler: SeedlessOnboardingController['updateBackupMetadataState'];\n};\n\n/**\n * Verify the password validity by decrypting the vault.\n *\n * @param password - The password to verify.\n * @param options - Optional options object.\n * @param options.skipLock - Whether to skip the lock acquisition. (to prevent deadlock in case the caller already acquired the lock)\n * @returns A promise that resolves to the success of the operation.\n * @throws {Error} If the password is invalid or the vault is not initialized.\n */\nexport type SeedlessOnboardingControllerVerifyVaultPasswordAction = {\n type: `SeedlessOnboardingController:verifyVaultPassword`;\n handler: SeedlessOnboardingController['verifyVaultPassword'];\n};\n\n/**\n * Get backup state of the given secret data, from the controller state.\n *\n * If the given secret data is not backed up and not found in the state, it will return `undefined`.\n *\n * @param data - The data to get the backup state of.\n * @param type - The type of the secret data.\n * @returns The backup state of the given secret data.\n */\nexport type SeedlessOnboardingControllerGetSecretDataBackupStateAction = {\n type: `SeedlessOnboardingController:getSecretDataBackupState`;\n handler: SeedlessOnboardingController['getSecretDataBackupState'];\n};\n\n/**\n * Submit the password to the controller, verify the password validity and unlock the controller.\n *\n * This method will be used especially when user unlock the wallet.\n * The provided password will be verified against the encrypted vault, encryption key will be derived and saved in the controller state.\n *\n * This operation is useful when user performs some actions that requires the user password/encryption key. e.g. add new srp backup\n *\n * @param password - The password to submit.\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerSubmitPasswordAction = {\n type: `SeedlessOnboardingController:submitPassword`;\n handler: SeedlessOnboardingController['submitPassword'];\n};\n\n/**\n * Identify an incomplete or mismatched primary SRP backup.\n *\n * This method must only be called after the controller has been unlocked.\n *\n * @param password - The password used to export the local primary SRP.\n * @returns A promise that resolves after identification and telemetry have\n * completed.\n */\nexport type SeedlessOnboardingControllerIdentifyIncompleteMetadataBackupAction =\n {\n type: `SeedlessOnboardingController:identifyIncompleteMetadataBackup`;\n handler: SeedlessOnboardingController['identifyIncompleteMetadataBackup'];\n };\n\n/**\n * Set the controller to locked state, and deallocate the secrets (vault encryption key and salt).\n *\n * When the controller is locked, the user will not be able to perform any operations on the controller/vault.\n *\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerSetLockedAction = {\n type: `SeedlessOnboardingController:setLocked`;\n handler: SeedlessOnboardingController['setLocked'];\n};\n\n/**\n * Sync the latest global password to the controller.\n * reset vault with latest globalPassword,\n * persist the latest global password authPubKey\n *\n * @param params - The parameters for syncing the latest global password.\n * @param params.globalPassword - The latest global password.\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerSyncLatestGlobalPasswordAction = {\n type: `SeedlessOnboardingController:syncLatestGlobalPassword`;\n handler: SeedlessOnboardingController['syncLatestGlobalPassword'];\n};\n\n/**\n * @description Unlock the controller with the latest global password.\n *\n * @param params - The parameters for unlocking the controller.\n * @param params.maxKeyChainLength - The maximum chain length of the pwd encryption keys.\n * @param params.globalPassword - The latest global password.\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerSubmitGlobalPasswordAction = {\n type: `SeedlessOnboardingController:submitGlobalPassword`;\n handler: SeedlessOnboardingController['submitGlobalPassword'];\n};\n\n/**\n * @description Check if the current password is outdated compare to the global password.\n *\n * @param options - Optional options object.\n * @param options.globalAuthPubKey - The global auth public key to compare with the current auth public key.\n * If not provided, the global auth public key will be fetched from the backend.\n * @param options.skipCache - If true, bypass the cache and force a fresh check.\n * @param options.skipLock - Whether to skip the lock acquisition. (to prevent deadlock in case the caller already acquired the lock)\n * @returns A promise that resolves to true if the password is outdated, false otherwise.\n */\nexport type SeedlessOnboardingControllerCheckIsPasswordOutdatedAction = {\n type: `SeedlessOnboardingController:checkIsPasswordOutdated`;\n handler: SeedlessOnboardingController['checkIsPasswordOutdated'];\n};\n\n/**\n * Check if the user is authenticated with the seedless onboarding flow by checking the token values in the state.\n *\n * This method will check the `accessToken` and `revokeToken` in the state, besides the social login authentication details.\n * If both are present, the user is authenticated.\n * If either is missing, the user is not authenticated.\n *\n * This method is useful when we want to check if the state has valid authenticated user details to perform vault creations.\n *\n * @returns True if the user is authenticated, false otherwise.\n */\nexport type SeedlessOnboardingControllerGetIsUserAuthenticatedAction = {\n type: `SeedlessOnboardingController:getIsUserAuthenticated`;\n handler: SeedlessOnboardingController['getIsUserAuthenticated'];\n};\n\n/**\n * Clears the current state of the SeedlessOnboardingController.\n */\nexport type SeedlessOnboardingControllerClearStateAction = {\n type: `SeedlessOnboardingController:clearState`;\n handler: SeedlessOnboardingController['clearState'];\n};\n\n/**\n * Store the keyring encryption key in state, encrypted under the current\n * encryption key.\n *\n * @param keyringEncryptionKey - The keyring encryption key.\n */\nexport type SeedlessOnboardingControllerStoreKeyringEncryptionKeyAction = {\n type: `SeedlessOnboardingController:storeKeyringEncryptionKey`;\n handler: SeedlessOnboardingController['storeKeyringEncryptionKey'];\n};\n\n/**\n * Load the keyring encryption key from state, decrypted under the current\n * encryption key.\n *\n * @returns The keyring encryption key.\n */\nexport type SeedlessOnboardingControllerLoadKeyringEncryptionKeyAction = {\n type: `SeedlessOnboardingController:loadKeyringEncryptionKey`;\n handler: SeedlessOnboardingController['loadKeyringEncryptionKey'];\n};\n\n/**\n * Refresh expired nodeAuthTokens, accessToken, and metadataAccessToken using\n * the stored refresh token.\n *\n * Concurrent callers share a single in-flight HTTP request — if a refresh is\n * already in-progress the returned promise resolves when that request settles\n * rather than firing a duplicate request with the same token.\n *\n * @returns A promise that resolves when the tokens have been refreshed.\n */\nexport type SeedlessOnboardingControllerRefreshAuthTokensAction = {\n type: `SeedlessOnboardingController:refreshAuthTokens`;\n handler: SeedlessOnboardingController['refreshAuthTokens'];\n};\n\n/**\n * Rotate the refresh token — fetch a new refresh/revoke token pair from the\n * auth service and persist the new revoke token in the vault.\n *\n * This method should be called after a successful JWT refresh.\n *\n * @returns A Promise that resolves to void.\n */\nexport type SeedlessOnboardingControllerRotateRefreshTokenAction = {\n type: `SeedlessOnboardingController:rotateRefreshToken`;\n handler: SeedlessOnboardingController['rotateRefreshToken'];\n};\n\n/**\n * Revoke all pending refresh tokens.\n *\n * This method is to be called after user is authenticated.\n *\n * @returns A Promise that resolves to void.\n */\nexport type SeedlessOnboardingControllerRevokePendingRefreshTokensAction = {\n type: `SeedlessOnboardingController:revokePendingRefreshTokens`;\n handler: SeedlessOnboardingController['revokePendingRefreshTokens'];\n};\n\n/**\n * Get the access token from the state.\n *\n * If the tokens are expired, the method will refresh them and return the new access token.\n *\n * @returns The access token.\n */\nexport type SeedlessOnboardingControllerGetAccessTokenAction = {\n type: `SeedlessOnboardingController:getAccessToken`;\n handler: SeedlessOnboardingController['getAccessToken'];\n};\n\n/**\n * Check if the current node auth token is expired.\n *\n * @returns True if the current node auth token is expired, false otherwise.\n */\nexport type SeedlessOnboardingControllerCheckNodeAuthTokenExpiredAction = {\n type: `SeedlessOnboardingController:checkNodeAuthTokenExpired`;\n handler: SeedlessOnboardingController['checkNodeAuthTokenExpired'];\n};\n\n/**\n * Check if the current metadata access token should be refreshed.\n * Returns true when the token is expired or when less than 10% of its\n * lifetime remains (proactive refresh).\n *\n * @returns True if the metadata access token should be refreshed, false otherwise.\n */\nexport type SeedlessOnboardingControllerCheckMetadataAccessTokenExpiredAction =\n {\n type: `SeedlessOnboardingController:checkMetadataAccessTokenExpired`;\n handler: SeedlessOnboardingController['checkMetadataAccessTokenExpired'];\n };\n\n/**\n * Check if the current access token should be refreshed.\n * Returns true when the token is expired or when less than 10% of its\n * lifetime remains (proactive refresh).\n * When the vault is locked, the access token is not accessible, so we return false.\n *\n * @returns True if the access token should be refreshed, false otherwise.\n */\nexport type SeedlessOnboardingControllerCheckAccessTokenExpiredAction = {\n type: `SeedlessOnboardingController:checkAccessTokenExpired`;\n handler: SeedlessOnboardingController['checkAccessTokenExpired'];\n};\n\n/**\n * Union of all SeedlessOnboardingController action types.\n */\nexport type SeedlessOnboardingControllerMethodActions =\n | SeedlessOnboardingControllerFetchMetadataAccessCredsAction\n | SeedlessOnboardingControllerPreloadToprfNodeDetailsAction\n | SeedlessOnboardingControllerAuthenticateAction\n | SeedlessOnboardingControllerCreateToprfKeyAndBackupSeedPhraseAction\n | SeedlessOnboardingControllerAddNewSecretDataAction\n | SeedlessOnboardingControllerRunMigrationsAction\n | SeedlessOnboardingControllerFetchAllSecretDataAction\n | SeedlessOnboardingControllerChangePasswordAction\n | SeedlessOnboardingControllerUpdateBackupMetadataStateAction\n | SeedlessOnboardingControllerVerifyVaultPasswordAction\n | SeedlessOnboardingControllerGetSecretDataBackupStateAction\n | SeedlessOnboardingControllerSubmitPasswordAction\n | SeedlessOnboardingControllerIdentifyIncompleteMetadataBackupAction\n | SeedlessOnboardingControllerSetLockedAction\n | SeedlessOnboardingControllerSyncLatestGlobalPasswordAction\n | SeedlessOnboardingControllerSubmitGlobalPasswordAction\n | SeedlessOnboardingControllerCheckIsPasswordOutdatedAction\n | SeedlessOnboardingControllerGetIsUserAuthenticatedAction\n | SeedlessOnboardingControllerClearStateAction\n | SeedlessOnboardingControllerStoreKeyringEncryptionKeyAction\n | SeedlessOnboardingControllerLoadKeyringEncryptionKeyAction\n | SeedlessOnboardingControllerRefreshAuthTokensAction\n | SeedlessOnboardingControllerRotateRefreshTokenAction\n | SeedlessOnboardingControllerRevokePendingRefreshTokensAction\n | SeedlessOnboardingControllerGetAccessTokenAction\n | SeedlessOnboardingControllerCheckNodeAuthTokenExpiredAction\n | SeedlessOnboardingControllerCheckMetadataAccessTokenExpiredAction\n | SeedlessOnboardingControllerCheckAccessTokenExpiredAction;\n"]}
1
+ {"version":3,"file":"SeedlessOnboardingController-method-action-types.js","sourceRoot":"","sources":["../src/SeedlessOnboardingController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { SeedlessOnboardingController } from './SeedlessOnboardingController.js';\n\nexport type SeedlessOnboardingControllerFetchMetadataAccessCredsAction = {\n type: `SeedlessOnboardingController:fetchMetadataAccessCreds`;\n handler: SeedlessOnboardingController['fetchMetadataAccessCreds'];\n};\n\n/**\n * Gets the node details for the TOPRF operations.\n * This function can be called to get the node endpoints, indexes and pubkeys and cache them locally.\n */\nexport type SeedlessOnboardingControllerPreloadToprfNodeDetailsAction = {\n type: `SeedlessOnboardingController:preloadToprfNodeDetails`;\n handler: SeedlessOnboardingController['preloadToprfNodeDetails'];\n};\n\n/**\n * Authenticate OAuth user using the seedless onboarding flow\n * and determine if the user is already registered or not.\n *\n * @param params - The parameters for authenticate OAuth user.\n * @param params.idTokens - The ID token(s) issued by OAuth verification service. Currently this array only contains a single idToken which is verified by all the nodes, in future we are considering to issue a unique idToken for each node.\n * @param params.authConnection - The social login provider.\n * @param params.authConnectionId - OAuth authConnectionId from dashboard\n * @param params.userId - user email or id from Social login\n * @param params.groupedAuthConnectionId - Optional grouped authConnectionId to be used for the authenticate request.\n * @param params.socialLoginEmail - The user email from Social login.\n * @param params.refreshToken - Refresh token issued during OAuth login. Written to state when provided.\n * @param params.revokeToken - revoke token for revoking refresh token and get new refresh token and new revoke token.\n * @param params.accessToken - Access token for pairing with profile sync auth service and to access other services.\n * @param params.metadataAccessToken - Metadata access token for accessing the metadata service before the vault is created or unlocked.\n * @param params.skipLock - Optional flag to skip acquiring the controller lock. (to prevent deadlock in case the caller already acquired the lock)\n * @returns A promise that resolves to the authentication result.\n */\nexport type SeedlessOnboardingControllerAuthenticateAction = {\n type: `SeedlessOnboardingController:authenticate`;\n handler: SeedlessOnboardingController['authenticate'];\n};\n\n/**\n * Create a new TOPRF encryption key using given password and backups the provided seed phrase.\n *\n * @param password - The password used to create new wallet and seedphrase\n * @param seedPhrase - The initial seed phrase (Mnemonic) created together with the wallet.\n * @param keyringId - The keyring id of the backup seed phrase\n * @returns A promise that resolves to the encrypted seed phrase and the encryption key.\n */\nexport type SeedlessOnboardingControllerCreateToprfKeyAndBackupSeedPhraseAction =\n {\n type: `SeedlessOnboardingController:createToprfKeyAndBackupSeedPhrase`;\n handler: SeedlessOnboardingController['createToprfKeyAndBackupSeedPhrase'];\n };\n\n/**\n * Encrypt and add a new secret data to the metadata store.\n *\n * @param data - The data to add.\n * @param dataType - The data type classification for the secret data.\n * @param options - Optional options object, which includes optional data to be added to the metadata store.\n * @param options.keyringId - The keyring id of the backup keyring (SRP).\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerAddNewSecretDataAction = {\n type: `SeedlessOnboardingController:addNewSecretData`;\n handler: SeedlessOnboardingController['addNewSecretData'];\n};\n\n/**\n * Run any pending seedless onboarding migrations.\n *\n * This method should be called by clients after the controller is unlocked\n * to ensure legacy data is migrated to the latest format.\n *\n * Migrations are idempotent - running this multiple times is safe.\n * The migration version is tracked in state to prevent re-running migrations.\n *\n * @returns A promise that resolves to `true` if data was actually migrated\n * (items were updated on the server), `false` otherwise.\n * @throws If the password is outdated (changed on another device).\n */\nexport type SeedlessOnboardingControllerRunMigrationsAction = {\n type: `SeedlessOnboardingController:runMigrations`;\n handler: SeedlessOnboardingController['runMigrations'];\n};\n\n/**\n * Fetches all secret data items from the metadata store.\n *\n * Decrypts the secret data and returns the decrypted secret data using the recovered encryption key from the password.\n *\n * @param password - The optional password used to create new wallet. If not provided, `cached Encryption Key` will be used.\n * @returns A promise that resolves to the secret metadata items.\n */\nexport type SeedlessOnboardingControllerFetchAllSecretDataAction = {\n type: `SeedlessOnboardingController:fetchAllSecretData`;\n handler: SeedlessOnboardingController['fetchAllSecretData'];\n};\n\n/**\n * Update the password of the seedless onboarding flow.\n *\n * Changing password will also update the encryption key, metadata store and the vault with new encrypted values.\n *\n * @param newPassword - The new password to update.\n * @param oldPassword - The old password to verify.\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerChangePasswordAction = {\n type: `SeedlessOnboardingController:changePassword`;\n handler: SeedlessOnboardingController['changePassword'];\n};\n\n/**\n * Update the backup metadata state for the given secret data.\n *\n * @param secretData - The data to backup, can be a single backup or array of backups.\n * @param secretData.keyringId - The keyring id associated with the backup secret data.\n * @param secretData.data - The secret data to update the backup metadata state.\n */\nexport type SeedlessOnboardingControllerUpdateBackupMetadataStateAction = {\n type: `SeedlessOnboardingController:updateBackupMetadataState`;\n handler: SeedlessOnboardingController['updateBackupMetadataState'];\n};\n\n/**\n * Verify the password validity by decrypting the vault.\n *\n * @param password - The password to verify.\n * @param options - Optional options object.\n * @param options.skipLock - Whether to skip the lock acquisition. (to prevent deadlock in case the caller already acquired the lock)\n * @returns A promise that resolves to the success of the operation.\n * @throws {Error} If the password is invalid or the vault is not initialized.\n */\nexport type SeedlessOnboardingControllerVerifyVaultPasswordAction = {\n type: `SeedlessOnboardingController:verifyVaultPassword`;\n handler: SeedlessOnboardingController['verifyVaultPassword'];\n};\n\n/**\n * Get backup state of the given secret data, from the controller state.\n *\n * If the given secret data is not backed up and not found in the state, it will return `undefined`.\n *\n * @param data - The data to get the backup state of.\n * @param type - The type of the secret data.\n * @returns The backup state of the given secret data.\n */\nexport type SeedlessOnboardingControllerGetSecretDataBackupStateAction = {\n type: `SeedlessOnboardingController:getSecretDataBackupState`;\n handler: SeedlessOnboardingController['getSecretDataBackupState'];\n};\n\n/**\n * Submit the password to the controller, verify the password validity and unlock the controller.\n *\n * This method will be used especially when user unlock the wallet.\n * The provided password will be verified against the encrypted vault, encryption key will be derived and saved in the controller state.\n *\n * This operation is useful when user performs some actions that requires the user password/encryption key. e.g. add new srp backup\n *\n * @param password - The password to submit.\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerSubmitPasswordAction = {\n type: `SeedlessOnboardingController:submitPassword`;\n handler: SeedlessOnboardingController['submitPassword'];\n};\n\n/**\n * Identify an incomplete or mismatched primary SRP backup.\n *\n * This method must only be called after the controller has been unlocked.\n *\n * @param password - The password used to export the local primary SRP.\n * @returns A promise that resolves after identification and telemetry have\n * completed.\n */\nexport type SeedlessOnboardingControllerIdentifyIncompleteMetadataBackupAction =\n {\n type: `SeedlessOnboardingController:identifyIncompleteMetadataBackup`;\n handler: SeedlessOnboardingController['identifyIncompleteMetadataBackup'];\n };\n\n/**\n * Set the controller to locked state, and deallocate the secrets (vault encryption key and salt).\n *\n * When the controller is locked, the user will not be able to perform any operations on the controller/vault.\n *\n * @returns A promise that resolves to the success of the operation.\n */\nexport type SeedlessOnboardingControllerSetLockedAction = {\n type: `SeedlessOnboardingController:setLocked`;\n handler: SeedlessOnboardingController['setLocked'];\n};\n\n/**\n * Check if the user is authenticated with the seedless onboarding flow by checking the token values in the state.\n *\n * This method will check the `accessToken` and `revokeToken` in the state, besides the social login authentication details.\n * If both are present, the user is authenticated.\n * If either is missing, the user is not authenticated.\n *\n * This method is useful when we want to check if the state has valid authenticated user details to perform vault creations.\n *\n * @returns True if the user is authenticated, false otherwise.\n */\nexport type SeedlessOnboardingControllerGetIsUserAuthenticatedAction = {\n type: `SeedlessOnboardingController:getIsUserAuthenticated`;\n handler: SeedlessOnboardingController['getIsUserAuthenticated'];\n};\n\n/**\n * Clears the current state of the SeedlessOnboardingController.\n *\n * Waits for any in-flight controller operation before clearing state and\n * releases the in-memory decrypted vault data.\n *\n * @returns A promise that resolves once the state has been cleared.\n */\nexport type SeedlessOnboardingControllerClearStateAction = {\n type: `SeedlessOnboardingController:clearState`;\n handler: SeedlessOnboardingController['clearState'];\n};\n\n/**\n * Store the keyring encryption key in state, encrypted under the current\n * encryption key.\n *\n * Remains lifecycle-neutral: the client calls this during recovery without\n * advancing the lifecycle checkpoint.\n *\n * @param keyringEncryptionKey - The keyring encryption key.\n */\nexport type SeedlessOnboardingControllerStoreKeyringEncryptionKeyAction = {\n type: `SeedlessOnboardingController:storeKeyringEncryptionKey`;\n handler: SeedlessOnboardingController['storeKeyringEncryptionKey'];\n};\n\n/**\n * Load the keyring encryption key from state, decrypted under the current\n * encryption key.\n *\n * @returns The keyring encryption key.\n */\nexport type SeedlessOnboardingControllerLoadKeyringEncryptionKeyAction = {\n type: `SeedlessOnboardingController:loadKeyringEncryptionKey`;\n handler: SeedlessOnboardingController['loadKeyringEncryptionKey'];\n};\n\n/**\n * Complete password-change recovery.\n *\n * Call this after the current Keyring encryption key has been synchronized\n * and all required local writes have succeeded. The controller clears the\n * lifecycle so the next unlock is normal.\n *\n * @returns A promise that resolves once recovery has been completed.\n */\nexport type SeedlessOnboardingControllerCompletePasswordChangeAction = {\n type: `SeedlessOnboardingController:completePasswordChange`;\n handler: SeedlessOnboardingController['completePasswordChange'];\n};\n\n/**\n * Mark the password-change lifecycle as `KEY_SYNC_PENDING`.\n *\n * Called by the client coordinator before it synchronizes the current\n * Keyring encryption key to Seedless. The controller only records the\n * boundary; it does not perform or verify synchronization.\n *\n * @returns A promise that resolves once the checkpoint has been persisted.\n */\nexport type SeedlessOnboardingControllerMarkPasswordChangeKeySyncPendingAction =\n {\n type: `SeedlessOnboardingController:markPasswordChangeKeySyncPending`;\n handler: SeedlessOnboardingController['markPasswordChangeKeySyncPending'];\n };\n\n/**\n * Resolve the password-sync instruction without consuming a password.\n *\n * Checks the remote password before routing recovery for every valid\n * password-sync checkpoint. The checkpoint then determines the next local\n * recovery instruction when the passwords are in sync.\n *\n * @param options - The options.\n * @param options.skipCache - Whether to bypass the outdated cache. Recovery\n * checkpoints always bypass the cache.\n * @returns The sync/recovery instruction.\n * @throws If another operation is active or the password state cannot be\n * established.\n */\nexport type SeedlessOnboardingControllerResolvePasswordSyncStateAction = {\n type: `SeedlessOnboardingController:resolvePasswordSyncState`;\n handler: SeedlessOnboardingController['resolvePasswordSyncState'];\n};\n\n/**\n * Reconcile the local Seedless password with the remote password.\n *\n * For `LOCAL_STATE_PENDING` it re-runs the existing password-sync flow\n * (chain unlock + local vault rewrite) with the new password and advances\n * the checkpoint to `LOCAL_PASSWORD_PENDING`. These operations are\n * idempotent, so re-running them is safe whether or not the local Seedless\n * vault was already rewritten. The controller is left unlocked.\n *\n * For `LOCAL_PASSWORD_PENDING` or `KEY_SYNC_PENDING` the local Seedless vault\n * is already rewritten. The method unlocks it with the supplied password so\n * `loadKeyringEncryptionKey` and `storeKeyringEncryptionKey` work after a\n * restart, without repeating remote TOPRF recovery or a vault rewrite. A\n * newer `accessToken` from `refreshAuthTokens` is kept instead of being\n * overwritten by the vault copy.\n *\n * It always re-checks whether the remote password is outdated, including when\n * the local Seedless vault was already rewritten. If it is, it runs the same\n * password-sync flow, advances to `LOCAL_PASSWORD_PENDING`, and returns\n * `ReconcileKeyring` so the client can reconcile the local Keyring. If the\n * remote password is current, the checkpoint determines whether the client\n * must reconcile the Keyring, sync its key, or do nothing.\n *\n * The client remains responsible for the Keyring side (classifying the local\n * Keyring via `KeyringController:verifyPassword` and running the old-Keyring\n * or new-Keyring branch), because this controller does not depend on\n * `KeyringController`. See\n * [0003](./docs/0003-controller-owned-password-change-recovery-plan.md).\n *\n * @param params - The reconciliation parameters.\n * @param params.globalPassword - The current global password.\n * @param params.maxKeyChainLength - The maximum chain length of the pwd encryption keys. @default 5\n * @returns The reconciliation instruction.\n * @throws If recovery cannot establish the current password state.\n */\nexport type SeedlessOnboardingControllerReconcilePasswordAction = {\n type: `SeedlessOnboardingController:reconcilePassword`;\n handler: SeedlessOnboardingController['reconcilePassword'];\n};\n\n/**\n * Refresh expired nodeAuthTokens, accessToken, and metadataAccessToken using\n * the stored refresh token.\n *\n * Concurrent callers share a single in-flight HTTP request — if a refresh is\n * already in-progress the returned promise resolves when that request settles\n * rather than firing a duplicate request with the same token.\n *\n * @returns A promise that resolves when the tokens have been refreshed.\n */\nexport type SeedlessOnboardingControllerRefreshAuthTokensAction = {\n type: `SeedlessOnboardingController:refreshAuthTokens`;\n handler: SeedlessOnboardingController['refreshAuthTokens'];\n};\n\n/**\n * Rotate the refresh token — fetch a new refresh/revoke token pair from the\n * auth service and persist the new revoke token in the vault.\n *\n * This method should be called after a successful JWT refresh.\n *\n * @returns A Promise that resolves to void.\n */\nexport type SeedlessOnboardingControllerRotateRefreshTokenAction = {\n type: `SeedlessOnboardingController:rotateRefreshToken`;\n handler: SeedlessOnboardingController['rotateRefreshToken'];\n};\n\n/**\n * Revoke all pending refresh tokens.\n *\n * This method is to be called after user is authenticated.\n *\n * @returns A Promise that resolves to void.\n */\nexport type SeedlessOnboardingControllerRevokePendingRefreshTokensAction = {\n type: `SeedlessOnboardingController:revokePendingRefreshTokens`;\n handler: SeedlessOnboardingController['revokePendingRefreshTokens'];\n};\n\n/**\n * Get the access token from the state.\n *\n * If the tokens are expired, the method will refresh them and return the new access token.\n *\n * @returns The access token.\n */\nexport type SeedlessOnboardingControllerGetAccessTokenAction = {\n type: `SeedlessOnboardingController:getAccessToken`;\n handler: SeedlessOnboardingController['getAccessToken'];\n};\n\n/**\n * Check if the current node auth token is expired.\n *\n * @returns True if the current node auth token is expired, false otherwise.\n */\nexport type SeedlessOnboardingControllerCheckNodeAuthTokenExpiredAction = {\n type: `SeedlessOnboardingController:checkNodeAuthTokenExpired`;\n handler: SeedlessOnboardingController['checkNodeAuthTokenExpired'];\n};\n\n/**\n * Check if the current metadata access token should be refreshed.\n * Returns true when the token is expired or when less than 10% of its\n * lifetime remains (proactive refresh).\n *\n * @returns True if the metadata access token should be refreshed, false otherwise.\n */\nexport type SeedlessOnboardingControllerCheckMetadataAccessTokenExpiredAction =\n {\n type: `SeedlessOnboardingController:checkMetadataAccessTokenExpired`;\n handler: SeedlessOnboardingController['checkMetadataAccessTokenExpired'];\n };\n\n/**\n * Check if the current access token should be refreshed.\n * Returns true when the token is expired or when less than 10% of its\n * lifetime remains (proactive refresh).\n * When the vault is locked, the access token is not accessible, so we return false.\n *\n * @returns True if the access token should be refreshed, false otherwise.\n */\nexport type SeedlessOnboardingControllerCheckAccessTokenExpiredAction = {\n type: `SeedlessOnboardingController:checkAccessTokenExpired`;\n handler: SeedlessOnboardingController['checkAccessTokenExpired'];\n};\n\n/**\n * Union of all SeedlessOnboardingController action types.\n */\nexport type SeedlessOnboardingControllerMethodActions =\n | SeedlessOnboardingControllerFetchMetadataAccessCredsAction\n | SeedlessOnboardingControllerPreloadToprfNodeDetailsAction\n | SeedlessOnboardingControllerAuthenticateAction\n | SeedlessOnboardingControllerCreateToprfKeyAndBackupSeedPhraseAction\n | SeedlessOnboardingControllerAddNewSecretDataAction\n | SeedlessOnboardingControllerRunMigrationsAction\n | SeedlessOnboardingControllerFetchAllSecretDataAction\n | SeedlessOnboardingControllerChangePasswordAction\n | SeedlessOnboardingControllerUpdateBackupMetadataStateAction\n | SeedlessOnboardingControllerVerifyVaultPasswordAction\n | SeedlessOnboardingControllerGetSecretDataBackupStateAction\n | SeedlessOnboardingControllerSubmitPasswordAction\n | SeedlessOnboardingControllerIdentifyIncompleteMetadataBackupAction\n | SeedlessOnboardingControllerSetLockedAction\n | SeedlessOnboardingControllerGetIsUserAuthenticatedAction\n | SeedlessOnboardingControllerClearStateAction\n | SeedlessOnboardingControllerStoreKeyringEncryptionKeyAction\n | SeedlessOnboardingControllerLoadKeyringEncryptionKeyAction\n | SeedlessOnboardingControllerCompletePasswordChangeAction\n | SeedlessOnboardingControllerMarkPasswordChangeKeySyncPendingAction\n | SeedlessOnboardingControllerResolvePasswordSyncStateAction\n | SeedlessOnboardingControllerReconcilePasswordAction\n | SeedlessOnboardingControllerRefreshAuthTokensAction\n | SeedlessOnboardingControllerRotateRefreshTokenAction\n | SeedlessOnboardingControllerRevokePendingRefreshTokensAction\n | SeedlessOnboardingControllerGetAccessTokenAction\n | SeedlessOnboardingControllerCheckNodeAuthTokenExpiredAction\n | SeedlessOnboardingControllerCheckMetadataAccessTokenExpiredAction\n | SeedlessOnboardingControllerCheckAccessTokenExpiredAction;\n"]}
@@ -1,12 +1,12 @@
1
1
  import { BaseController } from '@metamask/base-controller';
2
2
  import type * as encryptionUtils from '@metamask/browser-passworder';
3
3
  import type { DefaultEncryptionResult, EncryptionResultConstraint } from '@metamask/keyring-controller';
4
- import type { AuthenticateResult, SEC1EncodedPublicKey } from '@metamask/toprf-secure-backup';
4
+ import type { AuthenticateResult } from '@metamask/toprf-secure-backup';
5
5
  import { ToprfSecureBackup, EncAccountDataType } from '@metamask/toprf-secure-backup';
6
6
  import type { AuthConnection } from './constants.js';
7
- import { controllerName, SecretType, SeedlessOnboardingMigrationVersion } from './constants.js';
7
+ import { controllerName, SecretType, SeedlessOnboardingMigrationVersion, PasswordSyncInstruction } from './constants.js';
8
8
  import { SecretMetadata } from './SecretMetadata.js';
9
- import type { SeedlessOnboardingControllerMessenger, SeedlessOnboardingControllerOptions } from './SeedlessOnboardingController-types.js';
9
+ import { SeedlessOnboardingControllerMessenger, SeedlessOnboardingControllerOptions } from './SeedlessOnboardingController-types.js';
10
10
  import type { SeedlessOnboardingControllerState, SocialBackupsMetadata } from './types.js';
11
11
  export type { SeedlessOnboardingControllerActions, SeedlessOnboardingControllerEvents, SeedlessOnboardingControllerGetStateAction, SeedlessOnboardingControllerMessenger, SeedlessOnboardingControllerOptions, SeedlessOnboardingControllerStateChangeEvent, } from './SeedlessOnboardingController-types.js';
12
12
  export { getInitialSeedlessOnboardingControllerStateWithDefaults } from './state.js';
@@ -194,45 +194,6 @@ export declare class SeedlessOnboardingController<EncryptionKey = encryptionUtil
194
194
  * @returns A promise that resolves to the success of the operation.
195
195
  */
196
196
  setLocked(): Promise<void>;
197
- /**
198
- * Sync the latest global password to the controller.
199
- * reset vault with latest globalPassword,
200
- * persist the latest global password authPubKey
201
- *
202
- * @param params - The parameters for syncing the latest global password.
203
- * @param params.globalPassword - The latest global password.
204
- * @returns A promise that resolves to the success of the operation.
205
- */
206
- syncLatestGlobalPassword({ globalPassword, }: {
207
- globalPassword: string;
208
- }): Promise<void>;
209
- /**
210
- * @description Unlock the controller with the latest global password.
211
- *
212
- * @param params - The parameters for unlocking the controller.
213
- * @param params.maxKeyChainLength - The maximum chain length of the pwd encryption keys.
214
- * @param params.globalPassword - The latest global password.
215
- * @returns A promise that resolves to the success of the operation.
216
- */
217
- submitGlobalPassword({ globalPassword, maxKeyChainLength, }: {
218
- globalPassword: string;
219
- maxKeyChainLength?: number;
220
- }): Promise<void>;
221
- /**
222
- * @description Check if the current password is outdated compare to the global password.
223
- *
224
- * @param options - Optional options object.
225
- * @param options.globalAuthPubKey - The global auth public key to compare with the current auth public key.
226
- * If not provided, the global auth public key will be fetched from the backend.
227
- * @param options.skipCache - If true, bypass the cache and force a fresh check.
228
- * @param options.skipLock - Whether to skip the lock acquisition. (to prevent deadlock in case the caller already acquired the lock)
229
- * @returns A promise that resolves to true if the password is outdated, false otherwise.
230
- */
231
- checkIsPasswordOutdated(options?: {
232
- skipCache?: boolean;
233
- skipLock?: boolean;
234
- globalAuthPubKey?: SEC1EncodedPublicKey;
235
- }): Promise<boolean>;
236
197
  /**
237
198
  * Check if the user is authenticated with the seedless onboarding flow by checking the token values in the state.
238
199
  *
@@ -247,12 +208,20 @@ export declare class SeedlessOnboardingController<EncryptionKey = encryptionUtil
247
208
  getIsUserAuthenticated(): Promise<boolean>;
248
209
  /**
249
210
  * Clears the current state of the SeedlessOnboardingController.
211
+ *
212
+ * Waits for any in-flight controller operation before clearing state and
213
+ * releases the in-memory decrypted vault data.
214
+ *
215
+ * @returns A promise that resolves once the state has been cleared.
250
216
  */
251
- clearState(): void;
217
+ clearState(): Promise<void>;
252
218
  /**
253
219
  * Store the keyring encryption key in state, encrypted under the current
254
220
  * encryption key.
255
221
  *
222
+ * Remains lifecycle-neutral: the client calls this during recovery without
223
+ * advancing the lifecycle checkpoint.
224
+ *
256
225
  * @param keyringEncryptionKey - The keyring encryption key.
257
226
  */
258
227
  storeKeyringEncryptionKey(keyringEncryptionKey: string): Promise<void>;
@@ -263,6 +232,82 @@ export declare class SeedlessOnboardingController<EncryptionKey = encryptionUtil
263
232
  * @returns The keyring encryption key.
264
233
  */
265
234
  loadKeyringEncryptionKey(): Promise<string>;
235
+ /**
236
+ * Complete password-change recovery.
237
+ *
238
+ * Call this after the current Keyring encryption key has been synchronized
239
+ * and all required local writes have succeeded. The controller clears the
240
+ * lifecycle so the next unlock is normal.
241
+ *
242
+ * @returns A promise that resolves once recovery has been completed.
243
+ */
244
+ completePasswordChange(): Promise<void>;
245
+ /**
246
+ * Mark the password-change lifecycle as `KEY_SYNC_PENDING`.
247
+ *
248
+ * Called by the client coordinator before it synchronizes the current
249
+ * Keyring encryption key to Seedless. The controller only records the
250
+ * boundary; it does not perform or verify synchronization.
251
+ *
252
+ * @returns A promise that resolves once the checkpoint has been persisted.
253
+ */
254
+ markPasswordChangeKeySyncPending(): Promise<void>;
255
+ /**
256
+ * Resolve the password-sync instruction without consuming a password.
257
+ *
258
+ * Checks the remote password before routing recovery for every valid
259
+ * password-sync checkpoint. The checkpoint then determines the next local
260
+ * recovery instruction when the passwords are in sync.
261
+ *
262
+ * @param options - The options.
263
+ * @param options.skipCache - Whether to bypass the outdated cache. Recovery
264
+ * checkpoints always bypass the cache.
265
+ * @returns The sync/recovery instruction.
266
+ * @throws If another operation is active or the password state cannot be
267
+ * established.
268
+ */
269
+ resolvePasswordSyncState(options?: {
270
+ skipCache?: boolean;
271
+ }): Promise<PasswordSyncInstruction>;
272
+ /**
273
+ * Reconcile the local Seedless password with the remote password.
274
+ *
275
+ * For `LOCAL_STATE_PENDING` it re-runs the existing password-sync flow
276
+ * (chain unlock + local vault rewrite) with the new password and advances
277
+ * the checkpoint to `LOCAL_PASSWORD_PENDING`. These operations are
278
+ * idempotent, so re-running them is safe whether or not the local Seedless
279
+ * vault was already rewritten. The controller is left unlocked.
280
+ *
281
+ * For `LOCAL_PASSWORD_PENDING` or `KEY_SYNC_PENDING` the local Seedless vault
282
+ * is already rewritten. The method unlocks it with the supplied password so
283
+ * `loadKeyringEncryptionKey` and `storeKeyringEncryptionKey` work after a
284
+ * restart, without repeating remote TOPRF recovery or a vault rewrite. A
285
+ * newer `accessToken` from `refreshAuthTokens` is kept instead of being
286
+ * overwritten by the vault copy.
287
+ *
288
+ * It always re-checks whether the remote password is outdated, including when
289
+ * the local Seedless vault was already rewritten. If it is, it runs the same
290
+ * password-sync flow, advances to `LOCAL_PASSWORD_PENDING`, and returns
291
+ * `ReconcileKeyring` so the client can reconcile the local Keyring. If the
292
+ * remote password is current, the checkpoint determines whether the client
293
+ * must reconcile the Keyring, sync its key, or do nothing.
294
+ *
295
+ * The client remains responsible for the Keyring side (classifying the local
296
+ * Keyring via `KeyringController:verifyPassword` and running the old-Keyring
297
+ * or new-Keyring branch), because this controller does not depend on
298
+ * `KeyringController`. See
299
+ * [0003](./docs/0003-controller-owned-password-change-recovery-plan.md).
300
+ *
301
+ * @param params - The reconciliation parameters.
302
+ * @param params.globalPassword - The current global password.
303
+ * @param params.maxKeyChainLength - The maximum chain length of the pwd encryption keys. @default 5
304
+ * @returns The reconciliation instruction.
305
+ * @throws If recovery cannot establish the current password state.
306
+ */
307
+ reconcilePassword({ globalPassword, maxKeyChainLength, }: {
308
+ globalPassword: string;
309
+ maxKeyChainLength?: number;
310
+ }): Promise<PasswordSyncInstruction>;
266
311
  /**
267
312
  * Refresh expired nodeAuthTokens, accessToken, and metadataAccessToken using
268
313
  * the stored refresh token.
@@ -1 +1 @@
1
- {"version":3,"file":"SeedlessOnboardingController.d.ts","sourceRoot":"","sources":["../src/SeedlessOnboardingController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,KAAK,eAAe,MAAM,8BAA8B,CAAC;AAErE,OAA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ED;;;;;;;;;OASG;IACG,uBAAuB,CAAC,OAAO,CAAC,EAAE;QACtC,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;KACzC,GAAG,OAAO,CAAC,OAAO,CAAC,CAkEnB;IAED;;;;;;;;;;OAUG;IACG,sBAAsB,IAAI,OAAO,CAAC,OAAO,CAAC,CAO/C;IAuCD;;OAEG;IACH,UAAU,IAAI,IAAI,CAMjB;IAoDD;;;;;OAKG;IACG,yBAAyB,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI3E;IAED;;;;;OAKG;IACG,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC,CAIhD;IA8xBD;;;;;;;;;OASG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAgBvC;IAqJD;;;;;;;OAOG;IACG,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CA2CxC;IAED;;;;;;OAMG;IACG,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAqChD;IAED;;;;;;OAMG;IACG,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAQlD;IAgGD;;;;OAIG;IACI,yBAAyB,IAAI,OAAO,CAU1C;IAED;;;;;;OAMG;IACI,+BAA+B,IAAI,OAAO,CAUhD;IAED;;;;;;;OAOG;IACI,uBAAuB,IAAI,OAAO,CAYxC;CAqBF"}
1
+ {"version":3,"file":"SeedlessOnboardingController.d.ts","sourceRoot":"","sources":["../src/SeedlessOnboardingController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,KAAK,eAAe,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAE3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,kBAA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