{"id":23448800,"url":"https://github.com/zkfriendly/erc4337emailwallet","last_synced_at":"2025-06-25T16:04:50.965Z","repository":{"id":257445270,"uuid":"857831873","full_name":"zkfriendly/Erc4337EmailWallet","owner":"zkfriendly","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-26T06:46:34.000Z","size":45311,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T02:49:46.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zkfriendly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-15T18:10:02.000Z","updated_at":"2024-11-06T07:59:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"dec7af0a-37f5-4935-944e-830bb05a5ad7","html_url":"https://github.com/zkfriendly/Erc4337EmailWallet","commit_stats":null,"previous_names":["zkfriendly/erc4337emailwallet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zkfriendly/Erc4337EmailWallet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfriendly%2FErc4337EmailWallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfriendly%2FErc4337EmailWallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfriendly%2FErc4337EmailWallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfriendly%2FErc4337EmailWallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkfriendly","download_url":"https://codeload.github.com/zkfriendly/Erc4337EmailWallet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfriendly%2FErc4337EmailWallet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261906776,"owners_count":23228348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-23T22:18:43.594Z","updated_at":"2025-06-25T16:04:50.929Z","avatar_url":"https://github.com/zkfriendly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ERC4337 Email Wallet\n\nThis project implements an Email Wallet using the ERC4337 standard.\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- [Docker](https://www.docker.com/) installed and running\n- [Node.js](https://nodejs.org/) and npm (or [Yarn](https://yarnpkg.com/))\n\n### Setup\n\n0. Setup environment variables:\n\n   ```bash\n   cp .env.example .env\n   ```\n\n   Edit `.env` with your providers SMTP and IMAP credentials. SMPT is used to send emails to users when they want to create an account or send transactions. IMAP is used to receive emails from users.\n\n1. Start the local blockchain node and bundler:\n\n   ```bash\n   docker compose up\n   ```\n\n2. Open a new terminal and install contract dependencies and setup environment variables (the default values should work for most users):\n\n   ```bash\n   cd contracts \u0026\u0026 yarn \u0026\u0026 cp .env.example .env\n   ```\n\n## 🧪 Testing (Optional)\n\nRun the smart contract tests:\n```bash\nnpx hardhat test --network dev\n```\n\n### Controlling test environment\n\nYou can control the test environment by setting the `BUNDLER` environment variable to either `unsafe` or `safe`. The default is `safe`.\n\n- `unsafe` will use the unsafe bundler which does not enforce limitations like storage access.\n- `safe` will use the safe bundler which enforces limitations like storage access.\n\nAlso the `STAKE_ACCOUNT` environment variable can be set to `true` to automatically stake ETH to the email account.\nThis is useful for when working with the safe bundler that only works with stakes.\n\n## 📤 Send Transaction\n\nYou can send a transaction using the provided Hardhat task `esend-eth`.\n\n1. Make sure you are in the `contracts` directory:\n\n2. Run the `esend-eth` task with the user's email address and the transaction details as parameters - note this tool only supports sending ETH to an address, however the underlying Email Account contract supports any ERC-4337 `userOperation`:\n\n   ```bash\n   npx hardhat esend-eth --useremail user@example.com --amount 2 --to 0x742d35Cc6634C0532925a3b844Bc454e4438f44e --network dev\n   ```\n\nReplace `user@example.com` with the actual email address of the user, `1` with the amount of ETH to send, and `0xRecipientEthereumAddress` with the actual recipient address.\n\nThis task will send a confirmation request to the user's email address. Once the user replies to the email, the transaction will be sent to the chain.\n\n## 📧 Create New Email Account (Optional)\n\n***If you want to test sending a transaction you don't need to create an email account first, an Email Account will be created automatically when you want to send the first transaction.***\n\nYou can create a new email account using the provided Hardhat task.\n\n1. Make sure you are in the `contracts` directory:\n\n2. Run the `create-eaccount` task with the user's email address as a parameter:\n\n   ```bash\n   npx hardhat create-eaccount --useremail user@example.com\n   ```\n\nReplace `user@example.com` with the actual email address of the user you want to create an account for.\n\nThis task will send a welcome email to the specified email address.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfriendly%2Ferc4337emailwallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkfriendly%2Ferc4337emailwallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfriendly%2Ferc4337emailwallet/lists"}