FastATP

DIDServer

A class in fastatp.server.did_server (source).

DIDServer(
    domain: str,
    resolver: SlugResolver,
    *,
    chain_resolver: ChainResolver | None = None,
    shelf_store: ShelfStore | None = None,
    shelf_accept: ShelfAccept | None = None,
)

Serves /.well-known/did.json (root DID, slug "") and /{slug}/did.json (path-segmented DIDs) from a caller-supplied resolver.

For self-certifying did:web continuity an optional chain_resolver also serves /{slug}/chain.json — the append-only ContinuityChain log beside the twin's head document.

Passing shelf_store opts in to the shelf-intake route: POST {SHELF_INTAKE_PATH} with a chain JSON body. The intake verifies the chain self-certifies for this server's domain (fail closed), refuses rollbacks when a chain_resolver can see the currently served chain, runs shelf_accept (default: accept), then hands the chain to shelf_store. Without shelf_store the route does not exist.

Attributes

Methods

run

run(host: str = '127.0.0.1', port: int = 8000, **kwargs: Any) -> None

Run standalone under uvicorn (blocking).