0.0.9 • Published 5 months ago
@gelatonetwork/smartwallet-react-dynamic v0.0.9
@gelatonetwork/smartwallet-react-dynamic
A React package that provides integration with Dynamic WaaS (Wallet-as-a-Service) for Gelato Smart Wallet.
Features
- Dynamic 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-dynamicUsage
Provider Setup
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>
);
}Using the Connect Button
import { GelatoSmartWalletDynamicConnectButton } from '@gelatonetwork/smartwallet-react-dynamic';
function ConnectWallet() {
return (
<GelatoSmartWalletDynamicConnectButton>
Connect Wallet
</GelatoSmartWalletDynamicConnectButton>
);
}Accessing Wallet Context
import { useGelatoSmartWalletDynamicContext } from '@gelatonetwork/smartwallet-react-dynamic';
function YourComponent() {
const { wagmi, logout, switchNetwork } = useGelatoSmartWalletDynamicContext();
// Use the context values as needed
}0.0.9
5 months ago
0.0.8
5 months ago
0.0.7
5 months ago
0.0.6
5 months ago
0.0.5
6 months ago
0.0.4
6 months ago
0.0.3
6 months ago
0.0.2
6 months ago
0.0.2-alpha.7
6 months ago
0.0.2-alpha.6
6 months ago
0.0.2-alpha.5
6 months ago
1.0.0-alpha.6
6 months ago
0.0.2-alpha.4
6 months ago
0.0.2-alpha.3
6 months ago
0.0.2-alpha.1
6 months ago
0.0.2-alpha.0
6 months ago