{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://capp.local/schemas/capp.solana-asset-observation.v1.schema.json",
  "title": "capp.solana-asset-observation.v1",
  "type": "object",
  "required": [
    "protocol",
    "asset",
    "decimals",
    "supplyAtomic",
    "mintAuthority",
    "freezeAuthority",
    "slot",
    "genesisHash",
    "observedAt",
    "source",
    "metadataAuthenticated"
  ],
  "properties": {
    "protocol": {
      "const": "capp.solana-asset-observation.v1"
    },
    "asset": {
      "$ref": "https://capp.local/schemas/capp.solana-asset.v1.schema.json"
    },
    "decimals": {
      "type": "integer",
      "minimum": 0,
      "maximum": 18
    },
    "supplyAtomic": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]{0,19})$",
      "description": "Exact unsigned u64 atomic units. Runtime also enforces <= 18446744073709551615."
    },
    "mintAuthority": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "freezeAuthority": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "slot": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "genesisHash": {
      "type": "string",
      "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
    },
    "observedAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "source": {
      "const": "rpc-observation"
    },
    "metadataAuthenticated": {
      "const": false
    }
  },
  "additionalProperties": false
}
