Last updated
Edit

DIDSet

[Source]

(Requires the DID amendment )

Creates a new DID ledger entry or updates the fields of an existing one.

Example DIDSet JSON

{
  "TransactionType": "DIDSet",
  "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
  "Fee": "10",
  "Sequence": 391,
  "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
  "Data": "",
  "SigningPubKey":"0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020"
}

DIDSet Fields

In addition to the common fields, DIDSet transactions use the following fields:

FieldJSON TypeInternal TypeRequired?Description
DataStringBlobNoThe public attestations of identity credentials associated with the DID.
DIDDocumentStringBlobNoThe DID document associated with the DID.
URIStringBlobNoThe Universal Resource Identifier associated with the DID.

You must include either Data, DIDDocument, or URI when you submit the DIDSet transaction. If all three fields are missing, the transaction fails.

Note
To delete the Data, DIDDocument, or URI field from an existing DID ledger entry, add the field as an empty string.

Error Cases

Besides errors that can occur for all transactions, DIDSet transactions can result in the following transaction result codes:

Error CodeDescription
tecEMPTY_DIDThe transaction will create an empty DID ledger entry. Check that your updates don't remove the Data, DIDDocument, and URI fields.
temEMPTY_DIDThe transaction is malformed and missing any DID information. Include either the Data, DIDDocument, or URI fields.