Skip to content

DID-Update tyronZIL transaction

It makes modifications to the user's self-sovereign identity (stored in their DIDC). To be able to execute this operation, the user MUST possess the private did_update_key.

Once the operation request is processed, the contract owner MUST make a call to the DidUpdate transition of the user's DIDC.

On the DID-Client's side:

  1. Initialize with the Zilliqa network (mainnet or testnet) & the user's domain name.did to fetch their DID contract from the blockchain.
  2. Utilize the user's private did_update_key to verify that it corresponds to the public did_update_key stored in the DIDC.
  3. Get the user's input regarding the update patch actions, and generate the List Document.
  4. Hash the document with the HASH_ALGORITHM and sign the hash with the SIGNATURE_ALGORITHM using the did_update_keys.
  5. Generate a new key-pair for the did_update_keys necessary for any future Update operation.
  6. Return the new document, hash, Schnorr signature & the new public did_update_key.

    All private keys MUST be in control of the user.

  7. Submit the DidUpdate tyronZIL transaction with its transition parameters (agent, newDocument, docHash, signature and newUpdateKey). The contract owner MUST call this transition for it to be successful.

On the DID smart contract's side

When the DidUpdate transition gets called, the DIDC proceeds as follows:

  1. First, it verifies that the DID-Status is operational by executing the IsRightStatus procedure.
  2. Executes the Payment procedure to make the DIDC work only if the payment is correct.
  3. Executes the IsRightCaller procedure to verify that the call comes from the user (contract owner address).
  4. Performs the IsRightSignature procedure to verify that the signature got produced with the did_update_keys by applying the Schnorr signature algorithm. For this verification, the DIDC utilizes the public key that it has stored in the did_update_key mutable field.
  5. Executes the UpdateDocument procedure to update the verification_methods and services map fields.
  6. Applies the IsValidKey procedure to verify that the new public did_update_key is different from any other key. If so, then saves the new key in the did_update_key mutable field.
  7. Sets the DID-Status to Updated.
  8. Emits a "DID_updated" event & executes the Timestamp procedure.

A DID-Update tyronZIL transaction consumes approximately 700 units of GAS (1.4 ZIL, currently less than 0.03 USD).