-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Example docs * fix and sort * non private
- Loading branch information
Showing
7 changed files
with
35 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,25 @@ | ||
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). | ||
# Sound.xyz SDK + Viem + Wagmi + Next.js Example | ||
|
||
## Getting Started | ||
This example uses: | ||
|
||
First, run the development server: | ||
- `Next.js` https://nextjs.org/ | ||
- `Typescript` https://www.typescriptlang.org/ | ||
- `Wagmi` https://wagmi.sh/ | ||
- `Viem` https://viem.sh/ | ||
- `Tailwind` https://tailwindcss.com/ | ||
- `Tanstack Query` aka `React Query` https://tanstack.com/query | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
With the help of libraries like: | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
- `radix-ui/themes` https://www.radix-ui.com/ | ||
- `Zod` https://zod.dev/ | ||
- `Valtio` https://valtio.pmnd.rs/ | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
## Breakdown of important scripts | ||
|
||
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. | ||
- [./src/context/wagmi.tsx](./src/context/wagmi.tsx) **Wagmi** initialization and importing **Sound.xyz SDK** | ||
- [./src/context/wallet.ts](./src/context/wallet.ts) **Viem** initialization and importing **Sound.xyz SDK**, this integration will vary depending on custom wallet integration, this example only includes a secret-key implementation that is not suitable for production environments | ||
- [./src/context/sound.ts](./src/context/sound.ts) **Sound.xyz API + SDK** client initialization | ||
- [./src/app/v2/page.tsx](./src/app/v2/page.tsx) **Sound Edition V2 usage** (Tiered Editions) | ||
- [./src/app/v1/page.tsx](./src/app/v1/page.tsx) **Sound Edition V1 usage** (Previous Tiered Edition Upgrade) | ||
- [./src/app/v1/sam/page.tsx](./src/app/v1/sam/page.tsx) **Sound Edition V1 with SAM/Sound Swap usage** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import { SoundAPI } from '@soundxyz/sdk/api/sound' | ||
|
||
export const soundApi = SoundAPI({ | ||
// Remove this line to use the production API | ||
apiEndpoint: 'https://preview.api.sound.xyz/graphql', | ||
|
||
// Change with your own API key | ||
apiKey: 'preview-no-key', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.