From a4aea7be26c350953982b8da4de019c91ebb74d3 Mon Sep 17 00:00:00 2001 From: Bailey Townsend Date: Mon, 16 Mar 2026 16:55:21 -0500 Subject: [PATCH] day one done --- shared/challenges_markdown/one/part_two.md | 70 +++++++++++++++++----- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/shared/challenges_markdown/one/part_two.md b/shared/challenges_markdown/one/part_two.md index f14988a..e632f2c 100644 --- a/shared/challenges_markdown/one/part_two.md +++ b/shared/challenges_markdown/one/part_two.md @@ -1,25 +1,67 @@ -//notes we are using the users multibase as the answer here. Explain how to find the did doc and what that key does - Great job beating Part 1! Now onto Part 2. -This will be submitting their public verification code from the did doc since each did doc will have one. - -Each one has a unique way to find something called a [DID document](https://atproto.com/specs/did#did-documents). Your -did document holds various information about your identity. Things like where does your PDS live, the key that signs -your repo, handle, and more. - -explain where to find the did document for each did +You now know how to find your did. But how to do you get things like the PDS url or the public signing key? These are +stored on something called a [did document](https://atproto.com/specs/did#did-documents). On atproto there are two valid +did's that can be used. [did:plc and did:web](https://atproto.com/specs/did#blessed-did-methods) with each one having a +slightly different way to find the did document. # plc -talk about where to find the PLC +The PLC, or Public Ledger of Credentials, is a type of did host by Bluesky PBC currently, with plans to move to +an [independent +entity](https://docs.bsky.app/blog/plc-directory-org). This allows users to sign up for an account on the atmosphere +easily and without prerequisites. The PLC is the authority of the did doc with the popular one +being [https://plc.directory](https://plc.directory/). Access to changing the did doc is by rotation keys which are +either secp256k1 (“k256”) or NIST P-256 (“p256”) public `did:keys` which are set on creation of the did and changed when +using a previous one to sign for the change. Can read more on that [here](https://web.plc.directory/spec/v0.1/did-plc). + +To find the did doc for a `did:plc` you can make a simple web request to `https://plc.directory/{did}`, like +`https://plc.directory/did:plc:vc7f4oafdgxsihk4cry2xpze`. To find the rotation keys or previous revsions you can +append `/log` to the url, `https://plc.directory/did:plc:vc7f4oafdgxsihk4cry2xpze/log` # did:web -talk about how to find your did:web (altho you probably already know this) +With `did:web` the domain of the did is the authority of the did doc, and you can find it via +`https://{did:web}/.well-known/did.json`. +An example would be the `did:web:didd.uk` with it's did doc found at https://didd.uk/.well-known/did.json. There are no +rotation keys since the proof is in the control of the domain and exposing the doc at the url. + +# The doc + +The did doc itself is much the same for both did types. It holds important information like. The user's handle, the +signing key (verificationMethod with the users did), and the PDS url (the `#atproto_pds` service). Can read more about +the +did doc [here](https://atproto.com/specs/did#did-documents). + +```json +{ + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3id.org/security/multikey/v1", + "https://w3id.org/security/suites/secp256k1-2019/v1" + ], + "id": "did:plc:vc7f4oafdgxsihk4cry2xpze", + "alsoKnownAs": [ + "at://jcsalterego.bsky.social" + ], + "verificationMethod": [ + { + "id": "did:plc:vc7f4oafdgxsihk4cry2xpze#atproto", + "type": "Multikey", + "controller": "did:plc:vc7f4oafdgxsihk4cry2xpze", + "publicKeyMultibase": "zQ3shTnCYJAav9LgJrRWt81qiW2uKArPQNiNP62igctKXCQh9" + } + ], + "service": [ + { + "id": "#atproto_pds", + "type": "AtprotoPersonalDataServer", + "serviceEndpoint": "https://shiitake.us-east.host.bsky.network" + } + ] +} -Keeping it simple proof of concept, blah, blah will have a real one here another time. Add a new field `partTwo` to the -record with the value `{{code}}` +``` -[//]: # () \ No newline at end of file +To complete this challenge. Enter your did's `publicKeyMultibase` from your did doc into the text box below. \ No newline at end of file -- 2.51.2