@metamask-previews/keyring-controller 16.0.0-preview-699063fc → 16.0.0-preview-a6633f22

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,11 @@ 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
+ - Added `changePassword` method ([#4279](https://github.com/MetaMask/core/pull/4279))
13
+ - This method can be used to change the password used to encrypt the vault
14
+
10
15
  ## [16.0.0]
11
16
 
12
17
  ### Added
@@ -7,8 +7,8 @@
7
7
 
8
8
 
9
9
 
10
- var _chunk7SZS2WCDjs = require('./chunk-7SZS2WCD.js');
11
- require('./chunk-ZGV2QNCG.js');
10
+ var _chunkORDHI6BFjs = require('./chunk-ORDHI6BF.js');
11
+ require('./chunk-NOCGQCUM.js');
12
12
 
13
13
 
14
14
 
@@ -18,5 +18,5 @@ require('./chunk-ZGV2QNCG.js');
18
18
 
19
19
 
20
20
 
21
- exports.AccountImportStrategy = _chunk7SZS2WCDjs.AccountImportStrategy; exports.KeyringController = _chunk7SZS2WCDjs.KeyringController; exports.KeyringTypes = _chunk7SZS2WCDjs.KeyringTypes; exports.SignTypedDataVersion = _chunk7SZS2WCDjs.SignTypedDataVersion; exports.default = _chunk7SZS2WCDjs.KeyringController_default; exports.getDefaultKeyringState = _chunk7SZS2WCDjs.getDefaultKeyringState; exports.isCustodyKeyring = _chunk7SZS2WCDjs.isCustodyKeyring; exports.keyringBuilderFactory = _chunk7SZS2WCDjs.keyringBuilderFactory;
21
+ exports.AccountImportStrategy = _chunkORDHI6BFjs.AccountImportStrategy; exports.KeyringController = _chunkORDHI6BFjs.KeyringController; exports.KeyringTypes = _chunkORDHI6BFjs.KeyringTypes; exports.SignTypedDataVersion = _chunkORDHI6BFjs.SignTypedDataVersion; exports.default = _chunkORDHI6BFjs.KeyringController_default; exports.getDefaultKeyringState = _chunkORDHI6BFjs.getDefaultKeyringState; exports.isCustodyKeyring = _chunkORDHI6BFjs.isCustodyKeyring; exports.keyringBuilderFactory = _chunkORDHI6BFjs.keyringBuilderFactory;
22
22
  //# sourceMappingURL=KeyringController.js.map
@@ -7,8 +7,8 @@ import {
7
7
  getDefaultKeyringState,
8
8
  isCustodyKeyring,
9
9
  keyringBuilderFactory
10
- } from "./chunk-RCQUVSUE.mjs";
11
- import "./chunk-4OE2G6WW.mjs";
10
+ } from "./chunk-XXVV3V7U.mjs";
11
+ import "./chunk-F64I344Z.mjs";
12
12
  export {
13
13
  AccountImportStrategy,
14
14
  KeyringController,
@@ -27,6 +27,7 @@ var KeyringControllerError = /* @__PURE__ */ ((KeyringControllerError2) => {
27
27
  KeyringControllerError2["KeyringNotFound"] = "KeyringController - Keyring not found.";
28
28
  KeyringControllerError2["UnsafeDirectKeyringAccess"] = "KeyringController - Returning keyring instances is unsafe";
29
29
  KeyringControllerError2["WrongPasswordType"] = "KeyringController - Password must be of type string.";
30
+ KeyringControllerError2["InvalidEmptyPassword"] = "KeyringController - Password cannot be empty.";
30
31
  KeyringControllerError2["NoFirstAccount"] = "KeyringController - First Account not found.";
31
32
  KeyringControllerError2["DuplicatedAccount"] = "KeyringController - The account you are trying to import is a duplicate";
32
33
  KeyringControllerError2["VaultError"] = "KeyringController - Cannot unlock without a previous vault.";
@@ -64,4 +65,4 @@ export {
64
65
  __privateMethod,
65
66
  KeyringControllerError
66
67
  };
67
- //# sourceMappingURL=chunk-4OE2G6WW.mjs.map
68
+ //# sourceMappingURL=chunk-F64I344Z.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export enum KeyringControllerError {\n NoKeyring = 'KeyringController - No keyring found',\n KeyringNotFound = 'KeyringController - Keyring not found.',\n UnsafeDirectKeyringAccess = 'KeyringController - Returning keyring instances is unsafe',\n WrongPasswordType = 'KeyringController - Password must be of type string.',\n InvalidEmptyPassword = 'KeyringController - Password cannot be empty.',\n NoFirstAccount = 'KeyringController - First Account not found.',\n DuplicatedAccount = 'KeyringController - The account you are trying to import is a duplicate',\n VaultError = 'KeyringController - Cannot unlock without a previous vault.',\n VaultDataError = 'KeyringController - The decrypted vault has an unexpected shape.',\n UnsupportedEncryptionKeyExport = 'KeyringController - The encryptor does not support encryption key export.',\n UnsupportedGenerateRandomMnemonic = 'KeyringController - The current keyring does not support the method generateRandomMnemonic.',\n UnsupportedExportAccount = '`KeyringController - The keyring for the current address does not support the method exportAccount',\n UnsupportedRemoveAccount = '`KeyringController - The keyring for the current address does not support the method removeAccount',\n UnsupportedSignTransaction = 'KeyringController - The keyring for the current address does not support the method signTransaction.',\n UnsupportedSignMessage = 'KeyringController - The keyring for the current address does not support the method signMessage.',\n UnsupportedSignPersonalMessage = 'KeyringController - The keyring for the current address does not support the method signPersonalMessage.',\n UnsupportedGetEncryptionPublicKey = 'KeyringController - The keyring for the current address does not support the method getEncryptionPublicKey.',\n UnsupportedDecryptMessage = 'KeyringController - The keyring for the current address does not support the method decryptMessage.',\n UnsupportedSignTypedMessage = 'KeyringController - The keyring for the current address does not support the method signTypedMessage.',\n UnsupportedGetAppKeyAddress = 'KeyringController - The keyring for the current address does not support the method getAppKeyAddress.',\n UnsupportedExportAppKeyForAddress = 'KeyringController - The keyring for the current address does not support the method exportAppKeyForAddress.',\n UnsupportedPrepareUserOperation = 'KeyringController - The keyring for the current address does not support the method prepareUserOperation.',\n UnsupportedPatchUserOperation = 'KeyringController - The keyring for the current address does not support the method patchUserOperation.',\n UnsupportedSignUserOperation = 'KeyringController - The keyring for the current address does not support the method signUserOperation.',\n NoAccountOnKeychain = \"KeyringController - The keychain doesn't have accounts.\",\n MissingCredentials = 'KeyringController - Cannot persist vault without password and encryption key',\n MissingVaultData = 'KeyringController - Cannot persist vault without vault information',\n ExpiredCredentials = 'KeyringController - Encryption key and salt provided are expired',\n NoKeyringBuilder = 'KeyringController - No keyringBuilder found for keyring',\n DataType = 'KeyringController - Incorrect data type provided',\n NoHdKeyring = 'KeyringController - No HD Keyring found',\n ControllerLockRequired = 'KeyringController - attempt to update vault during a non mutually exclusive operation',\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAK,yBAAL,kBAAKA,4BAAL;AACL,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,qBAAkB;AAClB,EAAAA,wBAAA,+BAA4B;AAC5B,EAAAA,wBAAA,uBAAoB;AACpB,EAAAA,wBAAA,0BAAuB;AACvB,EAAAA,wBAAA,oBAAiB;AACjB,EAAAA,wBAAA,uBAAoB;AACpB,EAAAA,wBAAA,gBAAa;AACb,EAAAA,wBAAA,oBAAiB;AACjB,EAAAA,wBAAA,oCAAiC;AACjC,EAAAA,wBAAA,uCAAoC;AACpC,EAAAA,wBAAA,8BAA2B;AAC3B,EAAAA,wBAAA,8BAA2B;AAC3B,EAAAA,wBAAA,gCAA6B;AAC7B,EAAAA,wBAAA,4BAAyB;AACzB,EAAAA,wBAAA,oCAAiC;AACjC,EAAAA,wBAAA,uCAAoC;AACpC,EAAAA,wBAAA,+BAA4B;AAC5B,EAAAA,wBAAA,iCAA8B;AAC9B,EAAAA,wBAAA,iCAA8B;AAC9B,EAAAA,wBAAA,uCAAoC;AACpC,EAAAA,wBAAA,qCAAkC;AAClC,EAAAA,wBAAA,mCAAgC;AAChC,EAAAA,wBAAA,kCAA+B;AAC/B,EAAAA,wBAAA,yBAAsB;AACtB,EAAAA,wBAAA,wBAAqB;AACrB,EAAAA,wBAAA,sBAAmB;AACnB,EAAAA,wBAAA,wBAAqB;AACrB,EAAAA,wBAAA,sBAAmB;AACnB,EAAAA,wBAAA,cAAW;AACX,EAAAA,wBAAA,iBAAc;AACd,EAAAA,wBAAA,4BAAyB;AAhCf,SAAAA;AAAA,GAAA;","names":["KeyringControllerError"]}
@@ -27,6 +27,7 @@ var KeyringControllerError = /* @__PURE__ */ ((KeyringControllerError2) => {
27
27
  KeyringControllerError2["KeyringNotFound"] = "KeyringController - Keyring not found.";
28
28
  KeyringControllerError2["UnsafeDirectKeyringAccess"] = "KeyringController - Returning keyring instances is unsafe";
29
29
  KeyringControllerError2["WrongPasswordType"] = "KeyringController - Password must be of type string.";
30
+ KeyringControllerError2["InvalidEmptyPassword"] = "KeyringController - Password cannot be empty.";
30
31
  KeyringControllerError2["NoFirstAccount"] = "KeyringController - First Account not found.";
31
32
  KeyringControllerError2["DuplicatedAccount"] = "KeyringController - The account you are trying to import is a duplicate";
32
33
  KeyringControllerError2["VaultError"] = "KeyringController - Cannot unlock without a previous vault.";
@@ -64,4 +65,4 @@ var KeyringControllerError = /* @__PURE__ */ ((KeyringControllerError2) => {
64
65
 
65
66
 
66
67
  exports.__privateGet = __privateGet; exports.__privateAdd = __privateAdd; exports.__privateSet = __privateSet; exports.__privateMethod = __privateMethod; exports.KeyringControllerError = KeyringControllerError;
67
- //# sourceMappingURL=chunk-ZGV2QNCG.js.map
68
+ //# sourceMappingURL=chunk-NOCGQCUM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/constants.ts"],"names":["KeyringControllerError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAK,yBAAL,kBAAKA,4BAAL;AACL,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,qBAAkB;AAClB,EAAAA,wBAAA,+BAA4B;AAC5B,EAAAA,wBAAA,uBAAoB;AACpB,EAAAA,wBAAA,0BAAuB;AACvB,EAAAA,wBAAA,oBAAiB;AACjB,EAAAA,wBAAA,uBAAoB;AACpB,EAAAA,wBAAA,gBAAa;AACb,EAAAA,wBAAA,oBAAiB;AACjB,EAAAA,wBAAA,oCAAiC;AACjC,EAAAA,wBAAA,uCAAoC;AACpC,EAAAA,wBAAA,8BAA2B;AAC3B,EAAAA,wBAAA,8BAA2B;AAC3B,EAAAA,wBAAA,gCAA6B;AAC7B,EAAAA,wBAAA,4BAAyB;AACzB,EAAAA,wBAAA,oCAAiC;AACjC,EAAAA,wBAAA,uCAAoC;AACpC,EAAAA,wBAAA,+BAA4B;AAC5B,EAAAA,wBAAA,iCAA8B;AAC9B,EAAAA,wBAAA,iCAA8B;AAC9B,EAAAA,wBAAA,uCAAoC;AACpC,EAAAA,wBAAA,qCAAkC;AAClC,EAAAA,wBAAA,mCAAgC;AAChC,EAAAA,wBAAA,kCAA+B;AAC/B,EAAAA,wBAAA,yBAAsB;AACtB,EAAAA,wBAAA,wBAAqB;AACrB,EAAAA,wBAAA,sBAAmB;AACnB,EAAAA,wBAAA,wBAAqB;AACrB,EAAAA,wBAAA,sBAAmB;AACnB,EAAAA,wBAAA,cAAW;AACX,EAAAA,wBAAA,iBAAc;AACd,EAAAA,wBAAA,4BAAyB;AAhCf,SAAAA;AAAA,GAAA","sourcesContent":["export enum KeyringControllerError {\n NoKeyring = 'KeyringController - No keyring found',\n KeyringNotFound = 'KeyringController - Keyring not found.',\n UnsafeDirectKeyringAccess = 'KeyringController - Returning keyring instances is unsafe',\n WrongPasswordType = 'KeyringController - Password must be of type string.',\n InvalidEmptyPassword = 'KeyringController - Password cannot be empty.',\n NoFirstAccount = 'KeyringController - First Account not found.',\n DuplicatedAccount = 'KeyringController - The account you are trying to import is a duplicate',\n VaultError = 'KeyringController - Cannot unlock without a previous vault.',\n VaultDataError = 'KeyringController - The decrypted vault has an unexpected shape.',\n UnsupportedEncryptionKeyExport = 'KeyringController - The encryptor does not support encryption key export.',\n UnsupportedGenerateRandomMnemonic = 'KeyringController - The current keyring does not support the method generateRandomMnemonic.',\n UnsupportedExportAccount = '`KeyringController - The keyring for the current address does not support the method exportAccount',\n UnsupportedRemoveAccount = '`KeyringController - The keyring for the current address does not support the method removeAccount',\n UnsupportedSignTransaction = 'KeyringController - The keyring for the current address does not support the method signTransaction.',\n UnsupportedSignMessage = 'KeyringController - The keyring for the current address does not support the method signMessage.',\n UnsupportedSignPersonalMessage = 'KeyringController - The keyring for the current address does not support the method signPersonalMessage.',\n UnsupportedGetEncryptionPublicKey = 'KeyringController - The keyring for the current address does not support the method getEncryptionPublicKey.',\n UnsupportedDecryptMessage = 'KeyringController - The keyring for the current address does not support the method decryptMessage.',\n UnsupportedSignTypedMessage = 'KeyringController - The keyring for the current address does not support the method signTypedMessage.',\n UnsupportedGetAppKeyAddress = 'KeyringController - The keyring for the current address does not support the method getAppKeyAddress.',\n UnsupportedExportAppKeyForAddress = 'KeyringController - The keyring for the current address does not support the method exportAppKeyForAddress.',\n UnsupportedPrepareUserOperation = 'KeyringController - The keyring for the current address does not support the method prepareUserOperation.',\n UnsupportedPatchUserOperation = 'KeyringController - The keyring for the current address does not support the method patchUserOperation.',\n UnsupportedSignUserOperation = 'KeyringController - The keyring for the current address does not support the method signUserOperation.',\n NoAccountOnKeychain = \"KeyringController - The keychain doesn't have accounts.\",\n MissingCredentials = 'KeyringController - Cannot persist vault without password and encryption key',\n MissingVaultData = 'KeyringController - Cannot persist vault without vault information',\n ExpiredCredentials = 'KeyringController - Encryption key and salt provided are expired',\n NoKeyringBuilder = 'KeyringController - No keyringBuilder found for keyring',\n DataType = 'KeyringController - Incorrect data type provided',\n NoHdKeyring = 'KeyringController - No HD Keyring found',\n ControllerLockRequired = 'KeyringController - attempt to update vault during a non mutually exclusive operation',\n}\n"]}