AGENT SKILL

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

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 _clawd proofs
  • 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

  1. Use StoreProofV2, TeeProofV2, and ProofCounterDay for new work.
  2. Keep Rust program constants, TypeScript client builders/decoders, and gateway Solana builders in sync.
  3. Use verification_level = 0 for stored-only development and verification_level = 1 only when the secp256k1 instruction and signature are present.
  4. Treat V1 InitCounter and StoreProof as backwards-compatible legacy paths.
  5. 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

  1. Classify the task:
  2. Inspect the current source files before editing. The skill docs summarize the repo, but code wins.
  3. Preserve the V2 security invariants:
    • 32-byte signed_payload_hash must be the PDA seed.
    • secp message data must equal signed_payload_hash.
    • recovered Ethereum address must equal signing_address.
    • day_tag must be exactly 8 ASCII bytes, YYYYMMDD.
    • expires_at != 0 must not be in the past at store time.
  4. When changing account layout or instruction data, update every mirror:
    • program/src/constants.rs
    • program/src/state/tee_proof.rs
    • program/src/processor/store_proof_v2.rs
    • clients/typescript/src/accounts.ts
    • clients/typescript/src/instructions.ts
    • clients/typescript/src/types.ts
    • clawd-tee-gateway/src/solana.rs
    • idl/solana_redpill_verifier.json if the public interface changed
  5. 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

04 同仓库更多 Skills

Solizardking
Solizardking/skillhub-main

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.

★ 0
Solizardking
Solizardking/skillhub-main

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.

★ 0
Solizardking
Solizardking/skillhub-main

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.

★ 0
Solizardking
Solizardking/skillhub-main

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.

★ 0
Solizardking
Solizardking/skillhub-main

youtube-clipper

YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video

★ 0
Solizardking
Solizardking/skillhub-main

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.

★ 0