bluesky-social / indigo

Go source code for Bluesky's atproto services.
https://atproto.com
Apache License 2.0
640 stars 97 forks source link

com.atproto.repo.describeRepo returns something unparseable by indigo #344

Open karalabe opened 1 year ago

karalabe commented 1 year ago

I've got the following response on this endpoint:

{
  "handle": "go-bluesky-tester.bsky.social",
  "did": "did:plc:wflozfzpewefv46qof26vbzm",
  "didDoc": {
    "@context": [
      "https://www.w3.org/ns/did/v1",
      "https://w3id.org/security/suites/secp256k1-2019/v1"
    ],
    "id": "did:plc:wflozfzpewefv46qof26vbzm",
    "alsoKnownAs": [
      "at://go-bluesky-tester.bsky.social"
    ],
    "verificationMethod": [
      {
        "id": "#atproto",
        "type": "EcdsaSecp256k1VerificationKey2019",
        "controller": "did:plc:wflozfzpewefv46qof26vbzm",
        "publicKeyMultibase": "zQYEBzXeuTM9UR3rfvNag6L3RNAs5pQZyYPsomTsgQhsxLdEgCrPTLgFna8yqCnxPpNT7DBk6Ym3dgPKNu86vt9GR"
      }
    ],
    "service": [
      {
        "id": "#atproto_pds",
        "type": "AtprotoPersonalDataServer",
        "serviceEndpoint": "https://bsky.social"
      }
    ]
  },
  "collections": [
    "app.bsky.actor.profile",
    "app.bsky.feed.post",
    "app.bsky.graph.follow"
  ],
  "handleIsCorrect": true
}

The indigo parser chokes on it however because the diddoc does not have a type field and the parser wants one. Unsure who's at fault here, just that I don't know how to fix it.

karalabe commented 1 year ago

The fault my originate from this repo not having a proper type spec for the didDoc, it just says "unknown", so generated app's can't really make heads or tails of it: https://atproto.com/lexicons/com-atproto-repo#comatprotorepodescriberepo

            "didDoc": {
              "type": "unknown"
            },
devinivy commented 11 months ago

The response there appears valid to me per the lexicon, so moving this over to indigo.