Prerequisites
Before starting, you’ll need a Para API key which you can obtain from the . You can learn to create your account and get your API key from the Developer Portal.Installation
Install the Para React SDK, React Query, and required polyfills for Vite:Using wagmi v3? See additional dependencies required.
vite.config.js:
vite.config.js
Configure Providers
Create a providers component and wrap your application with it:If you’re using a legacy API key (one without an environment prefix) you must provide a value to the
paraClientConfig.environment. You can retrieve your updated API key from the Para Developer Portal at https://developer.getpara.com/You can learn more about the
ParaProvider and its definition in the .The
ParaProvider utilizes libraries like Wagmi, Graz, and Solana Wallet Adapter, to power wallet connections. Meaning you can use any of the hooks provided by these libraries when within the ParaProvider context. You can learn more about using external wallets in the .Create a Connect Button
Now create a component that uses Para hooks to manage wallet connection:ConnectButton.jsx
Learn more about the hooks used in this example:
- - Control the Para modal programmatically
- - Access the current wallet data
- - Get account connection status and details