···182182183183```ts
184184import { parseResourceUri, type Did, type Handle } from '@atcute/lexicons';
185185+import { isDid } from '@atcute/lexicons/syntax';
185186import { user } from './auth.svelte';
186187import { DOH_RESOLVER, type AllowedCollection } from './settings';
187188import {
···220221221222 const data = await handleResolver.resolve(handle);
222223 return data;
224224+}
225225+226226+/**
227227+ * Returns a DID given a handle or DID string.
228228+ */
229229+export async function actorToDid(actor: string): Promise<Did> {
230230+ if (isDid(actor)) return actor;
231231+ return await resolveHandle({ handle: actor as Handle });
223232}
224233225234const didResolver = new CompositeDidDocumentResolver({
···511520export {
512521 parseUri,
513522 resolveHandle,
523523+ actorToDid,
514524 getPDS,
515525 getDetailedProfile,
516526 getClient,
···11import { parseResourceUri, type Did, type Handle } from '@atcute/lexicons';
22+import { isDid } from '@atcute/lexicons/syntax';
23import { user } from './auth.svelte';
34import { DOH_RESOLVER, type AllowedCollection } from './settings';
45import {
···37383839 const data = await handleResolver.resolve(handle);
3940 return data;
4141+}
4242+4343+/**
4444+ * Returns a DID given a handle or DID string.
4545+ */
4646+export async function actorToDid(actor: string): Promise<Did> {
4747+ if (isDid(actor)) return actor;
4848+ return await resolveHandle({ handle: actor as Handle });
4049}
41504251const didResolver = new CompositeDidDocumentResolver({