Verax Attestation Registry
  • 👋Introduction
  • ⚒️Getting Started
  • Core Concepts
    • High-Level Overview
    • Attestations
    • Schemas
    • Linked Data
    • Modules
    • Portals
    • Ecosystem
  • Developer Guides
    • ♒For Attestation Issuers
      • Create and register a Schema
      • Create a Module
      • Register a Module
      • Create a Portal
      • Register a Portal
      • Create an Attestation
      • Encoding Attestation Data
      • Revoke an Attestation
      • Replace an Attestation
      • Link Attestations
      • Bulk Create Attestations
      • EAS compatibility
    • 🧑‍🏫Tutorials
      • From a Schema to an Attestation
      • Using Ceramic to store the Attestation Payload
    • 🚀Examples
    • 🌐Using the Subgraph
    • 🛠️Using the SDK
  • Discover
    • 📚Modules Standard Library
      • ECDSAModule
      • ERC1271Module
      • FeeModule
      • IndexerModule
      • IssuersModule
      • SchemaModule
      • SenderModule
    • 🤝Integrations
  • Get Involved
    • Get in Touch
    • Contribute
    • Governance
      • Governance Charter
      • Governance Parameters
      • Overview of Governance
      • Proposal Templates
Powered by GitBook
On this page
  • Link to the code
  • When to use this module?
  • When not to use this module?
  • How to use this module?
  • How to check the authorized sender(s)?
  1. Discover
  2. Modules Standard Library

ECDSAModule

The ECDSA module allows you to check that there is a ECDSA signature in the validation payload in order to proceed with issuing the attestation.

PreviousModules Standard LibraryNextERC1271Module

Last updated 1 year ago

Link to the code

When to use this module?

Use this module when you want the issuance of an attestation to be conditional of the verification of a signature. An example of why you may want to do this, is if you only want attestations to only come from your dapp frontend. In this scenario, you might sign a message on your backend and submit it as part of the validation payload. When your portal passes the signed message to this module in the validation payload, the module checks the signature and makes sure the signer address matches the correct address.

When not to use this module?

If you don't care who uses your portal to issue attestations. Maybe you only care that they use a specific schema, but other than that, anyone can go ahead and make an attestation. Also, it may be the case that you need to support ERC-1271, which uses a different module.

How to use this module?

There are two different ways to use this module. You can either deploy a new instance of this module and use it with your portal, or you can use an existing instance of module. In this second approach, multiple different portals can actually use the same singleton instance of the module.

In either approach, you will need to add an authorized signer for the module to check the signature against. To do this, you must call the setAuthorizedSigners function with the following parameters:

  • address portal - the address of the portal contract that the attestations will come from

  • address[] memory signers - the list of signers, one of which must be required in order to attest

  • bool[] memory authorizationStatus - set to false to revoke a previously registered signer

How to check the authorized sender(s)?

Pass the signature as the validationPayload and the module will check the signature against the hash of the attestationPayload. Note that this requires that the signature should be on the attestationPayload in the first place.

📚
https://github.com/Consensys/linea-attestation-registry/blob/dev/contracts/src/stdlib/ECDSAModule.sol