{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "attributionEntry": {
      "description": "An entry in the attribution chain",
      "properties": {
        "contributorDID": {
          "format": "did",
          "type": "string"
        },
        "role": {
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "splitPercentage": {
          "maximum": 10000,
          "minimum": 0,
          "type": "integer"
        },
        "timestamp": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "contributorDID",
        "role"
      ],
      "type": "object"
    },
    "main": {
      "description": "The attribution and permission layer. Tracks who contributed what and under what terms.",
      "key": "tid",
      "record": {
        "properties": {
          "attributionChain": {
            "description": "The chain of attribution for this contribution",
            "items": {
              "ref": "#attributionEntry",
              "type": "ref"
            },
            "type": "array"
          },
          "contributionType": {
            "description": "The type of contribution",
            "knownValues": [
              "originator",
              "coauthor",
              "contributor",
              "editor",
              "translator",
              "illustrator"
            ],
            "type": "string"
          },
          "contributorDID": {
            "description": "The permanent identity of the contributor",
            "format": "did",
            "type": "string"
          },
          "createdAt": {
            "description": "Timestamp when this contribution was made",
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "Description of what was contributed",
            "maxGraphemes": 1024,
            "maxLength": 10240,
            "type": "string"
          },
          "originatorApproval": {
            "description": "Whether the world originator has approved this contribution",
            "knownValues": [
              "approved",
              "pending",
              "rejected",
              "notRequired"
            ],
            "type": "string"
          },
          "publicDomainCompliance": {
            "description": "For public domain worlds, whether this contribution complies with source attribution requirements",
            "knownValues": [
              "compliant",
              "pending",
              "disputed",
              "notApplicable"
            ],
            "type": "string"
          },
          "splitPercentage": {
            "description": "Contribution share in basis points (100 = 1%)",
            "maximum": 10000,
            "minimum": 0,
            "type": "integer"
          },
          "targetReference": {
            "description": "Reference to the specific record being contributed to",
            "format": "at-uri",
            "type": "string"
          },
          "worldReference": {
            "description": "Reference to the world this contribution is part of",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "contributorDID",
          "worldReference",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "world.ptah.origin",
  "lexicon": 1
}
