@metamask-previews/seedless-onboarding-controller 2.4.0-preview-fed19434 → 2.4.0-preview-e0bc4b4b
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 +0 -13
- package/dist/SeedlessOnboardingController.cjs +70 -133
- package/dist/SeedlessOnboardingController.cjs.map +1 -1
- package/dist/SeedlessOnboardingController.d.cts +14 -7
- package/dist/SeedlessOnboardingController.d.cts.map +1 -1
- package/dist/SeedlessOnboardingController.d.mts +14 -7
- package/dist/SeedlessOnboardingController.d.mts.map +1 -1
- package/dist/SeedlessOnboardingController.mjs +71 -134
- package/dist/SeedlessOnboardingController.mjs.map +1 -1
- package/dist/assertions.cjs +1 -16
- package/dist/assertions.cjs.map +1 -1
- package/dist/assertions.d.cts +0 -7
- package/dist/assertions.d.cts.map +1 -1
- package/dist/assertions.d.mts +0 -7
- package/dist/assertions.d.mts.map +1 -1
- package/dist/assertions.mjs +0 -14
- package/dist/assertions.mjs.map +1 -1
- package/dist/constants.cjs +1 -3
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +2 -4
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.mts +2 -4
- package/dist/constants.d.mts.map +1 -1
- package/dist/constants.mjs +1 -3
- package/dist/constants.mjs.map +1 -1
- package/dist/index.cjs +1 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +0 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +0 -6
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +0 -6
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +2 -2
package/dist/assertions.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertions.mjs","sourceRoot":"","sources":["../src/assertions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wCAAwC,EAAE,wBAAoB;AAGvE;;;;;GAKG;AACH,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"assertions.mjs","sourceRoot":"","sources":["../src/assertions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wCAAwC,EAAE,wBAAoB;AAGvE;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAAc;IAEd,6EAA6E;IAC7E,IACE,CAAC,KAAK,IAAI,uBAAuB;QACjC,OAAO,KAAK,KAAK,QAAQ,IAAI,yBAAyB;QACtD,CAAC,CAAC,oBAAoB,IAAI,KAAK,CAAC,IAAI,oCAAoC;QACxE,OAAO,KAAK,CAAC,kBAAkB,KAAK,QAAQ,IAAI,qCAAqC;QACrF,CAAC,CAAC,sBAAsB,IAAI,KAAK,CAAC,IAAI,sCAAsC;QAC5E,OAAO,KAAK,CAAC,oBAAoB,KAAK,QAAQ,IAAI,uCAAuC;QACzF,CAAC,CAAC,kBAAkB,IAAI,KAAK,CAAC,IAAI,kCAAkC;QACpE,OAAO,KAAK,CAAC,gBAAgB,KAAK,QAAQ,IAAI,mCAAmC;QACjF,+DAA+D;QAC/D,CAAC,aAAa,IAAI,KAAK;YACrB,OAAO,KAAK,CAAC,WAAW,KAAK,QAAQ;YACrC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC;QAClC,CAAC,CAAC,aAAa,IAAI,KAAK,CAAC,IAAI,6BAA6B;QAC1D,OAAO,KAAK,CAAC,WAAW,KAAK,QAAQ,CAAC,8BAA8B;MACpE;QACA,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,cAAc,CAAC,CAAC;KAC1E;AACH,CAAC","sourcesContent":["import { SeedlessOnboardingControllerErrorMessage } from './constants';\nimport type { VaultData } from './types';\n\n/**\n * Check if the provided value is a valid vault data.\n *\n * @param value - The value to check.\n * @throws If the value is not a valid vault data.\n */\nexport function assertIsValidVaultData(\n value: unknown,\n): asserts value is VaultData {\n // value is not valid vault data if any of the following conditions are true:\n if (\n !value || // value is not defined\n typeof value !== 'object' || // value is not an object\n !('toprfEncryptionKey' in value) || // toprfEncryptionKey is not defined\n typeof value.toprfEncryptionKey !== 'string' || // toprfEncryptionKey is not a string\n !('toprfPwEncryptionKey' in value) || // toprfPwEncryptionKey is not defined\n typeof value.toprfPwEncryptionKey !== 'string' || // toprfPwEncryptionKey is not a string\n !('toprfAuthKeyPair' in value) || // toprfAuthKeyPair is not defined\n typeof value.toprfAuthKeyPair !== 'string' || // toprfAuthKeyPair is not a string\n // revoke token exists but is not a string and is not undefined\n ('revokeToken' in value &&\n typeof value.revokeToken !== 'string' &&\n value.revokeToken !== undefined) ||\n !('accessToken' in value) || // accessToken is not defined\n typeof value.accessToken !== 'string' // accessToken is not a string\n ) {\n throw new Error(SeedlessOnboardingControllerErrorMessage.VaultDataError);\n }\n}\n"]}
|
package/dist/constants.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SeedlessOnboardingControllerErrorMessage = exports.SecretMetadataVersion = exports.SecretType = exports.AuthConnection = exports.Web3AuthNetwork = exports.PASSWORD_OUTDATED_CACHE_TTL_MS = exports.controllerName = void 0;
|
|
4
4
|
exports.controllerName = 'SeedlessOnboardingController';
|
|
5
|
-
exports.PASSWORD_OUTDATED_CACHE_TTL_MS =
|
|
5
|
+
exports.PASSWORD_OUTDATED_CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes
|
|
6
6
|
var Web3AuthNetwork;
|
|
7
7
|
(function (Web3AuthNetwork) {
|
|
8
8
|
Web3AuthNetwork["Mainnet"] = "sapphire_mainnet";
|
|
@@ -60,7 +60,5 @@ var SeedlessOnboardingControllerErrorMessage;
|
|
|
60
60
|
SeedlessOnboardingControllerErrorMessage["EncryptedSeedlessEncryptionKeyNotSet"] = "SeedlessOnboardingController - Encrypted seedless encryption key is not set";
|
|
61
61
|
SeedlessOnboardingControllerErrorMessage["VaultEncryptionKeyUndefined"] = "SeedlessOnboardingController - Vault encryption key is not available";
|
|
62
62
|
SeedlessOnboardingControllerErrorMessage["MaxKeyChainLengthExceeded"] = "SeedlessOnboardingController - Max key chain length exceeded";
|
|
63
|
-
SeedlessOnboardingControllerErrorMessage["FailedToFetchAuthPubKey"] = "SeedlessOnboardingController - Failed to fetch latest auth pub key";
|
|
64
|
-
SeedlessOnboardingControllerErrorMessage["InvalidPasswordOutdatedCache"] = "SeedlessOnboardingController - Invalid password outdated cache provided.";
|
|
65
63
|
})(SeedlessOnboardingControllerErrorMessage || (exports.SeedlessOnboardingControllerErrorMessage = SeedlessOnboardingControllerErrorMessage = {}));
|
|
66
64
|
//# sourceMappingURL=constants.cjs.map
|
package/dist/constants.cjs.map
CHANGED
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,8BAA8B,CAAC;AAEhD,QAAA,8BAA8B,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;AAEzE,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,qBAEX;AAFD,WAAY,qBAAqB;IAC/B,kCAAS,CAAA;AACX,CAAC,EAFW,qBAAqB,qCAArB,qBAAqB,QAEhC;AAED,IAAY,wCAkCX;AAlCD,WAAY,wCAAwC;IAClD,iKAA0G,CAAA;IAC1G,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,gJAAyF,CAAA;IACzF,sIAA+E,CAAA;AACjF,CAAC,EAlCW,wCAAwC,wDAAxC,wCAAwC,QAkCnD","sourcesContent":["export const controllerName = 'SeedlessOnboardingController';\n\nexport const PASSWORD_OUTDATED_CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes\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 SecretMetadataVersion {\n V1 = 'v1',\n}\n\nexport enum SeedlessOnboardingControllerErrorMessage {\n ControllerLocked = `${controllerName} - The operation cannot be completed while the controller 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 VaultEncryptionKeyUndefined = `${controllerName} - Vault encryption key is not available`,\n MaxKeyChainLengthExceeded = `${controllerName} - Max key chain length exceeded`,\n}\n"]}
|
package/dist/constants.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const controllerName = "SeedlessOnboardingController";
|
|
2
|
-
export declare const PASSWORD_OUTDATED_CACHE_TTL_MS
|
|
2
|
+
export declare const PASSWORD_OUTDATED_CACHE_TTL_MS: number;
|
|
3
3
|
export declare enum Web3AuthNetwork {
|
|
4
4
|
Mainnet = "sapphire_mainnet",
|
|
5
5
|
Devnet = "sapphire_devnet"
|
|
@@ -51,8 +51,6 @@ export declare enum SeedlessOnboardingControllerErrorMessage {
|
|
|
51
51
|
EncryptedKeyringEncryptionKeyNotSet = "SeedlessOnboardingController - Encrypted keyring encryption key is not set",
|
|
52
52
|
EncryptedSeedlessEncryptionKeyNotSet = "SeedlessOnboardingController - Encrypted seedless encryption key is not set",
|
|
53
53
|
VaultEncryptionKeyUndefined = "SeedlessOnboardingController - Vault encryption key is not available",
|
|
54
|
-
MaxKeyChainLengthExceeded = "SeedlessOnboardingController - Max key chain length exceeded"
|
|
55
|
-
FailedToFetchAuthPubKey = "SeedlessOnboardingController - Failed to fetch latest auth pub key",
|
|
56
|
-
InvalidPasswordOutdatedCache = "SeedlessOnboardingController - Invalid password outdated cache provided."
|
|
54
|
+
MaxKeyChainLengthExceeded = "SeedlessOnboardingController - Max key chain length exceeded"
|
|
57
55
|
}
|
|
58
56
|
//# sourceMappingURL=constants.d.cts.map
|
package/dist/constants.d.cts.map
CHANGED
|
@@ -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,
|
|
1
|
+
{"version":3,"file":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
export declare const controllerName = "SeedlessOnboardingController";
|
|
2
|
-
export declare const PASSWORD_OUTDATED_CACHE_TTL_MS
|
|
2
|
+
export declare const PASSWORD_OUTDATED_CACHE_TTL_MS: number;
|
|
3
3
|
export declare enum Web3AuthNetwork {
|
|
4
4
|
Mainnet = "sapphire_mainnet",
|
|
5
5
|
Devnet = "sapphire_devnet"
|
|
@@ -51,8 +51,6 @@ export declare enum SeedlessOnboardingControllerErrorMessage {
|
|
|
51
51
|
EncryptedKeyringEncryptionKeyNotSet = "SeedlessOnboardingController - Encrypted keyring encryption key is not set",
|
|
52
52
|
EncryptedSeedlessEncryptionKeyNotSet = "SeedlessOnboardingController - Encrypted seedless encryption key is not set",
|
|
53
53
|
VaultEncryptionKeyUndefined = "SeedlessOnboardingController - Vault encryption key is not available",
|
|
54
|
-
MaxKeyChainLengthExceeded = "SeedlessOnboardingController - Max key chain length exceeded"
|
|
55
|
-
FailedToFetchAuthPubKey = "SeedlessOnboardingController - Failed to fetch latest auth pub key",
|
|
56
|
-
InvalidPasswordOutdatedCache = "SeedlessOnboardingController - Invalid password outdated cache provided."
|
|
54
|
+
MaxKeyChainLengthExceeded = "SeedlessOnboardingController - Max key chain length exceeded"
|
|
57
55
|
}
|
|
58
56
|
//# sourceMappingURL=constants.d.mts.map
|
package/dist/constants.d.mts.map
CHANGED
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,iCAAiC,CAAC;AAE7D,eAAO,MAAM,8BAA8B,QAAgB,CAAC;AAE5D,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,qBAAqB;IAC/B,EAAE,OAAO;CACV;AAED,oBAAY,wCAAwC;IAClD,gBAAgB,qGAA0F;IAC1G,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,2BAA2B,yEAA8D;IACzF,yBAAyB,iEAAsD;CAChF"}
|
package/dist/constants.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const controllerName = 'SeedlessOnboardingController';
|
|
2
|
-
export const PASSWORD_OUTDATED_CACHE_TTL_MS =
|
|
2
|
+
export const PASSWORD_OUTDATED_CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes
|
|
3
3
|
export var Web3AuthNetwork;
|
|
4
4
|
(function (Web3AuthNetwork) {
|
|
5
5
|
Web3AuthNetwork["Mainnet"] = "sapphire_mainnet";
|
|
@@ -57,7 +57,5 @@ export var SeedlessOnboardingControllerErrorMessage;
|
|
|
57
57
|
SeedlessOnboardingControllerErrorMessage["EncryptedSeedlessEncryptionKeyNotSet"] = "SeedlessOnboardingController - Encrypted seedless encryption key is not set";
|
|
58
58
|
SeedlessOnboardingControllerErrorMessage["VaultEncryptionKeyUndefined"] = "SeedlessOnboardingController - Vault encryption key is not available";
|
|
59
59
|
SeedlessOnboardingControllerErrorMessage["MaxKeyChainLengthExceeded"] = "SeedlessOnboardingController - Max key chain length exceeded";
|
|
60
|
-
SeedlessOnboardingControllerErrorMessage["FailedToFetchAuthPubKey"] = "SeedlessOnboardingController - Failed to fetch latest auth pub key";
|
|
61
|
-
SeedlessOnboardingControllerErrorMessage["InvalidPasswordOutdatedCache"] = "SeedlessOnboardingController - Invalid password outdated cache provided.";
|
|
62
60
|
})(SeedlessOnboardingControllerErrorMessage || (SeedlessOnboardingControllerErrorMessage = {}));
|
|
63
61
|
//# sourceMappingURL=constants.mjs.map
|
package/dist/constants.mjs.map
CHANGED
|
@@ -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,
|
|
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,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;AAEzE,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,+CAA4B,CAAA;IAC5B,6CAA0B,CAAA;AAC5B,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED;;GAEG;AACH,MAAM,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_MS = 5 * 60 * 1000; // 5 minutes\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 SecretMetadataVersion {\n V1 = 'v1',\n}\n\nexport enum SeedlessOnboardingControllerErrorMessage {\n ControllerLocked = `${controllerName} - The operation cannot be completed while the controller 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 VaultEncryptionKeyUndefined = `${controllerName} - Vault encryption key is not available`,\n MaxKeyChainLengthExceeded = `${controllerName} - Max key chain length exceeded`,\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RecoveryError = exports.
|
|
3
|
+
exports.RecoveryError = exports.SecretType = exports.AuthConnection = exports.SeedlessOnboardingControllerErrorMessage = exports.Web3AuthNetwork = exports.getDefaultSeedlessOnboardingControllerState = exports.SeedlessOnboardingController = void 0;
|
|
4
4
|
var SeedlessOnboardingController_1 = require("./SeedlessOnboardingController.cjs");
|
|
5
5
|
Object.defineProperty(exports, "SeedlessOnboardingController", { enumerable: true, get: function () { return SeedlessOnboardingController_1.SeedlessOnboardingController; } });
|
|
6
6
|
Object.defineProperty(exports, "getDefaultSeedlessOnboardingControllerState", { enumerable: true, get: function () { return SeedlessOnboardingController_1.getDefaultSeedlessOnboardingControllerState; } });
|
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "Web3AuthNetwork", { enumerable: true, get: funct
|
|
|
9
9
|
Object.defineProperty(exports, "SeedlessOnboardingControllerErrorMessage", { enumerable: true, get: function () { return constants_1.SeedlessOnboardingControllerErrorMessage; } });
|
|
10
10
|
Object.defineProperty(exports, "AuthConnection", { enumerable: true, get: function () { return constants_1.AuthConnection; } });
|
|
11
11
|
Object.defineProperty(exports, "SecretType", { enumerable: true, get: function () { return constants_1.SecretType; } });
|
|
12
|
-
var SecretMetadata_1 = require("./SecretMetadata.cjs");
|
|
13
|
-
Object.defineProperty(exports, "SecretMetadata", { enumerable: true, get: function () { return SecretMetadata_1.SecretMetadata; } });
|
|
14
12
|
var errors_1 = require("./errors.cjs");
|
|
15
13
|
Object.defineProperty(exports, "RecoveryError", { enumerable: true, get: function () { return errors_1.RecoveryError; } });
|
|
16
14
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mFAGwC;AAFtC,4IAAA,4BAA4B,OAAA;AAC5B,2JAAA,2CAA2C,OAAA;AAe7C,6CAKqB;AAJnB,4GAAA,eAAe,OAAA;AACf,qIAAA,wCAAwC,OAAA;AACxC,2GAAA,cAAc,OAAA;AACd,uGAAA,UAAU,OAAA;AAEZ,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mFAGwC;AAFtC,4IAAA,4BAA4B,OAAA;AAC5B,2JAAA,2CAA2C,OAAA;AAe7C,6CAKqB;AAJnB,4GAAA,eAAe,OAAA;AACf,qIAAA,wCAAwC,OAAA;AACxC,2GAAA,cAAc,OAAA;AACd,uGAAA,UAAU,OAAA;AAEZ,uCAAyC;AAAhC,uGAAA,aAAa,OAAA","sourcesContent":["export {\n SeedlessOnboardingController,\n getDefaultSeedlessOnboardingControllerState,\n} from './SeedlessOnboardingController';\nexport type {\n AuthenticatedUserDetails,\n SocialBackupsMetadata,\n SeedlessOnboardingControllerState,\n SeedlessOnboardingControllerOptions,\n SeedlessOnboardingControllerMessenger,\n SeedlessOnboardingControllerGetStateAction,\n SeedlessOnboardingControllerStateChangeEvent,\n SeedlessOnboardingControllerActions,\n SeedlessOnboardingControllerEvents,\n ToprfKeyDeriver,\n RecoveryErrorData,\n} from './types';\nexport {\n Web3AuthNetwork,\n SeedlessOnboardingControllerErrorMessage,\n AuthConnection,\n SecretType,\n} from './constants';\nexport { RecoveryError } from './errors';\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { SeedlessOnboardingController, getDefaultSeedlessOnboardingControllerState, } from "./SeedlessOnboardingController.cjs";
|
|
2
2
|
export type { AuthenticatedUserDetails, SocialBackupsMetadata, SeedlessOnboardingControllerState, SeedlessOnboardingControllerOptions, SeedlessOnboardingControllerMessenger, SeedlessOnboardingControllerGetStateAction, SeedlessOnboardingControllerStateChangeEvent, SeedlessOnboardingControllerActions, SeedlessOnboardingControllerEvents, ToprfKeyDeriver, RecoveryErrorData, } from "./types.cjs";
|
|
3
3
|
export { Web3AuthNetwork, SeedlessOnboardingControllerErrorMessage, AuthConnection, SecretType, } from "./constants.cjs";
|
|
4
|
-
export { SecretMetadata } from "./SecretMetadata.cjs";
|
|
5
4
|
export { RecoveryError } from "./errors.cjs";
|
|
6
5
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,2CAA2C,GAC5C,2CAAuC;AACxC,YAAY,EACV,wBAAwB,EACxB,qBAAqB,EACrB,iCAAiC,EACjC,mCAAmC,EACnC,qCAAqC,EACrC,0CAA0C,EAC1C,4CAA4C,EAC5C,mCAAmC,EACnC,kCAAkC,EAClC,eAAe,EACf,iBAAiB,GAClB,oBAAgB;AACjB,OAAO,EACL,eAAe,EACf,wCAAwC,EACxC,cAAc,EACd,UAAU,GACX,wBAAoB;AACrB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,2CAA2C,GAC5C,2CAAuC;AACxC,YAAY,EACV,wBAAwB,EACxB,qBAAqB,EACrB,iCAAiC,EACjC,mCAAmC,EACnC,qCAAqC,EACrC,0CAA0C,EAC1C,4CAA4C,EAC5C,mCAAmC,EACnC,kCAAkC,EAClC,eAAe,EACf,iBAAiB,GAClB,oBAAgB;AACjB,OAAO,EACL,eAAe,EACf,wCAAwC,EACxC,cAAc,EACd,UAAU,GACX,wBAAoB;AACrB,OAAO,EAAE,aAAa,EAAE,qBAAiB"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { SeedlessOnboardingController, getDefaultSeedlessOnboardingControllerState, } from "./SeedlessOnboardingController.mjs";
|
|
2
2
|
export type { AuthenticatedUserDetails, SocialBackupsMetadata, SeedlessOnboardingControllerState, SeedlessOnboardingControllerOptions, SeedlessOnboardingControllerMessenger, SeedlessOnboardingControllerGetStateAction, SeedlessOnboardingControllerStateChangeEvent, SeedlessOnboardingControllerActions, SeedlessOnboardingControllerEvents, ToprfKeyDeriver, RecoveryErrorData, } from "./types.mjs";
|
|
3
3
|
export { Web3AuthNetwork, SeedlessOnboardingControllerErrorMessage, AuthConnection, SecretType, } from "./constants.mjs";
|
|
4
|
-
export { SecretMetadata } from "./SecretMetadata.mjs";
|
|
5
4
|
export { RecoveryError } from "./errors.mjs";
|
|
6
5
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,2CAA2C,GAC5C,2CAAuC;AACxC,YAAY,EACV,wBAAwB,EACxB,qBAAqB,EACrB,iCAAiC,EACjC,mCAAmC,EACnC,qCAAqC,EACrC,0CAA0C,EAC1C,4CAA4C,EAC5C,mCAAmC,EACnC,kCAAkC,EAClC,eAAe,EACf,iBAAiB,GAClB,oBAAgB;AACjB,OAAO,EACL,eAAe,EACf,wCAAwC,EACxC,cAAc,EACd,UAAU,GACX,wBAAoB;AACrB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,2CAA2C,GAC5C,2CAAuC;AACxC,YAAY,EACV,wBAAwB,EACxB,qBAAqB,EACrB,iCAAiC,EACjC,mCAAmC,EACnC,qCAAqC,EACrC,0CAA0C,EAC1C,4CAA4C,EAC5C,mCAAmC,EACnC,kCAAkC,EAClC,eAAe,EACf,iBAAiB,GAClB,oBAAgB;AACjB,OAAO,EACL,eAAe,EACf,wCAAwC,EACxC,cAAc,EACd,UAAU,GACX,wBAAoB;AACrB,OAAO,EAAE,aAAa,EAAE,qBAAiB"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { SeedlessOnboardingController, getDefaultSeedlessOnboardingControllerState } from "./SeedlessOnboardingController.mjs";
|
|
2
2
|
export { Web3AuthNetwork, SeedlessOnboardingControllerErrorMessage, AuthConnection, SecretType } from "./constants.mjs";
|
|
3
|
-
export { SecretMetadata } from "./SecretMetadata.mjs";
|
|
4
3
|
export { RecoveryError } from "./errors.mjs";
|
|
5
4
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,2CAA2C,EAC5C,2CAAuC;AAcxC,OAAO,EACL,eAAe,EACf,wCAAwC,EACxC,cAAc,EACd,UAAU,EACX,wBAAoB;AACrB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,2CAA2C,EAC5C,2CAAuC;AAcxC,OAAO,EACL,eAAe,EACf,wCAAwC,EACxC,cAAc,EACd,UAAU,EACX,wBAAoB;AACrB,OAAO,EAAE,aAAa,EAAE,qBAAiB","sourcesContent":["export {\n SeedlessOnboardingController,\n getDefaultSeedlessOnboardingControllerState,\n} from './SeedlessOnboardingController';\nexport type {\n AuthenticatedUserDetails,\n SocialBackupsMetadata,\n SeedlessOnboardingControllerState,\n SeedlessOnboardingControllerOptions,\n SeedlessOnboardingControllerMessenger,\n SeedlessOnboardingControllerGetStateAction,\n SeedlessOnboardingControllerStateChangeEvent,\n SeedlessOnboardingControllerActions,\n SeedlessOnboardingControllerEvents,\n ToprfKeyDeriver,\n RecoveryErrorData,\n} from './types';\nexport {\n Web3AuthNetwork,\n SeedlessOnboardingControllerErrorMessage,\n AuthConnection,\n SecretType,\n} from './constants';\nexport { RecoveryError } from './errors';\n"]}
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RestrictedMessenger } from '@metamask/base-controller';\nimport type { ControllerGetStateAction } from '@metamask/base-controller';\nimport type { ControllerStateChangeEvent } from '@metamask/base-controller';\nimport type {\n ExportableKeyEncryptor,\n KeyringControllerLockEvent,\n KeyringControllerUnlockEvent,\n} from '@metamask/keyring-controller';\nimport type { NodeAuthTokens } from '@metamask/toprf-secure-backup';\nimport type { MutexInterface } from 'async-mutex';\n\nimport type {\n AuthConnection,\n controllerName,\n SecretMetadataVersion,\n SecretType,\n Web3AuthNetwork,\n} from './constants';\n\n/**\n * The backup state of the secret data.\n * Each secret data added/restored will be stored in the state locally.\n *\n * This is used to track the backup status of the secret data.\n */\nexport type SocialBackupsMetadata = {\n /**\n * The hash of the secret data.\n */\n hash: string;\n\n /**\n * The type of the secret data.\n */\n type: SecretType;\n\n /**\n * The optional keyringId to identify the keyring that the secret data belongs to.\n *\n * This is only required for `Mnemonic` secret data.\n */\n keyringId?: string;\n};\n\nexport type AuthenticatedUserDetails = {\n /**\n * Type of social login provider.\n */\n authConnection: AuthConnection;\n\n /**\n * The node auth tokens from OAuth User authentication after the Social login.\n *\n * This values are used to authenticate users when they go through the Seedless Onboarding flow.\n */\n nodeAuthTokens: NodeAuthTokens;\n\n /**\n * OAuth connection id from web3auth dashboard.\n */\n authConnectionId: string;\n\n /**\n * The optional grouped authConnectionId to authenticate the user with Web3Auth network.\n */\n groupedAuthConnectionId?: string;\n\n /**\n * The user email or ID from Social login.\n */\n userId: string;\n\n /**\n * The user email from Social login.\n */\n socialLoginEmail: string;\n\n /**\n * The refresh token used to refresh expired nodeAuthTokens.\n */\n refreshToken: string;\n};\n\nexport type SRPBackedUpUserDetails = {\n /**\n * The public key of the authentication key pair in base64 format.\n *\n * This value is used to check if the password is outdated compare to the global password and find backed up old password.\n */\n authPubKey: string;\n};\n\n/**\n * The data of the recovery error.\n */\nexport type RecoveryErrorData = {\n /**\n * The remaining time in seconds before the user can try again.\n */\n remainingTime: number;\n\n /**\n * The number of attempts made by the user.\n */\n numberOfAttempts: number;\n};\n\n// State\nexport type SeedlessOnboardingControllerState =\n Partial<AuthenticatedUserDetails> &\n Partial<SRPBackedUpUserDetails> & {\n /**\n * Encrypted array of serialized keyrings data.\n */\n vault?: string;\n\n /**\n * The hashes of the seed phrase backups.\n *\n * This is to facilitate the UI to display backup status of the seed phrases.\n */\n socialBackupsMetadata: SocialBackupsMetadata[];\n\n /**\n * The encryption key derived from the password and used to encrypt\n * the vault.\n */\n vaultEncryptionKey?: string;\n\n /**\n * The salt used to derive the encryption key from the password.\n */\n vaultEncryptionSalt?: string;\n\n /**\n * Cache for checkIsPasswordOutdated result and timestamp.\n */\n passwordOutdatedCache?: { isExpiredPwd: boolean; timestamp: number };\n\n /**\n * The refresh token used to refresh expired nodeAuthTokens.\n * This is persisted in state.\n */\n refreshToken?: string;\n\n /**\n * The revoke token used to revoke refresh token and get new refresh token and new revoke token.\n * This is temporarily stored in state during authentication and then persisted in the vault.\n */\n revokeToken?: string;\n\n /**\n * The encrypted seedless encryption key used to encrypt the seedless vault.\n */\n encryptedSeedlessEncryptionKey?: string;\n\n /**\n * The encrypted keyring encryption key used to encrypt the keyring vault.\n */\n encryptedKeyringEncryptionKey?: string;\n\n /**\n * The access token used for pairing with profile sync auth service and to access other services.\n */\n accessToken?: string;\n\n /**\n * The metadata access token used to access the metadata service.\n *\n * This token is used to access the metadata service before the vault is created or unlocked.\n */\n metadataAccessToken?: string;\n };\n\n// Actions\nexport type SeedlessOnboardingControllerGetStateAction =\n ControllerGetStateAction<\n typeof controllerName,\n SeedlessOnboardingControllerState\n >;\nexport type SeedlessOnboardingControllerActions =\n SeedlessOnboardingControllerGetStateAction;\n\nexport type AllowedActions = never;\n\n// Events\nexport type SeedlessOnboardingControllerStateChangeEvent =\n ControllerStateChangeEvent<\n typeof controllerName,\n SeedlessOnboardingControllerState\n >;\nexport type SeedlessOnboardingControllerEvents =\n SeedlessOnboardingControllerStateChangeEvent;\n\nexport type AllowedEvents =\n | KeyringControllerLockEvent\n | KeyringControllerUnlockEvent;\n\n// Messenger\nexport type SeedlessOnboardingControllerMessenger = RestrictedMessenger<\n typeof controllerName,\n SeedlessOnboardingControllerActions | AllowedActions,\n SeedlessOnboardingControllerEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n\n/**\n * Encryptor interface for encrypting and decrypting seedless onboarding vault.\n */\nexport type VaultEncryptor<EncryptionKey> = Omit<\n ExportableKeyEncryptor<EncryptionKey>,\n 'encryptWithKey'\n>;\n\n/**\n * Additional key deriver for the TOPRF client.\n *\n * This is a function that takes a seed and salt and returns a key in bytes (Uint8Array).\n * It is used as an additional step during key derivation. This can be used, for example, to inject a slow key\n * derivation step to protect against local brute force attacks on the password.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\nexport type ToprfKeyDeriver = {\n /**\n * Derive a key from a seed and salt.\n *\n * @param seed - The seed to derive the key from.\n * @param salt - The salt to derive the key from.\n * @returns The derived key.\n */\n deriveKey: (seed: Uint8Array, salt: Uint8Array) => Promise<Uint8Array>;\n};\n\nexport type RefreshJWTToken = (params: {\n connection: AuthConnection;\n refreshToken: string;\n}) => Promise<{\n idTokens: string[];\n accessToken: string;\n metadataAccessToken: string;\n}>;\n\nexport type RevokeRefreshToken = (params: {\n connection: AuthConnection;\n revokeToken: string;\n}) => Promise<{ newRevokeToken: string; newRefreshToken: string }>;\n\n/**\n * Seedless Onboarding Controller Options.\n *\n * @param messenger - The messenger to use for this controller.\n * @param state - The initial state to set on this controller.\n * @param encryptor - The encryptor to use for encrypting and decrypting seedless onboarding vault.\n */\nexport type SeedlessOnboardingControllerOptions<EncryptionKey> = {\n messenger: SeedlessOnboardingControllerMessenger;\n\n /**\n * Initial state to set on this controller.\n */\n state?: Partial<SeedlessOnboardingControllerState>;\n\n /**\n * Encryptor to use for encrypting and decrypting seedless onboarding vault.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\n encryptor: VaultEncryptor<EncryptionKey>;\n\n /**\n * A function to get a new jwt token using refresh token.\n */\n refreshJWTToken: RefreshJWTToken;\n\n /**\n * A function to revoke the refresh token.\n * And get new refresh token and revoke token.\n */\n revokeRefreshToken: RevokeRefreshToken;\n\n /**\n * Optional key derivation interface for the TOPRF client.\n *\n * If provided, it will be used as an additional step during\n * key derivation. This can be used, for example, to inject a slow key\n * derivation step to protect against local brute force attacks on the\n * password.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\n toprfKeyDeriver?: ToprfKeyDeriver;\n\n /**\n * Type of Web3Auth network to be used for the Seedless Onboarding flow.\n *\n * @default Web3AuthNetwork.Mainnet\n */\n network?: Web3AuthNetwork;\n\n /**\n * The TTL of the password outdated cache in milliseconds.\n *\n * @default PASSWORD_OUTDATED_CACHE_TTL_MS\n */\n passwordOutdatedCacheTTL?: number;\n};\n\n/**\n * A function executed within a mutually exclusive lock, with\n * a mutex releaser in its option bag.\n *\n * @param releaseLock - A function to release the lock.\n */\nexport type MutuallyExclusiveCallback<Result> = ({\n releaseLock,\n}: {\n releaseLock: MutexInterface.Releaser;\n}) => Promise<Result>;\n\n/**\n * The structure of the data which is serialized and stored in the vault.\n */\nexport type VaultData = {\n /**\n * The node auth tokens from OAuth User authentication after the Social login.\n */\n authTokens: NodeAuthTokens;\n /**\n * The encryption key to encrypt the seed phrase.\n */\n toprfEncryptionKey: string;\n /**\n * The encryption key to encrypt the password.\n */\n toprfPwEncryptionKey: string;\n /**\n * The authentication key pair to authenticate the TOPRF.\n */\n toprfAuthKeyPair: string;\n /**\n * The revoke token to revoke refresh token and get new refresh token and new revoke token.\n * The revoke token may no longer be available after a large number of password changes. In this case, re-authentication is advised.\n */\n revokeToken?: string;\n /**\n * The access token used for pairing with profile sync auth service and to access other services.\n */\n accessToken: string;\n};\n\nexport type SecretDataType = Uint8Array | string | number;\n\n/**\n * The constructor options for the seed phrase metadata.\n */\nexport type SecretMetadataOptions = {\n /**\n * The timestamp when the seed phrase was created.\n */\n timestamp: number;\n /**\n * The type of the seed phrase.\n */\n type: SecretType;\n /**\n * The version of the seed phrase metadata.\n */\n version: SecretMetadataVersion;\n};\n\nexport type DecodedNodeAuthToken = {\n /**\n * The expiration time of the token in seconds.\n */\n exp: number;\n temp_key_x: string;\n temp_key_y: string;\n aud: string;\n verifier_name: string;\n verifier_id: string;\n scope: string;\n signature: string;\n};\n\nexport type DecodedBaseJWTToken = {\n /**\n * The expiration time of the token in seconds.\n */\n exp: number;\n /**\n * The issued at time of the token in seconds.\n */\n iat: number;\n /**\n * The audience of the token.\n */\n aud: string;\n /**\n * The issuer of the token.\n */\n iss: string;\n /**\n * The subject of the token.\n */\n sub: string;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RestrictedMessenger } from '@metamask/base-controller';\nimport type { ControllerGetStateAction } from '@metamask/base-controller';\nimport type { ControllerStateChangeEvent } from '@metamask/base-controller';\nimport type {\n ExportableKeyEncryptor,\n KeyringControllerLockEvent,\n KeyringControllerUnlockEvent,\n} from '@metamask/keyring-controller';\nimport type { NodeAuthTokens } from '@metamask/toprf-secure-backup';\nimport type { MutexInterface } from 'async-mutex';\n\nimport type {\n AuthConnection,\n controllerName,\n SecretMetadataVersion,\n SecretType,\n Web3AuthNetwork,\n} from './constants';\n\n/**\n * The backup state of the secret data.\n * Each secret data added/restored will be stored in the state locally.\n *\n * This is used to track the backup status of the secret data.\n */\nexport type SocialBackupsMetadata = {\n /**\n * The hash of the secret data.\n */\n hash: string;\n\n /**\n * The type of the secret data.\n */\n type: SecretType;\n\n /**\n * The optional keyringId to identify the keyring that the secret data belongs to.\n *\n * This is only required for `Mnemonic` secret data.\n */\n keyringId?: string;\n};\n\nexport type AuthenticatedUserDetails = {\n /**\n * Type of social login provider.\n */\n authConnection: AuthConnection;\n\n /**\n * The node auth tokens from OAuth User authentication after the Social login.\n *\n * This values are used to authenticate users when they go through the Seedless Onboarding flow.\n */\n nodeAuthTokens: NodeAuthTokens;\n\n /**\n * OAuth connection id from web3auth dashboard.\n */\n authConnectionId: string;\n\n /**\n * The optional grouped authConnectionId to authenticate the user with Web3Auth network.\n */\n groupedAuthConnectionId?: string;\n\n /**\n * The user email or ID from Social login.\n */\n userId: string;\n\n /**\n * The user email from Social login.\n */\n socialLoginEmail: string;\n\n /**\n * The refresh token used to refresh expired nodeAuthTokens.\n */\n refreshToken: string;\n};\n\nexport type SRPBackedUpUserDetails = {\n /**\n * The public key of the authentication key pair in base64 format.\n *\n * This value is used to check if the password is outdated compare to the global password and find backed up old password.\n */\n authPubKey: string;\n};\n\n/**\n * The data of the recovery error.\n */\nexport type RecoveryErrorData = {\n /**\n * The remaining time in seconds before the user can try again.\n */\n remainingTime: number;\n\n /**\n * The number of attempts made by the user.\n */\n numberOfAttempts: number;\n};\n\n// State\nexport type SeedlessOnboardingControllerState =\n Partial<AuthenticatedUserDetails> &\n Partial<SRPBackedUpUserDetails> & {\n /**\n * Encrypted array of serialized keyrings data.\n */\n vault?: string;\n\n /**\n * The hashes of the seed phrase backups.\n *\n * This is to facilitate the UI to display backup status of the seed phrases.\n */\n socialBackupsMetadata: SocialBackupsMetadata[];\n\n /**\n * The encryption key derived from the password and used to encrypt\n * the vault.\n */\n vaultEncryptionKey?: string;\n\n /**\n * The salt used to derive the encryption key from the password.\n */\n vaultEncryptionSalt?: string;\n\n /**\n * Cache for checkIsPasswordOutdated result and timestamp.\n */\n passwordOutdatedCache?: { isExpiredPwd: boolean; timestamp: number };\n\n /**\n * The refresh token used to refresh expired nodeAuthTokens.\n * This is persisted in state.\n */\n refreshToken?: string;\n\n /**\n * The revoke token used to revoke refresh token and get new refresh token and new revoke token.\n * This is temporarily stored in state during authentication and then persisted in the vault.\n */\n revokeToken?: string;\n\n /**\n * The encrypted seedless encryption key used to encrypt the seedless vault.\n */\n encryptedSeedlessEncryptionKey?: string;\n\n /**\n * The encrypted keyring encryption key used to encrypt the keyring vault.\n */\n encryptedKeyringEncryptionKey?: string;\n\n /**\n * The access token used for pairing with profile sync auth service and to access other services.\n */\n accessToken?: string;\n\n /**\n * The metadata access token used to access the metadata service.\n *\n * This token is used to access the metadata service before the vault is created or unlocked.\n */\n metadataAccessToken?: string;\n };\n\n// Actions\nexport type SeedlessOnboardingControllerGetStateAction =\n ControllerGetStateAction<\n typeof controllerName,\n SeedlessOnboardingControllerState\n >;\nexport type SeedlessOnboardingControllerActions =\n SeedlessOnboardingControllerGetStateAction;\n\nexport type AllowedActions = never;\n\n// Events\nexport type SeedlessOnboardingControllerStateChangeEvent =\n ControllerStateChangeEvent<\n typeof controllerName,\n SeedlessOnboardingControllerState\n >;\nexport type SeedlessOnboardingControllerEvents =\n SeedlessOnboardingControllerStateChangeEvent;\n\nexport type AllowedEvents =\n | KeyringControllerLockEvent\n | KeyringControllerUnlockEvent;\n\n// Messenger\nexport type SeedlessOnboardingControllerMessenger = RestrictedMessenger<\n typeof controllerName,\n SeedlessOnboardingControllerActions | AllowedActions,\n SeedlessOnboardingControllerEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n\n/**\n * Encryptor interface for encrypting and decrypting seedless onboarding vault.\n */\nexport type VaultEncryptor<EncryptionKey> = Omit<\n ExportableKeyEncryptor<EncryptionKey>,\n 'encryptWithKey'\n>;\n\n/**\n * Additional key deriver for the TOPRF client.\n *\n * This is a function that takes a seed and salt and returns a key in bytes (Uint8Array).\n * It is used as an additional step during key derivation. This can be used, for example, to inject a slow key\n * derivation step to protect against local brute force attacks on the password.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\nexport type ToprfKeyDeriver = {\n /**\n * Derive a key from a seed and salt.\n *\n * @param seed - The seed to derive the key from.\n * @param salt - The salt to derive the key from.\n * @returns The derived key.\n */\n deriveKey: (seed: Uint8Array, salt: Uint8Array) => Promise<Uint8Array>;\n};\n\nexport type RefreshJWTToken = (params: {\n connection: AuthConnection;\n refreshToken: string;\n}) => Promise<{\n idTokens: string[];\n accessToken: string;\n metadataAccessToken: string;\n}>;\n\nexport type RevokeRefreshToken = (params: {\n connection: AuthConnection;\n revokeToken: string;\n}) => Promise<{ newRevokeToken: string; newRefreshToken: string }>;\n\n/**\n * Seedless Onboarding Controller Options.\n *\n * @param messenger - The messenger to use for this controller.\n * @param state - The initial state to set on this controller.\n * @param encryptor - The encryptor to use for encrypting and decrypting seedless onboarding vault.\n */\nexport type SeedlessOnboardingControllerOptions<EncryptionKey> = {\n messenger: SeedlessOnboardingControllerMessenger;\n\n /**\n * Initial state to set on this controller.\n */\n state?: Partial<SeedlessOnboardingControllerState>;\n\n /**\n * Encryptor to use for encrypting and decrypting seedless onboarding vault.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\n encryptor: VaultEncryptor<EncryptionKey>;\n\n /**\n * A function to get a new jwt token using refresh token.\n */\n refreshJWTToken: RefreshJWTToken;\n\n /**\n * A function to revoke the refresh token.\n * And get new refresh token and revoke token.\n */\n revokeRefreshToken: RevokeRefreshToken;\n\n /**\n * Optional key derivation interface for the TOPRF client.\n *\n * If provided, it will be used as an additional step during\n * key derivation. This can be used, for example, to inject a slow key\n * derivation step to protect against local brute force attacks on the\n * password.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\n toprfKeyDeriver?: ToprfKeyDeriver;\n\n /**\n * Type of Web3Auth network to be used for the Seedless Onboarding flow.\n *\n * @default Web3AuthNetwork.Mainnet\n */\n network?: Web3AuthNetwork;\n};\n\n/**\n * A function executed within a mutually exclusive lock, with\n * a mutex releaser in its option bag.\n *\n * @param releaseLock - A function to release the lock.\n */\nexport type MutuallyExclusiveCallback<Result> = ({\n releaseLock,\n}: {\n releaseLock: MutexInterface.Releaser;\n}) => Promise<Result>;\n\n/**\n * The structure of the data which is serialized and stored in the vault.\n */\nexport type VaultData = {\n /**\n * The node auth tokens from OAuth User authentication after the Social login.\n */\n authTokens: NodeAuthTokens;\n /**\n * The encryption key to encrypt the seed phrase.\n */\n toprfEncryptionKey: string;\n /**\n * The encryption key to encrypt the password.\n */\n toprfPwEncryptionKey: string;\n /**\n * The authentication key pair to authenticate the TOPRF.\n */\n toprfAuthKeyPair: string;\n /**\n * The revoke token to revoke refresh token and get new refresh token and new revoke token.\n * The revoke token may no longer be available after a large number of password changes. In this case, re-authentication is advised.\n */\n revokeToken?: string;\n /**\n * The access token used for pairing with profile sync auth service and to access other services.\n */\n accessToken: string;\n};\n\nexport type SecretDataType = Uint8Array | string | number;\n\n/**\n * The constructor options for the seed phrase metadata.\n */\nexport type SecretMetadataOptions = {\n /**\n * The timestamp when the seed phrase was created.\n */\n timestamp: number;\n /**\n * The type of the seed phrase.\n */\n type: SecretType;\n /**\n * The version of the seed phrase metadata.\n */\n version: SecretMetadataVersion;\n};\n\nexport type DecodedNodeAuthToken = {\n /**\n * The expiration time of the token in seconds.\n */\n exp: number;\n temp_key_x: string;\n temp_key_y: string;\n aud: string;\n verifier_name: string;\n verifier_id: string;\n scope: string;\n signature: string;\n};\n\nexport type DecodedBaseJWTToken = {\n /**\n * The expiration time of the token in seconds.\n */\n exp: number;\n /**\n * The issued at time of the token in seconds.\n */\n iat: number;\n /**\n * The audience of the token.\n */\n aud: string;\n /**\n * The issuer of the token.\n */\n iss: string;\n /**\n * The subject of the token.\n */\n sub: string;\n};\n"]}
|
package/dist/types.d.cts
CHANGED
|
@@ -226,12 +226,6 @@ export type SeedlessOnboardingControllerOptions<EncryptionKey> = {
|
|
|
226
226
|
* @default Web3AuthNetwork.Mainnet
|
|
227
227
|
*/
|
|
228
228
|
network?: Web3AuthNetwork;
|
|
229
|
-
/**
|
|
230
|
-
* The TTL of the password outdated cache in milliseconds.
|
|
231
|
-
*
|
|
232
|
-
* @default PASSWORD_OUTDATED_CACHE_TTL_MS
|
|
233
|
-
*/
|
|
234
|
-
passwordOutdatedCacheTTL?: number;
|
|
235
229
|
};
|
|
236
230
|
/**
|
|
237
231
|
* A function executed within a mutually exclusive lock, with
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kCAAkC;AACrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,kCAAkC;AAC1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,kCAAkC;AAC5E,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC7B,qCAAqC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,sCAAsC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB;AAElD,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,UAAU,EACV,eAAe,EAChB,wBAAoB;AAErB;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,M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ACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,qBAAqB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
|
package/dist/types.d.mts
CHANGED
|
@@ -226,12 +226,6 @@ export type SeedlessOnboardingControllerOptions<EncryptionKey> = {
|
|
|
226
226
|
* @default Web3AuthNetwork.Mainnet
|
|
227
227
|
*/
|
|
228
228
|
network?: Web3AuthNetwork;
|
|
229
|
-
/**
|
|
230
|
-
* The TTL of the password outdated cache in milliseconds.
|
|
231
|
-
*
|
|
232
|
-
* @default PASSWORD_OUTDATED_CACHE_TTL_MS
|
|
233
|
-
*/
|
|
234
|
-
passwordOutdatedCacheTTL?: number;
|
|
235
229
|
};
|
|
236
230
|
/**
|
|
237
231
|
* A function executed within a mutually exclusive lock, with
|
package/dist/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kCAAkC;AACrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,kCAAkC;AAC1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,kCAAkC;AAC5E,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC7B,qCAAqC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,sCAAsC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB;AAElD,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,UAAU,EACV,eAAe,EAChB,wBAAoB;AAErB;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,cAAc,EAAE,cAAc,CAAC;IAE/B;;;;OAIG;IACH,cAAc,EAAE,cAAc,CAAC;IAE/B;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG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AAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
|
package/dist/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RestrictedMessenger } from '@metamask/base-controller';\nimport type { ControllerGetStateAction } from '@metamask/base-controller';\nimport type { ControllerStateChangeEvent } from '@metamask/base-controller';\nimport type {\n ExportableKeyEncryptor,\n KeyringControllerLockEvent,\n KeyringControllerUnlockEvent,\n} from '@metamask/keyring-controller';\nimport type { NodeAuthTokens } from '@metamask/toprf-secure-backup';\nimport type { MutexInterface } from 'async-mutex';\n\nimport type {\n AuthConnection,\n controllerName,\n SecretMetadataVersion,\n SecretType,\n Web3AuthNetwork,\n} from './constants';\n\n/**\n * The backup state of the secret data.\n * Each secret data added/restored will be stored in the state locally.\n *\n * This is used to track the backup status of the secret data.\n */\nexport type SocialBackupsMetadata = {\n /**\n * The hash of the secret data.\n */\n hash: string;\n\n /**\n * The type of the secret data.\n */\n type: SecretType;\n\n /**\n * The optional keyringId to identify the keyring that the secret data belongs to.\n *\n * This is only required for `Mnemonic` secret data.\n */\n keyringId?: string;\n};\n\nexport type AuthenticatedUserDetails = {\n /**\n * Type of social login provider.\n */\n authConnection: AuthConnection;\n\n /**\n * The node auth tokens from OAuth User authentication after the Social login.\n *\n * This values are used to authenticate users when they go through the Seedless Onboarding flow.\n */\n nodeAuthTokens: NodeAuthTokens;\n\n /**\n * OAuth connection id from web3auth dashboard.\n */\n authConnectionId: string;\n\n /**\n * The optional grouped authConnectionId to authenticate the user with Web3Auth network.\n */\n groupedAuthConnectionId?: string;\n\n /**\n * The user email or ID from Social login.\n */\n userId: string;\n\n /**\n * The user email from Social login.\n */\n socialLoginEmail: string;\n\n /**\n * The refresh token used to refresh expired nodeAuthTokens.\n */\n refreshToken: string;\n};\n\nexport type SRPBackedUpUserDetails = {\n /**\n * The public key of the authentication key pair in base64 format.\n *\n * This value is used to check if the password is outdated compare to the global password and find backed up old password.\n */\n authPubKey: string;\n};\n\n/**\n * The data of the recovery error.\n */\nexport type RecoveryErrorData = {\n /**\n * The remaining time in seconds before the user can try again.\n */\n remainingTime: number;\n\n /**\n * The number of attempts made by the user.\n */\n numberOfAttempts: number;\n};\n\n// State\nexport type SeedlessOnboardingControllerState =\n Partial<AuthenticatedUserDetails> &\n Partial<SRPBackedUpUserDetails> & {\n /**\n * Encrypted array of serialized keyrings data.\n */\n vault?: string;\n\n /**\n * The hashes of the seed phrase backups.\n *\n * This is to facilitate the UI to display backup status of the seed phrases.\n */\n socialBackupsMetadata: SocialBackupsMetadata[];\n\n /**\n * The encryption key derived from the password and used to encrypt\n * the vault.\n */\n vaultEncryptionKey?: string;\n\n /**\n * The salt used to derive the encryption key from the password.\n */\n vaultEncryptionSalt?: string;\n\n /**\n * Cache for checkIsPasswordOutdated result and timestamp.\n */\n passwordOutdatedCache?: { isExpiredPwd: boolean; timestamp: number };\n\n /**\n * The refresh token used to refresh expired nodeAuthTokens.\n * This is persisted in state.\n */\n refreshToken?: string;\n\n /**\n * The revoke token used to revoke refresh token and get new refresh token and new revoke token.\n * This is temporarily stored in state during authentication and then persisted in the vault.\n */\n revokeToken?: string;\n\n /**\n * The encrypted seedless encryption key used to encrypt the seedless vault.\n */\n encryptedSeedlessEncryptionKey?: string;\n\n /**\n * The encrypted keyring encryption key used to encrypt the keyring vault.\n */\n encryptedKeyringEncryptionKey?: string;\n\n /**\n * The access token used for pairing with profile sync auth service and to access other services.\n */\n accessToken?: string;\n\n /**\n * The metadata access token used to access the metadata service.\n *\n * This token is used to access the metadata service before the vault is created or unlocked.\n */\n metadataAccessToken?: string;\n };\n\n// Actions\nexport type SeedlessOnboardingControllerGetStateAction =\n ControllerGetStateAction<\n typeof controllerName,\n SeedlessOnboardingControllerState\n >;\nexport type SeedlessOnboardingControllerActions =\n SeedlessOnboardingControllerGetStateAction;\n\nexport type AllowedActions = never;\n\n// Events\nexport type SeedlessOnboardingControllerStateChangeEvent =\n ControllerStateChangeEvent<\n typeof controllerName,\n SeedlessOnboardingControllerState\n >;\nexport type SeedlessOnboardingControllerEvents =\n SeedlessOnboardingControllerStateChangeEvent;\n\nexport type AllowedEvents =\n | KeyringControllerLockEvent\n | KeyringControllerUnlockEvent;\n\n// Messenger\nexport type SeedlessOnboardingControllerMessenger = RestrictedMessenger<\n typeof controllerName,\n SeedlessOnboardingControllerActions | AllowedActions,\n SeedlessOnboardingControllerEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n\n/**\n * Encryptor interface for encrypting and decrypting seedless onboarding vault.\n */\nexport type VaultEncryptor<EncryptionKey> = Omit<\n ExportableKeyEncryptor<EncryptionKey>,\n 'encryptWithKey'\n>;\n\n/**\n * Additional key deriver for the TOPRF client.\n *\n * This is a function that takes a seed and salt and returns a key in bytes (Uint8Array).\n * It is used as an additional step during key derivation. This can be used, for example, to inject a slow key\n * derivation step to protect against local brute force attacks on the password.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\nexport type ToprfKeyDeriver = {\n /**\n * Derive a key from a seed and salt.\n *\n * @param seed - The seed to derive the key from.\n * @param salt - The salt to derive the key from.\n * @returns The derived key.\n */\n deriveKey: (seed: Uint8Array, salt: Uint8Array) => Promise<Uint8Array>;\n};\n\nexport type RefreshJWTToken = (params: {\n connection: AuthConnection;\n refreshToken: string;\n}) => Promise<{\n idTokens: string[];\n accessToken: string;\n metadataAccessToken: string;\n}>;\n\nexport type RevokeRefreshToken = (params: {\n connection: AuthConnection;\n revokeToken: string;\n}) => Promise<{ newRevokeToken: string; newRefreshToken: string }>;\n\n/**\n * Seedless Onboarding Controller Options.\n *\n * @param messenger - The messenger to use for this controller.\n * @param state - The initial state to set on this controller.\n * @param encryptor - The encryptor to use for encrypting and decrypting seedless onboarding vault.\n */\nexport type SeedlessOnboardingControllerOptions<EncryptionKey> = {\n messenger: SeedlessOnboardingControllerMessenger;\n\n /**\n * Initial state to set on this controller.\n */\n state?: Partial<SeedlessOnboardingControllerState>;\n\n /**\n * Encryptor to use for encrypting and decrypting seedless onboarding vault.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\n encryptor: VaultEncryptor<EncryptionKey>;\n\n /**\n * A function to get a new jwt token using refresh token.\n */\n refreshJWTToken: RefreshJWTToken;\n\n /**\n * A function to revoke the refresh token.\n * And get new refresh token and revoke token.\n */\n revokeRefreshToken: RevokeRefreshToken;\n\n /**\n * Optional key derivation interface for the TOPRF client.\n *\n * If provided, it will be used as an additional step during\n * key derivation. This can be used, for example, to inject a slow key\n * derivation step to protect against local brute force attacks on the\n * password.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\n toprfKeyDeriver?: ToprfKeyDeriver;\n\n /**\n * Type of Web3Auth network to be used for the Seedless Onboarding flow.\n *\n * @default Web3AuthNetwork.Mainnet\n */\n network?: Web3AuthNetwork;\n\n /**\n * The TTL of the password outdated cache in milliseconds.\n *\n * @default PASSWORD_OUTDATED_CACHE_TTL_MS\n */\n passwordOutdatedCacheTTL?: number;\n};\n\n/**\n * A function executed within a mutually exclusive lock, with\n * a mutex releaser in its option bag.\n *\n * @param releaseLock - A function to release the lock.\n */\nexport type MutuallyExclusiveCallback<Result> = ({\n releaseLock,\n}: {\n releaseLock: MutexInterface.Releaser;\n}) => Promise<Result>;\n\n/**\n * The structure of the data which is serialized and stored in the vault.\n */\nexport type VaultData = {\n /**\n * The node auth tokens from OAuth User authentication after the Social login.\n */\n authTokens: NodeAuthTokens;\n /**\n * The encryption key to encrypt the seed phrase.\n */\n toprfEncryptionKey: string;\n /**\n * The encryption key to encrypt the password.\n */\n toprfPwEncryptionKey: string;\n /**\n * The authentication key pair to authenticate the TOPRF.\n */\n toprfAuthKeyPair: string;\n /**\n * The revoke token to revoke refresh token and get new refresh token and new revoke token.\n * The revoke token may no longer be available after a large number of password changes. In this case, re-authentication is advised.\n */\n revokeToken?: string;\n /**\n * The access token used for pairing with profile sync auth service and to access other services.\n */\n accessToken: string;\n};\n\nexport type SecretDataType = Uint8Array | string | number;\n\n/**\n * The constructor options for the seed phrase metadata.\n */\nexport type SecretMetadataOptions = {\n /**\n * The timestamp when the seed phrase was created.\n */\n timestamp: number;\n /**\n * The type of the seed phrase.\n */\n type: SecretType;\n /**\n * The version of the seed phrase metadata.\n */\n version: SecretMetadataVersion;\n};\n\nexport type DecodedNodeAuthToken = {\n /**\n * The expiration time of the token in seconds.\n */\n exp: number;\n temp_key_x: string;\n temp_key_y: string;\n aud: string;\n verifier_name: string;\n verifier_id: string;\n scope: string;\n signature: string;\n};\n\nexport type DecodedBaseJWTToken = {\n /**\n * The expiration time of the token in seconds.\n */\n exp: number;\n /**\n * The issued at time of the token in seconds.\n */\n iat: number;\n /**\n * The audience of the token.\n */\n aud: string;\n /**\n * The issuer of the token.\n */\n iss: string;\n /**\n * The subject of the token.\n */\n sub: string;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RestrictedMessenger } from '@metamask/base-controller';\nimport type { ControllerGetStateAction } from '@metamask/base-controller';\nimport type { ControllerStateChangeEvent } from '@metamask/base-controller';\nimport type {\n ExportableKeyEncryptor,\n KeyringControllerLockEvent,\n KeyringControllerUnlockEvent,\n} from '@metamask/keyring-controller';\nimport type { NodeAuthTokens } from '@metamask/toprf-secure-backup';\nimport type { MutexInterface } from 'async-mutex';\n\nimport type {\n AuthConnection,\n controllerName,\n SecretMetadataVersion,\n SecretType,\n Web3AuthNetwork,\n} from './constants';\n\n/**\n * The backup state of the secret data.\n * Each secret data added/restored will be stored in the state locally.\n *\n * This is used to track the backup status of the secret data.\n */\nexport type SocialBackupsMetadata = {\n /**\n * The hash of the secret data.\n */\n hash: string;\n\n /**\n * The type of the secret data.\n */\n type: SecretType;\n\n /**\n * The optional keyringId to identify the keyring that the secret data belongs to.\n *\n * This is only required for `Mnemonic` secret data.\n */\n keyringId?: string;\n};\n\nexport type AuthenticatedUserDetails = {\n /**\n * Type of social login provider.\n */\n authConnection: AuthConnection;\n\n /**\n * The node auth tokens from OAuth User authentication after the Social login.\n *\n * This values are used to authenticate users when they go through the Seedless Onboarding flow.\n */\n nodeAuthTokens: NodeAuthTokens;\n\n /**\n * OAuth connection id from web3auth dashboard.\n */\n authConnectionId: string;\n\n /**\n * The optional grouped authConnectionId to authenticate the user with Web3Auth network.\n */\n groupedAuthConnectionId?: string;\n\n /**\n * The user email or ID from Social login.\n */\n userId: string;\n\n /**\n * The user email from Social login.\n */\n socialLoginEmail: string;\n\n /**\n * The refresh token used to refresh expired nodeAuthTokens.\n */\n refreshToken: string;\n};\n\nexport type SRPBackedUpUserDetails = {\n /**\n * The public key of the authentication key pair in base64 format.\n *\n * This value is used to check if the password is outdated compare to the global password and find backed up old password.\n */\n authPubKey: string;\n};\n\n/**\n * The data of the recovery error.\n */\nexport type RecoveryErrorData = {\n /**\n * The remaining time in seconds before the user can try again.\n */\n remainingTime: number;\n\n /**\n * The number of attempts made by the user.\n */\n numberOfAttempts: number;\n};\n\n// State\nexport type SeedlessOnboardingControllerState =\n Partial<AuthenticatedUserDetails> &\n Partial<SRPBackedUpUserDetails> & {\n /**\n * Encrypted array of serialized keyrings data.\n */\n vault?: string;\n\n /**\n * The hashes of the seed phrase backups.\n *\n * This is to facilitate the UI to display backup status of the seed phrases.\n */\n socialBackupsMetadata: SocialBackupsMetadata[];\n\n /**\n * The encryption key derived from the password and used to encrypt\n * the vault.\n */\n vaultEncryptionKey?: string;\n\n /**\n * The salt used to derive the encryption key from the password.\n */\n vaultEncryptionSalt?: string;\n\n /**\n * Cache for checkIsPasswordOutdated result and timestamp.\n */\n passwordOutdatedCache?: { isExpiredPwd: boolean; timestamp: number };\n\n /**\n * The refresh token used to refresh expired nodeAuthTokens.\n * This is persisted in state.\n */\n refreshToken?: string;\n\n /**\n * The revoke token used to revoke refresh token and get new refresh token and new revoke token.\n * This is temporarily stored in state during authentication and then persisted in the vault.\n */\n revokeToken?: string;\n\n /**\n * The encrypted seedless encryption key used to encrypt the seedless vault.\n */\n encryptedSeedlessEncryptionKey?: string;\n\n /**\n * The encrypted keyring encryption key used to encrypt the keyring vault.\n */\n encryptedKeyringEncryptionKey?: string;\n\n /**\n * The access token used for pairing with profile sync auth service and to access other services.\n */\n accessToken?: string;\n\n /**\n * The metadata access token used to access the metadata service.\n *\n * This token is used to access the metadata service before the vault is created or unlocked.\n */\n metadataAccessToken?: string;\n };\n\n// Actions\nexport type SeedlessOnboardingControllerGetStateAction =\n ControllerGetStateAction<\n typeof controllerName,\n SeedlessOnboardingControllerState\n >;\nexport type SeedlessOnboardingControllerActions =\n SeedlessOnboardingControllerGetStateAction;\n\nexport type AllowedActions = never;\n\n// Events\nexport type SeedlessOnboardingControllerStateChangeEvent =\n ControllerStateChangeEvent<\n typeof controllerName,\n SeedlessOnboardingControllerState\n >;\nexport type SeedlessOnboardingControllerEvents =\n SeedlessOnboardingControllerStateChangeEvent;\n\nexport type AllowedEvents =\n | KeyringControllerLockEvent\n | KeyringControllerUnlockEvent;\n\n// Messenger\nexport type SeedlessOnboardingControllerMessenger = RestrictedMessenger<\n typeof controllerName,\n SeedlessOnboardingControllerActions | AllowedActions,\n SeedlessOnboardingControllerEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n\n/**\n * Encryptor interface for encrypting and decrypting seedless onboarding vault.\n */\nexport type VaultEncryptor<EncryptionKey> = Omit<\n ExportableKeyEncryptor<EncryptionKey>,\n 'encryptWithKey'\n>;\n\n/**\n * Additional key deriver for the TOPRF client.\n *\n * This is a function that takes a seed and salt and returns a key in bytes (Uint8Array).\n * It is used as an additional step during key derivation. This can be used, for example, to inject a slow key\n * derivation step to protect against local brute force attacks on the password.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\nexport type ToprfKeyDeriver = {\n /**\n * Derive a key from a seed and salt.\n *\n * @param seed - The seed to derive the key from.\n * @param salt - The salt to derive the key from.\n * @returns The derived key.\n */\n deriveKey: (seed: Uint8Array, salt: Uint8Array) => Promise<Uint8Array>;\n};\n\nexport type RefreshJWTToken = (params: {\n connection: AuthConnection;\n refreshToken: string;\n}) => Promise<{\n idTokens: string[];\n accessToken: string;\n metadataAccessToken: string;\n}>;\n\nexport type RevokeRefreshToken = (params: {\n connection: AuthConnection;\n revokeToken: string;\n}) => Promise<{ newRevokeToken: string; newRefreshToken: string }>;\n\n/**\n * Seedless Onboarding Controller Options.\n *\n * @param messenger - The messenger to use for this controller.\n * @param state - The initial state to set on this controller.\n * @param encryptor - The encryptor to use for encrypting and decrypting seedless onboarding vault.\n */\nexport type SeedlessOnboardingControllerOptions<EncryptionKey> = {\n messenger: SeedlessOnboardingControllerMessenger;\n\n /**\n * Initial state to set on this controller.\n */\n state?: Partial<SeedlessOnboardingControllerState>;\n\n /**\n * Encryptor to use for encrypting and decrypting seedless onboarding vault.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\n encryptor: VaultEncryptor<EncryptionKey>;\n\n /**\n * A function to get a new jwt token using refresh token.\n */\n refreshJWTToken: RefreshJWTToken;\n\n /**\n * A function to revoke the refresh token.\n * And get new refresh token and revoke token.\n */\n revokeRefreshToken: RevokeRefreshToken;\n\n /**\n * Optional key derivation interface for the TOPRF client.\n *\n * If provided, it will be used as an additional step during\n * key derivation. This can be used, for example, to inject a slow key\n * derivation step to protect against local brute force attacks on the\n * password.\n *\n * @default browser-passworder @link https://github.com/MetaMask/browser-passworder\n */\n toprfKeyDeriver?: ToprfKeyDeriver;\n\n /**\n * Type of Web3Auth network to be used for the Seedless Onboarding flow.\n *\n * @default Web3AuthNetwork.Mainnet\n */\n network?: Web3AuthNetwork;\n};\n\n/**\n * A function executed within a mutually exclusive lock, with\n * a mutex releaser in its option bag.\n *\n * @param releaseLock - A function to release the lock.\n */\nexport type MutuallyExclusiveCallback<Result> = ({\n releaseLock,\n}: {\n releaseLock: MutexInterface.Releaser;\n}) => Promise<Result>;\n\n/**\n * The structure of the data which is serialized and stored in the vault.\n */\nexport type VaultData = {\n /**\n * The node auth tokens from OAuth User authentication after the Social login.\n */\n authTokens: NodeAuthTokens;\n /**\n * The encryption key to encrypt the seed phrase.\n */\n toprfEncryptionKey: string;\n /**\n * The encryption key to encrypt the password.\n */\n toprfPwEncryptionKey: string;\n /**\n * The authentication key pair to authenticate the TOPRF.\n */\n toprfAuthKeyPair: string;\n /**\n * The revoke token to revoke refresh token and get new refresh token and new revoke token.\n * The revoke token may no longer be available after a large number of password changes. In this case, re-authentication is advised.\n */\n revokeToken?: string;\n /**\n * The access token used for pairing with profile sync auth service and to access other services.\n */\n accessToken: string;\n};\n\nexport type SecretDataType = Uint8Array | string | number;\n\n/**\n * The constructor options for the seed phrase metadata.\n */\nexport type SecretMetadataOptions = {\n /**\n * The timestamp when the seed phrase was created.\n */\n timestamp: number;\n /**\n * The type of the seed phrase.\n */\n type: SecretType;\n /**\n * The version of the seed phrase metadata.\n */\n version: SecretMetadataVersion;\n};\n\nexport type DecodedNodeAuthToken = {\n /**\n * The expiration time of the token in seconds.\n */\n exp: number;\n temp_key_x: string;\n temp_key_y: string;\n aud: string;\n verifier_name: string;\n verifier_id: string;\n scope: string;\n signature: string;\n};\n\nexport type DecodedBaseJWTToken = {\n /**\n * The expiration time of the token in seconds.\n */\n exp: number;\n /**\n * The issued at time of the token in seconds.\n */\n iat: number;\n /**\n * The audience of the token.\n */\n aud: string;\n /**\n * The issuer of the token.\n */\n iss: string;\n /**\n * The subject of the token.\n */\n sub: string;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/seedless-onboarding-controller",
|
|
3
|
-
"version": "2.4.0-preview-
|
|
3
|
+
"version": "2.4.0-preview-e0bc4b4b",
|
|
4
4
|
"description": "Backup and rehydrate SRP(s) using social login and password",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@metamask/auth-network-utils": "^0.3.0",
|
|
51
51
|
"@metamask/base-controller": "^8.0.1",
|
|
52
|
-
"@metamask/toprf-secure-backup": "^0.7.
|
|
52
|
+
"@metamask/toprf-secure-backup": "^0.7.0",
|
|
53
53
|
"@metamask/utils": "^11.4.2",
|
|
54
54
|
"async-mutex": "^0.5.0"
|
|
55
55
|
},
|