Remove zod schemas that we can get from NSchema

This commit is contained in:
Alex Gleason
2024-05-01 19:51:12 -05:00
parent 79177cd6c3
commit fc7ed8bf24
17 changed files with 65 additions and 204 deletions

View File

@@ -1,13 +1,13 @@
import { NostrEvent } from '@nostrify/nostrify';
import { NostrEvent, NSchema as n } from '@nostrify/nostrify';
import { EventTemplate, nip13 } from 'nostr-tools';
import { decode64Schema, jsonSchema } from '@/schema.ts';
import { decode64Schema } from '@/schema.ts';
import { signedEventSchema } from '@/schemas/nostr.ts';
import { eventAge, findTag, nostrNow, sha256 } from '@/utils.ts';
import { Time } from '@/utils/time.ts';
/** Decode a Nostr event from a base64 encoded string. */
const decode64EventSchema = decode64Schema.pipe(jsonSchema).pipe(signedEventSchema);
const decode64EventSchema = decode64Schema.pipe(n.json()).pipe(signedEventSchema);
interface ParseAuthRequestOpts {
/** Max event age (in ms). */