Encrypted, ephemeral, private memos on atproto
1import type { BaseClientOptions, ClientRequirements } from "@cistern/shared";
2import type { ResourceUri } from "@atcute/lexicons";
3
4/** Credentials and an optional public key, used for deriving `ProducerParams` */
5export interface ProducerOptions extends BaseClientOptions {
6 /** An optional record key to a Cistern public key. Assumed to be within the specified user's PDS, and retrieved before instantiation. You can omit this value if you intend to select a public key later */
7 publicKey?: string;
8}
9
10/** Required parameters for constructing a `Producer`. These are automatically created for you in `createProducer` */
11export type ProducerParams = ClientRequirements<ProducerOptions> & {
12 /** Optional public key and its contents */
13 publicKey?: PublicKeyOption;
14};
15
16/** A simplified public key, suitable for local storage */
17export interface PublicKeyOption {
18 /** Full AT-URI of this key */
19 uri: ResourceUri;
20
21 /** Generated friendly name for this public key */
22 name: string;
23
24 /** The contents of this public key, encoded in base64 */
25 content: string;
26}