APIs & Data Models
Implemented documentation APIs and contract integration models
APIs & Data Models
Routes implemented in this repository
| Endpoint | Method | Behavior |
|---|---|---|
/api/search | GET | Static Fumadocs/Orama documentation search index |
/api/chat | POST | Gemini response to JSON containing a string message |
Chat requires GEMINI_API_KEY and outbound HTTPS to generativelanguage.googleapis.com. It uses gemini-2.5-flash. Without credentials it returns a configuration error. The assistant is informational; it cannot verify contract deployment, sign transactions, or supply legal/financial advice.
Older /api/*.php, /status, /allowlist/proof, and /allocation/:wallet examples are not implemented by this Next.js site. Do not present them as deployed endpoints.
Main-application integration models
These are recommended indexing fields, not published contract tuple signatures or confirmed REST APIs.
| Model | Important fields |
|---|---|
| Referral user | chain ID, wallet, isRegistered, userTier, referredBy, referralCount, totalEarned, pendingWithdrawals |
| Collectible | chain ID, FOSNFT address, token ID, collection type, cycle ID, collectible position, original purchaser, weight, transaction hash |
| Cycle | collection type, cycle ID, stored capacity/contribution/group rules, collectible count, pool balance, request correlation, finalization status |
| Allocation | cycle ID, selected collectible, recipient, allocated ETH, transfer outcome, claim transaction |
| Certificate | Verify address, token ID, originType, originContract, originId, initial recipient, current owner, getStatus result |
Confirm every indexed transaction against the correct chain, contract address/version, and successful receipt. Avoid double-counting repeated events or CCIP deliveries. Display nominal USD calculations separately from actual ETH accounting.
Terminology
- VRF: verifiable randomness produced on the specified Base integration.
- CCIP: messaging carrying a cycle request/result between Base and Robinhood.
- Collectible: a registered cycle entry associated with a mint; uniqueness of selection is at collectible level.
- Deferred payment: owed ETH recorded for a later
claim()after direct transfer fails. - Origin certificate: a separate Verify NFT; issuance and active status are distinct.
See network metadata and contract reference.