DID ResolverΒΆ

class atproto_identity.did.resolver.AsyncDidResolver(plc_url: str | None = None, timeout: float | None = None, cache: AsyncDidBaseCache | None = None)ΒΆ

Asynchronous DID Resolver.

Supported DID methods: PLC, Web.

Parameters:
  • plc_url – PLC directory URL.

  • timeout – Request timeout.

  • cache – DID cache.

async ensure_resolve(did: str, force_refresh: bool = False) DidDocumentΒΆ

Ensure DID is resolved.

Parameters:
  • did – DID.

  • force_refresh – Force refresh cache.

Returns:

DID document.

Return type:

DidDocument

Raises:

DidNotFoundError – DID not found.

async refresh_cache(did: str) NoneΒΆ

Refresh cached DID.

Parameters:

did – DID.

async resolve(did: str, force_refresh: bool = False) DidDocument | NoneΒΆ

Resolve DID.

Parameters:
  • did – DID.

  • force_refresh – Force refresh cache.

Returns:

DID document or None if not found.

Return type:

DidDocument

async resolve_atproto_data(did: str, force_refresh: bool = False) AtprotoDataΒΆ

Resolve AT Protocol Data.

Parameters:
  • did – DID.

  • force_refresh – Force refresh cache.

Returns:

AT Protocol data.

Return type:

AtprotoData

Raises:
async resolve_atproto_key(did: str, force_refresh: bool = False) strΒΆ

Resolve AT Protocol signing key.

Parameters:
  • did – DID.

  • force_refresh – Force refresh cache.

Returns:

AT Protocol signing key.

Return type:

str

Raises:
async resolve_no_cache(did: str) DidDocument | NoneΒΆ

Resolve DID without cache.

Parameters:

did – DID.

Returns:

DID document or None if not found.

Return type:

DidDocument

async resolve_without_validation(did: str) Dict[str, Any] | NoneΒΆ

Resolve DID without validation.

Parameters:

did – DID.

Returns:

DID document or None if DID not found.

Return type:

dict

static validate_did_doc(did: str, value: Dict[str, Any]) DidDocumentΒΆ
class atproto_identity.did.resolver.DidResolver(plc_url: str | None = None, timeout: float | None = None, cache: DidBaseCache | None = None)ΒΆ

DID Resolver.

Supported DID methods: PLC, Web.

Parameters:
  • plc_url – PLC directory URL.

  • timeout – Request timeout.

  • cache – DID cache.

ensure_resolve(did: str, force_refresh: bool = False) DidDocumentΒΆ

Ensure DID is resolved.

Parameters:
  • did – DID.

  • force_refresh – Force refresh cache.

Returns:

DID document.

Return type:

DidDocument

Raises:

DidNotFoundError – DID not found.

refresh_cache(did: str) NoneΒΆ

Refresh cached DID.

Parameters:

did – DID.

resolve(did: str, force_refresh: bool = False) DidDocument | NoneΒΆ

Resolve DID.

Parameters:
  • did – DID.

  • force_refresh – Force refresh cache.

Returns:

DID document or None if not found.

Return type:

DidDocument

resolve_atproto_data(did: str, force_refresh: bool = False) AtprotoDataΒΆ

Resolve AT Protocol Data.

Parameters:
  • did – DID.

  • force_refresh – Force refresh cache.

Returns:

AT Protocol data.

Return type:

AtprotoData

Raises:
resolve_atproto_key(did: str, force_refresh: bool = False) strΒΆ

Resolve AT Protocol signing key.

Parameters:
  • did – DID.

  • force_refresh – Force refresh cache.

Returns:

AT Protocol signing key.

Return type:

str

Raises:
resolve_no_cache(did: str) DidDocument | NoneΒΆ

Resolve DID without cache.

Parameters:

did – DID.

Returns:

DID document or None if not found.

Return type:

DidDocument

resolve_without_validation(did: str) Dict[str, Any] | NoneΒΆ

Resolve DID without validation.

Parameters:

did – DID.

Returns:

DID document or None if DID not found.

Return type:

dict

static validate_did_doc(did: str, value: Dict[str, Any]) DidDocumentΒΆ