Closed danfinlay closed 4 years ago
Alright got the tests passing.
I separated the two types of identifiers:
slip44:60
Ether
We are using the former in Aaron's PR above to ensure that the key derivation permission is bound very explicitly to the input of the key derivation function.
The account type identifier is a "softer" guarantee: The two permissions that use this are for:
To allow keyless account types, it's important that the account-service registry is not bound to a key derivation strategy (or key derivation at all, as in the case of contract accounts).
Introduces a concept of "account types" to the AccountsController.
The permission to
wallet_manageIdentities
is now known aswallet_manageAccounts_*
, where*
is an account type identifier string.Currently this string is
Ether
for Ethereum accounts, per Ethereum's SLIP44 name.Also introduces
wallet_accounts_*
, where*
is again that same account type identifier. This method is meant to so thateth_accounts
can be an alias forwallet_accounts_Ether
, as a strict superset of that method.If any parameters are present in a call to
wallet_accounts_*
, then those parameters will be passed to the handler for the account defined by thefrom
value on itsAccountMessageHandler
function, allowing account type snaps to define their own interfaces, and the accounts permission to allow passing through messages related to the permitted accounts.Will benefit from a number of improvements:
eth_accounts
atwallet_accounts_*
.