A React package that provides integration with Privy WaaS (Wallet-as-a-Service) for Gelato Smart Wallet.
- Privy WaaS integration for Gelato smart wallet management
- Connect button component for easy wallet connection
- Integration with wagmi for Web3 functionality
pnpm add @gelatonetwork/smartwallet-react-privy
import { GelatoSmartWalletPrivyContextProvider } from '@gelatonetwork/smartwallet-react-privy';
function App() {
return (
<GelatoSmartWalletPrivyContextProvider
settings={{
waas: {
appId: 'your-privy-app-id'
},
defaultChain: yourDefaultChain,
wagmi: {
config: yourWagmiConfig
}
}}
>
<YourApp />
</GelatoSmartWalletPrivyContextProvider>
);
}
import { GelatoSmartWalletPrivyConnectButton } from '@gelatonetwork/smartwallet-react-privy';
function ConnectWallet() {
return (
<GelatoSmartWalletPrivyConnectButton>
Connect Wallet
</GelatoSmartWalletPrivyConnectButton>
);
}
import { useGelatoSmartWalletPrivyContext } from '@gelatonetwork/smartwallet-react-privy';
function YourComponent() {
const { wagmi, logout, switchNetwork } = useGelatoSmartWalletPrivyContext();
// Use the context values as needed
}