{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": "shroom-observatory-v2"
    },
    "snapshot_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "generated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    },
    "evidence_asof": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        {
          "type": "null"
        }
      ]
    },
    "chain_id": {
      "const": 4663
    },
    "token_address": {
      "const": "0xab093def657f15df31b33922a95e047add645b29"
    },
    "historical": {
      "const": false
    },
    "methodology_version": {
      "const": "standalone-v2.0"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9_-]+$",
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "maxLength": 2000,
            "pattern": "^[^<>]*$"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 500
          },
          "status": {
            "enum": [
              "available",
              "partial",
              "unavailable"
            ]
          },
          "checked_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "Z$"
          },
          "capability": {
            "type": "string",
            "maxLength": 2000,
            "pattern": "^[^<>]*$"
          },
          "credential_required": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "status",
          "checked_at",
          "capability",
          "credential_required"
        ],
        "additionalProperties": false
      }
    },
    "components": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "enum": [
              "identity",
              "market",
              "liquidity",
              "rewards",
              "fees",
              "demand",
              "synthesis",
              "project_reported",
              "valuation",
              "reconciliation",
              "position_history",
              "fee_ledger",
              "burns",
              "discovery",
              "issuer_parity",
              "external_positions",
              "burn_provenance",
              "changes"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 2000,
            "pattern": "^[^<>]*$"
          },
          "status": {
            "enum": [
              "verified",
              "indexed",
              "estimated",
              "project_reported",
              "partial",
              "unavailable",
              "stale"
            ]
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              {
                "type": "null"
              }
            ]
          },
          "available_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              {
                "type": "null"
              }
            ]
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z0-9_-]+$",
                  "maxLength": 100
                },
                "label": {
                  "type": "string",
                  "maxLength": 2000,
                  "pattern": "^[^<>]*$"
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$",
                      "maxLength": 120
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unit": {
                  "type": "string",
                  "maxLength": 2000,
                  "pattern": "^[^<>]*$"
                },
                "raw_amount": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?(0|[1-9][0-9]*)$",
                      "maxLength": 79
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decimals": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 36
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "enum": [
                    "verified",
                    "indexed",
                    "estimated",
                    "project_reported",
                    "partial",
                    "unavailable",
                    "stale"
                  ]
                },
                "observed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "Z$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "available_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "Z$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "window_start": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "Z$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "window_end": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "Z$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "block_number": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "block_hash": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^0x[a-f0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "coverage": {
                  "type": "object",
                  "properties": {
                    "numerator": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "denominator": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 2000,
                      "pattern": "^[^<>]*$"
                    }
                  },
                  "required": [
                    "numerator",
                    "denominator",
                    "complete",
                    "scope"
                  ],
                  "additionalProperties": false
                },
                "source_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-z0-9_-]+$",
                    "maxLength": 100
                  }
                },
                "evidence_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "method": {
                  "type": "string",
                  "maxLength": 2000,
                  "pattern": "^[^<>]*$"
                },
                "limitations": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 2000,
                    "pattern": "^[^<>]*$"
                  }
                },
                "temporal_kind": {
                  "enum": [
                    "fixed_window"
                  ]
                },
                "basis": {
                  "type": "object",
                  "properties": {
                    "population_id": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ownership_basis": {
                      "enum": [
                        "historical_attribution",
                        "current_tracked_operator_title",
                        "other_recorded_title"
                      ]
                    },
                    "liquidity_basis": {
                      "const": "all_measured_including_empty"
                    },
                    "pricing_basis_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "evidence_block_number": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "evidence_block_hash": {
                      "type": "string",
                      "pattern": "^0x[a-f0-9]{64}$"
                    },
                    "window_start": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "Z$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "window_end": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "Z$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pricing_observation_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "population_id",
                    "ownership_basis",
                    "liquidity_basis",
                    "pricing_basis_id",
                    "evidence_block_number",
                    "evidence_block_hash",
                    "window_start",
                    "window_end"
                  ],
                  "additionalProperties": false
                },
                "comparison_basis": {
                  "type": "object",
                  "properties": {
                    "opening_population_id": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "closing_population_id": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "matched_population_id": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "opening_positions": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "closing_positions": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "matched_positions": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "absent_from_opening": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "absent_from_closing": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "changed_title_or_identity": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "unsupported_positions": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "opening_population_id",
                    "closing_population_id",
                    "matched_population_id",
                    "opening_positions",
                    "closing_positions",
                    "matched_positions",
                    "absent_from_opening",
                    "absent_from_closing",
                    "changed_title_or_identity",
                    "unsupported_positions"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "label",
                "value",
                "unit",
                "raw_amount",
                "decimals",
                "status",
                "observed_at",
                "available_at",
                "window_start",
                "window_end",
                "block_number",
                "block_hash",
                "coverage",
                "source_ids",
                "evidence_ids",
                "method",
                "limitations"
              ],
              "additionalProperties": false
            }
          },
          "table": {
            "type": "object",
            "properties": {
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[a-z0-9_-]+$",
                      "maxLength": 100
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 2000,
                      "pattern": "^[^<>]*$"
                    }
                  },
                  "required": [
                    "key",
                    "label"
                  ],
                  "additionalProperties": false
                }
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9_-]+$",
                      "maxLength": 100
                    },
                    "cells": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2000,
                            "pattern": "^[^<>]*$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "status": {
                      "enum": [
                        "verified",
                        "indexed",
                        "estimated",
                        "project_reported",
                        "partial",
                        "unavailable",
                        "stale"
                      ]
                    },
                    "observed_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "Z$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[a-z0-9_-]+$",
                        "maxLength": 100
                      }
                    },
                    "evidence_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "limitations": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 2000,
                        "pattern": "^[^<>]*$"
                      }
                    },
                    "evidence_basis": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "enum": [
                            "bounded_accounting",
                            "burn_sender_ledger",
                            "noncomparable_juxtaposition"
                          ]
                        },
                        "verified_claim": {
                          "type": "string",
                          "maxLength": 2000,
                          "pattern": "^[^<>]*$"
                        },
                        "unresolved_claim": {
                          "type": "string",
                          "maxLength": 2000,
                          "pattern": "^[^<>]*$"
                        }
                      },
                      "required": [
                        "kind",
                        "verified_claim",
                        "unresolved_claim"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "cells",
                    "status",
                    "observed_at",
                    "source_ids",
                    "evidence_ids",
                    "limitations"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "columns",
              "rows"
            ],
            "additionalProperties": false
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 2000,
              "pattern": "^[^<>]*$"
            }
          },
          "status_reason": {
            "type": "string",
            "maxLength": 2000,
            "pattern": "^[^<>]*$"
          },
          "delivery_value_history": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "window_start": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "Z$"
                },
                "window_end": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "Z$"
                },
                "mu_raw": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "maxLength": 78
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "priced_mu_raw": {
                  "type": "string",
                  "pattern": "^(0|[1-9][0-9]*)$",
                  "maxLength": 78
                },
                "unpriced_mu_raw": {
                  "type": "string",
                  "pattern": "^(0|[1-9][0-9]*)$",
                  "maxLength": 78
                },
                "estimated_usd": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$",
                      "maxLength": 120
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "receipt_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "priced_receipt_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "receipt_complete": {
                  "type": "boolean"
                },
                "pricing_complete": {
                  "type": "boolean"
                },
                "observed_at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "Z$"
                },
                "available_at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "Z$"
                },
                "evidence_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "pricing_methods": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 2000,
                    "pattern": "^[^<>]*$"
                  }
                },
                "max_quote_age_seconds": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "window_start",
                "window_end",
                "mu_raw",
                "priced_mu_raw",
                "unpriced_mu_raw",
                "estimated_usd",
                "receipt_count",
                "priced_receipt_count",
                "receipt_complete",
                "pricing_complete",
                "observed_at",
                "available_at",
                "evidence_ids"
              ],
              "additionalProperties": false
            }
          },
          "shroom_pool_volume_cumulative": {
            "type": "object",
            "properties": {
              "schema_version": {
                "const": "shroom-turnover-hourly-v1"
              },
              "metric_id": {
                "const": "shroom_pool_volume_all_time"
              },
              "population_id": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "window_start": {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              "window_end": {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              "observed_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              "available_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              "evidence_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              },
              "limitations": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 2000,
                  "pattern": "^[^<>]*$"
                }
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "bucket_start": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "Z$"
                    },
                    "bucket_end": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "Z$"
                    },
                    "cumulative_raw": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "maxLength": 78
                    },
                    "cumulative_amount": {
                      "type": "string",
                      "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$",
                      "maxLength": 120
                    },
                    "volume_raw": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "maxLength": 78
                    },
                    "decimals": {
                      "const": 18
                    },
                    "swaps_in_bucket": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "pools_covered": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "pools_total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "closed_hour": {
                      "type": "boolean"
                    },
                    "population_id": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "status": {
                      "enum": [
                        "verified",
                        "indexed",
                        "estimated",
                        "project_reported",
                        "partial",
                        "unavailable",
                        "stale"
                      ]
                    }
                  },
                  "required": [
                    "bucket_start",
                    "bucket_end",
                    "cumulative_raw",
                    "cumulative_amount",
                    "volume_raw",
                    "decimals",
                    "swaps_in_bucket",
                    "pools_covered",
                    "pools_total",
                    "complete",
                    "closed_hour",
                    "population_id",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "schema_version",
              "metric_id",
              "population_id",
              "window_start",
              "window_end",
              "observed_at",
              "available_at",
              "evidence_ids",
              "limitations",
              "rows"
            ],
            "additionalProperties": false
          },
          "shroom_fee_collections_cumulative": {
            "type": "object",
            "properties": {
              "schema_version": {
                "const": "shroom-fee-collections-hourly-v1"
              },
              "measurement": {
                "const": "zero_principal_erc20_collections"
              },
              "population_id": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "position_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 2000,
                  "pattern": "^[^<>]*$"
                }
              },
              "window_start": {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              "window_end": {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              "observed_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              "available_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              "evidence_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              },
              "limitations": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 2000,
                  "pattern": "^[^<>]*$"
                }
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "bucket_start": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "Z$"
                    },
                    "bucket_end": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "Z$"
                    },
                    "collected_raw": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "maxLength": 78
                    },
                    "collected_cumulative_raw": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "maxLength": 78
                    },
                    "collected_cumulative_amount": {
                      "type": "string",
                      "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$",
                      "maxLength": 120
                    },
                    "decimals": {
                      "const": 18
                    },
                    "receipt_count": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "closed_hour": {
                      "type": "boolean"
                    },
                    "status": {
                      "enum": [
                        "verified",
                        "partial"
                      ]
                    },
                    "population_id": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "evidence_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "accrued_uncollected_amount": {
                      "type": "null"
                    },
                    "generated_amount": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "bucket_start",
                    "bucket_end",
                    "collected_raw",
                    "collected_cumulative_raw",
                    "collected_cumulative_amount",
                    "decimals",
                    "receipt_count",
                    "complete",
                    "closed_hour",
                    "status",
                    "population_id",
                    "evidence_ids",
                    "accrued_uncollected_amount",
                    "generated_amount"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "schema_version",
              "measurement",
              "population_id",
              "position_ids",
              "window_start",
              "window_end",
              "observed_at",
              "available_at",
              "evidence_ids",
              "limitations",
              "rows"
            ],
            "additionalProperties": false
          },
          "ledgers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "asset_address": {
                  "type": "string",
                  "pattern": "^0x[a-f0-9]{40}$"
                },
                "recorded_account": {
                  "type": "string",
                  "pattern": "^0x[a-f0-9]{40}$"
                },
                "decimals": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "window_start": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "Z$"
                },
                "window_end": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "Z$"
                },
                "opening_block": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "closing_block": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "closing_block_hash": {
                  "type": "string",
                  "pattern": "^0x[a-f0-9]{64}$"
                },
                "observed_at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "Z$"
                },
                "complete": {
                  "type": "boolean"
                },
                "opening_raw": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "maxLength": 79
                },
                "inflow_raw": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "maxLength": 79
                },
                "outflow_raw": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "maxLength": 79
                },
                "closing_raw": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "maxLength": 79
                },
                "residual_raw": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "maxLength": 79
                },
                "selected_fees_raw": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "maxLength": 79
                },
                "selected_retained_min_raw": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "maxLength": 79
                },
                "selected_retained_max_raw": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "maxLength": 79
                },
                "destinations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "pattern": "^[a-z0-9_-]+$",
                        "maxLength": 100
                      },
                      "gross": {
                        "type": "string",
                        "pattern": "^-?(0|[1-9][0-9]*)$",
                        "maxLength": 79
                      },
                      "selected_min": {
                        "type": "string",
                        "pattern": "^-?(0|[1-9][0-9]*)$",
                        "maxLength": 79
                      },
                      "selected_max": {
                        "type": "string",
                        "pattern": "^-?(0|[1-9][0-9]*)$",
                        "maxLength": 79
                      }
                    },
                    "required": [
                      "kind",
                      "gross",
                      "selected_min",
                      "selected_max"
                    ],
                    "additionalProperties": false
                  }
                },
                "evidence_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "limitations": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 2000,
                    "pattern": "^[^<>]*$"
                  }
                }
              },
              "required": [
                "id",
                "asset_address",
                "recorded_account",
                "decimals",
                "window_start",
                "window_end",
                "opening_block",
                "closing_block",
                "closing_block_hash",
                "observed_at",
                "complete",
                "opening_raw",
                "inflow_raw",
                "outflow_raw",
                "closing_raw",
                "residual_raw",
                "selected_fees_raw",
                "selected_retained_min_raw",
                "selected_retained_max_raw",
                "destinations",
                "evidence_ids",
                "limitations"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "title",
          "status",
          "observed_at",
          "available_at",
          "metrics",
          "table",
          "limitations"
        ],
        "additionalProperties": false
      }
    },
    "history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "Z$"
          },
          "available_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "Z$"
          },
          "metric_id": {
            "type": "string",
            "pattern": "^[a-z0-9_-]+$",
            "maxLength": 100
          },
          "value": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "verified",
              "indexed",
              "estimated",
              "project_reported",
              "partial",
              "unavailable",
              "stale"
            ]
          },
          "scope": {
            "type": "string",
            "maxLength": 2000,
            "pattern": "^[^<>]*$"
          },
          "bucket_start": {
            "type": "string",
            "format": "date-time",
            "pattern": "Z$"
          },
          "snapshot_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit": {
            "type": "string",
            "maxLength": 2000,
            "pattern": "^[^<>]*$"
          },
          "raw_amount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(0|[1-9][0-9]*)$",
                "maxLength": 79
              },
              {
                "type": "null"
              }
            ]
          },
          "decimals": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 36
              },
              {
                "type": "null"
              }
            ]
          },
          "window_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              {
                "type": "null"
              }
            ]
          },
          "window_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "Z$"
              },
              {
                "type": "null"
              }
            ]
          },
          "sampling_interval_seconds": {
            "enum": [
              3600,
              86400
            ]
          },
          "scope_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "coverage_complete": {
            "type": "boolean"
          },
          "method": {
            "type": "string",
            "maxLength": 2000,
            "pattern": "^[^<>]*$"
          },
          "gap": {
            "type": "boolean"
          }
        },
        "required": [
          "observed_at",
          "available_at",
          "metric_id",
          "value",
          "status",
          "scope"
        ],
        "additionalProperties": false
      }
    },
    "notices": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000,
        "pattern": "^[^<>]*$"
      }
    },
    "cadence_seconds": {
      "const": 3600
    },
    "next_expected_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    }
  },
  "required": [
    "schema_version",
    "snapshot_id",
    "generated_at",
    "evidence_asof",
    "chain_id",
    "token_address",
    "historical",
    "methodology_version",
    "sources",
    "components",
    "history",
    "notices"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
