https://github.com/alchemyplatform/embedded-accounts-demo
Demo for Alchemy Embedded Accounts
https://github.com/alchemyplatform/embedded-accounts-demo
Last synced: 12 months ago
JSON representation
Demo for Alchemy Embedded Accounts
- Host: GitHub
- URL: https://github.com/alchemyplatform/embedded-accounts-demo
- Owner: alchemyplatform
- Created: 2024-02-29T16:21:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T19:26:26.000Z (about 2 years ago)
- Last Synced: 2024-04-14T02:45:04.707Z (about 2 years ago)
- Language: TypeScript
- Size: 1.08 MB
- Stars: 2
- Watchers: 6
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is an example of an Alchemy Embedded Account using an Alchemy Signer to enable secure auth and transaction flows using ERC-4337 smart accounts! Learn more in our [docs](https://accountkit.alchemy.com/signers/alchemy-signer.html).
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Setup
Create your own `.env` file by copying the `.sample.env` file.
To use the Alchemy Signer in this demo, you will need to:
1. Create an Alchemy App and get your API Key. Go to the [Alchemy Dashboard](https://dashboard.alchemy.com/signup/?a=aa-docs). Create a new app on Ethereum Sepolia. Access your credentials for this app then paste the API KEY and the RPC URL in to the `.env` file.

2. Create a new account config in your [Alchemy Accounts Manager Dashbord](https://dashboard.alchemy.com/accounts). Make sure to set the redirect url to http://localhost:3000 for testing this demo and connect this to the app you made in step 1.

The account config allows you to customize the signup and login authentication email that will be sent to users when logging in to your dapp. Apply the config to the app your created in the step above.

## Getting Started
Make sure you are using Node.js version >= 18.17.0.
Install dependencies:
```bash
npm install
# or
yarn install
```
Run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.