Identity (DID and Handle resolvers)

The AT Protocol has two identifiers: handles, which are DNS names, and DIDs, which are stable W3C identifiers. This package resolves between them, fetches DID documents, and caches the results.

IdResolver / AsyncIdResolver

The entry point. .handle resolves a handle to a DID over DNS and HTTP; .did resolves a DID to its document over the PLC directory or HTTP.

from atproto import IdResolver  # AsyncIdResolver for async

resolver = IdResolver()
did = resolver.handle.resolve('test.marshal.dev')
did_doc = resolver.did.resolve(did)

Tip

For the full story, covering resolve versus ensure_resolve, did:web versus did:plc, writing your own cache, and pulling the signing key out of a DID document, see the Identity guide.

A DID document is modelled by DidDocument in atproto_core.

Submodules