Skip to content

Quickstart

Introduction

Sign Protocol is an omni-chain attestation protocol for creating and retrieving structured, verifiable data on-chain. Large data can be offloaded to IPFS* or Arweave. Participating contracts define data schemas and deposit data as attestations in Sign Protocol's smart contract.

*Storage on IPFS is free but not permanent. We recommend Arweave over IPFS.

Getting started

Defining a schema

A schema is the blueprint for an attestation: it defines the type and structure of the attestation's data. Because schemas set a standard, any observer (verifier) can check that an attestation is accurate, combine it with others, and understand what it says.

To create a schema, decide what information your attestations will store and how large the data will be. Usually all data is stored on-chain, but larger datasets are cheaper to store off-chain, either in a hybrid attestation or entirely on Arweave/IPFS.

Storage Solutions for Sign Protocol Storage Solutions for Sign Protocol
Storage Solutions for Sign Protocol

How Sign Protocol Works covers schemas in more detail. For examples, see the notary platform tutorial and the SDK examples.

Schema hooks

To use a schema hook, create a smart contract that implements the functions in the ISPHook interface. Schema hooks can whitelist attesters, charge fees, and run other application logic when attestations are created or revoked. For a sample whitelist hook, see Schema Hooks.

Creating an attestation

In Sign Protocol, an attestation is digitally signed structured data that adheres to a schema registered in the schema registry. Attestations are stored on-chain or off-chain, and you need to create or find a schema before you can create one.

An attestation must follow its schema's format to be parseable. How Sign Protocol Works covers attestations in more detail, and the notary platform tutorial and SDK examples show how to create one. To create attestations on behalf of a user (for example, to sponsor gas), you must provide a delegate signature from the user; the SDK examples include delegate attestation creation with the NPM SDK.

Querying for attestations

Sign Protocol's indexing service lets you query schema and attestation data through a REST endpoint, a GraphQL endpoint, or the NPM SDK.

Final details

For more development details and examples, see How Sign Protocol Works and the Tutorials. For how Sign Protocol fits into national identity and evidence systems, see Sign Protocol: Attestation Architecture in the whitepaper.

We recommend building on a testnet. Supported Networks lists the supported networks; if the one you need is not supported, ask us on Discord.

For bugs, docs issues, or questions, join Sign's Discord or the Telegram developer chat.