UNPKG

rx-nostr

Version:

A library based on RxJS, which allows Nostr applications to easily communicate with relays.

14 lines (10 loc) 378 B
import * as Nostr from "nostr-typedef"; export interface EventVerifier { (params: Nostr.Event): Promise<boolean>; } export const noopVerifier: EventVerifier = async () => true; export const emptyVerifier: EventVerifier = async () => { throw new Error( "You must give some verifier to createRxNostr(). In most cases, @rx-nostr/crypto packages will help you.", ); };