Initialization
In this doc and the three following we will build a Next.js application with Alchemy Smart Wallets from scratch. If you’re using any other tech stack, follow along with the key points of integration and adjust as needed!
Create a new Next.js app
Start by initializing a new Next.js app. Run:
This command passes in flags to use Typescript, Tailwind and the next app router. The following docs in this guide will expect you to use these.
Install Dependencies
You will need these three libraries:
- @account-kit/infra: Core interfaces and functions for Smart Wallets (learn more)
- @account-kit/react: React Hooks, components and utilities for Smart Wallets (learn more)
- @tanstack/react-query: A required async state library to make smart wallet react hooks easier to use (learn more about this library’s motivation here)
Go ahead and install them to the project with a single command: