@metamask-previews/keyring-controller 24.0.0-preview-4419d7e4 → 24.0.0-preview-c2c8112b
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 -20
- package/dist/KeyringController.cjs +138 -107
- package/dist/KeyringController.cjs.map +1 -1
- package/dist/KeyringController.d.cts +33 -41
- package/dist/KeyringController.d.cts.map +1 -1
- package/dist/KeyringController.d.mts +33 -41
- package/dist/KeyringController.d.mts.map +1 -1
- package/dist/KeyringController.mjs +139 -108
- package/dist/KeyringController.mjs.map +1 -1
- package/dist/constants.cjs +0 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +0 -1
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.mts +0 -1
- package/dist/constants.d.mts.map +1 -1
- package/dist/constants.mjs +0 -1
- package/dist/constants.mjs.map +1 -1
- package/package.json +4 -2
package/dist/constants.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAuCX;AAvCD,WAAY,sBAAsB;IAChC,4EAAkD,CAAA;IAClD,oFAA0D,CAAA;IAC1D,iHAAuF,CAAA;IACvF,oGAA0E,CAAA;IAC1E,gGAAsE,CAAA;IACtE,yFAA+D,CAAA;IAC/D,uHAA6F,CAAA;IAC7F,oGAA0E,CAAA;IAC1E,6GAAmF,CAAA;IACnF,sIAA4G,CAAA;IAC5G,2JAAiI,CAAA;IACjI,yJAA+H,CAAA;IAC/H,yJAA+H,CAAA;IAC/H,6JAAmI,CAAA;IACnI,qJAA2H,CAAA;IAC3H,qKAA2I,CAAA;IAC3I,+KAAqJ,CAAA;IACrJ,2KAAiJ,CAAA;IACjJ,2JAAiI,CAAA;IACjI,+JAAqI,CAAA;IACrI,+JAAqI,CAAA;IACrI,2KAAiJ,CAAA;IACjJ,uKAA6I,CAAA;IAC7I,mKAAyI,CAAA;IACzI,iKAAuI,CAAA;IACvI,uIAA6G,CAAA;IAC7G,iKAAuI,CAAA;IACvI,yGAA+E,CAAA;IAC/E,oIAA0G,CAAA;IAC1G,6HAAmG,CAAA;IACnG,iHAAuF,CAAA;IACvF,iHAAuF,CAAA;IACvF,sGAA4E,CAAA;IAC5E,uFAA6D,CAAA;IAC7D,iFAAuD,CAAA;IACvD,0IAAgH,CAAA;IAChH,+HAAqG,CAAA;IACrG,4FAAkE,CAAA;AACpE,CAAC,EAvCW,sBAAsB,sCAAtB,sBAAsB,QAuCjC","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 UnsupportedSignEip7702Authorization = 'KeyringController - The keyring for the current address does not support the method signEip7702Authorization.',\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 UnsupportedVerifySeedPhrase = 'KeyringController - The keyring does not support the method verifySeedPhrase.',\n MissingEip7702AuthorizationContractAddress = 'KeyringController - The EIP-7702 Authorization is invalid. No contract address provided.',\n NoAccountOnKeychain = \"KeyringController - The keychain doesn't have accounts.\",\n ControllerLocked = 'KeyringController - The operation cannot be completed while the controller is locked.',\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 LastAccountInPrimaryKeyring = 'KeyringController - Last account in primary keyring cannot be removed',\n EncryptionKeyNotSet = 'KeyringController - Encryption key not set',\n}\n"]}
|
package/dist/constants.d.cts
CHANGED
|
@@ -3,7 +3,6 @@ export declare enum KeyringControllerError {
|
|
|
3
3
|
KeyringNotFound = "KeyringController - Keyring not found.",
|
|
4
4
|
UnsafeDirectKeyringAccess = "KeyringController - Returning keyring instances is unsafe",
|
|
5
5
|
WrongPasswordType = "KeyringController - Password must be of type string.",
|
|
6
|
-
WrongEncryptionKeyType = "KeyringController - Encryption key must be of type string.",
|
|
7
6
|
InvalidEmptyPassword = "KeyringController - Password cannot be empty.",
|
|
8
7
|
NoFirstAccount = "KeyringController - First Account not found.",
|
|
9
8
|
DuplicatedAccount = "KeyringController - The account you are trying to import is a duplicate",
|
package/dist/constants.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,SAAS,yCAAyC;IAClD,eAAe,2CAA2C;IAC1D,yBAAyB,8DAA8D;IACvF,iBAAiB,yDAAyD;IAC1E,
|
|
1
|
+
{"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,SAAS,yCAAyC;IAClD,eAAe,2CAA2C;IAC1D,yBAAyB,8DAA8D;IACvF,iBAAiB,yDAAyD;IAC1E,oBAAoB,kDAAkD;IACtE,cAAc,iDAAiD;IAC/D,iBAAiB,4EAA4E;IAC7F,UAAU,gEAAgE;IAC1E,cAAc,qEAAqE;IACnF,8BAA8B,8EAA8E;IAC5G,iCAAiC,gGAAgG;IACjI,wBAAwB,uGAAuG;IAC/H,wBAAwB,uGAAuG;IAC/H,0BAA0B,yGAAyG;IACnI,sBAAsB,qGAAqG;IAC3H,8BAA8B,6GAA6G;IAC3I,mCAAmC,kHAAkH;IACrJ,iCAAiC,gHAAgH;IACjJ,yBAAyB,wGAAwG;IACjI,2BAA2B,0GAA0G;IACrI,2BAA2B,0GAA0G;IACrI,iCAAiC,gHAAgH;IACjJ,+BAA+B,8GAA8G;IAC7I,6BAA6B,4GAA4G;IACzI,4BAA4B,2GAA2G;IACvI,2BAA2B,kFAAkF;IAC7G,0CAA0C,6FAA6F;IACvI,mBAAmB,4DAA4D;IAC/E,gBAAgB,0FAA0F;IAC1G,kBAAkB,iFAAiF;IACnG,gBAAgB,uEAAuE;IACvF,kBAAkB,qEAAqE;IACvF,gBAAgB,4DAA4D;IAC5E,QAAQ,qDAAqD;IAC7D,WAAW,4CAA4C;IACvD,sBAAsB,0FAA0F;IAChH,2BAA2B,0EAA0E;IACrG,mBAAmB,+CAA+C;CACnE"}
|
package/dist/constants.d.mts
CHANGED
|
@@ -3,7 +3,6 @@ export declare enum KeyringControllerError {
|
|
|
3
3
|
KeyringNotFound = "KeyringController - Keyring not found.",
|
|
4
4
|
UnsafeDirectKeyringAccess = "KeyringController - Returning keyring instances is unsafe",
|
|
5
5
|
WrongPasswordType = "KeyringController - Password must be of type string.",
|
|
6
|
-
WrongEncryptionKeyType = "KeyringController - Encryption key must be of type string.",
|
|
7
6
|
InvalidEmptyPassword = "KeyringController - Password cannot be empty.",
|
|
8
7
|
NoFirstAccount = "KeyringController - First Account not found.",
|
|
9
8
|
DuplicatedAccount = "KeyringController - The account you are trying to import is a duplicate",
|
package/dist/constants.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,SAAS,yCAAyC;IAClD,eAAe,2CAA2C;IAC1D,yBAAyB,8DAA8D;IACvF,iBAAiB,yDAAyD;IAC1E,
|
|
1
|
+
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,SAAS,yCAAyC;IAClD,eAAe,2CAA2C;IAC1D,yBAAyB,8DAA8D;IACvF,iBAAiB,yDAAyD;IAC1E,oBAAoB,kDAAkD;IACtE,cAAc,iDAAiD;IAC/D,iBAAiB,4EAA4E;IAC7F,UAAU,gEAAgE;IAC1E,cAAc,qEAAqE;IACnF,8BAA8B,8EAA8E;IAC5G,iCAAiC,gGAAgG;IACjI,wBAAwB,uGAAuG;IAC/H,wBAAwB,uGAAuG;IAC/H,0BAA0B,yGAAyG;IACnI,sBAAsB,qGAAqG;IAC3H,8BAA8B,6GAA6G;IAC3I,mCAAmC,kHAAkH;IACrJ,iCAAiC,gHAAgH;IACjJ,yBAAyB,wGAAwG;IACjI,2BAA2B,0GAA0G;IACrI,2BAA2B,0GAA0G;IACrI,iCAAiC,gHAAgH;IACjJ,+BAA+B,8GAA8G;IAC7I,6BAA6B,4GAA4G;IACzI,4BAA4B,2GAA2G;IACvI,2BAA2B,kFAAkF;IAC7G,0CAA0C,6FAA6F;IACvI,mBAAmB,4DAA4D;IAC/E,gBAAgB,0FAA0F;IAC1G,kBAAkB,iFAAiF;IACnG,gBAAgB,uEAAuE;IACvF,kBAAkB,qEAAqE;IACvF,gBAAgB,4DAA4D;IAC5E,QAAQ,qDAAqD;IAC7D,WAAW,4CAA4C;IACvD,sBAAsB,0FAA0F;IAChH,2BAA2B,0EAA0E;IACrG,mBAAmB,+CAA+C;CACnE"}
|
package/dist/constants.mjs
CHANGED
|
@@ -4,7 +4,6 @@ export var KeyringControllerError;
|
|
|
4
4
|
KeyringControllerError["KeyringNotFound"] = "KeyringController - Keyring not found.";
|
|
5
5
|
KeyringControllerError["UnsafeDirectKeyringAccess"] = "KeyringController - Returning keyring instances is unsafe";
|
|
6
6
|
KeyringControllerError["WrongPasswordType"] = "KeyringController - Password must be of type string.";
|
|
7
|
-
KeyringControllerError["WrongEncryptionKeyType"] = "KeyringController - Encryption key must be of type string.";
|
|
8
7
|
KeyringControllerError["InvalidEmptyPassword"] = "KeyringController - Password cannot be empty.";
|
|
9
8
|
KeyringControllerError["NoFirstAccount"] = "KeyringController - First Account not found.";
|
|
10
9
|
KeyringControllerError["DuplicatedAccount"] = "KeyringController - The account you are trying to import is a duplicate";
|
package/dist/constants.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAuCX;AAvCD,WAAY,sBAAsB;IAChC,4EAAkD,CAAA;IAClD,oFAA0D,CAAA;IAC1D,iHAAuF,CAAA;IACvF,oGAA0E,CAAA;IAC1E,gGAAsE,CAAA;IACtE,yFAA+D,CAAA;IAC/D,uHAA6F,CAAA;IAC7F,oGAA0E,CAAA;IAC1E,6GAAmF,CAAA;IACnF,sIAA4G,CAAA;IAC5G,2JAAiI,CAAA;IACjI,yJAA+H,CAAA;IAC/H,yJAA+H,CAAA;IAC/H,6JAAmI,CAAA;IACnI,qJAA2H,CAAA;IAC3H,qKAA2I,CAAA;IAC3I,+KAAqJ,CAAA;IACrJ,2KAAiJ,CAAA;IACjJ,2JAAiI,CAAA;IACjI,+JAAqI,CAAA;IACrI,+JAAqI,CAAA;IACrI,2KAAiJ,CAAA;IACjJ,uKAA6I,CAAA;IAC7I,mKAAyI,CAAA;IACzI,iKAAuI,CAAA;IACvI,uIAA6G,CAAA;IAC7G,iKAAuI,CAAA;IACvI,yGAA+E,CAAA;IAC/E,oIAA0G,CAAA;IAC1G,6HAAmG,CAAA;IACnG,iHAAuF,CAAA;IACvF,iHAAuF,CAAA;IACvF,sGAA4E,CAAA;IAC5E,uFAA6D,CAAA;IAC7D,iFAAuD,CAAA;IACvD,0IAAgH,CAAA;IAChH,+HAAqG,CAAA;IACrG,4FAAkE,CAAA;AACpE,CAAC,EAvCW,sBAAsB,KAAtB,sBAAsB,QAuCjC","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 UnsupportedSignEip7702Authorization = 'KeyringController - The keyring for the current address does not support the method signEip7702Authorization.',\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 UnsupportedVerifySeedPhrase = 'KeyringController - The keyring does not support the method verifySeedPhrase.',\n MissingEip7702AuthorizationContractAddress = 'KeyringController - The EIP-7702 Authorization is invalid. No contract address provided.',\n NoAccountOnKeychain = \"KeyringController - The keychain doesn't have accounts.\",\n ControllerLocked = 'KeyringController - The operation cannot be completed while the controller is locked.',\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 LastAccountInPrimaryKeyring = 'KeyringController - Last account in primary keyring cannot be removed',\n EncryptionKeyNotSet = 'KeyringController - Encryption key not set',\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/keyring-controller",
|
|
3
|
-
"version": "24.0.0-preview-
|
|
3
|
+
"version": "24.0.0-preview-c2c8112b",
|
|
4
4
|
"description": "Stores identities seen in the wallet and manages interactions such as signing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
|
|
39
|
+
"build:all": "ts-bridge --project tsconfig.build.json --verbose --clean",
|
|
39
40
|
"build:docs": "typedoc",
|
|
40
41
|
"changelog:update": "../../scripts/update-changelog.sh @metamask/keyring-controller",
|
|
41
42
|
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/keyring-controller",
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
"dependencies": {
|
|
50
51
|
"@ethereumjs/util": "^9.1.0",
|
|
51
52
|
"@metamask/base-controller": "^9.0.0",
|
|
53
|
+
"@metamask/browser-passworder": "^4.3.0",
|
|
52
54
|
"@metamask/eth-hd-keyring": "^13.0.0",
|
|
53
55
|
"@metamask/eth-sig-util": "^8.2.0",
|
|
54
56
|
"@metamask/eth-simple-keyring": "^11.0.0",
|
|
@@ -68,9 +70,9 @@
|
|
|
68
70
|
"@lavamoat/allow-scripts": "^3.0.4",
|
|
69
71
|
"@lavamoat/preinstall-always-fail": "^2.1.0",
|
|
70
72
|
"@metamask/auto-changelog": "^3.4.4",
|
|
71
|
-
"@metamask/browser-passworder": "^6.0.0",
|
|
72
73
|
"@metamask/keyring-utils": "^3.1.0",
|
|
73
74
|
"@metamask/scure-bip39": "^2.1.1",
|
|
75
|
+
"@ts-bridge/cli": "^0.6.4",
|
|
74
76
|
"@types/jest": "^27.4.1",
|
|
75
77
|
"deepmerge": "^4.2.2",
|
|
76
78
|
"jest": "^27.5.1",
|