Support the full NIP-46 protocol

This commit is contained in:
Alex Gleason
2024-04-28 11:13:54 -05:00
parent 39a9e174d4
commit d2a28ea3c9
2 changed files with 80 additions and 15 deletions

View File

@ -24,11 +24,11 @@ const eventSchema = eventTemplateSchema.extend({
/** Nostr event schema that also verifies the event's signature. */
const signedEventSchema = eventSchema.refine(verifyEvent);
/** NIP-46 signer request. */
/** NIP-46 request content schema. */
const connectRequestSchema = z.object({
id: z.string(),
method: z.literal('sign_event'),
params: z.tuple([z.string()]),
method: z.string(),
params: z.string().array(),
});
/** NIP-47 signer response. */