{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "schemaVersion": {
      "type": "string",
      "const": "0.1.0-alpha"
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "documentation": {
      "type": "string",
      "format": "uri"
    },
    "modifiedAt": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "license": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string",
          "const": "CC0-1.0"
        },
        "url": {
          "type": "string",
          "const": "https://creativecommons.org/publicdomain/zero/1.0/"
        },
        "noticeUrl": {
          "type": "string",
          "format": "uri"
        },
        "scope": {
          "type": "string",
          "minLength": 1
        },
        "modifiedAt": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        }
      },
      "required": [
        "identifier",
        "url",
        "noticeUrl",
        "scope",
        "modifiedAt"
      ],
      "additionalProperties": false
    },
    "reviewCoverage": {
      "type": "object",
      "properties": {
        "oldestRecordReview": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "newestRecordReview": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "recordCount": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "meaning": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "oldestRecordReview",
        "newestRecordReview",
        "recordCount",
        "meaning"
      ],
      "additionalProperties": false
    },
    "providers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "detail": {
            "type": "boolean"
          },
          "modifiedAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "reviewedAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "profile": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "minLength": 1
              },
              "introduction": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceIds": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    }
                  }
                },
                "required": [
                  "text",
                  "sourceIds"
                ],
                "additionalProperties": false
              },
              "sections": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "heading": {
                      "type": "string",
                      "minLength": 1
                    },
                    "paragraphs": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceIds": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          }
                        },
                        "required": [
                          "text",
                          "sourceIds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "examples": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "language": {
                            "type": "string",
                            "enum": [
                              "http",
                              "js",
                              "json",
                              "bash",
                              "text"
                            ]
                          },
                          "description": {
                            "type": "string",
                            "minLength": 1
                          },
                          "code": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceIds": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "language",
                          "description",
                          "code",
                          "sourceIds"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "heading",
                    "paragraphs"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "title",
              "introduction",
              "sections"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "description",
          "detail",
          "modifiedAt",
          "reviewedAt"
        ],
        "additionalProperties": false
      }
    },
    "networks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "legacyRecordId": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "asset": {
            "type": "string",
            "const": "OUSD"
          },
          "deployment": {
            "type": "string",
            "const": "native"
          },
          "address": {
            "type": "string",
            "minLength": 1
          },
          "explorerUrl": {
            "type": "string",
            "format": "uri"
          },
          "sourceId": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "reviewedAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "modifiedAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "profile": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "minLength": 1
              },
              "introduction": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceIds": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    }
                  }
                },
                "required": [
                  "text",
                  "sourceIds"
                ],
                "additionalProperties": false
              },
              "sections": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "heading": {
                      "type": "string",
                      "minLength": 1
                    },
                    "paragraphs": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceIds": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          }
                        },
                        "required": [
                          "text",
                          "sourceIds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "examples": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "language": {
                            "type": "string",
                            "enum": [
                              "http",
                              "js",
                              "json",
                              "bash",
                              "text"
                            ]
                          },
                          "description": {
                            "type": "string",
                            "minLength": 1
                          },
                          "code": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceIds": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "language",
                          "description",
                          "code",
                          "sourceIds"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "heading",
                    "paragraphs"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "title",
              "introduction",
              "sections"
            ],
            "additionalProperties": false
          },
          "source": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "title": {
                "type": "string",
                "minLength": 1
              },
              "publishedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reviewedAt": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              }
            },
            "required": [
              "id",
              "url",
              "title",
              "publishedAt",
              "reviewedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "legacyRecordId",
          "asset",
          "deployment",
          "address",
          "explorerUrl",
          "sourceId",
          "reviewedAt",
          "modifiedAt",
          "source"
        ],
        "additionalProperties": false
      }
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "providerId": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "capability": {
            "type": "string",
            "minLength": 1
          },
          "assetScope": {
            "type": "string",
            "minLength": 1
          },
          "networks": {
            "anyOf": [
              {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "networkNote": {
            "type": "string",
            "minLength": 1
          },
          "availability": {
            "type": "string",
            "enum": [
              "announced",
              "private_beta",
              "public_beta",
              "generally_available",
              "deprecated",
              "unknown"
            ]
          },
          "availabilityReason": {
            "type": "string",
            "minLength": 1
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "accessRequirements": {
            "type": "string",
            "minLength": 1
          },
          "limitations": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "officialDocumentationUrl": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence": {
            "type": "string",
            "enum": [
              "source-backed",
              "provider-reviewed",
              "independently tested"
            ]
          },
          "evidenceArtifact": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "modifiedAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "reviewedAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "sources": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "publishedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reviewedAt": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "supportedClaim": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "url",
                "title",
                "publishedAt",
                "reviewedAt",
                "supportedClaim"
              ],
              "additionalProperties": false
            }
          },
          "tasks": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "accept-payments",
                "send-payouts",
                "hold-funds",
                "create-wallets",
                "mint-redeem",
                "issue-cards",
                "convert",
                "custody",
                "development",
                "api-access"
              ]
            }
          },
          "access": {
            "type": "string",
            "enum": [
              "onboarding_required",
              "restricted_beta",
              "announced",
              "not_established",
              "self_service"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "production",
              "sandbox",
              "unknown"
            ]
          },
          "verification": {
            "type": "string",
            "enum": [
              "not_tested",
              "tested"
            ]
          },
          "ousdSupport": {
            "type": "string",
            "enum": [
              "documented",
              "listed",
              "unresolved",
              "generic"
            ]
          }
        },
        "required": [
          "id",
          "providerId",
          "name",
          "capability",
          "assetScope",
          "networks",
          "networkNote",
          "availability",
          "availabilityReason",
          "summary",
          "accessRequirements",
          "limitations",
          "officialDocumentationUrl",
          "evidence",
          "evidenceArtifact",
          "modifiedAt",
          "reviewedAt",
          "sources",
          "tasks",
          "access",
          "environment",
          "verification"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "evidence": {
                  "enum": [
                    "provider-reviewed",
                    "independently tested"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "evidenceArtifact": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "verification": {
                  "const": "tested"
                }
              }
            },
            "then": {
              "properties": {
                "evidence": {
                  "const": "independently tested"
                },
                "evidenceArtifact": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          }
        ]
      }
    },
    "tasks": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "enum": [
          "accept-payments",
          "send-payouts",
          "hold-funds",
          "create-wallets",
          "mint-redeem",
          "issue-cards",
          "convert",
          "custody",
          "development",
          "api-access"
        ]
      },
      "additionalProperties": {
        "type": "string",
        "minLength": 1
      },
      "required": [
        "accept-payments",
        "send-payouts",
        "hold-funds",
        "create-wallets",
        "mint-redeem",
        "issue-cards",
        "convert",
        "custody",
        "development",
        "api-access"
      ]
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "publishedAt": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewedAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "id",
          "url",
          "title",
          "publishedAt",
          "reviewedAt"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "$schema",
    "schemaVersion",
    "description",
    "documentation",
    "modifiedAt",
    "reviewCoverage",
    "providers",
    "networks",
    "capabilities",
    "tasks",
    "sources"
  ],
  "additionalProperties": false,
  "$id": "https://openusd.dev/data/ecosystem.schema.json"
}