@metamask-previews/keyring-controller 25.2.0-preview-47dc390 → 25.2.0-preview-0bc2ac9

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.
@@ -53,28 +53,6 @@ const ulid_1 = require("ulid");
53
53
  const constants_1 = require("./constants.cjs");
54
54
  const errors_1 = require("./errors.cjs");
55
55
  const name = 'KeyringController';
56
- const MESSENGER_EXPOSED_METHODS = [
57
- 'signMessage',
58
- 'signEip7702Authorization',
59
- 'signPersonalMessage',
60
- 'signTypedMessage',
61
- 'decryptMessage',
62
- 'getEncryptionPublicKey',
63
- 'getAccounts',
64
- 'getKeyringsByType',
65
- 'getKeyringForAccount',
66
- 'persistAllKeyrings',
67
- 'prepareUserOperation',
68
- 'patchUserOperation',
69
- 'signUserOperation',
70
- 'addNewAccount',
71
- 'withKeyring',
72
- 'withKeyringUnsafe',
73
- 'addNewKeyring',
74
- 'createNewVaultAndKeychain',
75
- 'createNewVaultAndRestore',
76
- 'removeAccount',
77
- ];
78
56
  /**
79
57
  * Available keyring types
80
58
  */
@@ -1068,7 +1046,26 @@ _KeyringController_controllerOperationMutex = new WeakMap(), _KeyringController_
1068
1046
  }
1069
1047
  return value;
1070
1048
  }, _KeyringController_registerMessageHandlers = function _KeyringController_registerMessageHandlers() {
1071
- this.messenger.registerMethodActionHandlers(this, MESSENGER_EXPOSED_METHODS);
1049
+ this.messenger.registerActionHandler(`${name}:signMessage`, this.signMessage.bind(this));
1050
+ this.messenger.registerActionHandler(`${name}:signEip7702Authorization`, this.signEip7702Authorization.bind(this));
1051
+ this.messenger.registerActionHandler(`${name}:signPersonalMessage`, this.signPersonalMessage.bind(this));
1052
+ this.messenger.registerActionHandler(`${name}:signTypedMessage`, this.signTypedMessage.bind(this));
1053
+ this.messenger.registerActionHandler(`${name}:decryptMessage`, this.decryptMessage.bind(this));
1054
+ this.messenger.registerActionHandler(`${name}:getEncryptionPublicKey`, this.getEncryptionPublicKey.bind(this));
1055
+ this.messenger.registerActionHandler(`${name}:getAccounts`, this.getAccounts.bind(this));
1056
+ this.messenger.registerActionHandler(`${name}:getKeyringsByType`, this.getKeyringsByType.bind(this));
1057
+ this.messenger.registerActionHandler(`${name}:getKeyringForAccount`, this.getKeyringForAccount.bind(this));
1058
+ this.messenger.registerActionHandler(`${name}:persistAllKeyrings`, this.persistAllKeyrings.bind(this));
1059
+ this.messenger.registerActionHandler(`${name}:prepareUserOperation`, this.prepareUserOperation.bind(this));
1060
+ this.messenger.registerActionHandler(`${name}:patchUserOperation`, this.patchUserOperation.bind(this));
1061
+ this.messenger.registerActionHandler(`${name}:signUserOperation`, this.signUserOperation.bind(this));
1062
+ this.messenger.registerActionHandler(`${name}:addNewAccount`, this.addNewAccount.bind(this));
1063
+ this.messenger.registerActionHandler(`${name}:withKeyring`, this.withKeyring.bind(this));
1064
+ this.messenger.registerActionHandler(`${name}:withKeyringUnsafe`, this.withKeyringUnsafe.bind(this));
1065
+ this.messenger.registerActionHandler(`${name}:addNewKeyring`, this.addNewKeyring.bind(this));
1066
+ this.messenger.registerActionHandler(`${name}:createNewVaultAndKeychain`, this.createNewVaultAndKeychain.bind(this));
1067
+ this.messenger.registerActionHandler(`${name}:createNewVaultAndRestore`, this.createNewVaultAndRestore.bind(this));
1068
+ this.messenger.registerActionHandler(`${name}:removeAccount`, this.removeAccount.bind(this));
1072
1069
  }, _KeyringController_selectKeyring =
1073
1070
  /**
1074
1071
  * Select a keyring using a selector without acquiring the controller lock.