Skip to content

Add a zkFetch example - #2

Merged
predatorx7 merged 3 commits into
mainfrom
feat/zkfetch-example
Nov 11, 2026
Merged

predatorx7 merged 3 commits into
mainfrom
feat/zkfetch-example

Conversation

@predatorx7

@predatorx7 predatorx7 commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

What

A new packages/zkfetch workspace: a script that proves the <title> of https://example.org with zkFetch in Builder mode (new ReclaimClient({ orgToken })), then verifies the proof with verifyRequestProof from @reclaimprotocol/client, which trusts Builder's JWKS by default. It's for proving a response your own server fetches, with no user or provider involved.

  • npm run zkfetch from the root. It needs packages/zkfetch/.env with RECLAIM_ORG_SECRET, and each run uses one unit of ZKFETCH quota.
  • Root typecheck covers the new package; README and AGENTS.md describe it.

Testing

  • npm run typecheck.
  • npm run zkfetch against production: proved in 7.7s and verified the title.

Before merging

Requires @reclaimprotocol/client 0.1.47 (reclaimprotocol/developer-tools#24), which trusts Builder's JWKS by default, so the script passes no attestorJwksUrl. After 0.1.47 is on npm, run npm install and commit the lockfile, which still records 0.1.46. Verified locally against a packed 0.1.47: proved and verified.

Builder-mode zkFetch runs in a TEE by default once reclaimprotocol/zk-fetch#41 is released (about 2.5s per proof).

🤖 Generated with Claude Code

packages/zkfetch proves the <title> of example.org with zkFetch in
Builder mode, using the org key, and verifies the proof with
verifyRequestProof from @reclaimprotocol/client. Run it with
npm run zkfetch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@reclaim-pr-agent reclaim-pr-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Reclaim PR Agent after an automated GPT-5.6 Terra review.

@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130447887312

Result Head Blocking findings Ponytail suggestions Check
Approved 5385fad0aa93 0 2 View run

Reviewed all 3 diff chunks. No blocking defects found.

# Ponytail suggestion
1 packages/zkfetch/package.json:L4: delete: empty description metadata. Nothing.
2 packages/zkfetch/package.json:L6: delete: empty author metadata. Nothing.
Full findings and Ponytail review

Ponytail suggestions:

  • packages/zkfetch/package.json:L4: delete: empty description metadata. Nothing.
  • packages/zkfetch/package.json:L6: delete: empty author metadata. Nothing.

net: -2 lines possible.

@reclaimprotocol/client 0.1.47 trusts Builder's JWKS by default, so the
example no longer passes attestorJwksUrl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130455001639

Result Head Blocking findings Ponytail suggestions Check
Changes required 7d85493e731e 1 1 View run
# Finding
1 package-lock.json: the packages/zkfetch lock entry declares @reclaimprotocol/client: ^0.1.46 and the resolved module is 0.1.46, but packages/zkfetch/package.json requires…
# Ponytail suggestion
1 packages/zkfetch/package.json:L4-6: delete: empty description, license, and author metadata. Nothing.
Full findings and Ponytail review
  • package-lock.json: the packages/zkfetch lock entry declares @reclaimprotocol/client: ^0.1.46 and the resolved module is 0.1.46, but packages/zkfetch/package.json requires ^0.1.47. This makes the committed lockfile inconsistent with the manifest; a clean npm ci will reject it (or users must mutate the lockfile with npm install) before the documented example can run. Smallest safe fix: regenerate/update package-lock.json using the current workspace manifest so its workspace dependency and resolved @reclaimprotocol/client version satisfy ^0.1.47 (or, if 0.1.47 is intentionally unavailable, revert the manifest and corresponding code to the compatible 0.1.46 setup).

Ponytail suggestions:

  • packages/zkfetch/package.json:L4-6: delete: empty description, license, and author metadata. Nothing.

net: -3 lines possible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130468946038

Result Head Blocking findings Ponytail suggestions Check
Changes required 2453f25c5c80 1 1 View run
# Finding
1 package-lock.json is inconsistent with packages/zkfetch/package.json: the workspace declares @reclaimprotocol/client: ^0.1.47, while the lockfile's resolved client version…
# Ponytail suggestion
1 packages/zkfetch/package.json:L4,L6: delete: empty description and author metadata. Nothing.
Full findings and Ponytail review
  • package-lock.json is inconsistent with packages/zkfetch/package.json: the workspace declares @reclaimprotocol/client: ^0.1.47, while the lockfile's resolved client version remains 0.1.46. A clean npm ci rejects an out-of-sync lockfile (or leaves the user to mutate it with npm install) before npm run zkfetch can run; moreover, this example relies on the 0.1.47 Builder-JWKS verification behavior. Smallest safe fix: run npm install after 0.1.47 is available and commit the resulting lockfile so both the packages/zkfetch lock entry and resolved node_modules/@reclaimprotocol/client satisfy ^0.1.47.

Ponytail suggestions:

  • packages/zkfetch/package.json:L4,L6: delete: empty description and author metadata. Nothing.

net: -2 lines possible.

@predatorx7

Copy link
Copy Markdown
Collaborator Author

/reclaim-review

@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130470700383

Result Head Blocking findings Ponytail suggestions Check
Changes required 2453f25c5c80 1 1 View run
# Finding
1 package-lock.json (packages/zkfetch workspace entry / node_modules/@reclaimprotocol/client): packages/zkfetch/package.json requires @reclaimprotocol/client ^0.1.47,…
# Ponytail suggestion
1 packages/zkfetch/package.json:L4-L6: delete: empty description and author package metadata. Nothing.
Full findings and Ponytail review
  • package-lock.json (packages/zkfetch workspace entry / node_modules/@reclaimprotocol/client): packages/zkfetch/package.json requires @reclaimprotocol/client ^0.1.47, while the committed lockfile remains on 0.1.46. Because 0.1.46 does not satisfy that 0.x range, a clean npm ci rejects the stale lockfile before the documented npm run zkfetch can run; even if installed by mutating the lockfile, the example relies on the 0.1.47 Builder-JWKS verification behavior. Smallest safe fix: install after 0.1.47 is available and commit the regenerated package-lock.json, including the workspace dependency entry and resolved client package at a version satisfying ^0.1.47.

Ponytail suggestions:

  • packages/zkfetch/package.json:L4-L6: delete: empty description and author package metadata. Nothing.

net: -2 lines possible.

@predatorx7
predatorx7 merged commit 2b323d2 into main Nov 11, 2026
3 checks passed
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.

2 participants