Skip to content

WalletChat.fun MetaMask Snap to Receive Notifications in MetaMask Browser Extension

License

Notifications You must be signed in to change notification settings

Wallet-Chat/walletchat-metamask-snap

 
 

Repository files navigation

Sign-in with Ethereum and MetaMask Snaps

While Snaps can request the endowment:ethereum-provider permission to get access to the MetaMask API, it currently can't be used to call eth_requestAccounts. This prevents snaps from directly signing the user in using SIWE, or from any other calls to personal_sign and similar methods.

This repository shows an example of a snap requiring a ficticious API key to make some requests. The API key is obtained by doing a Sign-in with Ethereum. Since this requires calling personal_sign, which in turn requires access to an account using eth_requestAccounts, this signing currently has to happen in the Dapp.

Relevant parts in the code

About

WalletChat.fun MetaMask Snap to Receive Notifications in MetaMask Browser Extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.3%
  • JavaScript 3.4%
  • Shell 0.3%