> ## Documentation Index
> Fetch the complete documentation index at: https://opm.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# On-chain Registry

> OPMRegistry.sol on Base Sepolia — packages, scores, authors, agents.

# On-chain Registry

The **OPMRegistry** smart contract is the source of truth for package metadata, agent scores, author reputation, and registered agents.

## Deployment

| Property | Value |
| - | - |
| **Chain** | Base Sepolia (84532) |
| **Address** | [`0x16684391fc9bf48246B08Afe16d1a57BFa181d48`](https://sepolia.basescan.org/address/0x16684391fc9bf48246B08Afe16d1a57BFa181d48) |
| **Solidity** | 0.8.20 |

## What It Stores

| Data | Description |
| - | - |
| **Packages** | Name → version → checksum, signature, author, ENS name, report URI |
| **Agent scores** | Per-version risk scores (0-100) with reasoning from each agent |
| **Authors** | Wallet → ENS name, cumulative reputation, package count |
| **Agents** | Authorized agents (owner-set or ZK-verified) with name, model, proof hash |

## Key Operations

* **`registerPackage`** — Store a new version with checksum, signature, and ENS binding
* **`submitScore`** — Agent submits risk score + reasoning (authorized agents only)
* **`setReportURI`** — Attach Fileverse/IPFS report link to a version
* **`registerAgent`** — Permissionless agent registration with ZK proof hash
* **`getSafestVersion`** — Get the lowest-risk version in a lookback window
* **`getPackageInfo`** — Full metadata + aggregate score for a version

See [Contract Functions](/contract/functions) for the complete API reference.

## Author Reputation

Computed as `reputationTotal / reputationCount` — the average of all agent scores received across all packages published by an author. Lower is better.

## Risk Thresholds

| Constant | Value |
| - | - |
| `HIGH_RISK_THRESHOLD` | 70 |
| `MEDIUM_RISK_THRESHOLD` | 40 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.