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
3 weeks ago (0.36.0)
interface NostrEvent

NIP-01 Nostr event.

Properties

32-bytes lowercase hex-encoded sha256 of the serialized event data.

32-bytes lowercase hex-encoded public key of the event creator

Unix timestamp in seconds.

Integer between 0 and 65535.

Matrix of arbitrary strings.

Arbitrary string.

64-bytes lowercase hex of the signature of the sha256 hash of the serialized event data, which is the same as the id field.

Add Package

deno add jsr:@nostrify/types

Import symbol

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

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @nostrify/types

Import symbol

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

Add Package

yarn dlx jsr add @nostrify/types

Import symbol

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

Add Package

pnpm dlx jsr add @nostrify/types

Import symbol

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

Add Package

bunx jsr add @nostrify/types

Import symbol

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