{
  "handle": "Contract",
  "data_schema": {
    "type": "object",
    "required": [
      "contract_id",
      "parties",
      "terms",
      "signatures"
    ],
    "properties": {
      "contract_id": {
        "type": "string",
        "description": "Unique identifier for this contract"
      },
      "parties": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Identity IDs of all parties"
      },
      "terms": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Array of Condition objects defining obligations"
      },
      "signatures": {
        "type": "object",
        "description": "Map of party ID to cryptographic signature"
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "description": "When the contract was created"
      }
    }
  },
  "mechanism": "An immutable record of agreement between two or more {{identity}}s, acting as a multi-party {{commitment_device}}. It aggregates a set of {{condition}}s (terms) and obligations which all parties must {{sign}} to accept. Contracts supply the agreed terms for disputes resolved by a {{judge}}.",
  "gloss": "Binding agreement between parties",
  "failure_modes": [
    "Ambiguity: Terms are open to interpretation.",
    "Unsigned: Not all parties have signed (invalid).",
    "Void: Conditions violate higher-law constraints."
  ],
  "invariants": [
    "Binding only when `signatures` covers every party in `parties`.",
    "Terms cannot change after signing; an amendment is a new Contract.",
    "Terms are verifiable by a third party."
  ],
  "_meta": {
    "tier": 1,
    "ring": 1,
    "supersedes": [
      "sema:Contract#mh:SHA-256:06241d8925a848e07b8b7afab2c37767b126c3f2363faba11bcc455ebb6a4d04",
      "sema:Contract#mh:SHA-256:9e78730155e2edf5c5a6c8eeec52557d4db784b376957bdfffa1e0fe785b77f6",
      "sema:Contract#mh:SHA-256:bf33d6b0b29a7d4c2daa50ec3ab94c09818c67af367567f2b76976a433e5e00f",
      "sema:Contract#mh:SHA-256:0a175c6f4a8622b98f611614e42401c4dc4778178a438269bf5dd388006397e0"
    ],
    "path": [
      "Infrastructure",
      "Data Structures"
    ],
    "related": [
      "Cocapacity#0924"
    ]
  },
  "sema_id": "sema:Contract#mh:SHA-256:98747322ee31ffa265a8dfd6609d726e0dcba9c513e5ec85742c6c04e4afaa26",
  "sema_ref": "Contract#9874",
  "sema_stub": "9874",
  "dependencies": {
    "accepts": {
      "condition": "sema:Condition#mh:SHA-256:b480f3c4da11ba6d86f6d14e0fb8521268f3c4bb38588460f7ff4253ad8d78d5"
    },
    "references": {
      "commitment_device": "sema:CommitmentDevice#mh:SHA-256:548b0a08b4956329e458f4e9bd150ea3d40c1867ca99e04b3e4f1bb31c9c6278",
      "identity": "sema:Identity#mh:SHA-256:b24a57fdd59ebf2ef019be30af8fa10fc127f61d346a74ab0b49f729b4e32093",
      "judge": "sema:Judge#mh:SHA-256:704cbb71588d7a3bafa08b71c863005e31ec4400860b9cb8b094e660da9c7c6c",
      "sign": "sema:Sign#mh:SHA-256:b2020447ec4c2725a139c6117c764cf464643e6e83379e86263267f95e4965ee"
    }
  },
  "sema_layer": "Infrastructure",
  "sema_category": "Data Structures",
  "used_by": {
    "yields": {
      "Award": "sema:Award#mh:SHA-256:4c5d0b7992809eebff99b727da727b08f4659773607c2621d8181b5d816e4b23"
    },
    "references": {
      "Cocapacity": "sema:Cocapacity#mh:SHA-256:0924cffc9a46023862f0a81ad3c96c35111fd246c6de483789a120f1b4774fdc",
      "Trait": "sema:Trait#mh:SHA-256:e415fe6619857f831d831228b5532ea64d4a6a222773c828098f30d36f450b20"
    }
  }
}
