Skip to content

cookbook: add xProof blockchain certification middleware for AI SDK#13701

Open
jasonxkensei wants to merge 2 commits intovercel:mainfrom
jasonxkensei:main
Open

cookbook: add xProof blockchain certification middleware for AI SDK#13701
jasonxkensei wants to merge 2 commits intovercel:mainfrom
jasonxkensei:main

Conversation

@jasonxkensei
Copy link

This PR adds a cookbook example showing how to use xProof middleware with the Vercel AI SDK to automatically certify every AI generation on the MultiversX blockchain.

The middleware wraps streamText / generateText transparently — zero changes to existing application code.

What it demonstrates

  • Drop-in xproofMiddleware() wrapping streamText and generateText
  • Automatic SHA-256 hashing of prompts + outputs (no PII sent)
  • Batch mode for high-throughput applications
  • shouldCertify filter to certify only production-critical generations

Install

npm install @xproof/xproof

Checklist

  • Works with App Router route handlers
  • Works with streamText and generateText
  • TypeScript types included
  • Free tier available (10 certs/day)

@tigent tigent bot added ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. documentation Improvements or additions to documentation provider/community labels Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. documentation Improvements or additions to documentation provider/community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant