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 .md to its URL, or by requesting it with Accept: text/markdown.

ReputationScore

Compact inline badge showing the agent's average feedback score and total review count.

Preview

Loading…

Usage

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

Examples

Without Count

Hide the review count for a more minimal display.

Loading…
<ReputationScore agentRegistry="eip155:8453:0x8004...a432" agentId={888} showCount={false} />

Higher Precision

Show two decimal places for more precise scores.

Loading…
<ReputationScore agentRegistry="eip155:8453:0x8004...a432" agentId={888} precision={2} />

In Context

ReputationScore in a marketplace card alongside the agent's image, name, and tag cloud.

Loading…
Loading…
<AgentProvider agentRegistry="eip155:8453:0x8004...a432" agentId={888}>
  <div className="flex items-center gap-3">
    <AgentImage />
    <div className="flex min-w-0 flex-1 items-center justify-between gap-3">
      <AgentName />
      <ReputationScore />
    </div>
  </div>
  <TagCloud />
</AgentProvider>

API Reference

agentRegistryoptional
type: string

Agent registry in the format "eip155:{chainId}:{contractAddress}". Required unless inside an <AgentProvider>.

agentIdoptional
type: number

ERC-721 token ID of the agent. Required unless inside an <AgentProvider>.

classNameoptional
type: string

Optional CSS classes merged onto the component root for layout, spacing, or custom styling (e.g. Tailwind).

showCountoptional
type: booleandefault: true

Show/hide the inline "AVG / N reviews" label beside the score.

precisionoptional
type: numberdefault: 1

Decimal places for the score display.

States

This component handles loading and error states internally with inline placeholders. No configuration needed.