Encrypted, ephemeral, private memos on atproto
3
fork

Configure Feed

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

at 4e4d4e463e6e2bfddd2041bb70b1825dfc7b2c9a 22 lines 660 B view raw
1import { Client, CredentialManager } from "@atcute/client"; 2import { resolveMiniDoc } from "./resolve-did.ts"; 3import type { BaseClientOptions, ClientRequirements } from "./types.ts"; 4 5export async function produceRequirements<Options extends BaseClientOptions>( 6 options: Options, 7): Promise<ClientRequirements<Options>> { 8 const miniDoc = await resolveMiniDoc(options.handle); 9 const manager = new CredentialManager({ service: miniDoc.pds }); 10 const rpc = new Client({ handler: manager }); 11 await manager.login({ 12 identifier: miniDoc.handle, 13 password: options.appPassword, 14 }); 15 16 return { 17 miniDoc, 18 manager, 19 rpc, 20 options, 21 }; 22}