I am working on a web based game. And I want to connect Solana wallet to my website. How can I integrate Solana wallet adapter to my website. I've read Githubi but I don't understand where to write the codes or how to run them as I'm new to this stuff. What I want is as in the picture.
2 Answers
here is a solana game example with an anchor program: https://github.com/solana-developers/solana-game-starter-kits/tree/main/tiny-adventure/app
clone the repository, open it in visual studio code and then go into the folder tiny-adventure/app in the terminal and run
yarn install
and then
yarn dev
This will start up the next js client and you can play via wallet adapter.
You may need to install node and yarn https://nodejs.org/en/download https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable and maybe solana cli: https://docs.solana.com/de/cli/install-solana-cli-tools
Here's an easy to follow guide for integrating solana wallet adapter in your dapp.
https://www.solanawalletadapter.xyz/
Hope this helps!