This example showcases how to use the Abstract Global Wallet react SDK with Thirdweb inside a Next.js application.
-
Get a copy of the
agw-thirdweb-nextjsexample directory from the Abstract Examples repository:mkdir -p agw-thirdweb-nextjs && curl -L https://codeload.github.com/Abstract-Foundation/examples/tar.gz/main | tar -xz --strip=2 -C agw-thirdweb-nextjs examples-main/agw-thirdweb-nextjs && cd agw-thirdweb-nextjs
-
Set up a Thirdweb API key:
- Go to the Thirdweb dashboard and create an account or sign in
- Navigate to the Project Settings tab and copy your project’s Client ID
- Create a
.env.localfile in the project root and add your client ID:NEXT_PUBLIC_THIRDWEB_CLIENT_ID=your-client-id-here
-
Install dependencies
npm install
-
Run the development server
npm run dev
Visit http://localhost:3000 to see the app.