This page explains states and a typical flow of client-managed secret mode with the did:indy
method. See https://identity.foundation/did-registration/#client-managed-secret-mode for more information about the protocol.
Possible states:
curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X POST "https://api.godiddy.com/0.1.0/universal-registrar/update?method=indy" \
-H "Content-Type: application/json" \
-d '{
"did": "did:indy:danube:1234567890123456789012",
"options": {
"clientSecretMode": true
},
"secret": { },
"didDocument": {
"@context": ["https//www.w3.org/ns/did/v1"],
"id": "did:indy:danube:1234567890123456789012",
"verificationMethod": [{
"id": "#key-1",
"type": "Ed25519VerificationKey2018",
"publicKeyBase58": "<-- base58 encoded -->"
}],
"service": [{
"id": "#didcomm",
"type": "DIDComm",
"serviceEndpoint": "https://test.com/mydidcomm/newendpoint"
}]
}
}'
action=signPayload
with "signingRequestAttrib"{
"jobId": "00000000-0000-0000-0000-000000000000",
"didState": {
"state": "action",
"action": "signPayload",
"signingRequest": {
"signingRequestAttrib": {
"kid": "did:indy:danube:1234567890123456789012#key-1",
"alg": "EdDSA",
"purpose": "authentication",
"payload": { ... },
"serializedPayload": "<-- base 64 encoded -->"
}
}
},
"didRegistrationMetadata": { ... },
"didDocumentMetadata": { ... }
}
signingResponse
for "signingRequestAttrib"curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X POST "https://api.godiddy.com/0.1.0/universal-registrar/update?method=indy" \
-H "Content-Type: application/json" \
-d '{
"jobId": "00000000-0000-0000-0000-000000000000",
"options": {
"clientSecretMode": true
},
"secret": {
"signingResponse": {
"signingRequestAttrib": {
"signature": "<-- base64 encoded -->"
}
}
},
"didDocument": { }
}'
action=signPayload
with "signingRequestNym"{
"jobId": "00000000-0000-0000-0000-000000000000",
"didState": {
"state": "action",
"action": "signPayload",
"signingRequest": {
"signingRequestNym": {
"kid": "did:indy:danube:1234567890123456789012#key-1",
"alg": "EdDSA",
"purpose": "authentication",
"payload": { ... },
"serializedPayload": "<-- base 64 encoded -->"
}
}
},
"didRegistrationMetadata": { ... },
"didDocumentMetadata": { ... }
}
signingResponse
for "signingRequestNym"curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X POST "https://api.godiddy.com/0.1.0/universal-registrar/update?method=indy" \
-H "Content-Type: application/json" \
-d '{
"jobId": "00000000-0000-0000-0000-000000000000",
"options": {
"clientSecretMode": true
},
"secret": {
"signingResponse": {
"signingRequestNym": {
"signature": "<-- base64 encoded -->"
}
}
},
"didDocument": { }
}'
state=finished
{
"jobId": "00000000-0000-0000-0000-000000000000",
"didState": {
"state": "finished",
"did": "did:indy:danube:1234567890123456789012",
"secret": { }
},
"didRegistrationMetadata": { ... },
"didDocumentMetadata": { ... }
}