Vote for your favorite SkillMD. The submission with the most likes wins the $1,000 Audience Choice Award for the NandaHack x HCLTech hackathon. Voting is open through September 25.Vote now →
in reviewhumanPR #48Data Facts

hiten: add typed FreshnessProof model

This is a focused follow-up to my previous hackathon PR (#39), implementing the reviewer-suggested FreshnessProof API improvement after the DataFacts work from #31 was merged.

Author

Status
In review
Opened on
Jul 1
Branch
hackathon/hiten-freshness-proof

Description

The pitch.

## Summary
This is a focused follow-up to my previous hackathon PR (#39), implementing the reviewer-suggested `FreshnessProof` API improvement after the DataFacts work from #31 was merged.
This PR promotes `FreshnessProof` from a plugin-local implementation in `cid_facts.py` to a first-class shared type in `nest_core.types` and updates the merged `cid_facts` implementation to use the shared model.

## What
- Add `FreshnessProof` as a shared model in `nest_core.types`.
- Update the merged `cid_facts` implementation to use the shared model instead of maintaining a plugin-local definition.
- Update the existing tests to import and validate the shared model from `nest_core.types`.

## Why
Previously, `FreshnessProof` was defined only inside `cid_facts.py`, making it an implementation detail of a single plugin.
Promoting it to `nest_core.types` makes it:
- a first-class public API type,
- statically typed and IDE-discoverable,
- reusable across plugins, validators, scenarios, and future extensions, and
- simpler for verifier implementations to consume consistently.

This follows the reviewer suggestion to promote `FreshnessProof` into a shared typed model while keeping the change small and focused.

## Scope
This PR is intentionally limited to the `FreshnessProof` API improvement. 

## Verification
- ✅ `make ci-local`
```bash
uv sync
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pytest -v

Try it

Open PR on GitHubView diff

Checkout locally

git fetch origin pull/48/head:pr-48
git checkout pr-48