Randomness TEE Service¶
Verifiable randomness service powered by Phala Trusted Execution Environment.
Overview¶
Located at services/verifiable-randomness-service, this service provides:
- Hardware-backed random number generation
- Remote attestation proofs
- Replay attack prevention
- x402 payment support
Why TEE?¶
Using Intel TDX (Trusted Domain Extensions):
- Private keys never leave the enclave
- Cryptographic proof of hardware security
- Cannot be manipulated by software attacks
- Compliant with verifiable randomness requirements
API Endpoints¶
Generate Random Seed¶
Returns a verifiable random seed with attestation proof.
Integration¶
Randomness service is integrated with:
- Livestream Server (raffle winner selection)
- Marketplace API (pack opening)
Running Locally¶
Environment¶
Required variables:
PAYMENT_WALLET- Wallet for receiving payments
Next Steps¶
- Vault TEE - Secure NFT custody
- Livestream Server - Usage in raffles