@metamask-previews/seedless-onboarding-controller 10.1.0-preview-a42e8d0d2 → 10.1.0-preview-d2f661012

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,6 +7,10 @@ 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 `AuthConnection.Telegram` (`'telegram'`) to align with client social-login providers that already persist this value on `state.authConnection` ([#9737](https://github.com/MetaMask/core/pull/9737))
13
+
10
14
  ## [10.1.0]
11
15
 
12
16
  ### Added
@@ -15,6 +15,7 @@ var AuthConnection;
15
15
  (function (AuthConnection) {
16
16
  AuthConnection["Google"] = "google";
17
17
  AuthConnection["Apple"] = "apple";
18
+ AuthConnection["Telegram"] = "telegram";
18
19
  })(AuthConnection || (exports.AuthConnection = AuthConnection = {}));
19
20
  var SecretType;
20
21
  (function (SecretType) {
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,8BAA8B,CAAC;AAEhD,QAAA,8BAA8B,GAAG,KAAM,CAAC,CAAC,aAAa;AAEnE,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,+CAA4B,CAAA;IAC5B,6CAA0B,CAAA;AAC5B,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAED;;GAEG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,uCAAyB,CAAA;AAC3B,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uFAAM,CAAA;AACR,CAAC,EAFW,kCAAkC,kDAAlC,kCAAkC,QAE7C;AAED,IAAY,wCAsCX;AAtCD,WAAY,wCAAwC;IAClD,iKAA0G,CAAA;IAC1G,uJAAgG,CAAA;IAChG,uHAAgE,CAAA;IAChE,yIAAkF,CAAA;IAClF,gIAAyE,CAAA;IACzE,4GAAqD,CAAA;IACrD,4HAAqE,CAAA;IACrE,wHAAiE,CAAA;IACjE,sHAA+D,CAAA;IAC/D,sHAA+D,CAAA;IAC/D,uIAAgF,CAAA;IAChF,yJAAkG,CAAA;IAClG,8IAAuF,CAAA;IACvF,6HAAsE,CAAA;IACtE,iIAA0E,CAAA;IAC1E,kHAA2D,CAAA;IAC3D,0IAAmF,CAAA;IACnF,iIAA0E,CAAA;IAC1E,4HAAqE,CAAA;IACrE,4IAAqF,CAAA;IACrF,wJAAiG,CAAA;IACjG,0IAAmF,CAAA;IACnF,qHAA8D,CAAA;IAC9D,yJAAkG,CAAA;IAClG,+HAAwE,CAAA;IACxE,2HAAoE,CAAA;IACpE,mHAA4D,CAAA;IAC5D,iHAA0D,CAAA;IAC1D,iIAA0E,CAAA;IAC1E,oHAA6D,CAAA;IAC7D,8JAAuG,CAAA;IACvG,gKAAyG,CAAA;IACzG,sIAA+E,CAAA;IAC/E,0IAAmF,CAAA;IACnF,qJAA8F,CAAA;IAC9F,oIAA6E,CAAA;IAC7E,yNAAkK,CAAA;AACpK,CAAC,EAtCW,wCAAwC,wDAAxC,wCAAwC,QAsCnD","sourcesContent":["export const controllerName = 'SeedlessOnboardingController';\n\nexport const PASSWORD_OUTDATED_CACHE_TTL_MS = 10_000; // 10 seconds\n\nexport enum Web3AuthNetwork {\n Mainnet = 'sapphire_mainnet',\n Devnet = 'sapphire_devnet',\n}\n\n/**\n * The type of social login provider.\n */\nexport enum AuthConnection {\n Google = 'google',\n Apple = 'apple',\n}\n\nexport enum SecretType {\n Mnemonic = 'mnemonic',\n PrivateKey = 'privateKey',\n}\n\nexport enum SeedlessOnboardingMigrationVersion {\n V1 = 1,\n}\n\nexport enum SeedlessOnboardingControllerErrorMessage {\n ControllerLocked = `${controllerName} - The operation cannot be completed while the controller is locked.`,\n VaultLocked = `${controllerName} - The operation cannot be completed while the vault is locked.`,\n AuthenticationError = `${controllerName} - Authentication error`,\n MissingAuthUserInfo = `${controllerName} - Missing authenticated user information`,\n FailedToPersistOprfKey = `${controllerName} - Failed to persist OPRF key`,\n LoginFailedError = `${controllerName} - Login failed`,\n InsufficientAuthToken = `${controllerName} - Insufficient auth token`,\n InvalidRefreshToken = `${controllerName} - Invalid refresh token`,\n InvalidRevokeToken = `${controllerName} - Invalid revoke token`,\n InvalidAccessToken = `${controllerName} - Invalid access token`,\n InvalidMetadataAccessToken = `${controllerName} - Invalid metadata access token`,\n MissingCredentials = `${controllerName} - Cannot unlock vault without password and encryption key`,\n ExpiredCredentials = `${controllerName} - Encryption key and salt provided are expired`,\n InvalidEmptyPassword = `${controllerName} - Password cannot be empty.`,\n WrongPasswordType = `${controllerName} - Password must be of type string.`,\n InvalidVaultData = `${controllerName} - Invalid vault data`,\n VaultDataError = `${controllerName} - The decrypted vault has an unexpected shape.`,\n VaultError = `${controllerName} - Cannot unlock without a previous vault.`,\n InvalidSecretMetadata = `${controllerName} - Invalid secret metadata`,\n MissingKeyringId = `${controllerName} - Keyring ID is required to store SRP backups.`,\n FailedToEncryptAndStoreSecretData = `${controllerName} - Failed to encrypt and store secret data`,\n FailedToFetchSecretMetadata = `${controllerName} - Failed to fetch secret metadata`,\n NoSecretDataFound = `${controllerName} - No secret data found`,\n InvalidPrimarySecretDataType = `${controllerName} - Primary secret data must be of type mnemonic.`,\n FailedToChangePassword = `${controllerName} - Failed to change password`,\n TooManyLoginAttempts = `${controllerName} - Too many login attempts`,\n IncorrectPassword = `${controllerName} - Incorrect password`,\n OutdatedPassword = `${controllerName} - Outdated password`,\n CouldNotRecoverPassword = `${controllerName} - Could not recover password`,\n SRPNotBackedUpError = `${controllerName} - SRP not backed up`,\n EncryptedKeyringEncryptionKeyNotSet = `${controllerName} - Encrypted keyring encryption key is not set`,\n EncryptedSeedlessEncryptionKeyNotSet = `${controllerName} - Encrypted seedless encryption key is not set`,\n MaxKeyChainLengthExceeded = `${controllerName} - Max key chain length exceeded`,\n FailedToFetchAuthPubKey = `${controllerName} - Failed to fetch latest auth pub key`,\n InvalidPasswordOutdatedCache = `${controllerName} - Invalid password outdated cache provided.`,\n FailedToRefreshJWTTokens = `${controllerName} - Failed to refresh JWT tokens`,\n PrimarySrpCannotBeAddedViaAddNewSecretData = `${controllerName} - PrimarySrp cannot be added via addNewSecretData. Use createToprfKeyAndBackupSeedPhrase instead.`,\n}\n"]}
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,8BAA8B,CAAC;AAEhD,QAAA,8BAA8B,GAAG,KAAM,CAAC,CAAC,aAAa;AAEnE,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,+CAA4B,CAAA;IAC5B,6CAA0B,CAAA;AAC5B,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAED;;GAEG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;IACf,uCAAqB,CAAA;AACvB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,uCAAyB,CAAA;AAC3B,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uFAAM,CAAA;AACR,CAAC,EAFW,kCAAkC,kDAAlC,kCAAkC,QAE7C;AAED,IAAY,wCAsCX;AAtCD,WAAY,wCAAwC;IAClD,iKAA0G,CAAA;IAC1G,uJAAgG,CAAA;IAChG,uHAAgE,CAAA;IAChE,yIAAkF,CAAA;IAClF,gIAAyE,CAAA;IACzE,4GAAqD,CAAA;IACrD,4HAAqE,CAAA;IACrE,wHAAiE,CAAA;IACjE,sHAA+D,CAAA;IAC/D,sHAA+D,CAAA;IAC/D,uIAAgF,CAAA;IAChF,yJAAkG,CAAA;IAClG,8IAAuF,CAAA;IACvF,6HAAsE,CAAA;IACtE,iIAA0E,CAAA;IAC1E,kHAA2D,CAAA;IAC3D,0IAAmF,CAAA;IACnF,iIAA0E,CAAA;IAC1E,4HAAqE,CAAA;IACrE,4IAAqF,CAAA;IACrF,wJAAiG,CAAA;IACjG,0IAAmF,CAAA;IACnF,qHAA8D,CAAA;IAC9D,yJAAkG,CAAA;IAClG,+HAAwE,CAAA;IACxE,2HAAoE,CAAA;IACpE,mHAA4D,CAAA;IAC5D,iHAA0D,CAAA;IAC1D,iIAA0E,CAAA;IAC1E,oHAA6D,CAAA;IAC7D,8JAAuG,CAAA;IACvG,gKAAyG,CAAA;IACzG,sIAA+E,CAAA;IAC/E,0IAAmF,CAAA;IACnF,qJAA8F,CAAA;IAC9F,oIAA6E,CAAA;IAC7E,yNAAkK,CAAA;AACpK,CAAC,EAtCW,wCAAwC,wDAAxC,wCAAwC,QAsCnD","sourcesContent":["export const controllerName = 'SeedlessOnboardingController';\n\nexport const PASSWORD_OUTDATED_CACHE_TTL_MS = 10_000; // 10 seconds\n\nexport enum Web3AuthNetwork {\n Mainnet = 'sapphire_mainnet',\n Devnet = 'sapphire_devnet',\n}\n\n/**\n * The type of social login provider.\n */\nexport enum AuthConnection {\n Google = 'google',\n Apple = 'apple',\n Telegram = 'telegram',\n}\n\nexport enum SecretType {\n Mnemonic = 'mnemonic',\n PrivateKey = 'privateKey',\n}\n\nexport enum SeedlessOnboardingMigrationVersion {\n V1 = 1,\n}\n\nexport enum SeedlessOnboardingControllerErrorMessage {\n ControllerLocked = `${controllerName} - The operation cannot be completed while the controller is locked.`,\n VaultLocked = `${controllerName} - The operation cannot be completed while the vault is locked.`,\n AuthenticationError = `${controllerName} - Authentication error`,\n MissingAuthUserInfo = `${controllerName} - Missing authenticated user information`,\n FailedToPersistOprfKey = `${controllerName} - Failed to persist OPRF key`,\n LoginFailedError = `${controllerName} - Login failed`,\n InsufficientAuthToken = `${controllerName} - Insufficient auth token`,\n InvalidRefreshToken = `${controllerName} - Invalid refresh token`,\n InvalidRevokeToken = `${controllerName} - Invalid revoke token`,\n InvalidAccessToken = `${controllerName} - Invalid access token`,\n InvalidMetadataAccessToken = `${controllerName} - Invalid metadata access token`,\n MissingCredentials = `${controllerName} - Cannot unlock vault without password and encryption key`,\n ExpiredCredentials = `${controllerName} - Encryption key and salt provided are expired`,\n InvalidEmptyPassword = `${controllerName} - Password cannot be empty.`,\n WrongPasswordType = `${controllerName} - Password must be of type string.`,\n InvalidVaultData = `${controllerName} - Invalid vault data`,\n VaultDataError = `${controllerName} - The decrypted vault has an unexpected shape.`,\n VaultError = `${controllerName} - Cannot unlock without a previous vault.`,\n InvalidSecretMetadata = `${controllerName} - Invalid secret metadata`,\n MissingKeyringId = `${controllerName} - Keyring ID is required to store SRP backups.`,\n FailedToEncryptAndStoreSecretData = `${controllerName} - Failed to encrypt and store secret data`,\n FailedToFetchSecretMetadata = `${controllerName} - Failed to fetch secret metadata`,\n NoSecretDataFound = `${controllerName} - No secret data found`,\n InvalidPrimarySecretDataType = `${controllerName} - Primary secret data must be of type mnemonic.`,\n FailedToChangePassword = `${controllerName} - Failed to change password`,\n TooManyLoginAttempts = `${controllerName} - Too many login attempts`,\n IncorrectPassword = `${controllerName} - Incorrect password`,\n OutdatedPassword = `${controllerName} - Outdated password`,\n CouldNotRecoverPassword = `${controllerName} - Could not recover password`,\n SRPNotBackedUpError = `${controllerName} - SRP not backed up`,\n EncryptedKeyringEncryptionKeyNotSet = `${controllerName} - Encrypted keyring encryption key is not set`,\n EncryptedSeedlessEncryptionKeyNotSet = `${controllerName} - Encrypted seedless encryption key is not set`,\n MaxKeyChainLengthExceeded = `${controllerName} - Max key chain length exceeded`,\n FailedToFetchAuthPubKey = `${controllerName} - Failed to fetch latest auth pub key`,\n InvalidPasswordOutdatedCache = `${controllerName} - Invalid password outdated cache provided.`,\n FailedToRefreshJWTTokens = `${controllerName} - Failed to refresh JWT tokens`,\n PrimarySrpCannotBeAddedViaAddNewSecretData = `${controllerName} - PrimarySrp cannot be added via addNewSecretData. Use createToprfKeyAndBackupSeedPhrase instead.`,\n}\n"]}
@@ -9,7 +9,8 @@ export declare enum Web3AuthNetwork {
9
9
  */
10
10
  export declare enum AuthConnection {
11
11
  Google = "google",
12
- Apple = "apple"
12
+ Apple = "apple",
13
+ Telegram = "telegram"
13
14
  }
14
15
  export declare enum SecretType {
15
16
  Mnemonic = "mnemonic",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,iCAAiC,CAAC;AAE7D,eAAO,MAAM,8BAA8B,QAAS,CAAC;AAErD,oBAAY,eAAe;IACzB,OAAO,qBAAqB;IAC5B,MAAM,oBAAoB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,oBAAY,UAAU;IACpB,QAAQ,aAAa;IACrB,UAAU,eAAe;CAC1B;AAED,oBAAY,kCAAkC;IAC5C,EAAE,IAAI;CACP;AAED,oBAAY,wCAAwC;IAClD,gBAAgB,qGAA0F;IAC1G,WAAW,gGAAqF;IAChG,mBAAmB,wDAA6C;IAChE,mBAAmB,0EAA+D;IAClF,sBAAsB,8DAAmD;IACzE,gBAAgB,gDAAqC;IACrD,qBAAqB,2DAAgD;IACrE,mBAAmB,yDAA8C;IACjE,kBAAkB,wDAA6C;IAC/D,kBAAkB,wDAA6C;IAC/D,0BAA0B,iEAAsD;IAChF,kBAAkB,2FAAgF;IAClG,kBAAkB,gFAAqE;IACvF,oBAAoB,6DAAkD;IACtE,iBAAiB,oEAAyD;IAC1E,gBAAgB,sDAA2C;IAC3D,cAAc,gFAAqE;IACnF,UAAU,2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AyD;IAC1E,gBAAgB,sDAA2C;IAC3D,cAAc,gFAAqE;IACnF,UAAU,2EAAgE;IAC1E,qBAAqB,2DAAgD;IACrE,gBAAgB,gFAAqE;IACrF,iCAAiC,2EAAgE;IACjG,2BAA2B,mEAAwD;IACnF,iBAAiB,wDAA6C;IAC9D,4BAA4B,iFAAsE;IAClG,sBAAsB,6DAAkD;IACxE,oBAAoB,2DAAgD;IACpE,iBAAiB,sDAA2C;IAC5D,gBAAgB,qDAA0C;IAC1D,uBAAuB,8DAAmD;IAC1E,mBAAmB,qDAA0C;IAC7D,mCAAmC,+EAAoE;IACvG,oCAAoC,gFAAqE;IACzG,yBAAyB,iEAAsD;IAC/E,uBAAuB,uEAA4D;IACnF,4BAA4B,6EAAkE;IAC9F,wBAAwB,gEAAqD;IAC7E,0CAA0C,mIAAwH;CACnK"}
@@ -9,7 +9,8 @@ export declare enum Web3AuthNetwork {
9
9
  */
10
10
  export declare enum AuthConnection {
11
11
  Google = "google",
12
- Apple = "apple"
12
+ Apple = "apple",
13
+ Telegram = "telegram"
13
14
  }
14
15
  export declare enum SecretType {
15
16
  Mnemonic = "mnemonic",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,iCAAiC,CAAC;AAE7D,eAAO,MAAM,8BAA8B,QAAS,CAAC;AAErD,oBAAY,eAAe;IACzB,OAAO,qBAAqB;IAC5B,MAAM,oBAAoB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,oBAAY,UAAU;IACpB,QAAQ,aAAa;IACrB,UAAU,eAAe;CAC1B;AAED,oBAAY,kCAAkC;IAC5C,EAAE,IAAI;CACP;AAED,oBAAY,wCAAwC;IAClD,gBAAgB,qGAA0F;IAC1G,WAAW,gGAAqF;IAChG,mBAAmB,wDAA6C;IAChE,mBAAmB,0EAA+D;IAClF,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AW,gGAAqF;IAChG,mBAAmB,wDAA6C;IAChE,mBAAmB,0EAA+D;IAClF,sBAAsB,8DAAmD;IACzE,gBAAgB,gDAAqC;IACrD,qBAAqB,2DAAgD;IACrE,mBAAmB,yDAA8C;IACjE,kBAAkB,wDAA6C;IAC/D,kBAAkB,wDAA6C;IAC/D,0BAA0B,iEAAsD;IAChF,kBAAkB,2FAAgF;IAClG,kBAAkB,gFAAqE;IACvF,oBAAoB,6DAAkD;IACtE,iBAAiB,oEAAyD;IAC1E,gBAAgB,sDAA2C;IAC3D,cAAc,gFAAqE;IACnF,UAAU,2EAAgE;IAC1E,qBAAqB,2DAAgD;IACrE,gBAAgB,gFAAqE;IACrF,iCAAiC,2EAAgE;IACjG,2BAA2B,mEAAwD;IACnF,iBAAiB,wDAA6C;IAC9D,4BAA4B,iFAAsE;IAClG,sBAAsB,6DAAkD;IACxE,oBAAoB,2DAAgD;IACpE,iBAAiB,sDAA2C;IAC5D,gBAAgB,qDAA0C;IAC1D,uBAAuB,8DAAmD;IAC1E,mBAAmB,qDAA0C;IAC7D,mCAAmC,+EAAoE;IACvG,oCAAoC,gFAAqE;IACzG,yBAAyB,iEAAsD;IAC/E,uBAAuB,uEAA4D;IACnF,4BAA4B,6EAAkE;IAC9F,wBAAwB,gEAAqD;IAC7E,0CAA0C,mIAAwH;CACnK"}
@@ -12,6 +12,7 @@ export var AuthConnection;
12
12
  (function (AuthConnection) {
13
13
  AuthConnection["Google"] = "google";
14
14
  AuthConnection["Apple"] = "apple";
15
+ AuthConnection["Telegram"] = "telegram";
15
16
  })(AuthConnection || (AuthConnection = {}));
16
17
  export var SecretType;
17
18
  (function (SecretType) {
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,8BAA8B,CAAC;AAE7D,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAM,CAAC,CAAC,aAAa;AAEnE,M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yG,CAAA;IACzG,sIAA+E,CAAA;IAC/E,0IAAmF,CAAA;IACnF,qJAA8F,CAAA;IAC9F,oIAA6E,CAAA;IAC7E,yNAAkK,CAAA;AACpK,CAAC,EAtCW,wCAAwC,KAAxC,wCAAwC,QAsCnD","sourcesContent":["export const controllerName = 'SeedlessOnboardingController';\n\nexport const PASSWORD_OUTDATED_CACHE_TTL_MS = 10_000; // 10 seconds\n\nexport enum Web3AuthNetwork {\n Mainnet = 'sapphire_mainnet',\n Devnet = 'sapphire_devnet',\n}\n\n/**\n * The type of social login provider.\n */\nexport enum AuthConnection {\n Google = 'google',\n Apple = 'apple',\n}\n\nexport enum SecretType {\n Mnemonic = 'mnemonic',\n PrivateKey = 'privateKey',\n}\n\nexport enum SeedlessOnboardingMigrationVersion {\n V1 = 1,\n}\n\nexport enum SeedlessOnboardingControllerErrorMessage {\n ControllerLocked = `${controllerName} - The operation cannot be completed while the controller is locked.`,\n VaultLocked = `${controllerName} - The operation cannot be completed while the vault is locked.`,\n AuthenticationError = `${controllerName} - Authentication error`,\n MissingAuthUserInfo = `${controllerName} - Missing authenticated user information`,\n FailedToPersistOprfKey = `${controllerName} - Failed to persist OPRF key`,\n LoginFailedError = `${controllerName} - Login failed`,\n InsufficientAuthToken = `${controllerName} - Insufficient auth token`,\n InvalidRefreshToken = `${controllerName} - Invalid refresh token`,\n InvalidRevokeToken = `${controllerName} - Invalid revoke token`,\n InvalidAccessToken = `${controllerName} - Invalid access token`,\n InvalidMetadataAccessToken = `${controllerName} - Invalid metadata access token`,\n MissingCredentials = `${controllerName} - Cannot unlock vault without password and encryption key`,\n ExpiredCredentials = `${controllerName} - Encryption key and salt provided are expired`,\n InvalidEmptyPassword = `${controllerName} - Password cannot be empty.`,\n WrongPasswordType = `${controllerName} - Password must be of type string.`,\n InvalidVaultData = `${controllerName} - Invalid vault data`,\n VaultDataError = `${controllerName} - The decrypted vault has an unexpected shape.`,\n VaultError = `${controllerName} - Cannot unlock without a previous vault.`,\n InvalidSecretMetadata = `${controllerName} - Invalid secret metadata`,\n MissingKeyringId = `${controllerName} - Keyring ID is required to store SRP backups.`,\n FailedToEncryptAndStoreSecretData = `${controllerName} - Failed to encrypt and store secret data`,\n FailedToFetchSecretMetadata = `${controllerName} - Failed to fetch secret metadata`,\n NoSecretDataFound = `${controllerName} - No secret data found`,\n InvalidPrimarySecretDataType = `${controllerName} - Primary secret data must be of type mnemonic.`,\n FailedToChangePassword = `${controllerName} - Failed to change password`,\n TooManyLoginAttempts = `${controllerName} - Too many login attempts`,\n IncorrectPassword = `${controllerName} - Incorrect password`,\n OutdatedPassword = `${controllerName} - Outdated password`,\n CouldNotRecoverPassword = `${controllerName} - Could not recover password`,\n SRPNotBackedUpError = `${controllerName} - SRP not backed up`,\n EncryptedKeyringEncryptionKeyNotSet = `${controllerName} - Encrypted keyring encryption key is not set`,\n EncryptedSeedlessEncryptionKeyNotSet = `${controllerName} - Encrypted seedless encryption key is not set`,\n MaxKeyChainLengthExceeded = `${controllerName} - Max key chain length exceeded`,\n FailedToFetchAuthPubKey = `${controllerName} - Failed to fetch latest auth pub key`,\n InvalidPasswordOutdatedCache = `${controllerName} - Invalid password outdated cache provided.`,\n FailedToRefreshJWTTokens = `${controllerName} - Failed to refresh JWT tokens`,\n PrimarySrpCannotBeAddedViaAddNewSecretData = `${controllerName} - PrimarySrp cannot be added via addNewSecretData. Use createToprfKeyAndBackupSeedPhrase instead.`,\n}\n"]}
1
+ {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,8BAA8B,CAAC;AAE7D,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAM,CAAC,CAAC,aAAa;AAEnE,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,+CAA4B,CAAA;IAC5B,6CAA0B,CAAA;AAC5B,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED;;GAEG;AACH,MAAM,C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W,wCAAwC,KAAxC,wCAAwC,QAsCnD","sourcesContent":["export const controllerName = 'SeedlessOnboardingController';\n\nexport const PASSWORD_OUTDATED_CACHE_TTL_MS = 10_000; // 10 seconds\n\nexport enum Web3AuthNetwork {\n Mainnet = 'sapphire_mainnet',\n Devnet = 'sapphire_devnet',\n}\n\n/**\n * The type of social login provider.\n */\nexport enum AuthConnection {\n Google = 'google',\n Apple = 'apple',\n Telegram = 'telegram',\n}\n\nexport enum SecretType {\n Mnemonic = 'mnemonic',\n PrivateKey = 'privateKey',\n}\n\nexport enum SeedlessOnboardingMigrationVersion {\n V1 = 1,\n}\n\nexport enum SeedlessOnboardingControllerErrorMessage {\n ControllerLocked = `${controllerName} - The operation cannot be completed while the controller is locked.`,\n VaultLocked = `${controllerName} - The operation cannot be completed while the vault is locked.`,\n AuthenticationError = `${controllerName} - Authentication error`,\n MissingAuthUserInfo = `${controllerName} - Missing authenticated user information`,\n FailedToPersistOprfKey = `${controllerName} - Failed to persist OPRF key`,\n LoginFailedError = `${controllerName} - Login failed`,\n InsufficientAuthToken = `${controllerName} - Insufficient auth token`,\n InvalidRefreshToken = `${controllerName} - Invalid refresh token`,\n InvalidRevokeToken = `${controllerName} - Invalid revoke token`,\n InvalidAccessToken = `${controllerName} - Invalid access token`,\n InvalidMetadataAccessToken = `${controllerName} - Invalid metadata access token`,\n MissingCredentials = `${controllerName} - Cannot unlock vault without password and encryption key`,\n ExpiredCredentials = `${controllerName} - Encryption key and salt provided are expired`,\n InvalidEmptyPassword = `${controllerName} - Password cannot be empty.`,\n WrongPasswordType = `${controllerName} - Password must be of type string.`,\n InvalidVaultData = `${controllerName} - Invalid vault data`,\n VaultDataError = `${controllerName} - The decrypted vault has an unexpected shape.`,\n VaultError = `${controllerName} - Cannot unlock without a previous vault.`,\n InvalidSecretMetadata = `${controllerName} - Invalid secret metadata`,\n MissingKeyringId = `${controllerName} - Keyring ID is required to store SRP backups.`,\n FailedToEncryptAndStoreSecretData = `${controllerName} - Failed to encrypt and store secret data`,\n FailedToFetchSecretMetadata = `${controllerName} - Failed to fetch secret metadata`,\n NoSecretDataFound = `${controllerName} - No secret data found`,\n InvalidPrimarySecretDataType = `${controllerName} - Primary secret data must be of type mnemonic.`,\n FailedToChangePassword = `${controllerName} - Failed to change password`,\n TooManyLoginAttempts = `${controllerName} - Too many login attempts`,\n IncorrectPassword = `${controllerName} - Incorrect password`,\n OutdatedPassword = `${controllerName} - Outdated password`,\n CouldNotRecoverPassword = `${controllerName} - Could not recover password`,\n SRPNotBackedUpError = `${controllerName} - SRP not backed up`,\n EncryptedKeyringEncryptionKeyNotSet = `${controllerName} - Encrypted keyring encryption key is not set`,\n EncryptedSeedlessEncryptionKeyNotSet = `${controllerName} - Encrypted seedless encryption key is not set`,\n MaxKeyChainLengthExceeded = `${controllerName} - Max key chain length exceeded`,\n FailedToFetchAuthPubKey = `${controllerName} - Failed to fetch latest auth pub key`,\n InvalidPasswordOutdatedCache = `${controllerName} - Invalid password outdated cache provided.`,\n FailedToRefreshJWTTokens = `${controllerName} - Failed to refresh JWT tokens`,\n PrimarySrpCannotBeAddedViaAddNewSecretData = `${controllerName} - PrimarySrp cannot be added via addNewSecretData. Use createToprfKeyAndBackupSeedPhrase instead.`,\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/seedless-onboarding-controller",
3
- "version": "10.1.0-preview-a42e8d0d2",
3
+ "version": "10.1.0-preview-d2f661012",
4
4
  "description": "Backup and rehydrate SRP(s) using social login and password",
5
5
  "keywords": [
6
6
  "Ethereum",