Skip to content

v0.2.0

Latest
Compare
Choose a tag to compare
@sambacha sambacha released this 28 Aug 17:29
· 2 commits to master since this release
378f50a

DID Registry

This library contains the Ethereum contract code that allows the owner of a AS2
DID identity to update the attributes that appear in his DID Document.

These contracts allow Ethereum addresses to present signing information about
themselves with no prior registration. It allows them to perform key rotation
and specify different keys and services that are used on its behalf for both on
and off-chain usage.

Depending on the functionalities that you want to use, there are two smart
contracts to create a DID Registry.

  1. DIDRegistry: It is the basic DID Registry that allows multiple
    controllers and automatic key rotation. The parameters for deployment are:
    • minKeyRotationTime: The minimum time (in seconds) to automatically rotate
      the controller (each DID can set their own rotation time, but it can be
      less than this value)
  2. DIDRegistryRecoverable: It is the advanced DID Registry that allows, in
    addition to the functions of a basic DID, key recovery. The parameters for
    deployment are:
    • minKeyRotationTime (uint): The minimum time (in seconds) to automatically
      rotate the controller (inherit from DID Registry)
    • maxAttempts (uint): The maximum number of failed attempts in the reset
      period
    • minControllers (uint): The minimum number of controller that must have
      the account to be able to use this feature
    • resetSeconds (uint): The reset time period (in seconds). When the account
      exceeds the maxAttempts, the account must wait to reach the
      resetSeconds time before to call again the function to recover the
      account. When this time period is reached, the keys successfully proved to
      recover the account will be deleted, in that case is needed to prove again
      the controllers to recover the account.

The official AS2 DID Registries are deployed on xDai here::

Registry Address Parameters
DIDRegistry 0x minKeyRotationTime: 3600
DIDRegistryRecoverable 0x minKeyRotationTime: 3600
maxAttempts: 3
minControllers: 5
resetSeconds: 86400