EdgeDidPlcResolver
@atiproto/edge-resolvers
Extends DidPlcResolver from @atproto/identity to use the Web Platform fetch API with request timeouts via timed(). Resolves did:plc: identifiers against the PLC directory.
Constructor
typescript
new EdgeDidPlcResolver(options?: DidPlcResolverOptions)
| Option | Type | Default | Description |
|---|---|---|---|
| plcUrl | string | "https://plc.directory" | Base URL of the PLC directory to resolve DIDs against. |
| timeout | number | 3000 | Request timeout in milliseconds. Uses timed() with an AbortSignal. |
Example
typescript
import { EdgeDidPlcResolver } from "@atiproto/edge-resolvers";const resolver = new EdgeDidPlcResolver({plcUrl: "https://plc.directory",timeout: 5000,});const didDoc = await resolver.resolve("did:plc:abc123");
Related
- EdgeDidResolver — aggregates all DID method resolvers
- EdgeDidWebResolver — resolves did:web: identifiers