solana-redpill-verifier
Solana RedPill TEE verifier development and operations for the `web/solana-redpill-verifier` stack. Use for Pinocchio SVM proof storage, TeeProofV2 PDA layout, StoreProofV2 transactions, RedPill/TDX and NVIDIA NRAS attestation anchoring, CLAWD TEE Gateway setup, OpenAI-compatible attested inference proxying, Solana Attestation Service Token-2022 credentials, TypeScript client integration, OP-TEE signer integration, deployment, and debugging proof anchoring on Solana.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- solana-redpill-verifier
- description
- Solana RedPill TEE verifier development and operations for the `web/solana-redpill-verifier` stack. Use for Pinocchio SVM proof storage, TeeProofV2 PDA layout, StoreProofV2 transactions, RedPill/TDX and NVIDIA NRAS attestation anchoring, CLAWD TEE Gateway setup, OpenAI-compatible attested inference proxying, Solana Attestation Service Token-2022 credentials, TypeScript client integration, OP-TEE signer integration, deployment, and debugging proof anchoring on Solana.
02 资源文件 10
- 参考文档agents/openai.yaml225 B
- 参考文档architecture.md4.3 KB
- 参考文档debugging.md5.1 KB
- 参考文档deployment.md3.3 KB
- 参考文档gateway.md4.7 KB
- 参考文档onchain-program.md4.5 KB
- 参考文档optee.md3.1 KB
- 参考文档resources.md2.5 KB
- 参考文档sas-credentials.md3.0 KB
- 参考文档typescript-client.md3.6 KB
03 SKILL.md 正文
Solana RedPill Verifier Skill
What this Skill is for
Use this Skill when the user asks for:
- Solana RedPill verifier implementation in
web/solana-redpill-verifier - TEE proof anchoring on Solana with
StoreProofV2 TeeProof,TeeProofV2,ProofCounterDay, or verifier PDA layout- Native Solana secp256k1 proof binding for TEE signatures
- CLAWD TEE Gateway proxying OpenAI-compatible requests and adding
_clawdproofs - Intel TDX, Phala verifier, NVIDIA NRAS, or OP-TEE signer integration
- Solana Attestation Service credentials issued from verified TEE inference counts
- TypeScript client usage, CLI commands, proof lookup, or day counters
- Deployment, local testing, Docker, key handling, or production hardening
Source of truth
Read source files from web/solana-redpill-verifier before making code changes.
Do not read or copy secrets from:
web/solana-redpill-verifier/.keys- real keypair paths referenced by
SOLANA_KEYPAIR_PATH - generated build artifacts under
target/unless a build error requires inspection
Prefer V2 unless the user explicitly asks for legacy V1. svm.md is useful historical handoff context, but the README and current source files include newer V2, gateway, SAS, and OP-TEE behavior.
Key concepts
TeeProofV2 is the default on-chain account. Its PDA is:
["tee_proof_v2", signed_payload_hash]
StoreProofV2 is instruction discriminator 2. It stores forensic hashes, a TEE signing address, verification level, status, expiry, nonce, policy metadata, and submitter slot/time.
signed_payload_hash binds the proof to an inference. For CLAWD-native gateway proofs it is:
SHA256("CLAWD_REDPILL_V2:" || request_hash || response_hash || model_hash || nonce)
Native secp256k1 verification is required when verification_level >= 1. The secp instruction must sign the exact 32-byte signed_payload_hash, and secp_ix_index must match its transaction index.
Gateway anchoring is optional at runtime. If SOLANA_KEYPAIR_PATH is absent, the gateway can still proxy and sign proofs, but Solana anchoring is skipped and only the expected proof PDA is returned.
SAS credentials are Token-2022 non-transferable NFT attestations issued when a wallet reaches SAS_PROOF_THRESHOLD verified inferences through the gateway.
Default stack decisions
- Use
StoreProofV2,TeeProofV2, andProofCounterDayfor new work. - Keep Rust program constants, TypeScript client builders/decoders, and gateway Solana builders in sync.
- Use
verification_level = 0for stored-only development andverification_level = 1only when the secp256k1 instruction and signature are present. - Treat V1
InitCounterandStoreProofas backwards-compatible legacy paths. - Keep TEE signing keys inside the TEE boundary or an approved sealed-storage path. Never put real keys into skill files, examples, commits, or logs.
Operating procedure
- Classify the task:
- Architecture or flow: read architecture.md
- On-chain program or PDA layout: read onchain-program.md
- TypeScript client or CLI: read typescript-client.md
- Gateway proxy, signing, anchoring, or env vars: read gateway.md
- SAS credentials: read sas-credentials.md
- OP-TEE signer path: read optee.md
- Build, deploy, or operations: read deployment.md
- Failures or transaction errors: read debugging.md
- Inspect the current source files before editing. The skill docs summarize the repo, but code wins.
- Preserve the V2 security invariants:
- 32-byte
signed_payload_hashmust be the PDA seed. - secp message data must equal
signed_payload_hash. - recovered Ethereum address must equal
signing_address. day_tagmust be exactly 8 ASCII bytes,YYYYMMDD.expires_at != 0must not be in the past at store time.
- 32-byte
- When changing account layout or instruction data, update every mirror:
program/src/constants.rsprogram/src/state/tee_proof.rsprogram/src/processor/store_proof_v2.rsclients/typescript/src/accounts.tsclients/typescript/src/instructions.tsclients/typescript/src/types.tsclawd-tee-gateway/src/solana.rsidl/solana_redpill_verifier.jsonif the public interface changed
- Verify with the narrowest useful build or test command and report any unrun checks.
Deliverables expectations
When implementing changes, include:
- Files changed and the exact behavioral change
- Build/test commands run
- Deployment or key-management assumptions
- Risk notes for signer, verifier level, secp index, PDA seeds, or account layout changes
Progressive disclosure
- System architecture and proof flow: architecture.md
- Pinocchio on-chain program and PDA layout: onchain-program.md
- TypeScript client and CLI: typescript-client.md
- CLAWD TEE Gateway: gateway.md
- Solana Attestation Service credentials: sas-credentials.md
- OP-TEE signer provider: optee.md
- Build and deployment: deployment.md
- Debugging guide: debugging.md
- Source map and external endpoints: resources.md
04 同仓库更多 Skills
zkrouter
Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.
zk
For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.
zk-omni-messaging
Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.
zerion-wallet-data
Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.
youtube-clipper
YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video
yield-optimization
Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.