Snap Account
Last updated
Last updated
Currently, MetaMask Snaps can only connect to accounts generated via mnemonics and not to imported accounts. However, Identify Snap enables developers and users to access both MetaMask and non-MetaMask accounts (imported using private keys directly), extending the same DID and VC features to any type of account.
It is important to note that Snaps cannot interact directly with MetaMask accounts imported using private keys. Users should either utilize a regular MetaMask account (generated via mnemonics) or import the account using the private key by interacting with Identify Snap directly.
Moreover, Identify Snap supports both EVM-based blockchains/sidechains and non-EVM-based blockchains. As of version 1.5.0, it supports Hedera Hashgraph, with plans to add support for other blockchains, such as Bitcoin, XRPL, Dogecoin, and Litecoin in the near future. This is significant because not all blockchains use EVM-based addresses. For instance, Hedera Hashgraph employs an "AccountId" in the format of "0.0.xxxxx". By supporting the import of various account types, Identify Snap demonstrates its versatility, offering features not directly available through MetaMask.
Identify Snap natively supports EVM blockchains and sidechains, just like MetaMask. This means that no additional steps are required when interacting with EVM blockchains. For example, when a user connects to an account on MetaMask, Identify Snap automatically retrieves the private key for that account and stores it in its state for later use with DIDs and VCs. Subsequent connections to the same account bypass the import process since the account state already exists within Identify Snap.
For non-MetaMask accounts, users need to provide an extra flag in the Snap API request. If the external account hasn't been added to Identify Snap's state, the user will be prompted to enter the private key for that account via a MetaMask dialog. Once the account state is stored in Identify Snap, future connections bypass the import dialog.
Thus, Identify Snap enables seamless connections to both MetaMask and non-MetaMask accounts, offering users a versatile and convenient experience when dealing with different types of accounts.
Although MetaMask does not natively support non-EVM blockchains, Identify Snap provides a way to connect to them, such as Hedera Hashgraph. Each Hedera account has an associated AccountId, which is generated upon the account's first transaction with the Hedera ledger. Identify Snap supports both EVM addresses and Hedera AccountIds.
When a user connects to a MetaMask account associated with Hedera, Identify Snap retrieves the private key and stores it in its state for use with DIDs and VCs. The user must also enter their Hedera AccountId if it's their first time interacting with the account on the Hedera network. Once the account state is stored in Identify Snap, future connections bypass the import process.
For non-MetaMask Hedera accounts, users need to pass two additional flags in the Snap API request - one to indicate it's a non-MetaMask account and another for the desired Hedera AccountId. If the external account isn't in Identify Snap's state, the user will be prompted to enter the private key via a MetaMask dialog. Subsequent connections to the account bypass the import dialog since the account state is stored within Identify Snap.
In summary, Identify Snap enables connections to both MetaMask and non-MetaMask accounts for Hedera Hashgraph, offering users a versatile experience when interacting with various types of accounts.