Skip to main content
Privy handles authentication and embedded wallet creation. Convert its connected wagmi wallet client to a viem account, then use that account as a Rhinestone owner. For Solana, see the common authority recipe and remote signer requirements. This guide covers Ethereum signers, not a new vendor Solana integration; Ed25519 wallets are not supported Swig authorities.

Prerequisites

  • A Privy application and app ID
  • A React application
  • A backend that issues short-lived Rhinestone JWTs
1

Install the dependencies

These examples target SDK 3.0.0, which is not released yet. The install command below requires its publication; the current v2 package does not support these APIs.
2

Configure Privy and wagmi

Import createConfig and WagmiProvider from @privy-io/wagmi so Privy and wagmi share connection state.
The Privy app ID is public application configuration. It is not your Rhinestone API key.
3

Configure browser authentication

Do not put RHINESTONE_API_KEY in a NEXT_PUBLIC_* variable. When the SDK runs in the browser, fetch short-lived tokens from your backend:
See security for the server boundary and sponsored-intent extension tokens.
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.
For sponsored transactions, follow sponsorship setup. For transaction preparation and submission, continue to send a transaction. See the Privy documentation for additional login methods and embedded wallet settings.