@metamask-previews/seedless-onboarding-controller 4.1.0-preview-cd26f001 → 4.1.0-preview-e9856975

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.
@@ -11,7 +11,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
11
11
  };
12
12
  var _SeedlessOnboardingController_instances, _SeedlessOnboardingController_vaultEncryptor, _SeedlessOnboardingController_controllerOperationMutex, _SeedlessOnboardingController_vaultOperationMutex, _SeedlessOnboardingController_refreshJWTToken, _SeedlessOnboardingController_revokeRefreshToken, _SeedlessOnboardingController_renewRefreshToken, _SeedlessOnboardingController_passwordOutdatedCacheTTL, _SeedlessOnboardingController_isUnlocked, _SeedlessOnboardingController_cachedDecryptedVaultData, _SeedlessOnboardingController_submitGlobalPassword, _SeedlessOnboardingController_getAccessToken, _SeedlessOnboardingController_setUnlocked, _SeedlessOnboardingController_persistOprfKey, _SeedlessOnboardingController_persistAuthPubKey, _SeedlessOnboardingController_storeKeyringEncryptionKey, _SeedlessOnboardingController_loadKeyringEncryptionKey, _SeedlessOnboardingController_loadSeedlessEncryptionKey, _SeedlessOnboardingController_recoverAuthPubKey, _SeedlessOnboardingController_recoverEncKey, _SeedlessOnboardingController_fetchAllSecretDataFromMetadataStore, _SeedlessOnboardingController_changeEncryptionKey, _SeedlessOnboardingController_encryptAndStoreSecretData, _SeedlessOnboardingController_unlockVaultAndGetVaultData, _SeedlessOnboardingController_decryptAndParseVaultData, _SeedlessOnboardingController_withPersistedSecretMetadataBackupsState, _SeedlessOnboardingController_filterDupesAndUpdateSocialBackupsMetadata, _SeedlessOnboardingController_createNewVaultWithAuthData, _SeedlessOnboardingController_updateVault, _SeedlessOnboardingController_withControllerLock, _SeedlessOnboardingController_withVaultLock, _SeedlessOnboardingController_parseVaultData, _SeedlessOnboardingController_assertIsUnlocked, _SeedlessOnboardingController_assertIsAuthenticatedUser, _SeedlessOnboardingController_assertIsSRPBackedUpUser, _SeedlessOnboardingController_assertPasswordInSync, _SeedlessOnboardingController_resetPasswordOutdatedCache, _SeedlessOnboardingController_addRefreshTokenToRevokeList, _SeedlessOnboardingController_isTokenExpiredError, _SeedlessOnboardingController_isMaxKeyChainLengthError, _SeedlessOnboardingController_executeWithTokenRefresh;
13
13
  import { keccak256AndHexify } from "@metamask/auth-network-utils";
14
- import { BaseController } from "@metamask/base-controller";
14
+ import { BaseController } from "@metamask/base-controller/next";
15
15
  import { ToprfSecureBackup, TOPRFErrorCode, TOPRFError } from "@metamask/toprf-secure-backup";
16
16
  import { base64ToBytes, bytesToBase64, isNullOrUndefined } from "@metamask/utils";
17
17
  import { gcm } from "@noble/ciphers/aes";
@@ -59,99 +59,99 @@ const seedlessOnboardingMetadata = {
59
59
  vault: {
60
60
  includeInStateLogs: false,
61
61
  persist: true,
62
- anonymous: false,
62
+ includeInDebugSnapshot: false,
63
63
  usedInUi: false,
64
64
  },
65
65
  socialBackupsMetadata: {
66
66
  includeInStateLogs: false,
67
67
  persist: true,
68
- anonymous: false,
68
+ includeInDebugSnapshot: false,
69
69
  usedInUi: false,
70
70
  },
71
71
  nodeAuthTokens: {
72
72
  includeInStateLogs: (nodeAuthTokens) => !isNullOrUndefined(nodeAuthTokens),
73
73
  persist: true,
74
- anonymous: false,
74
+ includeInDebugSnapshot: false,
75
75
  usedInUi: false,
76
76
  },
77
77
  authConnection: {
78
78
  includeInStateLogs: true,
79
79
  persist: true,
80
- anonymous: true,
80
+ includeInDebugSnapshot: true,
81
81
  usedInUi: true,
82
82
  },
83
83
  authConnectionId: {
84
84
  includeInStateLogs: true,
85
85
  persist: true,
86
- anonymous: true,
86
+ includeInDebugSnapshot: true,
87
87
  usedInUi: false,
88
88
  },
89
89
  groupedAuthConnectionId: {
90
90
  includeInStateLogs: true,
91
91
  persist: true,
92
- anonymous: true,
92
+ includeInDebugSnapshot: true,
93
93
  usedInUi: false,
94
94
  },
95
95
  userId: {
96
96
  includeInStateLogs: true,
97
97
  persist: true,
98
- anonymous: false,
98
+ includeInDebugSnapshot: false,
99
99
  usedInUi: false,
100
100
  },
101
101
  socialLoginEmail: {
102
102
  includeInStateLogs: false,
103
103
  persist: true,
104
- anonymous: false,
104
+ includeInDebugSnapshot: false,
105
105
  usedInUi: true,
106
106
  },
107
107
  vaultEncryptionKey: {
108
108
  includeInStateLogs: false,
109
109
  persist: false,
110
- anonymous: false,
110
+ includeInDebugSnapshot: false,
111
111
  usedInUi: false,
112
112
  },
113
113
  vaultEncryptionSalt: {
114
114
  includeInStateLogs: false,
115
115
  persist: false,
116
- anonymous: false,
116
+ includeInDebugSnapshot: false,
117
117
  usedInUi: false,
118
118
  },
119
119
  authPubKey: {
120
120
  includeInStateLogs: true,
121
121
  persist: true,
122
- anonymous: false,
122
+ includeInDebugSnapshot: false,
123
123
  usedInUi: false,
124
124
  },
125
125
  passwordOutdatedCache: {
126
126
  includeInStateLogs: true,
127
127
  persist: true,
128
- anonymous: true,
128
+ includeInDebugSnapshot: true,
129
129
  usedInUi: false,
130
130
  },
131
131
  refreshToken: {
132
132
  includeInStateLogs: (refreshToken) => !isNullOrUndefined(refreshToken),
133
133
  persist: true,
134
- anonymous: false,
134
+ includeInDebugSnapshot: false,
135
135
  usedInUi: false,
136
136
  },
137
137
  revokeToken: {
138
138
  includeInStateLogs: (revokeToken) => !isNullOrUndefined(revokeToken),
139
139
  persist: false,
140
- anonymous: false,
140
+ includeInDebugSnapshot: false,
141
141
  usedInUi: false,
142
142
  },
143
143
  pendingToBeRevokedTokens: {
144
144
  includeInStateLogs: (pendingToBeRevokedTokens) => !isNullOrUndefined(pendingToBeRevokedTokens) &&
145
145
  pendingToBeRevokedTokens.length > 0,
146
146
  persist: true,
147
- anonymous: false,
147
+ includeInDebugSnapshot: false,
148
148
  usedInUi: false,
149
149
  },
150
150
  // stays in vault
151
151
  accessToken: {
152
152
  includeInStateLogs: (accessToken) => !isNullOrUndefined(accessToken),
153
153
  persist: false,
154
- anonymous: false,
154
+ includeInDebugSnapshot: false,
155
155
  usedInUi: false,
156
156
  },
157
157
  // stays outside of vault as this token is accessed by the metadata service
@@ -159,25 +159,25 @@ const seedlessOnboardingMetadata = {
159
159
  metadataAccessToken: {
160
160
  includeInStateLogs: (metadataAccessToken) => !isNullOrUndefined(metadataAccessToken),
161
161
  persist: true,
162
- anonymous: false,
162
+ includeInDebugSnapshot: false,
163
163
  usedInUi: false,
164
164
  },
165
165
  encryptedSeedlessEncryptionKey: {
166
166
  includeInStateLogs: false,
167
167
  persist: true,
168
- anonymous: false,
168
+ includeInDebugSnapshot: false,
169
169
  usedInUi: false,
170
170
  },
171
171
  encryptedKeyringEncryptionKey: {
172
172
  includeInStateLogs: false,
173
173
  persist: true,
174
- anonymous: false,
174
+ includeInDebugSnapshot: false,
175
175
  usedInUi: false,
176
176
  },
177
177
  isSeedlessOnboardingUserAuthenticated: {
178
178
  includeInStateLogs: true,
179
179
  persist: true,
180
- anonymous: true,
180
+ includeInDebugSnapshot: true,
181
181
  usedInUi: false,
182
182
  },
183
183
  };