EdgeXrpcHandleResolver
@atiproto/edge-resolvers
Resolves ATProto handles to DIDs by calling the com.atproto.identity.resolveHandle XRPC endpoint via fetch. No Node.js networking APIs required.
Constructor
typescript
new EdgeXrpcHandleResolver(service?: string | URL)
| Parameter | Type | Default | Description |
|---|---|---|---|
| service | string | URL | "https://public.api.bsky.app" | The XRPC service URL to use for handle resolution. Can be any ATProto PDS or AppView that implements com.atproto.identity.resolveHandle. |
Methods
| Method | Returns | Description |
|---|---|---|
| resolve(handle) | Promise<string> | Resolves an ATProto handle (e.g. alice.bsky.social) to a DID string. |
Example
typescript
import { EdgeXrpcHandleResolver } from "@atiproto/edge-resolvers";const resolver = new EdgeXrpcHandleResolver();const did = await resolver.resolve("alice.bsky.social");// => "did:plc:abc123..."