This section will guide you through setting up Privy authentication and configuring Solana environment variables for The DAO Tool.
Privy handles secure wallet creation, which is attached to your account upon sign-up, while the Solana variables allow you to connect to your preferred RPC endpoint for on-chain operations.
1. Set Up Privy
Head to the Privy Dashboardarrow-up-right and follow these steps:
Select "Web" as the platform
Once created, you'll get:
You can also find these under App Settings → Basic section later.
For more, check out Privy Docsarrow-up-right to explore available auth flows and configuration options.
Add these to your /server/.env file:
To connect to the Solana network and perform wallet-based payouts, you need two key values.
This is a chain ID used for CAIP-2-compatible blockchain identification.
For Solana Mainnet, use:
For Devnet, use:
Read more about CAIP-2:
This is your RPC endpoint to send transactions and fetch account data.
You can use the public RPC or a private one (recommended for scale). Example:
You may also use providers like QuickNodearrow-up-right , Alchemyarrow-up-right , or Heliusarrow-up-right for improved speed and reliability.
That’s it! You’re all set to integrate Privy auth and connect your app to the Solana network.
Last updated 7 months ago