Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser based email wallet connector #45

Open
saleel opened this issue Jan 6, 2024 · 4 comments
Open

Browser based email wallet connector #45

saleel opened this issue Jan 6, 2024 · 4 comments
Labels
enhancement New feature or request idea Ideas that need to be discussed, and are not ready for development yet

Comments

@saleel
Copy link
Member

saleel commented Jan 6, 2024

Allow dApp websites to easily integrate with EmailWallet by installing a JS script.

The JS script will

  • inject window.ethereum and listen to calls made to it based on the spec.
  • intercept transactions and generate calldata that matches Email Wallet Execute operation.
  • Generate a mail to link with subject like `Execute 0x{calldata}.
  • Open the mailto link.

The ideal behaviour for a Uniswap UI would be

  • User clicks "Use Email Wallet" button
  • UI reflects to show connected status
  • User enter amounts to swap, and click "Swap" button
  • Their email app opens with a new email to the relayer with subject "Execute: 0xababa..."
  • Once they send the email, the desired Swap happens.

There is a MVP / WIP in connect-email-wallet branch.

@saleel saleel added enhancement New feature or request idea Ideas that need to be discussed, and are not ready for development yet labels Jan 6, 2024
@Divide-By-0
Copy link
Member

So what's missing in the browser-connector branch?

@saleel
Copy link
Member Author

saleel commented Jan 6, 2024

Its only a MVP that opens the mailto link for a target+call data. We want a script that others can include in their UI that implements the functionality in generic way - ideally confirming to https://eips.ethereum.org/EIPS/eip-1193

@Divide-By-0
Copy link
Member

This can also be done by a chrome extension that injects itself into login flows.

@saleel
Copy link
Member Author

saleel commented May 29, 2024

It would be better if users don't have to install any extensions. Dapps can install our JS SDK to interact with user's email wallet.

  • In "browser-connector" model we open the mailto link for each transaction the user want to make in the dapp; or we send an email to the user and ask them to reply.
  • In "email-oauth" model we do email send/reply only once and then use ephemeral keys.

(both are kind of oauth as in "Sign in with Email Wallet", just differs in the flow/security model)

Anyway, implementation of browser-connector is not complete in this branch. There is a rough MVP, but there is no SDK that others can integrate yet.
We can probably close this issue, and open a new one later based on which of the above approach we are going to take.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idea Ideas that need to be discussed, and are not ready for development yet
Projects
None yet
Development

No branches or pull requests

2 participants