Delete event.ts, use nostr-tools types

This commit is contained in:
Alex Gleason
2023-08-16 21:53:51 -05:00
parent 5515c40df3
commit c15194020f
15 changed files with 62 additions and 88 deletions

View File

@@ -1,10 +1,8 @@
import { Conf } from '@/config.ts';
import { finishEvent, nip19 } from '@/deps.ts';
import type { EventTemplate, SignedEvent } from '@/event.ts';
import { type Event, type EventTemplate, finishEvent, nip19 } from '@/deps.ts';
// deno-lint-ignore require-await
async function signAdminEvent<K extends number = number>(event: EventTemplate<K>): Promise<SignedEvent<K>> {
async function signAdminEvent<K extends number = number>(event: EventTemplate<K>): Promise<Event<K>> {
if (!Conf.nsec) throw new Error('No secret key. Set one with DITTO_NSEC.');
const result = nip19.decode(Conf.nsec);