diff --git a/packages/ditto/storages/DittoAPIStore.test.ts b/packages/ditto/storages/DittoRelayStore.test.ts similarity index 93% rename from packages/ditto/storages/DittoAPIStore.test.ts rename to packages/ditto/storages/DittoRelayStore.test.ts index 5fbe5435..e589490b 100644 --- a/packages/ditto/storages/DittoAPIStore.test.ts +++ b/packages/ditto/storages/DittoRelayStore.test.ts @@ -4,7 +4,7 @@ import { genEvent, MockRelay } from '@nostrify/nostrify/test'; import { assertEquals } from '@std/assert'; import { generateSecretKey, getPublicKey } from 'nostr-tools'; -import { DittoAPIStore } from './DittoAPIStore.ts'; +import { DittoRelayStore } from './DittoRelayStore.ts'; import type { NostrMetadata } from '@nostrify/types'; @@ -50,7 +50,7 @@ function setupTest(cb: (req: Request) => Response | Promise) { return await cb(req); }; - const store = new DittoAPIStore({ conf, db, relay, pool, fetch: mockFetch }); + const store = new DittoRelayStore({ conf, db, relay, pool, fetch: mockFetch }); return { db, diff --git a/packages/ditto/storages/DittoAPIStore.ts b/packages/ditto/storages/DittoRelayStore.ts similarity index 99% rename from packages/ditto/storages/DittoAPIStore.ts rename to packages/ditto/storages/DittoRelayStore.ts index 9a8fc570..a6f14025 100644 --- a/packages/ditto/storages/DittoAPIStore.ts +++ b/packages/ditto/storages/DittoRelayStore.ts @@ -43,7 +43,7 @@ import { unfurlCardCached } from '@/utils/unfurl.ts'; import { renderWebPushNotification } from '@/views/mastodon/push.ts'; import { nip19 } from 'nostr-tools'; -interface DittoAPIStoreOpts { +interface DittoRelayStoreOpts { db: DittoDB; conf: DittoConf; pool: NRelay; @@ -51,7 +51,7 @@ interface DittoAPIStoreOpts { fetch?: typeof fetch; } -export class DittoAPIStore implements NRelay { +export class DittoRelayStore implements NRelay { private push: DittoPush; private encounters = new LRUCache({ max: 5000 }); private controller = new AbortController(); @@ -62,7 +62,7 @@ export class DittoAPIStore implements NRelay { private ns = 'ditto.apistore'; - constructor(private opts: DittoAPIStoreOpts) { + constructor(private opts: DittoRelayStoreOpts) { const { conf, db } = this.opts; this.push = new DittoPush(opts);