IMPORTANT: Use node v16.x - current node version on Mac is v18.x, but it introduces breaking changes!
This repo contains instructions on how to add Wallet Connect support to your app and connect it with Stacks wallet (thourh Stacks.js API).
The repo contains of 3 things that should be ready to run:
-
Wallet - react app that simulates a wallet - modified to support Stacks
Original repo: https://github.com/WalletConnect/web-examples/tree/main/wallets/react-wallet-v2
-
Web App - react app that we implement the Wallet Connect to.
This is a pure Create React App project that starts from "zero" to what's in the repo - see the README.md file!
-
Stacks Wallet Connect - helper functions and constants used in the wallet itself - we'll probably get rid of it so don't get too attached to it ;)
-
Clone the repo (obviously)
-
Insall dependencies in all 3 directories
cd wallet/webapp/stacks-wallet-connect yarn
-
Create linkable
@web3devs/stacks-wallet-connect
packagecd stacks-wallet-connect yarn build yarn link
-
Link the package in wallet
cd wallet yarn link @web3devs/stacks-wallet-connect
-
Starting the development environment
cd webapp yarn start cd .. cd wallet yarn dev
-
Read the WebApp README!