marianoguerra/atproto/identity does not have a README file

    DidDocument

    pub(all) struct DidDocument {
    id :
    Did

    also_known_as : Array[String]
    verification_method : Array[VerificationMethod]
    service : Array[Service]
    extra : Map[String,
    LexValue
    ]
    } derive(Eq,
    Debug
    )

    DidDocument::from_lex

    Decodes a didDoc, which arrives as a lexicon unknown -- so it is a LexValue until something asks for it as this.

    DidDocument::handle

    The account's handle, from the first at:// entry in alsoKnownAs.

    This is a CLAIM, not a fact. The document says what handle the account wants and anyone can write anything there; it is only true if resolving that handle leads back to this DID. verify_handle below is that second half, and @client.resolve_identity is what does both.

    DidDocument::pds_endpoint

    fn DidDocument::pds_endpoint(self : DidDocument) -> String?

    Where this account's repository lives. Every authenticated request goes here, so a session that cannot find it has to fall back on the host it logged in to.

    DidDocument::service_endpoint

    fn DidDocument::service_endpoint(self : DidDocument, id : String, type_? : String) -> String?

    An endpoint by service id, accepting the relative and absolute spellings of the id, and optionally requiring a type.

    The endpoint must be an http/https URL. That check is not decoration: a DID document is fetched from a third party and its contents decide where this library sends an access token, so a file: or data: endpoint is an attack rather than a curiosity.

    DidDocument::signing_key

    fn DidDocument::signing_key(self : DidDocument) -> VerificationMethod?

    The repository signing key, as publicKeyMultibase. Only useful to a caller verifying commits, which this library does not do -- exposed because the document carries it and dropping it would be lossy.

    DidDocument::verify_handle

    fn DidDocument::verify_handle(self : DidDocument, handle :
    Handle
    ) -> Bool

    Whether the document claims this handle -- the second half of bidirectional verification.

    Compared after normalizing, because Handle::parse lower-cases and a document may not have.

    Service

    pub(all) struct Service {
    id : String
    type_ : String
    service_endpoint : String
    extra : Map[String,
    LexValue
    ]
    } derive(Eq,
    Debug
    )

    VerificationMethod

    pub(all) struct VerificationMethod {
    id : String
    type_ : String
    controller : String
    public_key_multibase : String?
    extra : Map[String,
    LexValue
    ]
    } derive(Eq,
    Debug
    )

    PDS_SERVICE_ID

    let PDS_SERVICE_ID : String

    The fragment identifying an account's personal data server.

    PDS_SERVICE_TYPE

    let PDS_SERVICE_TYPE : String

    ... and the type it must carry.

    SIGNING_KEY_ID

    let SIGNING_KEY_ID : String

    The fragment identifying an account's repository signing key.

    Source Files