{
  "$id": "EE2VI0j6cttlC4nqu7HwlHfc0Et6xicoaFjvO41w27qN",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "SEDI Identity Credential",
  "description": "State-Endorsed Digital Identity (Utah Code 63A-20) root credential. The department verifies and endorses exactly the statutory attribute set -- name, birth date, image, Utah residence address (63A-20-301(2)(f)) -- carried in an attribute ('a') section as individually-blinded, partially-disclosable nested blocks, so a holder discloses an arbitrary subset by label (e.g. prove Utah residence without the street line). An attribute section (not an aggregate) is correct for a fixed set of meaningfully-labeled fields: label-based pathing for graduated-disclosure negotiation, with no advantage to hiding block labels/positions (PR WebOfTrust/keripy#1505; this.i @sdav5t).",
  "credentialType": "SEDI_Identity",
  "version": "1.0.0",
  "type": "object",
  "required": [
    "v",
    "d",
    "i",
    "ri",
    "s",
    "a",
    "r"
  ],
  "properties": {
    "v": {
      "description": "ACDC version string",
      "type": "string"
    },
    "d": {
      "description": "SAID of the credential",
      "type": "string"
    },
    "u": {
      "description": "Top-level blinding nonce; present => private variant",
      "type": "string"
    },
    "i": {
      "description": "AID of the issuer (the State, via the Department of Government Operations)",
      "type": "string"
    },
    "ri": {
      "description": "Registry for the issuer's credential status (revocation)",
      "type": "string"
    },
    "s": {
      "description": "SAID of this schema",
      "type": "string"
    },
    "a": {
      "oneOf": [
        {
          "description": "SAID of the attribute section",
          "type": "string"
        },
        {
          "$id": "EE8fXtL2W0-L1lHiI9ZbokknwvVbrZeUaH7HAlHFKXB9",
          "description": "Attribute section: the endorsed identity attributes",
          "type": "object",
          "required": [
            "d",
            "u",
            "i",
            "nameGiven",
            "nameFamily",
            "dob",
            "image",
            "residenceStreet",
            "residenceCity",
            "residenceState",
            "residencePostal"
          ],
          "properties": {
            "d": {
              "description": "SAID of the attribute section",
              "type": "string"
            },
            "u": {
              "description": "Attribute-section blinding nonce (salty)",
              "type": "string"
            },
            "i": {
              "description": "Issuee: the holder's AID",
              "type": "string"
            },
            "nameGiven": {
              "description": "Given-name block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Given-name block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "nameGiven"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "nameGiven": {
                      "description": "Given (first) name(s)",
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "nameFamily": {
              "description": "Family-name block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Family-name block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "nameFamily"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "nameFamily": {
                      "description": "Family (last) name",
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "dob": {
              "description": "Date-of-birth block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Date-of-birth block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "dob"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "dob": {
                      "description": "Date of birth",
                      "type": "string",
                      "format": "date"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "image": {
              "description": "Image block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Image block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "image"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "image": {
                      "description": "State-endorsed portrait, committed by digest; bytes holder-carried",
                      "type": "object",
                      "required": [
                        "digest"
                      ],
                      "properties": {
                        "digest": {
                          "description": "SAID/multibase digest of the canonical raw image bytes",
                          "type": "string"
                        },
                        "format": {
                          "description": "IANA media type, e.g. image/jpeg",
                          "type": "string"
                        },
                        "dim": {
                          "description": "Pixel dimensions, e.g. 480x600",
                          "type": "string"
                        },
                        "captured": {
                          "description": "Capture date",
                          "type": "string",
                          "format": "date"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "faceTemplate": {
              "description": "Face-template block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Face-template block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "faceTemplate"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "faceTemplate": {
                      "description": "Cancelable/biohashed (ISO/IEC 24745-style) face template for consented dedup",
                      "type": "object",
                      "required": [
                        "digest",
                        "protocol"
                      ],
                      "properties": {
                        "digest": {
                          "description": "Digest of the protected template",
                          "type": "string"
                        },
                        "protocol": {
                          "description": "Named canonicalize-and-transform protocol",
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "residenceStreet": {
              "description": "Residence-street block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Residence-street block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "residenceStreet"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "residenceStreet": {
                      "description": "Full street address line (kept whole)",
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "residenceCity": {
              "description": "Residence-city block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Residence-city block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "residenceCity"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "residenceCity": {
                      "description": "Residence city",
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "residenceState": {
              "description": "Residence-state block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Residence-state block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "residenceState"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "residenceState": {
                      "description": "Residence state/subdivision, e.g. UT",
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "residencePostal": {
              "description": "Residence-postal block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Residence-postal block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "residencePostal"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "residencePostal": {
                      "description": "Residence postal (ZIP) code",
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "residenceCounty": {
              "description": "Residence-county block (partially disclosable)",
              "oneOf": [
                {
                  "description": "Residence-county block SAID (withheld)",
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "d",
                    "u",
                    "residenceCounty"
                  ],
                  "properties": {
                    "d": {
                      "description": "SAID of this block",
                      "type": "string"
                    },
                    "u": {
                      "description": "Per-block blinding nonce (salty)",
                      "type": "string"
                    },
                    "residenceCounty": {
                      "description": "Residence county",
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "r": {
      "description": "SAID of the governing SEDI governance framework (sedi-id/rules.json)",
      "type": "string"
    }
  },
  "additionalProperties": false
}
