# Schema

## Overview

<figure><img src="/files/k44OU2kGtrNq9Us6n45u" alt=""><figcaption><p>An EthSign schema on Sign Protocol</p></figcaption></figure>

A schema defines the type and structure of data used in attestations, creating standards for accuracy and composability. It ensures attestations are insightful and verifiable. A Schema Registry stores and references schemas, coordinating standards and processes for efficient schema use.

## Purpose

Schemas establish rules for data organization in attestations, ensuring they are insightful and valid. They define structure and selection criteria for data points, providing context and provability. Schemas shape attestation standards, enhancing trust system efficiency.

## Design

<figure><img src="/files/DZGyI2J8SfoGlicRWsT6" alt="" width="400"><figcaption><p>How Sign Protocol schemas are structured in Solidity</p></figcaption></figure>

Sign Protocol schemas consist of two core modules:

1. **Header**: Contains metadata for initial attestation analysis, including:
   * **Attestation ID**: Unique identifier for cross-referencing.
   * **Claim Reference**: Points to a related claim or assertion.
   * **Attester ID**: Identifies the attestation creator.
   * **Signature**: Cryptographic certification of the attestation.
   * **Schema Registry ID**: References the schema used.
2. **Body**: Contains detailed attestation data, including:
   * **Timestamp**: When the event was observed.
   * **Subject ID**: Identifies the attestation subject.
   * **Boolean**: Indicates claim truthfulness.
   * **Cryptographic Proof**: Ensures data integrity.
   * **Evidence Data**: Supports or refutes the claim.

## Building a Schema

Schemas are typically JSON structures, organized as key-value pairs. They can be created using text editors or implemented as blockchain-based scripts. Sign Protocol's Schema Builder streamlines schema creation, offering intuitive flows and reducing complexity.

Schemas are vital for defining attestation nature, ensuring clarity and standardization. A well-crafted schema forms the basis for a robust attestation ecosystem.

For more on schemas, see our blog post: [Schemas: The Blueprint of Attestations](https://medium.com/ethsign/schemas-the-blueprint-of-attestations-c6b0e6faf430).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sign.global/reference/index/schema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
