Skip to main content

GrazProvider

Provider component which wraps @tanstack/react-query's QueryClientProvider and various graz side effects

Usage

import { GrazProvider, WalletType } from "graz";

// example next.js application in _app.tsx
export default function CustomApp({ Component, pageProps }: AppProps) {
return (
<GrazProvider
grazOptions={{
defaultWallet: WalletType.KEPLR, // optional
// ...
}}
>
<Component {...pageProps} />
</GrazProvider>
);
}

Params

grazOptions(Optional)

  • defaultChain?: GrazChain;
  • defaultWallet?: WalletType;
  • onNotFound?: () => void;
  • autoReconnect?: boolean; -> Defaults to true, will try to reconnect when initial start(session empty)
  • onReconnectFailed?: () => void;
  • walletConnect?: WalletConnectStore | null