open-index/open-npm huggingface dataset:
npm package: @nostr-dev-kit/react
Description: React hooks for the Nostr Development Kit (NDK)
Author: _@f7z.io
Latest version: 1.3.13

# @nostr-dev-kit/react

> React hooks for the Nostr Development Kit (NDK)

## Overview

`@nostr-dev-kit/react` provides a set of React hooks and utilities to easily integrate Nostr functionality into your React applications using NDK. This library helps you efficiently manage Nostr data in your React components, including:

- NDK instance management with `useNDKInit` and `useNDK`
- Current user management with `useNDKCurrentUser`
- User resolution from various formats with `useUser`
- User profile management with `useProfileValue`
- Multi-user session management
- Event subscriptions with modern callback patterns

## Installation

```bash
# npm
npm install @nostr-dev-kit/react

# pnpm
pnpm add @nostr-dev-kit/react

# yarn
yarn add @nostr-dev-kit/react
```
npm package: @nostr-mail/bridge-core
Description: Core library for email to Nostr bridge
Latest version: 1.2.5

# @nostr-mail/bridge-core

Core library for the Nostr Mail Bridge inbound system. Handles email-to-Nostr message processing using NIP-59 gift wrap encryption.

## Installation

```bash
npm i @nostr-mail/bridge-core
```

## Usage

```typescript
import { processIncomingEmail, initConfig, type IncomingEmail } from '@nostr-mail/bridge-core';

// Initialize configuration
initConfig({
  inboundPrivateKey: 'your-hex-private-key',
  relays: ['wss://relay.damus.io', 'wss://nos.lol'],
  pluginPath: './plugin.js', // optional
});

// Process an incoming email
const email: IncomingEmail = {
  from: 'sender@example.com',
  to: 'npub1abc...@nostr-mail.example.com',
  subject: 'Hello',
  body: 'Message content',
  timestamp: Math.floor(Date.now() / 1000),
};

const result = await processIncomingEmail(email, 'smtp', '127.0.0.1');

if (result.action === 'accept') {
  console.log('Email processed successfully');
} else {
  console.log('Email rejected:', result.message);
}
```

## API

### `initConfig(config)`

Initialize the core configuration.

### `processIncomingEmail(email, sourceType, sourceIP)`

Process an incoming email and publish it to Nostr relays as a NIP-59 gift wrap.

### Types

- `IncomingEmail` - Email structure with from, to, subject, body, timestamp
- `ProcessResult` - Result with action ('accept' | 'reject') and optional message

## License

MIT
npm package: @nostr-mail/bridge-inbound-core
Description: Core library for email to Nostr bridge
Latest version: 1.2.0

# @nostr-mail/bridge-inbound-core

Core library for the Nostr Mail Bridge inbound system. Handles email-to-Nostr message processing using NIP-59 gift wrap encryption.

## Installation

```bash
npm i @nostr-mail/bridge-inbound-core
```

## Usage

```typescript
import { processIncomingEmail, initConfig, type IncomingEmail } from '@nostr-mail/bridge-inbound-core';

// Initialize configuration
initConfig({
  inboundPrivateKey: 'your-hex-private-key',
  relays: ['wss://relay.damus.io', 'wss://nos.lol'],
  pluginPath: './plugin.js', // optional
});

// Process an incoming email
const email: IncomingEmail = {
  from: 'sender@example.com',
  to: 'npub1abc...@nostr-mail.example.com',
  subject: 'Hello',
  body: 'Message content',
  timestamp: Math.floor(Date.now() / 1000),
};

const result = await processIncomingEmail(email, 'smtp', '127.0.0.1');

if (result.action === 'accept') {
  console.log('Email processed successfully');
} else {
  console.log('Email rejected:', result.message);
}
```

## API

### `initConfig(config)`

Initialize the core configuration.

### `processIncomingEmail(email, sourceType, sourceIP)`

Process an incoming email and publish it to Nostr relays as a NIP-59 gift wrap.

### Types

- `IncomingEmail` - Email structure with from, to, subject, body, timestamp
- `ProcessResult` - Result with action ('accept' | 'reject') and optional message

## License

MIT
npm package: @nostr-mail/bridge-inbound-mailgun
Description: Mailgun webhook parser for nostr-mail-bridge
Latest version: 1.1.1

# @nostr-mail/bridge-inbound-mailgun

Mailgun webhook parser for the Nostr Mail Bridge. Parses and verifies Mailgun webhook payloads.

## Installation

```bash
npm i @nostr-mail/bridge-inbound-mailgun
```

## Usage

```typescript
import { parseMailgunWebhook, type MailgunWebhookBody } from '@nostr-mail/bridge-inbound-mailgun';

// In your webhook handler
app.post('/webhook', (req, res) => {
  const { email, error } = parseMailgunWebhook(
    req.body as MailgunWebhookBody,
    process.env.MAILGUN_WEBHOOK_SECRET
  );

  if (!email) {
    console.error('Webhook verification failed:', error);
    return res.status(401).json({ error });
  }

  console.log(`Email from ${email.from} to ${email.to}`);
  // Process the email...
});
```

## API

### `parseMailgunWebhook(body, secret?)`

Parse a Mailgun webhook body and verify its signature.

- `body` - The webhook request body
- `secret` - Mailgun webhook signing key (optional, skips verification if not provided)

Returns `{ email, error }` where email is `IncomingEmail | null`.

### `verifyMailgunSignature(timestamp, token, signature, secret?, maxAge?)`

Verify a Mailgun webhook signature with timing-safe comparison and replay protection.

- `maxAge` - Maximum age of timestamp in seconds (default: 300)

Returns `{ valid, error }`.

## Types

- `IncomingEmail` - Parsed email with from, to, subject, body, timestamp
- `MailgunWebhookBody` - Union of supported Mailgun webhook formats
- `MailgunRoutesWebhook` - Routes/store() format
- `MailgunEventsWebhook` - Events webhook format

## Security

- Timing-safe signature comparison
- Replay attack protection via timestamp validation
- Supports both Mailgun routes and events webhook formats

## License

MIT
npm package: @nostr-ts/common
Description: Commonly used nostr types and utils
Author: Franz Geffke
Latest version: 0.0.7

# nostr-ts Common

> Nostr: A simple, open protocol that enables a truly censorship-resistant and global social network.

This package is part of [nostr-ts](https://github.com/franzos/nostr-ts).

- `@nostr-ts/common`: common types and functions
- `@nostr-ts/node`: client for usage with node `ws` library
- `@nostr-ts/web`: client for usage with browser `WebSocket` API

Checkout the [documentation](https://github.com/franzos/nostr-ts) for more information.

## Installation

```bash
pnpm add @nostr-ts/common
```

## Get started

This is mostly shared stuff, so checkout either

- `@nostr-ts/node` for node usage
- `@nostr-ts/web` for browser usage

for ex.

On Node.js use:

```js
import { NewShortTextNote, NFilters } from '@nostr-ts/common'
import { RelayClient, RelayDiscovery, loadOrCreateKeypair, NUser } from '@nostr-ts/node'
```

In the browser use:

```js
import { NewShortTextNote, NFilters } from '@nostr-ts/common'
import { RelayClient, loadOrCreateKeypair, NUser } from '@nostr-ts/web'
```
npm package: @nostr-ts/node
Description: nostr on the backend: node.js implementation of the nostr protocol
Author: Franz Geffke
Latest version: 0.0.7

# nostr-ts Node

> Nostr: A simple, open protocol that enables a truly censorship-resistant and global social network.

This package is part of [nostr-ts](https://github.com/franzos/nostr-ts).

- `@nostr-ts/common`: common types and functions
- `@nostr-ts/node`: client for usage with node `ws` library
- `@nostr-ts/web`: client for usage with browser `WebSocket` API

Checkout the [documentation](https://github.com/franzos/nostr-ts) for more information.

## Installation

```bash
pnpm add @nostr-ts/node
```

## Get started

```js
import { NewShortTextNote, NFilters } from '@nostr-ts/common'
import { RelayClient, RelayDiscovery, loadOrCreateKeypair, NUser } from '@nostr-ts/node'
```

In the browser use:

```js
import { NewShortTextNote, NFilters } from '@nostr-ts/common'
import { RelayClient, loadOrCreateKeypair, NUser } from '@nostr-ts/web'
```
npm package: @nostr-ts/web
Description: nostr in the browser
Author: Franz Geffke
Latest version: 0.0.7

# nostr-ts Web

> Nostr: A simple, open protocol that enables a truly censorship-resistant and global social network.

This package is part of [nostr-ts](https://github.com/franzos/nostr-ts).

- `@nostr-ts/common`: common types and functions
- `@nostr-ts/node`: client for usage with node `ws` library
- `@nostr-ts/web`: client for usage with browser `WebSocket` API

Checkout the [documentation](https://github.com/franzos/nostr-ts) for more information.

## Installation

```bash
pnpm add @nostr-ts/web
```

## Get started

```js
import { NewShortTextNote, NFilters } from '@nostr-ts/common'
import { RelayClient, RelayDiscovery, loadOrCreateKeypair, NUser } from '@nostr-ts/node'
```

In the browser use:

```js
import { NewShortTextNote, NFilters } from '@nostr-ts/common'
import { RelayClient, loadOrCreateKeypair, NUser } from '@nostr-ts/web'
```
npm package: @nostrahealthai/sdk
Description: Official TypeScript/JavaScript SDK for NostraHealthAI Medical AI Platform - Skin Analysis, Eye Diagnosis, Wound Tracking, Drug Verification, and FHIR
Author: Nostra Health
Latest version: 2.1.0

# NostraHealthAI TypeScript/Node.js SDK

Official TypeScript/JavaScript SDK for **NostraHealthAI-1.0** - Advanced Medical AI Assistant.

## Installation

```bash
npm install @nostrahealthai/sdk
# or
yarn add @nostrahealthai/sdk
```

## Quick Start

```typescript
import { NostraHealthAI } from '@nostrahealthai/sdk';

// Initialize client
const client = new NostraHealthAI({
  apiKey: 'your-firebase-token'
});

// Chat with the AI
const response = await client.chat({
  message: 'What are the symptoms of high blood pressure?'
});

console.log(response.response);
console.log(`Model: ${response.modelInfo?.name}`);

// Analyze medical file
const jobId = await client.analyzeFile('./lab-results.png');
const result = await client.waitForJobCompletion(jobId);

console.log(`Risk Level: ${result.data.riskLevel}`);
console.log(`Summary: ${result.data.summary}`);
```

## Features

- 🩺 **Medical Chat** - Conversational AI with context memory
- 📊 **File Analysis** - Analyze lab reports, X-rays, medical images
- 🤖 **Multi-Model AI** - Powered by OpenAI GPT-4o + Google Gemini
- 📚 **Evidence-Based** - Cites medical sources (RxNorm, OpenFDA, PubMed)
- ⚡ **Promise-Based** - Modern async/await API
- 📝 **TypeScript** - Full type definitions included

## Documentation

Full documentation available at: [SDK Documentation](../README.md)

## Examples

See [typescript-example.ts](../examples/typescript-example.ts) for comprehensive examples.

## Requirements

- Node.js 16+ or Browser
- axios >= 1.6.0

## License

MIT License
npm package: @nostranger/gameloop
Description: A super simple implementation of a game loop
Author: NoStranger
Latest version: 1.0.1

# GameLoop

![NPM Version](https://img.shields.io/npm/v/%40nostranger%2Fgameloop)

A super simple implementation of a game loop.

## Usage

```js
import { GameLoop } from '@nostranger/gameloop';

const gameLoop = new GameLoop({
  update(delta) {
    // Update data here
  },
  render() {
    // Draw graphics here
  },
});

// Start the game loop
gameLoop.start();

// Stop the game loop
gameLoop.stop();

// Check if the game loop is running
gameLoop.isActive; // bool
```