SIPs
SIPs copied to clipboard
SIP-27: Accounts Metadata Request
This SIP proposes extension to the Keyring API, with a method called keyring_listAccountsAll that exposes all accounts usable by the user in the extension.
It's result is based on keyring_listAccounts
I'll give it a deeper read, but here are a few quick comments:
-
We already have an internal account type that includes a
metadatafield, but we deliberately chose not to expose that metadata to the Snaps, following the need-to-know principle. -
In the case of the send flow, I think it would make more sense to remove the burden of filtering the accounts from the Snap and have the component handle it based on a prop---something like
<AccountsList include="chainId:bip122:000000000019d6689c085ae165831e93" />. -
The approach above also eliminates the need to expose all accounts to the Snap, which aligns with the first point.
-
The Keyring API defines an API implemented by the Snap. For example, MetaMask or the companion dapp can call the
keyring_listAccountsmethod to list the accounts managed by the Snap. From the usage of this new proposed method, it seems more like a method that should be exposed by the wallet to be called by the Snap, rather than being part of the Keyring API.
- In the case of the send flow, I think it would make more sense to remove the burden of filtering the accounts from the Snap and have the component handle it based on a prop---something like
<AccountsList include="chainId:bip122:000000000019d6689c085ae165831e93" />.- The approach above also eliminates the need to expose all accounts to the Snap, which aligns with the first point.
Created an issue to start definition of this component here, feel free to drop ideas, requirements, and thoughts etc. directly on there