import { AtpAgent } from "@atproto/api"; export async function getActor(agent: AtpAgent, did: string) { const response = await agent.com.atproto.repo.getRecord({ repo: did, collection: "app.bsky.actor.profile", rkey: "self" }); return response.data; } export async function getActorDid(agent: AtpAgent, handle: string) { if (handle.startsWith("did:")) { return handle; } const response = await agent.resolveHandle({ handle: handle, }); return response.data.did; } export async function getActorFeed(agent: AtpAgent, did: string, limit?: number, cursor?: string) { const response = await agent.com.atproto.repo.listRecords({ repo: did, collection: "lol.skittr.skitpic.entry", limit: limit, cursor: cursor }); return response.data; }