[READ-ONLY] Mirror of https://github.com/flo-bit/atmo-garden. atmo.garden
0

Configure Feed

Select the types of activity you want to include in your feed.

add actorToDid

+22 -1
+2 -1
.claude/settings.local.json
··· 7 7 "mcp__plugin_svelte_svelte__svelte-autofixer", 8 8 "mcp__plugin_svelte_svelte__get-documentation", 9 9 "Bash(pnpm check:*)", 10 - "Bash(pnpm env:generate-secret:*)" 10 + "Bash(pnpm env:generate-secret:*)", 11 + "Bash(pnpm build:agent-setup:*)" 11 12 ] 12 13 } 13 14 }
+10
AGENT_SETUP.md
··· 182 182 183 183 ```ts 184 184 import { parseResourceUri, type Did, type Handle } from '@atcute/lexicons'; 185 + import { isDid } from '@atcute/lexicons/syntax'; 185 186 import { user } from './auth.svelte'; 186 187 import { DOH_RESOLVER, type AllowedCollection } from './settings'; 187 188 import { ··· 220 221 221 222 const data = await handleResolver.resolve(handle); 222 223 return data; 224 + } 225 + 226 + /** 227 + * Returns a DID given a handle or DID string. 228 + */ 229 + export async function actorToDid(actor: string): Promise<Did> { 230 + if (isDid(actor)) return actor; 231 + return await resolveHandle({ handle: actor as Handle }); 223 232 } 224 233 225 234 const didResolver = new CompositeDidDocumentResolver({ ··· 511 520 export { 512 521 parseUri, 513 522 resolveHandle, 523 + actorToDid, 514 524 getPDS, 515 525 getDetailedProfile, 516 526 getClient,
+1
src/lib/atproto/index.ts
··· 3 3 export { 4 4 parseUri, 5 5 resolveHandle, 6 + actorToDid, 6 7 getPDS, 7 8 getDetailedProfile, 8 9 getClient,
+9
src/lib/atproto/methods.ts
··· 1 1 import { parseResourceUri, type Did, type Handle } from '@atcute/lexicons'; 2 + import { isDid } from '@atcute/lexicons/syntax'; 2 3 import { user } from './auth.svelte'; 3 4 import { DOH_RESOLVER, type AllowedCollection } from './settings'; 4 5 import { ··· 37 38 38 39 const data = await handleResolver.resolve(handle); 39 40 return data; 41 + } 42 + 43 + /** 44 + * Returns a DID given a handle or DID string. 45 + */ 46 + export async function actorToDid(actor: string): Promise<Did> { 47 + if (isDid(actor)) return actor; 48 + return await resolveHandle({ handle: actor as Handle }); 40 49 } 41 50 42 51 const didResolver = new CompositeDidDocumentResolver({