# EndpointStatus

**Slug:** `endpoint-status`  
**Import:** `import { EndpointStatus } from "@p4n/erc8004-ui"`

> **NOTE — unofficial library.** `@p4n/erc8004-ui` is an independent, community-built project. It is not affiliated with, maintained by, or endorsed by the authors of ERC-8004. It reads the standard's on-chain data through public subgraphs; it does not speak for the standard.

## Description

Lists all registered service endpoints (MCP, A2A, OASF, web, email) with protocol labels and optional live health check indicators.

## Usage

```tsx
import { EndpointStatus } from "@p4n/erc8004-ui"
<EndpointStatus agentRegistry="eip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432" agentId={888} />
```

## Examples

### With Health Checks

Enable live HTTP health checks to show green/red status dots for each endpoint.

```tsx
<EndpointStatus agentRegistry="eip155:8453:0x8004...a432" agentId={888} showHealthChecks />
```

### Filtered Protocols

Show only MCP and A2A endpoints.

```tsx
<EndpointStatus agentRegistry="eip155:8453:0x8004...a432" agentId={888} protocols={["mcp", "a2a"]} />
```

## In Context

EndpointStatus alongside an AgentCard to form a complete identity view.

```tsx
<AgentProvider agentRegistry="eip155:8453:0x8004...a432" agentId={888}>
  <div className="w-full max-w-md space-y-4">
    <AgentCard />
    <EndpointStatus />
  </div>
</AgentProvider>
```

## API Reference

| Prop | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `agentRegistry` | `string` | no | — | Agent registry in the format "eip155:{chainId}:{contractAddress}". Required unless inside an <AgentProvider>. |
| `agentId` | `number` | no | — | ERC-721 token ID of the agent. Required unless inside an <AgentProvider>. |
| `className` | `string` | no | — | Optional CSS classes merged onto the component root for layout, spacing, or custom styling (e.g. Tailwind). |
| `showHealthChecks` | `boolean` | no | `false` | Show live HTTP health check dots. Opt-in because pings can be slow. |
| `protocols` | `Array<"mcp" \| "a2a" \| "oasf" \| "web" \| "email">` | no | — | Filter which protocols are shown. Default shows all. |
| `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | no | `3` | Heading level for this component's title. The default is the level it was previously hardcoded to, so leaving it alone renders exactly as before. Set it to keep the component from breaking the surrounding page's heading order. |

## States

This component handles loading, error, empty, and not-found states internally. A skeleton placeholder is shown while fetching, an error message with details appears if the Subgraph is unreachable, and a short message is displayed when no data exists for this agent.

## Reference

- Live preview & full docs: https://erc8004-ui.vercel.app/docs/components/endpoint-status
- Markdown source: https://erc8004-ui.vercel.app/docs/components/endpoint-status.md
