Here, we'll configure the essential component of the SDK to enable proper functionality for the hooks.
AzuroSDKProvider
The initial step involves setting up a AzuroSDKProvider
with the configurations. This setup is all that is required to initiate the use of SDK Hooks.
import { AzuroSDKProvider } from '@azuro-org/sdk'
import { WagmiProvider, createConfig } from 'wagmi'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { polygonAmoy } from 'viem/chains'
const wagmiConfig = createConfig(config)
const queryClient = new QueryClient()
function Providers(props: { children: React.ReactNode }) {
const { children } = props
return (
<QueryClientProvider client={queryClient}>
<WagmiProvider config={wagmiConfig}>
<AzuroSDKProvider initialChainId={polygonAmoy.id}>
{children}
</AzuroSDKProvider>
</WagmiProvider>
</QueryClientProvider>
)
}
For further details, refer to the AzuroSDKProvider section.
⚠️
The AzuroSDKProvider requires access to the Wagmi context.