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.
- 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)
- 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
periodminControllers (uint)
: The minimum number of controller that must have
the account to be able to use this featureresetSeconds (uint)
: The reset time period (in seconds). When the account
exceeds themaxAttempts
, 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 |