FakeAtproto

tcmts.cli.test.e2e.examples.FakeAtproto · #quuv6k4u · type

The fake network, running: its URL (every service is at it), and what it holds.

import type { FakeRecord } from "#codebase/tcmts/cli/test/e2e/examples";

export interface FakeAtproto {
  url: string;
  records: Map<string, FakeRecord>;
  /** put a record straight in (to start from), as its author would have */
  seed(did: string, collection: string, rkey: string, value: Record<string, unknown>): FakeRecord;
  /** how many times someone has signed in with OAuth, and refreshed their tokens */
  oauth: { signIns: number; refreshes: number };
  /** sign this record's getRecord with some other key from now on, as a forged one would be */
  forge(uri: string): void;
  /** a record Jetstream says was written, that its repository doesn't hold */
  unsigned(did: string, collection: string, rkey: string, value: Record<string, unknown>): void;
}

uses

used by