Remove unused code

This commit is contained in:
Alex Gleason 2023-04-29 17:20:51 -05:00
parent dabc3b7e3a
commit f87a17e609
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
4 changed files with 0 additions and 36 deletions

View File

@ -1,7 +0,0 @@
import { lmdb } from '@/deps.ts';
const db = lmdb.open('db', {});
const gossipDB = db.openDB('gossip', { dupSort: true });
export { db, gossipDB };

View File

@ -18,4 +18,3 @@ export {
nip21,
signEvent as getSignature,
} from 'npm:nostr-tools@^1.10.1';
export { default as lmdb } from 'npm:lmdb';

View File

@ -1,21 +0,0 @@
import { type Event } from '@/event.ts';
import { parseRelay } from './schema.ts';
/** Gets relays which pertain to the author from the event. */
function getAuthorRelays(event: Event): URL[] {
const relays: string[] = [];
switch (event.kind) {
case 10002:
event.tags.forEach((tag) => tag[0] === 'r' && relays.push(tag[1]));
break;
case 2:
relays.push(event.content);
break;
}
return relays.map(parseRelay).filter((r): r is URL => !!r);
}
export { getAuthorRelays };

View File

@ -1,7 +0,0 @@
import type { Filter } from '@/deps.ts';
function query(_filter: Filter, _relays?: URL[]) {
// TODO
}
export { query };