This page explains states and a typical flow of client-managed secret mode with the did:ethr
method. See https://identity.foundation/did-registration/#client-managed-secret-mode for more information about the protocol.
Possible states:
verificationMethod
"#controllerKey"Supported options:
mainnet
, goerli
, sepolia
)curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X POST "https://api.godiddy.com/0.1.0/universal-registrar/create?method=ethr" \
-H "Content-Type: application/json" \
-d '{
"options": {
"clientSecretMode": true,
"network": "goerli"
},
"secret": { },
"didDocument": { }
}'
action=getVerificationMethod
{
"jobId": null,
"didState": {
"state": "action",
"action": "getVerificationMethod",
"verificationMethodTemplate": [{
"id": "#controllerKey",
"type": "EcdsaSecp256k1VerificationKey2019"
}]
},
"didRegistrationMetadata": { ... },
"didDocumentMetadata": { ... }
}
verificationMethod
"#controllerKey"curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X POST "https://api.godiddy.com/0.1.0/universal-registrar/create?method=ethr" \
-H "Content-Type: application/json" \
-d '{
"options": {
"clientSecretMode": true,
"network": "goerli"
},
"secret": { },
"didDocument": {
"@context": ["https//www.w3.org/ns/did/v1"],
"verificationMethod": [{
"id": "#controllerKey",
"type": "EcdsaSecp256k1VerificationKey2019",
"publicKeyHex": "04d9c24fcc89e6cdd4a20e9a53836d2c5c0ccd19a0ec20e00f2e7796e48daa75bf960d5b9dd51484cf82ef9065abe02abffefa3cc3cbf72e44b374e17aeab091ca"
}]
}
}'
state=finished
{
"jobId": null,
"didState": {
"did": "did:ethr:goerli:0x02d9c24fcc89e6cdd4a20e9a53836d2c5c0ccd19a0ec20e00f2e7796e48daa75bf",
"state": "finished",
"secret": {
"verificationMethod": [
[{
"id": "#controllerKey",
"type": "EcdsaSecp256k1VerificationKey2019"
},
{
"id": "did:ethr:goerli:0x02d9c24fcc89e6cdd4a20e9a53836d2c5c0ccd19a0ec20e00f2e7796e48daa75bf#controllerKey",
"controller": "did:ethr:goerli:0x02d9c24fcc89e6cdd4a20e9a53836d2c5c0ccd19a0ec20e00f2e7796e48daa75bf",
"purpose": [
"authentication",
"assertionMethod"
]
}
]
]
}
}
}
Generate a new DID controller keypair (secp256k1):
openssl ecparam -genkey -name secp256k1 -outform DER >privkey
openssl ec -conv_form uncompressed -in privkey -pubout -out pubkey -inform DER -outform DER
Convert DID controller public key to hexadecimal:
cat pubkey| tail -c +24| basenc -w0 --base16
The result can then used as value of publicKeyHex
in Request 2.