@metamask-previews/keyring-controller 19.1.0-preview-74b4a89 → 19.1.0-preview-7a21cbc

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.
@@ -19,6 +19,7 @@ var KeyringControllerError;
19
19
  KeyringControllerError["UnsupportedSignTransaction"] = "KeyringController - The keyring for the current address does not support the method signTransaction.";
20
20
  KeyringControllerError["UnsupportedSignMessage"] = "KeyringController - The keyring for the current address does not support the method signMessage.";
21
21
  KeyringControllerError["UnsupportedSignPersonalMessage"] = "KeyringController - The keyring for the current address does not support the method signPersonalMessage.";
22
+ KeyringControllerError["UnsupportedSignEip7702Authorization"] = "KeyringController - The keyring for the current address does not support the method signEip7702Authorization.";
22
23
  KeyringControllerError["UnsupportedGetEncryptionPublicKey"] = "KeyringController - The keyring for the current address does not support the method getEncryptionPublicKey.";
23
24
  KeyringControllerError["UnsupportedDecryptMessage"] = "KeyringController - The keyring for the current address does not support the method decryptMessage.";
24
25
  KeyringControllerError["UnsupportedSignTypedMessage"] = "KeyringController - The keyring for the current address does not support the method signTypedMessage.";
@@ -27,6 +28,7 @@ var KeyringControllerError;
27
28
  KeyringControllerError["UnsupportedPrepareUserOperation"] = "KeyringController - The keyring for the current address does not support the method prepareUserOperation.";
28
29
  KeyringControllerError["UnsupportedPatchUserOperation"] = "KeyringController - The keyring for the current address does not support the method patchUserOperation.";
29
30
  KeyringControllerError["UnsupportedSignUserOperation"] = "KeyringController - The keyring for the current address does not support the method signUserOperation.";
31
+ KeyringControllerError["UnsupportedVerifySeedPhrase"] = "KeyringController - The keyring does not support the method verifySeedPhrase.";
30
32
  KeyringControllerError["NoAccountOnKeychain"] = "KeyringController - The keychain doesn't have accounts.";
31
33
  KeyringControllerError["ControllerLocked"] = "KeyringController - The operation cannot be completed while the controller is locked.";
32
34
  KeyringControllerError["MissingCredentials"] = "KeyringController - Cannot persist vault without password and encryption key";
@@ -36,5 +38,7 @@ var KeyringControllerError;
36
38
  KeyringControllerError["DataType"] = "KeyringController - Incorrect data type provided";
37
39
  KeyringControllerError["NoHdKeyring"] = "KeyringController - No HD Keyring found";
38
40
  KeyringControllerError["ControllerLockRequired"] = "KeyringController - attempt to update vault during a non mutually exclusive operation";
41
+ KeyringControllerError["KeyringMetadataLengthMismatch"] = "KeyringController - keyring metadata length mismatch";
42
+ KeyringControllerError["LastAccountInPrimaryKeyring"] = "KeyringController - Last account in primary keyring cannot be removed";
39
43
  })(KeyringControllerError || (exports.KeyringControllerError = KeyringControllerError = {}));
40
44
  //# sourceMappingURL=constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAkCX;AAlCD,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,2KAAiJ,CAAA;IACjJ,2JAAiI,CAAA;IACjI,+JAAqI,CAAA;IACrI,+JAAqI,CAAA;IACrI,2KAAiJ,CAAA;IACjJ,uKAA6I,CAAA;IAC7I,mKAAyI,CAAA;IACzI,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;AAClH,CAAC,EAlCW,sBAAsB,sCAAtB,sBAAsB,QAkCjC","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 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}\n"]}
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAsCX;AAtCD,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,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,gHAAsF,CAAA;IACtF,+HAAqG,CAAA;AACvG,CAAC,EAtCW,sBAAsB,sCAAtB,sBAAsB,QAsCjC","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 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 KeyringMetadataLengthMismatch = 'KeyringController - keyring metadata length mismatch',\n LastAccountInPrimaryKeyring = 'KeyringController - Last account in primary keyring cannot be removed',\n}\n"]}
@@ -15,6 +15,7 @@ export declare enum KeyringControllerError {
15
15
  UnsupportedSignTransaction = "KeyringController - The keyring for the current address does not support the method signTransaction.",
16
16
  UnsupportedSignMessage = "KeyringController - The keyring for the current address does not support the method signMessage.",
17
17
  UnsupportedSignPersonalMessage = "KeyringController - The keyring for the current address does not support the method signPersonalMessage.",
18
+ UnsupportedSignEip7702Authorization = "KeyringController - The keyring for the current address does not support the method signEip7702Authorization.",
18
19
  UnsupportedGetEncryptionPublicKey = "KeyringController - The keyring for the current address does not support the method getEncryptionPublicKey.",
19
20
  UnsupportedDecryptMessage = "KeyringController - The keyring for the current address does not support the method decryptMessage.",
20
21
  UnsupportedSignTypedMessage = "KeyringController - The keyring for the current address does not support the method signTypedMessage.",
@@ -23,6 +24,7 @@ export declare enum KeyringControllerError {
23
24
  UnsupportedPrepareUserOperation = "KeyringController - The keyring for the current address does not support the method prepareUserOperation.",
24
25
  UnsupportedPatchUserOperation = "KeyringController - The keyring for the current address does not support the method patchUserOperation.",
25
26
  UnsupportedSignUserOperation = "KeyringController - The keyring for the current address does not support the method signUserOperation.",
27
+ UnsupportedVerifySeedPhrase = "KeyringController - The keyring does not support the method verifySeedPhrase.",
26
28
  NoAccountOnKeychain = "KeyringController - The keychain doesn't have accounts.",
27
29
  ControllerLocked = "KeyringController - The operation cannot be completed while the controller is locked.",
28
30
  MissingCredentials = "KeyringController - Cannot persist vault without password and encryption key",
@@ -31,6 +33,8 @@ export declare enum KeyringControllerError {
31
33
  NoKeyringBuilder = "KeyringController - No keyringBuilder found for keyring",
32
34
  DataType = "KeyringController - Incorrect data type provided",
33
35
  NoHdKeyring = "KeyringController - No HD Keyring found",
34
- ControllerLockRequired = "KeyringController - attempt to update vault during a non mutually exclusive operation"
36
+ ControllerLockRequired = "KeyringController - attempt to update vault during a non mutually exclusive operation",
37
+ KeyringMetadataLengthMismatch = "KeyringController - keyring metadata length mismatch",
38
+ LastAccountInPrimaryKeyring = "KeyringController - Last account in primary keyring cannot be removed"
35
39
  }
36
40
  //# sourceMappingURL=constants.d.cts.map
@@ -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,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,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,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;CACjH"}
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,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,6BAA6B,yDAAyD;IACtF,2BAA2B,0EAA0E;CACtG"}
@@ -15,6 +15,7 @@ export declare enum KeyringControllerError {
15
15
  UnsupportedSignTransaction = "KeyringController - The keyring for the current address does not support the method signTransaction.",
16
16
  UnsupportedSignMessage = "KeyringController - The keyring for the current address does not support the method signMessage.",
17
17
  UnsupportedSignPersonalMessage = "KeyringController - The keyring for the current address does not support the method signPersonalMessage.",
18
+ UnsupportedSignEip7702Authorization = "KeyringController - The keyring for the current address does not support the method signEip7702Authorization.",
18
19
  UnsupportedGetEncryptionPublicKey = "KeyringController - The keyring for the current address does not support the method getEncryptionPublicKey.",
19
20
  UnsupportedDecryptMessage = "KeyringController - The keyring for the current address does not support the method decryptMessage.",
20
21
  UnsupportedSignTypedMessage = "KeyringController - The keyring for the current address does not support the method signTypedMessage.",
@@ -23,6 +24,7 @@ export declare enum KeyringControllerError {
23
24
  UnsupportedPrepareUserOperation = "KeyringController - The keyring for the current address does not support the method prepareUserOperation.",
24
25
  UnsupportedPatchUserOperation = "KeyringController - The keyring for the current address does not support the method patchUserOperation.",
25
26
  UnsupportedSignUserOperation = "KeyringController - The keyring for the current address does not support the method signUserOperation.",
27
+ UnsupportedVerifySeedPhrase = "KeyringController - The keyring does not support the method verifySeedPhrase.",
26
28
  NoAccountOnKeychain = "KeyringController - The keychain doesn't have accounts.",
27
29
  ControllerLocked = "KeyringController - The operation cannot be completed while the controller is locked.",
28
30
  MissingCredentials = "KeyringController - Cannot persist vault without password and encryption key",
@@ -31,6 +33,8 @@ export declare enum KeyringControllerError {
31
33
  NoKeyringBuilder = "KeyringController - No keyringBuilder found for keyring",
32
34
  DataType = "KeyringController - Incorrect data type provided",
33
35
  NoHdKeyring = "KeyringController - No HD Keyring found",
34
- ControllerLockRequired = "KeyringController - attempt to update vault during a non mutually exclusive operation"
36
+ ControllerLockRequired = "KeyringController - attempt to update vault during a non mutually exclusive operation",
37
+ KeyringMetadataLengthMismatch = "KeyringController - keyring metadata length mismatch",
38
+ LastAccountInPrimaryKeyring = "KeyringController - Last account in primary keyring cannot be removed"
35
39
  }
36
40
  //# sourceMappingURL=constants.d.mts.map
@@ -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,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,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,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;CACjH"}
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,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,6BAA6B,yDAAyD;IACtF,2BAA2B,0EAA0E;CACtG"}
@@ -16,6 +16,7 @@ export var KeyringControllerError;
16
16
  KeyringControllerError["UnsupportedSignTransaction"] = "KeyringController - The keyring for the current address does not support the method signTransaction.";
17
17
  KeyringControllerError["UnsupportedSignMessage"] = "KeyringController - The keyring for the current address does not support the method signMessage.";
18
18
  KeyringControllerError["UnsupportedSignPersonalMessage"] = "KeyringController - The keyring for the current address does not support the method signPersonalMessage.";
19
+ KeyringControllerError["UnsupportedSignEip7702Authorization"] = "KeyringController - The keyring for the current address does not support the method signEip7702Authorization.";
19
20
  KeyringControllerError["UnsupportedGetEncryptionPublicKey"] = "KeyringController - The keyring for the current address does not support the method getEncryptionPublicKey.";
20
21
  KeyringControllerError["UnsupportedDecryptMessage"] = "KeyringController - The keyring for the current address does not support the method decryptMessage.";
21
22
  KeyringControllerError["UnsupportedSignTypedMessage"] = "KeyringController - The keyring for the current address does not support the method signTypedMessage.";
@@ -24,6 +25,7 @@ export var KeyringControllerError;
24
25
  KeyringControllerError["UnsupportedPrepareUserOperation"] = "KeyringController - The keyring for the current address does not support the method prepareUserOperation.";
25
26
  KeyringControllerError["UnsupportedPatchUserOperation"] = "KeyringController - The keyring for the current address does not support the method patchUserOperation.";
26
27
  KeyringControllerError["UnsupportedSignUserOperation"] = "KeyringController - The keyring for the current address does not support the method signUserOperation.";
28
+ KeyringControllerError["UnsupportedVerifySeedPhrase"] = "KeyringController - The keyring does not support the method verifySeedPhrase.";
27
29
  KeyringControllerError["NoAccountOnKeychain"] = "KeyringController - The keychain doesn't have accounts.";
28
30
  KeyringControllerError["ControllerLocked"] = "KeyringController - The operation cannot be completed while the controller is locked.";
29
31
  KeyringControllerError["MissingCredentials"] = "KeyringController - Cannot persist vault without password and encryption key";
@@ -33,5 +35,7 @@ export var KeyringControllerError;
33
35
  KeyringControllerError["DataType"] = "KeyringController - Incorrect data type provided";
34
36
  KeyringControllerError["NoHdKeyring"] = "KeyringController - No HD Keyring found";
35
37
  KeyringControllerError["ControllerLockRequired"] = "KeyringController - attempt to update vault during a non mutually exclusive operation";
38
+ KeyringControllerError["KeyringMetadataLengthMismatch"] = "KeyringController - keyring metadata length mismatch";
39
+ KeyringControllerError["LastAccountInPrimaryKeyring"] = "KeyringController - Last account in primary keyring cannot be removed";
36
40
  })(KeyringControllerError || (KeyringControllerError = {}));
37
41
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAkCX;AAlCD,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,2KAAiJ,CAAA;IACjJ,2JAAiI,CAAA;IACjI,+JAAqI,CAAA;IACrI,+JAAqI,CAAA;IACrI,2KAAiJ,CAAA;IACjJ,uKAA6I,CAAA;IAC7I,mKAAyI,CAAA;IACzI,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;AAClH,CAAC,EAlCW,sBAAsB,KAAtB,sBAAsB,QAkCjC","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 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}\n"]}
1
+ {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAsCX;AAtCD,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,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,gHAAsF,CAAA;IACtF,+HAAqG,CAAA;AACvG,CAAC,EAtCW,sBAAsB,KAAtB,sBAAsB,QAsCjC","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 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 KeyringMetadataLengthMismatch = 'KeyringController - keyring metadata length mismatch',\n LastAccountInPrimaryKeyring = 'KeyringController - Last account in primary keyring cannot be removed',\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAoC","sourcesContent":["export * from './KeyringController';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAoC","sourcesContent":["export * from './KeyringController';\nexport type * from './types';\n"]}
package/dist/index.d.cts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./KeyringController.cjs";
2
+ export type * from "./types.cjs";
2
3
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wCAAoC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wCAAoC;AACpC,iCAA6B"}
package/dist/index.d.mts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./KeyringController.mjs";
2
+ export type * from "./types.mjs";
2
3
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wCAAoC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wCAAoC;AACpC,iCAA6B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wCAAoC","sourcesContent":["export * from './KeyringController';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wCAAoC","sourcesContent":["export * from './KeyringController';\nexport type * from './types';\n"]}
package/dist/types.cjs ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SIWEMessage } from '@metamask/controller-utils';\n\n/**\n * AbstractMessageParams\n *\n * Represents the parameters to pass to the signing method once the signature request is approved.\n *\n * from - Address from which the message is processed\n * origin? - Added for request origin identification\n * requestId? - Original request id\n * deferSetAsSigned? - Whether to defer setting the message as signed immediately after the keyring is told to sign it\n */\nexport type AbstractMessageParams = {\n from: string;\n origin?: string;\n requestId?: number;\n deferSetAsSigned?: boolean;\n};\n\n/**\n * Eip7702AuthorizationParams\n *\n * Represents the parameters for EIP-7702 authorization signing requests.\n *\n * chainId - The chain ID\n * contractAddress - The contract address\n * nonce - The nonce\n */\nexport type Eip7702AuthorizationParams = {\n chainId: number;\n contractAddress: string;\n nonce: number;\n} & AbstractMessageParams;\n\n/**\n * PersonalMessageParams\n *\n * Represents the parameters for personal signing messages.\n *\n * data - The data to sign\n * siwe? - The SIWE message\n */\nexport type PersonalMessageParams = {\n data: string;\n siwe?: SIWEMessage;\n} & AbstractMessageParams;\n\n/**\n * SignTypedDataMessageV3V4\n *\n * Represents the structure of a typed data message for EIP-712 signing requests.\n *\n * types - The types of the message\n * domain - The domain of the message\n * primaryType - The primary type of the message\n * message - The message\n */\nexport type SignTypedDataMessageV3V4 = {\n types: Record<string, unknown>;\n domain: Record<string, unknown>;\n primaryType: string;\n message: unknown;\n};\n\n/**\n * TypedMessageParams\n *\n * Represents the parameters for typed signing messages.\n *\n * data - The data to sign\n */\nexport type TypedMessageParams = {\n data: Record<string, unknown>[] | string | SignTypedDataMessageV3V4;\n} & AbstractMessageParams;\n"]}
@@ -0,0 +1,70 @@
1
+ import type { SIWEMessage } from "@metamask/controller-utils";
2
+ /**
3
+ * AbstractMessageParams
4
+ *
5
+ * Represents the parameters to pass to the signing method once the signature request is approved.
6
+ *
7
+ * from - Address from which the message is processed
8
+ * origin? - Added for request origin identification
9
+ * requestId? - Original request id
10
+ * deferSetAsSigned? - Whether to defer setting the message as signed immediately after the keyring is told to sign it
11
+ */
12
+ export type AbstractMessageParams = {
13
+ from: string;
14
+ origin?: string;
15
+ requestId?: number;
16
+ deferSetAsSigned?: boolean;
17
+ };
18
+ /**
19
+ * Eip7702AuthorizationParams
20
+ *
21
+ * Represents the parameters for EIP-7702 authorization signing requests.
22
+ *
23
+ * chainId - The chain ID
24
+ * contractAddress - The contract address
25
+ * nonce - The nonce
26
+ */
27
+ export type Eip7702AuthorizationParams = {
28
+ chainId: number;
29
+ contractAddress: string;
30
+ nonce: number;
31
+ } & AbstractMessageParams;
32
+ /**
33
+ * PersonalMessageParams
34
+ *
35
+ * Represents the parameters for personal signing messages.
36
+ *
37
+ * data - The data to sign
38
+ * siwe? - The SIWE message
39
+ */
40
+ export type PersonalMessageParams = {
41
+ data: string;
42
+ siwe?: SIWEMessage;
43
+ } & AbstractMessageParams;
44
+ /**
45
+ * SignTypedDataMessageV3V4
46
+ *
47
+ * Represents the structure of a typed data message for EIP-712 signing requests.
48
+ *
49
+ * types - The types of the message
50
+ * domain - The domain of the message
51
+ * primaryType - The primary type of the message
52
+ * message - The message
53
+ */
54
+ export type SignTypedDataMessageV3V4 = {
55
+ types: Record<string, unknown>;
56
+ domain: Record<string, unknown>;
57
+ primaryType: string;
58
+ message: unknown;
59
+ };
60
+ /**
61
+ * TypedMessageParams
62
+ *
63
+ * Represents the parameters for typed signing messages.
64
+ *
65
+ * data - The data to sign
66
+ */
67
+ export type TypedMessageParams = {
68
+ data: Record<string, unknown>[] | string | SignTypedDataMessageV3V4;
69
+ } & AbstractMessageParams;
70
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mCAAmC;AAE9D;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,qBAAqB,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,GAAG,qBAAqB,CAAC;AAE1B;;;;;;;;;GASG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,GAAG,wBAAwB,CAAC;CACrE,GAAG,qBAAqB,CAAC"}
@@ -0,0 +1,70 @@
1
+ import type { SIWEMessage } from "@metamask/controller-utils";
2
+ /**
3
+ * AbstractMessageParams
4
+ *
5
+ * Represents the parameters to pass to the signing method once the signature request is approved.
6
+ *
7
+ * from - Address from which the message is processed
8
+ * origin? - Added for request origin identification
9
+ * requestId? - Original request id
10
+ * deferSetAsSigned? - Whether to defer setting the message as signed immediately after the keyring is told to sign it
11
+ */
12
+ export type AbstractMessageParams = {
13
+ from: string;
14
+ origin?: string;
15
+ requestId?: number;
16
+ deferSetAsSigned?: boolean;
17
+ };
18
+ /**
19
+ * Eip7702AuthorizationParams
20
+ *
21
+ * Represents the parameters for EIP-7702 authorization signing requests.
22
+ *
23
+ * chainId - The chain ID
24
+ * contractAddress - The contract address
25
+ * nonce - The nonce
26
+ */
27
+ export type Eip7702AuthorizationParams = {
28
+ chainId: number;
29
+ contractAddress: string;
30
+ nonce: number;
31
+ } & AbstractMessageParams;
32
+ /**
33
+ * PersonalMessageParams
34
+ *
35
+ * Represents the parameters for personal signing messages.
36
+ *
37
+ * data - The data to sign
38
+ * siwe? - The SIWE message
39
+ */
40
+ export type PersonalMessageParams = {
41
+ data: string;
42
+ siwe?: SIWEMessage;
43
+ } & AbstractMessageParams;
44
+ /**
45
+ * SignTypedDataMessageV3V4
46
+ *
47
+ * Represents the structure of a typed data message for EIP-712 signing requests.
48
+ *
49
+ * types - The types of the message
50
+ * domain - The domain of the message
51
+ * primaryType - The primary type of the message
52
+ * message - The message
53
+ */
54
+ export type SignTypedDataMessageV3V4 = {
55
+ types: Record<string, unknown>;
56
+ domain: Record<string, unknown>;
57
+ primaryType: string;
58
+ message: unknown;
59
+ };
60
+ /**
61
+ * TypedMessageParams
62
+ *
63
+ * Represents the parameters for typed signing messages.
64
+ *
65
+ * data - The data to sign
66
+ */
67
+ export type TypedMessageParams = {
68
+ data: Record<string, unknown>[] | string | SignTypedDataMessageV3V4;
69
+ } & AbstractMessageParams;
70
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mCAAmC;AAE9D;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,qBAAqB,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,GAAG,qBAAqB,CAAC;AAE1B;;;;;;;;;GASG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,GAAG,wBAAwB,CAAC;CACrE,GAAG,qBAAqB,CAAC"}
package/dist/types.mjs ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SIWEMessage } from '@metamask/controller-utils';\n\n/**\n * AbstractMessageParams\n *\n * Represents the parameters to pass to the signing method once the signature request is approved.\n *\n * from - Address from which the message is processed\n * origin? - Added for request origin identification\n * requestId? - Original request id\n * deferSetAsSigned? - Whether to defer setting the message as signed immediately after the keyring is told to sign it\n */\nexport type AbstractMessageParams = {\n from: string;\n origin?: string;\n requestId?: number;\n deferSetAsSigned?: boolean;\n};\n\n/**\n * Eip7702AuthorizationParams\n *\n * Represents the parameters for EIP-7702 authorization signing requests.\n *\n * chainId - The chain ID\n * contractAddress - The contract address\n * nonce - The nonce\n */\nexport type Eip7702AuthorizationParams = {\n chainId: number;\n contractAddress: string;\n nonce: number;\n} & AbstractMessageParams;\n\n/**\n * PersonalMessageParams\n *\n * Represents the parameters for personal signing messages.\n *\n * data - The data to sign\n * siwe? - The SIWE message\n */\nexport type PersonalMessageParams = {\n data: string;\n siwe?: SIWEMessage;\n} & AbstractMessageParams;\n\n/**\n * SignTypedDataMessageV3V4\n *\n * Represents the structure of a typed data message for EIP-712 signing requests.\n *\n * types - The types of the message\n * domain - The domain of the message\n * primaryType - The primary type of the message\n * message - The message\n */\nexport type SignTypedDataMessageV3V4 = {\n types: Record<string, unknown>;\n domain: Record<string, unknown>;\n primaryType: string;\n message: unknown;\n};\n\n/**\n * TypedMessageParams\n *\n * Represents the parameters for typed signing messages.\n *\n * data - The data to sign\n */\nexport type TypedMessageParams = {\n data: Record<string, unknown>[] | string | SignTypedDataMessageV3V4;\n} & AbstractMessageParams;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/keyring-controller",
3
- "version": "19.1.0-preview-74b4a89",
3
+ "version": "19.1.0-preview-7a21cbc",
4
4
  "description": "Stores identities seen in the wallet and manages interactions such as signing",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -51,16 +51,16 @@
51
51
  "@keystonehq/metamask-airgapped-keyring": "^0.14.1",
52
52
  "@metamask/base-controller": "^8.0.0",
53
53
  "@metamask/browser-passworder": "^4.3.0",
54
- "@metamask/eth-hd-keyring": "^7.0.4",
55
- "@metamask/eth-sig-util": "^8.0.0",
56
- "@metamask/eth-simple-keyring": "^6.0.5",
54
+ "@metamask/eth-hd-keyring": "^10.0.0",
55
+ "@metamask/eth-sig-util": "^8.2.0",
56
+ "@metamask/eth-simple-keyring": "^8.1.0",
57
57
  "@metamask/keyring-api": "^17.0.0",
58
58
  "@metamask/keyring-internal-api": "^4.0.1",
59
- "@metamask/message-manager": "^12.0.1",
60
- "@metamask/utils": "^11.1.0",
59
+ "@metamask/utils": "^11.2.0",
61
60
  "async-mutex": "^0.5.0",
62
61
  "ethereumjs-wallet": "^1.0.1",
63
- "immer": "^9.0.6"
62
+ "immer": "^9.0.6",
63
+ "ulid": "^2.3.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@ethereumjs/common": "^3.2.0",
@@ -89,6 +89,10 @@
89
89
  "registry": "https://registry.npmjs.org/"
90
90
  },
91
91
  "lavamoat": {
92
- "allowScripts": {}
92
+ "allowScripts": {
93
+ "@lavamoat/preinstall-always-fail": false,
94
+ "ethereumjs-wallet>ethereum-cryptography>keccak": false,
95
+ "ethereumjs-wallet>ethereum-cryptography>secp256k1": false
96
+ }
93
97
  }
94
98
  }