GET /api/chain/:slug/contracts/:id
Return one contract and its 20 most recent transitions (newest first).
Auth
Bearer with viewer role or higher.
Response — 200
{
"ok": true,
"contract": {
"id": "uuid",
"name": "ProductionEscrow",
"version": "1.0",
"currentState": "funded",
"definition": { ... },
"createdAt": "...",
"updatedAt": "..."
},
"transitions": [
{
"id": "uuid",
"contractId": "uuid",
"fromState": "pending",
"toState": "funded",
"operator": "NM26",
"input": { "amount": 1000 },
"result": { ... },
"proofDigest": "7f…64hex",
"zspEnvelope": { ... },
"zeqondNumber": "2287439213",
"success": true,
"error": null,
"triggeredBy": "ZEQ07491829374",
"createdAt": "..."
}
]
}
BigInt fields stringify for JSON safety.
Errors
| Status | error | Cause |
|---|---|---|
404 | contract_not_found | id doesn't belong to this slug |
403 | forbidden | role < viewer |