LogoLogo
  • Sign Protocol
    • Introduction
    • FAQ
  • For Hackers
    • Getting Started
  • For Builders
    • Getting Started
      • Fundamentals
      • Tutorials
        • Building a Simple Notary Platform
          • Schema Creation
          • Attestation Creation
          • Querying Attestations
          • Parsing Attestation Data
        • Delegate Attestation Creation
          • Express Backend
          • Solidity
      • Examples
        • Attestation Discord Bot
        • KYC-Gated Smart Contract Access Control
    • Supported Networks
    • Sign Developer Platform
    • Advanced Topics
      • Cross Chain Attestations
      • Hybrid Attestations
      • Schema Hooks
        • Tutorial: Checking Attestation Data
          • Schema Creation
          • Schema Hook
          • Creating an Attestation (Solidity)
      • ZK Attestations
        • Compile a Circuit
        • Create a Schema Hook
    • Querying Data
      • NPM SDK
        • Usage & Examples
      • REST APIs
        • Schemas
        • Attestations
      • GraphQL
        • Schemas
        • Attestations
    • Writing Data
      • NPM SDK
        • Installation
        • Usage
          • Schemas
          • Attestations
        • Examples
        • Changelog
      • Smart Contract
        • EVM
          • Interfaces
            • ISP
            • ISPHook
            • IVersionable
          • Data Models
            • Schema
            • Attestation
            • DataLocation
  • For Thinkers
    • A Future Of Verifiable Trust
    • Effective Attestations
    • Incentive-Aligned Public Good
    • Glossary
      • Attestations
      • Schema
      • Schema Registry
      • Attestation Repository
  • Case Study
    • EthSign
    • KYC-Gated Contract Calls
    • Proof of Audit
    • Developer Onchain Reputation
    • Onboarding Web2 Data
Powered by GitBook
LogoLogo

Copyright Sign 2021-2024

On this page

Was this helpful?

  1. For Builders
  2. Writing Data
  3. Smart Contract
  4. EVM
  5. Data Models

Schema

Schema

This struct represents an on-chain Schema that Attestations can conform to.

registrant: The address that registered this schema.

revocable: Whether Attestations that adopt this Schema can be revoked.

dataLocation: Where Schema.data is stored. See DataLocation.DataLocation.

maxValidFor: The maximum number of seconds that an Attestation can remain valid. 0 means Attestations can be valid forever. This is enforced through Attestation.validUntil.

hook: The ISPHook that is called at the end of every function. 0 means there is no hook set. See ISPHook.

timestamp: When the schema was registered. This is automatically populated by _register(...).

data: The raw schema that Attestation.data should follow. Since there is no way to enforce this, it is a string for easy readability.

struct Schema {
  address registrant;
  bool revocable;
  enum DataLocation dataLocation;
  uint64 maxValidFor;
  ISPHook hook;
  uint64 timestamp;
  string data;
}
PreviousData ModelsNextAttestation

Last updated 1 year ago

Was this helpful?