Skip to content

[Hackathon] hiten: add typed FreshnessProof model#48

Open
Hiten0305l wants to merge 1 commit into
projnanda:mainfrom
Hiten0305l:hackathon/hiten-freshness-proof
Open

[Hackathon] hiten: add typed FreshnessProof model#48
Hiten0305l wants to merge 1 commit into
projnanda:mainfrom
Hiten0305l:hackathon/hiten-freshness-proof

Conversation

@Hiten0305l

@Hiten0305l Hiten0305l commented Jul 1, 2026

Copy link
Copy Markdown

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
uv sync
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pytest -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant