Expand description
Identity resolution for the AT Protocol
Jacquard’s handle-to-DID and DID-to-document resolution with configurable fallback chains.
§Quick start
use jacquard_identity::{PublicResolver, resolver::IdentityResolver};
use jacquard_common::types::string::Handle;
let resolver = PublicResolver::default();
// Resolve handle to DID
let did = resolver.resolve_handle(&Handle::new("alice.bsky.social")?).await?;
// Fetch DID document
let doc_response = resolver.resolve_did_doc(&did).await?;
let doc = doc_response.parse()?; // Borrow from response buffer§Resolution fallback order
Handle → DID (configurable via resolver::HandleStep):
- DNS TXT record at
_atproto.{handle}(ifdnsfeature enabled) - HTTPS well-known at
https://{handle}/.well-known/atproto-did - PDS XRPC
com.atproto.identity.resolveHandle(if PDS configured) - Public API fallback (
https://public.api.bsky.app) - Slingshot
resolveHandle(if configured)
DID → Document (configurable via resolver::DidStep):
did:webHTTPS well-known- PLC directory HTTP (for
did:plc) - PDS XRPC
com.atproto.identity.resolveDid(if PDS configured) - Slingshot mini-doc (partial document)
§Customization
use jacquard_identity::JacquardResolver;
use jacquard_identity::resolver::{ResolverOptions, PlcSource};
let opts = ResolverOptions {
plc_source: PlcSource::slingshot_default(),
public_fallback_for_handle: true,
validate_doc_id: true,
..Default::default()
};
let resolver = JacquardResolver::new(reqwest::Client::new(), opts);
#[cfg(feature = "dns")]
let resolver = resolver.with_system_dns(); // Enable DNS TXT resolution§Response types
Resolution methods return wrapper types that own the response buffer, allowing zero-copy parsing:
resolver::DidDocResponse- Full DID document responseMiniDocResponse- Slingshot mini-doc response (partial)
Both support .parse() for borrowing and validation.
Modules§
- lexicon_
resolver - Lexicon schema resolution via DNS and XRPC
- resolver
- Identity resolution: handle → DID and DID → document, with smart fallbacks.
Structs§
- Jacquard
Resolver - Default resolver implementation with configurable fallback order.
- Mini
DocResponse - Slingshot mini-doc JSON response wrapper
Enums§
- Identity
Warning - Warnings produced during identity checks that are not fatal
Functions§
- slingshot_
resolver_ default - Build a resolver configured to use Slingshot (
https://slingshot.microcosm.blue) for PLC and mini-doc fallbacks, unauthenticated by default.
Type Aliases§
- Public
Resolver - Resolver specialized for unauthenticated/public flows using reqwest and stateless XRPC