Update a DID
Update a did:cheqd Decentralized Identifier (DID) using the ACA-Py Agent.
Follow these instructions to update a did:cheqd DID from ACA-Py Agent.
⚠️ Important...
Your wallet must have the key(s) which were generated when the DID was created, without them signing will fail.
Update DID
To update an existing DID, you must pass the did id and the complete didDocumentin the request body. The main field that is updated using this method os the service object of the DID.
Body
didstringRequiredExample:
DID to update
did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86Pattern: ^(did:cheqd:(testnet|mainnet):(?:(?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))*:)*((?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))+)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)([?][^#]*)?|did:cheqd:(testnet|mainnet):(?:(?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))*:)*((?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))+)/resources/([a-z,0-9,-]{36,36})([?][^#]*)?)$didDocumentall ofRequiredExample:
DID Document to update
{"authentication":["did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#key-1"],"controller":["did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86"],"id":"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86","service":[{"id":"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#service-1","type":"MessagingService","serviceEndpoint":["https://example.com/service"]}],"verificationMethod":[{"id":"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#key-1","type":"Ed25519VerificationKey2018","controller":"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86","publicKeyMultibase":"z6Mk..."}]}optionsobjectOptionalExample:
Additional configuration options
{"network":"testnet"}Responses
200Success
application/json
post
/did/cheqd/updatePOST /did/cheqd/update HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 720
{
"did": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86",
"didDocument": {
"authentication": [
"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#key-1"
],
"controller": [
"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86"
],
"id": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86",
"service": [
{
"id": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#service-1",
"type": "MessagingService",
"serviceEndpoint": [
"https://example.com/service"
]
}
],
"verificationMethod": [
{
"id": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#key-1",
"type": "Ed25519VerificationKey2018",
"controller": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86",
"publicKeyMultibase": "z6Mk..."
}
]
},
"options": {
"network": "testnet"
}
}200Success
{
"did": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86",
"didState": {
"did": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86",
"didDocument": {
"authentication": [
"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#key-1"
],
"controller": [
"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86"
],
"id": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86",
"verificationMethod": [
{
"id": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#key-1",
"type": "Ed25519VerificationKey2020",
"controller": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86",
"publicKeyMultibase": "z6Mk..."
}
]
},
"secret": {
"signingResponse": [
{
"kid": "did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#key-1",
"signature": "SHFz..."
}
]
},
"state": "finished"
},
"success": true
}Last updated
Was this helpful?