0.0.9 • Published 8 months ago
@gelatonetwork/smartwallet-react-privy v0.0.9
@gelatonetwork/smartwallet-react-privy
A React package that provides integration with Privy WaaS (Wallet-as-a-Service) for Gelato Smart Wallet.
Features
- Privy WaaS integration for Gelato smart wallet management
- Connect button component for easy wallet connection
- Integration with wagmi for Web3 functionality
Installation
pnpm add @gelatonetwork/smartwallet-react-privyUsage
Provider Setup
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>
);
}Using the Connect Button
import { GelatoSmartWalletPrivyConnectButton } from '@gelatonetwork/smartwallet-react-privy';
function ConnectWallet() {
return (
<GelatoSmartWalletPrivyConnectButton>
Connect Wallet
</GelatoSmartWalletPrivyConnectButton>
);
}Accessing Wallet Context
import { useGelatoSmartWalletPrivyContext } from '@gelatonetwork/smartwallet-react-privy';
function YourComponent() {
const { wagmi, logout, switchNetwork } = useGelatoSmartWalletPrivyContext();
// Use the context values as needed
}0.0.9
8 months ago
0.0.8
8 months ago
0.0.7
8 months ago
0.0.6
8 months ago
0.0.5
8 months ago
0.0.4
8 months ago
0.0.3
9 months ago
0.0.2
9 months ago
0.0.2-alpha.7
9 months ago
0.0.2-alpha.6
9 months ago
0.0.2-alpha.5
9 months ago
1.0.0-alpha.6
9 months ago
0.0.2-alpha.4
9 months ago
0.0.2-alpha.3
9 months ago
0.0.2-alpha.1
9 months ago
0.0.2-alpha.0
9 months ago