For the complete documentation index, see /llms.txt. A single-fetch full bundle is at /llms-full.txt. Every docs page is also available as Markdown by appending.mdto its URL, or by requesting it withAccept: text/markdown.
ERC8004Provider
Root context provider that holds infrastructure config — your Graph API key and optional subgraph URL overrides. Wrap your app once at the top level. Automatically creates an internal QueryClient if TanStack Query is not already set up in your app.
Usage
import { ERC8004Provider } from "@erc8004/ui"import { ERC8004Provider } from "@erc8004/ui"
// Minimal setup — no TanStack Query knowledge required:
function App() {
return (
<ERC8004Provider apiKey="your-graph-api-key">
{/* your app */}
</ERC8004Provider>
)
}
// If you already use TanStack Query, ERC8004Provider detects it
// and shares the existing cache — no duplicate clients:
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
const queryClient = new QueryClient()
function App() {
return (
<QueryClientProvider client={queryClient}>
<ERC8004Provider apiKey="your-graph-api-key">
{/* your app */}
</ERC8004Provider>
</QueryClientProvider>
)
}API Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey | string | Yes | — | Your Graph API key. Used to authenticate Subgraph requests. Safe to use in frontend code — read-only. |
subgraphOverrides | Record<number, string> | No | — | Optional map of chainId → custom Subgraph URL. Overrides the default endpoint for that chain. |
className | string | No | — | Optional CSS classes merged onto the .erc8004 wrapper. Use for scoping dark mode (.dark) or custom layout. |
children | ReactNode | Yes | — | Your application tree. |