The ZK-Email Wallet is a unique type of non-custodial cryptocurrency wallet that is managed via email. This document provides an overview of its features and future development plans. You can try our demo at https://emailwallet.org, and view broader docs at emailwallet.org/docs.
For the source code of the contracts, relayers, and other infrastructure, see the main repo here: github.com/zkemail/email-wallet.
The ZK-Email Wallet currently supports the following functions:
Currently, the wallet uniquely provides the following features:
For each transaction, you send an email. This email can be formatted for you on https://emailwallet.org, or you can simply email "relayer@sendeth.org" with a subject like "Send 2 DAI to friend@gmail.com". The relayer will automatically deploy a new wallet for you (if you don't have one) that can only be authorized via emails from you. If you want to test without any Goerli assets, you can start trying to send TEST token like "Send 2 TEST to friend@gmail.com", which will automatically spend from a free 10 token starting balance.
This money is sent to a smart contract wallet authorized to your friend's email address (in this case, friend@gmail.com), meaning only emails from them can spend the money. This transaction occurs in wallets on-chain, and neither the relayer nor us can steal your funds (since we can't generate a fake email from you with the correct cryptographic signatures, only your email provider can). Currently, transfers happen on Goerli -- dm us if you need free Goerli ETH/DAI/USDC to test it out!
If you want to mass-send to a lot of email addresses at once, right now you have to send one email per transaction.
All sent emails are typically signed using a private key that is managed by your email domain server via the DKIM protocol. This signature is included in the headers of the email.
The DKIM signature serves to authenticate that the email was indeed sent by you, thereby providing a secure means to manage your wallet. Rather than verifying the signature directly on-chain, a zero-knowledge (zk) proof of the signature is generated by a permissionless entity, known as the relayer, and subsequently verified on-chain. The relayer also masks out all of the email addresses to ensure that they are not published publicly on-chain. This authorizes a transaction only if the email is formatted exactly correctly, or else the entire transaction will revert.
Below is an illustration of a standard interaction with the wallet:
Note that email addresses are salted via the message ID of your email, so you can always retrieve your own on-chain address without the relayer's help. Neither the email nor email address are on-chain; they are kept private.
For a more detailed technical breakdown of the cryptographic technology used in emails, read the technical blog post behind zk-email! For a more in-depth technical breakdown of our code, read through our Github repository! For a detailed breakdown of the protocol, read through our presentation slides.
Copy .env.example to .env and fill in the Alchemy API key, and include your deployed relayer API URL (ours is included as an example).
yarn
yarn dev
We use this command to deploy on Render:
sed -i 's|// output: "export",|output: "export",|' next.config.js && yarn; yarn build; yarn next export; ls -alhk && ls ./out
and set the publish directory to out/.
In the next month or two, we intend to prioritize: