Remove unused code
This commit is contained in:
parent
dabc3b7e3a
commit
f87a17e609
|
@ -1,7 +0,0 @@
|
||||||
import { lmdb } from '@/deps.ts';
|
|
||||||
|
|
||||||
const db = lmdb.open('db', {});
|
|
||||||
|
|
||||||
const gossipDB = db.openDB('gossip', { dupSort: true });
|
|
||||||
|
|
||||||
export { db, gossipDB };
|
|
|
@ -18,4 +18,3 @@ export {
|
||||||
nip21,
|
nip21,
|
||||||
signEvent as getSignature,
|
signEvent as getSignature,
|
||||||
} from 'npm:nostr-tools@^1.10.1';
|
} from 'npm:nostr-tools@^1.10.1';
|
||||||
export { default as lmdb } from 'npm:lmdb';
|
|
||||||
|
|
|
@ -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 };
|
|
|
@ -1,7 +0,0 @@
|
||||||
import type { Filter } from '@/deps.ts';
|
|
||||||
|
|
||||||
function query(_filter: Filter, _relays?: URL[]) {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
export { query };
|
|
Loading…
Reference in New Issue