Skip to main content

latest

TypeScript types for Nostr. Standardized types from the NIPs, as well as useful interfaces that promote consistency across your applications.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a week ago (0.30.1)
interface NPolicy

Nostr moderation policy.

Analyzes the event, possibly making calls to external sources, and then responds with a message to either accept or reject the event.

Methods

Invoke the policy. If ok is set to false, the application should not store or display the message.

Add Package

deno add jsr:@nostrify/types

Import symbol

import { type NPolicy } from "@nostrify/types";

---- OR ----

Import directly with a jsr specifier

import { type NPolicy } from "jsr:@nostrify/types";

Add Package

npx jsr add @nostrify/types

Import symbol

import { type NPolicy } from "@nostrify/types";

Add Package

yarn dlx jsr add @nostrify/types

Import symbol

import { type NPolicy } from "@nostrify/types";

Add Package

pnpm dlx jsr add @nostrify/types

Import symbol

import { type NPolicy } from "@nostrify/types";

Add Package

bunx jsr add @nostrify/types

Import symbol

import { type NPolicy } from "@nostrify/types";