SIPs icon indicating copy to clipboard operation
SIPs copied to clipboard

SIP-27: Accounts Metadata Request

Open ritave opened this issue 1 year ago • 2 comments

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

ritave avatar Sep 18 '24 10:09 ritave

I'll give it a deeper read, but here are a few quick comments:

  • We already have an internal account type that includes a metadata field, 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_listAccounts method 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.

danroc avatar Sep 20 '24 15:09 danroc

  • 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

eriknson avatar Sep 23 '24 13:09 eriknson