open-index/open-npm huggingface dataset:
npm package: @idempotix/express
Description: Express middleware for Idempotix idempotency
Author: stacks0x
Latest version: 1.0.3

# @idempotix/express

Express middleware for HTTP idempotency.

[![npm version](https://img.shields.io/npm/v/@idempotix/express.svg)](https://www.npmjs.com/package/@idempotix/express)

## Installation

```bash
npm install @idempotix/core @idempotix/express
```

## Quick Start

```typescript
import express from 'express';
import { express as idempotent } from '@idempotix/express';

const app = express();
app.use(express.json());

// Zero-config: memory storage, 24h TTL
app.post('/orders', idempotent(), async (req, res) => {
  const order = await createOrder(req.body);
  res.status(201).json(order);
});
```

## Configuration

```typescript
app.post(
  '/payments',
  idempotent({
    storage: redis(), // Storage adapter
    ttl: '1h', // Cache duration
    required: true, // Require Idempotency-Key header
    methods: ['POST', 'PUT'], // HTTP methods to protect
    failOpen: true, // Continue if storage fails
    getKey: (req) => req.headers['x-request-id'], // Custom key extraction
    getHash: (req) => hashObject(req.body), // Custom hash function
    onHit: (key, response) => {}, // Cache hit callback
    onMiss: (key) => {}, // Cache miss callback
    onError: (key, error) => {}, // Error callback
  }),
  handler
);
```

## Pre-configured Factory

Share configuration across routes:

```typescript
import { configure } from '@idempotix/express';
import { redis } from '@idempotix/redis';

const idempotent = configure({
  storage: redis(),
  ttl: '1h',
});

app.post('/orders', idempotent(), orderHandler);
app.post('/payments', idempotent({ required: true }), paymentHandler);
```

## Headers

| Header               | Direction | Description                           |
| -------------------- | --------- | ------------------------------------- |
| `Idempotency-Key`    | Request   | Client-provided unique key            |
| `Idempotency-Key`    | Response  | Echo of the key used                  |
| `Idempotency-Replay` | Response  | `true` when returning cached response |

## Error Responses

All errors follow [RFC 7807 Problem Details](https://tools.ietf.org/html/rfc7807):

| Status | Type           | Cause                               |
| ------ | -------------- | ----------------------------------- |
| 400    | `key-required` | Missing key when `required: true`   |
| 409    | `conflict`     | Request with same key in progress   |
| 422    | `mismatch`     | Same key reused with different body |

```json
{
  "type": "https://Idempotix.dev/errors/conflict",
  "title": "Conflict",
  "status": 409,
  "detail": "A request with this idempotency key is already being processed"
}
```

## With Redis

```typescript
import { redis } from '@idempotix/redis';

app.post('/orders', idempotent({ storage: redis() }), handler);
```

## License

MIT
npm package: @idempotix/redis
Description: Redis storage adapter for Idempotix idempotency - works with ioredis
Author: stacks0x
Latest version: 1.0.2

<p align="center">
  <a href="https://github.com/stacks0x/idempotix"><img src="https://raw.githubusercontent.com/stacks0x/idempotix/main/assets/idempotix.jpg" alt="Idempotix" width="80" /></a>
</p>

# @idempotix/redis

Redis storage adapter for Idempotix using ioredis.

[![npm version](https://img.shields.io/npm/v/@idempotix/redis.svg)](https://www.npmjs.com/package/@idempotix/redis)

## Installation

```bash
npm install @idempotix/core @idempotix/redis ioredis
```

## Quick Start

```typescript
import { redis } from '@idempotix/redis';
import { express as idempotent } from '@idempotix/express';

// From environment variable (IDEMPOTIX_REDIS_URL)
app.post('/orders', idempotent({ storage: redis() }), handler);
```

## Configuration

```typescript
import { redis } from '@idempotix/redis';

// From environment variable
const storage = redis();

// From URL (password in URL)
const storage = redis('redis://:password@localhost:6379');

// With options
const storage = redis({
  url: 'redis://localhost:6379',
  keyPrefix: 'myapp:idem:',
});

// With existing ioredis client
import Redis from 'ioredis';
const client = new Redis({ host: 'localhost', password: 'secret' });
const storage = redis({ client });
```

## Environment Variables

| Variable              | Description                                                |
| --------------------- | ---------------------------------------------------------- |
| `IDEMPOTIX_REDIS_URL` | Redis connection URL (e.g., `redis://:password@host:6379`) |

## Redis Cluster

```typescript
import Redis from 'ioredis';
import { redis } from '@idempotix/redis';

const cluster = new Redis.Cluster([
  { host: 'node1.example.com', port: 6379 },
  { host: 'node2.example.com', port: 6379 },
]);

const storage = redis({ client: cluster });
```

## AWS ElastiCache

```typescript
const storage = redis('redis://your-cluster.cache.amazonaws.com:6379');
```

## Usage with Express

```typescript
import { express as idempotent, configure } from '@idempotix/express';
import { redis } from '@idempotix/redis';

const idempotent = configure({
  storage: redis(),
  ttl: '1h',
});

app.post('/orders', idempotent(), orderHandler);
app.post('/payments', idempotent({ required: true }), paymentHandler);
```

## Usage with Next.js

```typescript
import { next } from '@idempotix/next';
import { redis } from '@idempotix/redis';

export const POST = next({ storage: redis() })(handler);
```

## Key Prefix

All keys are prefixed with `Idempotix:` by default. Customize with:

```typescript
const storage = redis({ keyPrefix: 'myapp:idem:' });
```

## License

MIT
npm package: @idena/vrf-js
Description: Reference implementation of Google Key Transparency VRF
Author: ridenaio
Latest version: 1.0.1

# vrf-js

[![NPM](https://nodei.co/npm/@idena/vrf-js.png?stars&downloads)](https://nodei.co/npm/@idena/vrf-js/)  
A reference implementation of [Google Key Transparency VRF](https://github.com/google/keytransparency/tree/master/core/crypto/vrf)

## Installation

You can use this command to install:

    npm install @idena/vrf-js

## Usage

You could use like this:

If you use node.js, you should require the module first:

```JavaScript
const { Evaluate, ProofHoHash } = require('vrf-js');
```

or ES6 import

```JavaScript
import { Evaluate, ProofHoHash } from 'vrf-js'
```

## Example

```JavaScript
// evaluate VRF proof from private key
const privateKey = [123, 254, 12, ... 11] // 32 bytes
const data = [1, 2, 3, 4, 5] // data
const [hash, proof] = Evaluate(privateKey, data)


// check VRF proof with public key
const publicKey = [23, 45, 76, ..., 22] // 65 bytes

// throws exception if proof is invalid
const hash = ProofTohash(publicKey, data, proof)
```

## License

The project is released under the [MIT license](http://www.opensource.org/licenses/MIT).
npm package: @idenisovs/bmp280
Description: Yet another BMP280 sensor library.
Author: Ilja Denisovs
Latest version: 1.0.2

# Yet another BMP280.

Yet another [Bosch Sensortect BMP280 sensor](https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/pressure-sensors-bmp280-1.html) library for Node.js

This library uses [i2c-bus](https://www.npmjs.com/package/i2c-bus) which should provide access with [Node.js](https://nodejs.org/en/) on Linux boards like the Raspberry Pi, BeagleBone or Intel Edison.

This library is heavily inspired by **Ptax**'s [BMP 280 sensor library](https://www.npmjs.com/package/bmp280-sensor).

## Install

```bash
npm install @idenisovs/bmp280 --save
```

## Usage

### Simple

In this case you need to provide just _bus number_ and _address of the device_.

* Device address can be found by `i2cdetect -y 1` command, where `1` is number of I2C bus.

```javascript
const { BMP280 } = require('@idenisovs/bmp280');

(async () => {
    const bmp280 = new BMP280({
        bus: 1,
        address: 0x76
    });

    await bmp280.connect();

    const values = await bmp280.sensors();
    console.log(values);

    await bmp280.disconnect();
})();
```

Expected output:

```json
{ 
  "temperature": 22.81, 
  "pressure": 991.9874688444662 
}
```

If configuration is not provided, then library will use the configuration options from [official datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/environmental_sensors_2/pressure_sensors_1/bmp280/bst-bmp280-ds001.pdf), page **19** ("_Weather station_" use case):

```javascript
{
    mode: Mode.forced,
    filter: Filter.off,
    standby: Standby.SB_1000MS,
    oversampling: {
        temperature: Oversampling.x1,
        pressure: Oversampling.x1
    }
}
```
npm package: @ident-agency/agent
Description: Agent plane for Ident.Agency - provides high-level abstractions and UI components
Author: Lorem Labs
Latest version: 0.1.7

# @ident-agency/agent

Agent layer for Ident.Agency - provides sandboxed iframe runtime and consent management for secure access to user data.

## Overview

Most likely you won't need to use this directly, but can instead use a web-component via the `@ident-agency/agent-ui` package.

This package builds on `@ident-agency/core` to enable secure, sandboxed access to encrypted at rest user data--fragments--through:

- **Sandboxed iframe runtime** - Isolated environment for crypto operations
- **Lens-based data access** - Safe, read-only views of user fragments
- **Consent management** - User-controlled permission grants
- **Storage adapters** - IndexedDB, memory, and cache implementations

## Architecture

The agent runs in a sandboxed iframe from `ident.agency` domain, ensuring:

- Keys and plaintext never exist in the host app's JavaScript context
- All cryptographic operations happen in the isolated agent environment

## Installation

```bash
npm install @ident-agency/agent
```

### Integration with Core

```typescript
import { createIA } from '@ident-agency/agent';
import { IndexedDBKV } from '@ident-agency/agent/adapters/indexeddb-kv';
import { PasswordProvider } from '@ident-agency/core';

// Initialize with real-world configuration
const passwordProvider = new PasswordProvider('secure-password');

const ia = await createIA({
	api: {
		baseUrl: 'https://www.ident.agency',
		redirectUri: window.location.origin,
		passwordProvider
	},
	storage: new IndexedDBKV('ia', 'kv'),
	ui: { mount: document.body },
	debug: true
});

// Listen for events
ia.on('subject_changed', (subject) => {
	console.log('Subject changed:', subject);
});

ia.on('grant_requested', (event) => {
	console.log('Grant requested:', event);
});
```

## Key Concepts

### Lenses

Lenses provide safe, read-only views of user data:

```typescript
// Request access to a specific data lens
const nameData = await ia.requestLens({
	path: '/identity/name',
	agent: { id: 'my-app' }
});
```

- Path-based access (e.g., `/identity/name`)
- User consent required for vault (encrypted) data
- No raw keys exposed to consuming applications

### Grants

Per-origin permission system:

```typescript
// Ensure grant for specific capabilities
await ia.ensureGrant({
	agent: { id: 'my-app' },
	manifest: {
		requested_capabilities: {
			read_lenses: ['/identity/*', '/wallet/xrpl/address'],
			mutate_paths: ['/preferences/*']
		}
	}
});

// Get current grants
const grants = await ia.getGrants({ agentId: 'my-app' });

// Revoke a grant
await ia.revokeGrant({ id: 'my-app' });
```

- Scoped access (e.g., `/wallets/xrpl/address`)
- Time-bound (session, one-time, or persistent)
- User-revocable at any time

## License

MIT
npm package: @ident-agency/agent-ui
Description: UI components and web components for Ident.Agency agent interfaces
Author: Ident.Agency
Latest version: 0.0.9

# @ident-agency/agent-ui

Web components and UI toolkit for Ident.Agency agent interfaces.

## Installation

```bash
npm install @ident-agency/agent-ui
```

## Overview

This package provides Web components for building Ident.Agency interfaces:

- Custom elements for authentication and consent flows
- Theme-aware components

## Usage

### Import Web Components

```javascript
import '@ident-agency/agent-ui/kit';

// Web components are now globally registered
```

### Basic Usage

```html
<!-- Simple connection component -->
<ia-connect
	client-id="your-app-id"
	redirect-uri="https://www.dev.ident.agency:5173"
	api-base-url="https://www.ident.agency"
	debug="true"
>
</ia-connect>

<!-- With custom scopes and transport -->
<ia-connect
	client-id="your-app-id"
	redirect-uri="https://www.dev.ident.agency:5173"
	api-base-url="https://www.ident.agency"
	scopes="read,write"
	transport="popup"
	debug="true"
>
</ia-connect>
```

### Advanced Configuration

```html
<!-- With event handling -->
<ia-connect
	id="ia-connector"
	client-id="your-app-id"
	redirect-uri="https://www.dev.ident.agency:5173"
	api-base-url="https://www.ident.agency"
	scopes="read,write,admin"
	transport="iframe"
	debug="true"
>
</ia-connect>

<script>
	const connector = document.getElementById('ia-connector');

	// Listen for connection events
	connector.addEventListener('connected', (event) => {
		console.log('Connected:', event.detail);
	});

	connector.addEventListener('error', (event) => {
		console.error('Connection error:', event.detail);
	});
</script>
```

## Features

- **🎨 Theme Support** - Light/dark mode with system preference detection
- **🔒 Consent UI** - Built-in components for permission management
- **🎯 Web Standards** - Works in any framework via custom elements

## License

MIT

## Repository

https://github.com/loremlabs/ident-agency-sdk

## More Information

For more information on using the Ident.Agency SDK, visit the [Ident.Agency website](https://www.ident.agency).