I'm running into an issue where the DID genesis operation returned by the DidBuilder are not valid. For example, if I run the create_did example in this repo:
{
"type": "plc_operation",
"rotationKeys": [
"did:key:z4oJ8cTtWSyiw4ggvJAkkjKbFmaqQ815FqtQyvJNZYRHNBx4qnNr6F8tjFBPn9Vzjz9Rp7BaR8sh7CWXGToQkw9akXUdq"
],
"verificationMethods": {
"atproto": "did:key:zQ3shce89AwLodbdeCMiCu72dtZN27JqDKox5k42aRhhYoe2t"
},
"alsoKnownAs": [
"at://alice.example.com"
],
"services": {
"atproto_pds": {
"type": "AtprotoPersonalDataServer",
"endpoint": "https://pds.example.com"
}
},
"sig": "P-jbAHAkkVes3_Spk1tL-5o1KYTckH0WubgxorD7DpE5LekO75tr45LeFNHmzRruXGn_kpDTWlUNONOXGebE_Q"
}
Trying to create the DID using the goat CLI yields:
PLC directory request failed status_code=400 body="{\"message\":\"Invalid rotationKey: did:key:z4oJ8cTtWSyiw4ggvJAkkjKbFmaqQ815FqtQyvJNZYRHNBx4qnNr6F8tjFBPn9Vzjz9Rp7BaR8sh7CWXGToQkw9akXUdq\"}"
error: failed did:plc operation submission, HTTP status: 400
If I switch the key type from p256 to k256 then it fails with an invalid signature:
PLC directory request failed status_code=400 body="{\"message\":\"Invalid signature on op: {\\\"type\\\":\\\"plc_operation\\\",\\\"rotationKeys\\\":[\\\"did:key:zQ3shrXWGT7b5n6TdNYnjg1CfCGkjGz5tXMpbCtn9eSYa9aVa\\\"],\\\"verificationMethods\\\":{\\\"atproto\\\":\\\"did:key:zQ3shbXa8NLFgcBqvfmRxe9vGHwqeCTijha6NaW7wnmdPRKJb\\\"},\\\"alsoKnownAs\\\":[\\\"at://alice.example.com\\\"],\\\"services\\\":{\\\"atproto_pds\\\":{\\\"type\\\":\\\"AtprotoPersonalDataServer\\\",\\\"endpoint\\\":\\\"https://pds.example.com\\\"}},\\\"prev\\\":null,\\\"sig\\\":\\\"cfWuIhLKoLCr6fVdSR6lpWYF-cBh0RA36un91GNR3O9OvRVYdxlE0fztBn4piu1u8Fn66FL53S_F2gdFadlCNw\\\"}\"}"
error: failed did:plc operation submission, HTTP status: 400
I'm also finding that the did returned by the
DidBuilderdiffers from the DID calculated by thegoatCLI for the genesis JSON.