Privy supports Solana clusters such as Mainnet Beta, Devnet, and Testnet.

To configure the Solana clusters to use in your application and custom RPC URLs for it, pass an array of clusters to the config.solanaClusters prop of the PrivyProvider:

<PrivyProvider
  appId="your-privy-app-id"
  config={{
    ...theRestOfYourConfig,
    // Replace this with your required clusters and custom RPC URLs
    solanaClusters: [{name: 'mainnet-beta', rpcUrl: 'https://api.mainnet-beta.solana.com'}]
  }}
>
  {/* your app's content */}
</PrivyProvider>

Each cluster in the array should be an object with the following fields:

FieldTypeDescription
name'mainnet-beta' | 'devnet' | 'testnet'Name of the Solana cluster.
rpcUrlstringCustom RPC URL for the cluster. We strongly recommend using a custom RPC URL in production to avoid rate limiting on public RPC endpoints.

Custom Solana Virtual Machine (SVM) networks

In addition to supporting transactions on Solana mainnet, devnet, and testnet, Privy also supports sending transactions on any blockchain that implements the Solana Virtual Machine (SVM).

You can send a transaction on a custom SVM by initializing the Connection instance for your transaction with the RPC URL for the SVM, like so:

// Initialize connection instance with custom SVM RPC URL
let connection = new Connection('insert-custom-SVM-rpc-url');

// Build out the transaction object for your desired program
// https://solana-labs.github.io/solana-web3.js/classes/Transaction.html
let transaction = new Transaction();

// Send transaction on custom SVM
console.log(await wallet.sendTransaction!(transaction, connection));