@gelatonetwork/smartwallet-react-dynamic
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

@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-dynamic

Usage

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
}

Readme

Keywords

none

Package Sidebar

Install

npm i @gelatonetwork/smartwallet-react-dynamic

Weekly Downloads

221

Version

0.0.11

License

none

Unpacked Size

1.01 MB

Total Files

21

Last publish

Collaborators

  • brandon.cs
  • pedrogelato
  • aless-io
  • denispanov
  • mkykadir