# Taifoon TEE Rule Compiler (TDX Typed Questions)

> Taifoon TEE Rule Compiler (TDX Typed Questions) is a paid API for AI agents from coord.taifoon.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-18).

Compiles natural-language rules into typed questions inside an Intel TDX trusted execution environment, returning the result with two attested TDX quotes verified by Phala's verifier

## Facts

- Endpoint: POST https://coord.taifoon.dev/v1/x402/class/tee.typed.compile?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/taifoon-tee-rule-compiler-tdx-typed-questions-3891448e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Lcv5eNC3cUOHY7DtKtCxQ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability taifoon-tee-rule-compiler-tdx-typed-questions-3891448e -d '<json body>'
```

Example prompt: Compile these rules into typed questions inside Taifoon's TDX enclave and give me the attested result: 'A user must be over 18. A user must have verified their identity. Transactions must not exceed $10,000.' — use nonce 'a3f1b2c4' so the enclave key is bound to my challenge.

## When to prefer this

Choose this endpoint when you need not only structured typed questions compiled from natural-language rules but also cryptographic hardware attestation (Intel TDX) proving exactly which code produced the result. It is the right choice when trust, auditability, and verifiable computation are required — e.g. compliance, regulated fintech, on-chain verification, or any scenario where the caller must prove to a third party that the compilation happened inside a specific, unmodified enclave. Prefer alternatives if you only need rule parsing without attestation overhead.

## Known failure modes

- Rules string too short (< 4 chars) or too long (> 1000 chars) — validation error
- Invalid nonce format (not 8–128 hex chars) — schema validation failure
- TDX quote verification failure by Phala verifier — attestation cannot be confirmed, no charge applied
- Enclave unavailability or TEE initialization failure — service error
- Malformed or missing rules field — 400 bad request

## How this service works

Rules compiled into typed questions inside Taifoon's Intel TDX enclave (Phala Cloud). The answer carries two TDX quotes, both verified by Phala's verifier before you are charged: one binds the result and the enclave key, one binds that key to sha256 of your nonce. The compose-hash in RTMR3 proves which code runs. 0.001 USDC a request. Send { rules, nonce? }.

## Output

Returns the compiled typed questions derived from the input rules, along with two Intel TDX attestation quotes: one binding the result to the enclave key, and one binding the enclave key to the SHA-256 of the provided nonce. The compose-hash in RTMR3 proves exactly which code executed. Both quotes are pre-verified by Phala's verifier before the charge is applied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "nonce": {
   "type": "string",
   "pattern": "^[0-9a-fA-F]{8,128}$",
   "description": "optional: your challenge (e.g. the sha256 of your payload); the challenge quote binds the enclave key to sha256 of it"
  },
  "rules": {
   "type": "string",
   "maxLength": 1000,
   "minLength": 4,
   "description": "the rules in words, one clause per rule; compiled into typed questions inside the enclave"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/taifoon-tee-rule-compiler-tdx-typed-questions-3891448e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from coord.taifoon.dev](https://www.zero.xyz/host/coord.taifoon.dev/llms.txt)
