Skip to content

Delegate Attestation Creation

This tutorial uses the Sign Protocol Smart Contract directly and the NPM SDK.

Warning

This tutorial gets the user's signature from the SDK's delegateSignAttestation, which signs in the pre-1.1.4 format. Sign Protocol contracts at version 1.1.4, the version on all maintained deployments, reject those signatures. Until the SDK is updated, replace that step with a signature built as described in Delegated signatures; the rest of the tutorial is unchanged.

Problem statement: delegate attestation creation

Delegate attestations have two main uses: initiated offchain, they let your backend pay gas fees for your users; initiated onchain, they let your smart contract create attestations on behalf of wallets interacting with it. This tutorial assumes you have created a schema and know how to create an attestation. Any schema works; to get started, see Building a Simple Notary Platform.

The tutorial has two parts: a JS backend and a Solidity contract. Both need the same frontend code to request a delegate signature from users.

Finished code

The finished code is in the examples repository.