UNPKG

@jim4565/dapp-wrapper-react

Version:

React components and hooks for @jim4565/dapp-wrapper with persistent wallet connection

35 lines 1.17 kB
import React, { ReactNode } from 'react'; import { WalletState, WalletActions, IncentivWalletConfig, ContractConfig } from '../types'; /** * Context Interface - wagmi-inspired API */ interface IncentivWalletContextValue extends WalletState, WalletActions { isReady: boolean; connector: string | undefined; registerContracts: (contracts: ContractConfig[]) => void; getContract: (name: string) => any; refreshBalance: () => Promise<void>; balance: string | undefined; isBalanceLoading: boolean; } /** * Provider Props */ interface IncentivWalletProviderProps { children: ReactNode; config?: IncentivWalletConfig; enableLogging?: boolean; } /** * IncentivWalletProvider - Professional React Context Provider * * Implements 3-Tier Reconnection Strategy and provides wagmi-style API * for seamless wallet connection management across the entire app. */ export declare const IncentivWalletProvider: React.FC<IncentivWalletProviderProps>; /** * Hook to use the wallet context */ export declare const useIncentivWalletContext: () => IncentivWalletContextValue; export {}; //# sourceMappingURL=IncentivWalletProvider.d.ts.map