A React package that provides integration with Dynamic WaaS (Wallet-as-a-Service) for Gelato Smart Wallet.
- Dynamic 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-dynamic
import { GelatoSmartWalletDynamicContextProvider } from '@gelatonetwork/smartwallet-react-dynamic';
function App() {
return (
<GelatoSmartWalletDynamicContextProvider
settings={{
waas: {
appId: 'your-dynamic-app-id'
},
defaultChain: yourDefaultChain,
wagmi: {
config: yourWagmiConfig
}
}}
>
<YourApp />
</GelatoSmartWalletDynamicContextProvider>
);
}
import { GelatoSmartWalletDynamicConnectButton } from '@gelatonetwork/smartwallet-react-dynamic';
function ConnectWallet() {
return (
<GelatoSmartWalletDynamicConnectButton>
Connect Wallet
</GelatoSmartWalletDynamicConnectButton>
);
}
import { useGelatoSmartWalletDynamicContext } from '@gelatonetwork/smartwallet-react-dynamic';
function YourComponent() {
const { wagmi, logout, switchNetwork } = useGelatoSmartWalletDynamicContext();
// Use the context values as needed
}