This is a demo NextJS app that showcases how requester applications can use RainbowKit to connect to Privy wallets created by provider applications. Requester apps do not need to be using Privy to access the cross app wallets, they can simply use the RainbowKit connector as provided in the @privy-io/cross-app-connect
package.
To try the demo, go to https://cross-app-connect-demo.vercel.app/ and connect to the provider app wallet. Once connected, click the buttons to invoke various wagmi
hooks, like useSignMessage
, to interface with your connected cross app wallet.
Check out our cross app connect docs for more guidance!
- Fork this repository, clone it, and open it in your terminal.
git clone https://github.com/<your-github-handle>/cross-app-connect-demo
- Install the necessary dependencies by running
npm i
.
In your project directory, run npm run dev
. You can now visit http://localhost:3000 to see your app and login with Privy!
src/config
for how to add the Privy wallet connector to your RainbowKit ConnectButton
.
src/pages/components
for how to use Wagmi hooks to interact with the cross app wallet.