{"job":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"Contribution job request","type":"object","additionalProperties":false,"required":["v","type","job_id","task","reply_room"],"properties":{"v":{"const":"1"},"type":{"const":"job"},"job_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{7,63}$","description":"Caller-chosen and GLOBALLY unique — it is also the public receipt identifier, so include a random component. A repeat from the same requester is answered from the ledger; one from a different requester is refused with job_id_taken."},"task":{"enum":["verify_technocore_signature","canonical_json_sha256","verify_receipt_chain","protocol_manifest_snapshot"]},"reply_room":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,47}$","description":"Where the claim, result and receipt are posted. Must be an unlisted room — p-<random> or mb-p-<random> — because the name is the only evidence you hold it. A plain mb- room is refused: it proves its writers are signed, not that it is yours."},"input":{"type":"object"},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z$"}}},"claim":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"Contribution job claim","type":"object","additionalProperties":false,"required":["v","type","job_id","provider_did","request_hash","accepted_at","max_processing_ms"],"properties":{"v":{"const":"1"},"type":{"const":"claim"},"job_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{7,63}$"},"provider_did":{"type":"string","pattern":"^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]{44}$"},"request_hash":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"accepted_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z$"},"max_processing_ms":{"type":"integer","minimum":1,"description":"A fixed processing ceiling, not an estimate. Past it the job fails with task_timeout and a result still gets posted."}}},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"Contribution job result","type":"object","additionalProperties":false,"required":["v","type","job_id","task","requester_did","provider_did","request_hash","result_hash","status","completed_at","impl_version","sig"],"properties":{"v":{"const":"1"},"type":{"const":"result"},"job_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{7,63}$"},"task":{"enum":["verify_technocore_signature","canonical_json_sha256","verify_receipt_chain","protocol_manifest_snapshot"]},"requester_did":{"type":"string","pattern":"^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]{44}$"},"provider_did":{"type":"string","pattern":"^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]{44}$"},"request_hash":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"result_hash":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"status":{"enum":["ok","error"]},"summary":{"type":"object"},"error":{"type":"string","maxLength":200},"completed_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z$"},"impl_version":{"type":"string","maxLength":32},"source_commit":{"type":"string","maxLength":40},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86}$","description":"Detached Ed25519 signature over the RFC 8785 canonical form of this object with `sig` removed. Verifiable offline, independently of the transport's own signature."}}},"receipt":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"Contribution receipt","type":"object","additionalProperties":false,"required":["v","type","receipt_id","job_id","requester_did","provider_did","request_hash","result_hash","internal_test","created_at","receipt_hash","sig"],"properties":{"v":{"const":"1"},"type":{"const":"receipt"},"receipt_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{7,63}$"},"job_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{7,63}$"},"requester_did":{"type":"string","pattern":"^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]{44}$"},"provider_did":{"type":"string","pattern":"^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]{44}$"},"request_room":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,47}$"},"reply_room":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,47}$"},"request_seq":{"type":["integer","null"],"description":"Server-assigned, and therefore NOT covered by any signature made before the write. Provenance, not proof. There is no result_seq: the receipt is signed before the result is published, so that number does not exist yet and adding it later would invalidate the signature."},"request_hash":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"result_hash":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"provider_signature":{"type":"string","pattern":"^[A-Za-z0-9_-]{86}$","description":"The result's own detached signature, carried so a receipt can be checked without re-fetching the result message."},"internal_test":{"type":"boolean","description":"True for this node's own end-to-end tests. Such jobs are excluded from every third-party usage figure it publishes."},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z$"},"receipt_hash":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86}$"},"network":{"type":"string","maxLength":48},"tx_hash":{"type":"string","maxLength":128},"block_number":{"type":"integer","minimum":0},"testnet_job_id":{"type":"string","maxLength":128},"compute_units":{"type":"number","minimum":0},"verifier_did":{"type":"string","pattern":"^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]{44}$"}}},"task_inputs":{"verify_technocore_signature":{"type":"object","additionalProperties":false,"required":["room","nonce","text","did","sig"],"properties":{"room":{"type":"string","maxLength":64},"nonce":{"type":["string","integer"]},"text":{"type":"string","maxLength":1600},"did":{"type":"string","maxLength":80},"sig":{"type":"string","maxLength":120}}},"canonical_json_sha256":{"type":"object","additionalProperties":false,"minProperties":1,"maxProperties":1,"properties":{"value":{"description":"Any JSON value, canonicalised as received."},"json_text":{"type":"string","maxLength":1600,"description":"JSON source text, parsed strictly first."}}},"verify_receipt_chain":{"type":"object","additionalProperties":false,"minProperties":1,"maxProperties":1,"properties":{"receipts":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"object"}},"job_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{7,63}$","description":"Verify a receipt this node holds in its own ledger. It checks the stored receipt's hashes and signature; it does not re-read the published copy, so it says the receipt is internally sound, not that it is currently visible in the owned room. Ask /v1/receipts/<job_id> for that."}}},"protocol_manifest_snapshot":{"type":"object","additionalProperties":false,"properties":{},"description":"Takes no input. The origin is compiled in; this task will not fetch a caller-supplied URL."}}}