Prerequisites
- A Privy application and app ID
- A React application
- A backend that issues short-lived Rhinestone JWTs
1
Install the dependencies
2
Configure Privy and wagmi
Import The Privy app ID is public application configuration. It is not your Rhinestone API key.
createConfig and WagmiProvider from @privy-io/wagmi so Privy and wagmi share connection state.3
Configure browser authentication
Do not put See security for the server boundary and sponsored-intent extension tokens.
RHINESTONE_API_KEY in a NEXT_PUBLIC_* variable. When the SDK runs in the browser, fetch short-lived tokens from your backend:4
Create the Rhinestone account
Wait until Privy is ready and wagmi returns a connected wallet client.
walletClientToAccount requires that client to have an active account.