open-index/open-npm huggingface dataset:
npm package: @lyno/lib-jitsi-meet
Description: JS library for accessing Jitsi server side deployments
Latest version: 2.6726.2
Deprecated: Package moved to @solyd/lib-jitsi-meet

# Jitsi Meet API library (with import & TypeScript support)

You can use Jitsi Meet API to create Jitsi Meet video conferences with a custom GUI.

Changes to the [original repo](https://github.com/jitsi/lib-jitsi-meet):

- export unbundled code
- TypeScript support
- published to [npm](https://www.npmjs.com/package/@lyno/lib-jitsi-meet)
- updated dependencies

## Installation

```bash
yarn add @lyno/lib-jitsi-meet
```

### Usage

```typescript
import JitsiMeetJS from '@lyno/lib-jitsi-meet';

JitsiMeetJS.init(initOptions);
const connection = new JitsiMeetJS.JitsiConnection(null, token, options);
```

### Alternative useage

We also provide a prebundled version with jQuery bundled in.

```typescript
import `@lyno/lib-jitsi-meet/lib-jitsi-meet.min.js`
```


## Building the sources

NOTE: you need Node.js >= 12 and npm >= 6

To build the library, just type:

```bash
yarn install
yarn build
```

### Release

```
yarn release
```
npm package: @lynoxdotio/x402
Description: x402 Payment Protocol
Author: LynoXdotIO
Latest version: 0.8.1

# @lynoxdotio/x402

Core TypeScript implementation of the x402 Payment Protocol. This package provides the foundational types, schemas, and utilities that power all x402 integrations.

## Installation

```bash
npm install @lynoxdotio/x402
```

## Overview

The x402 package provides the core building blocks for implementing the x402 Payment Protocol in TypeScript. It's designed to be used by:

- Middleware implementations (Express, Hono, Next.js)
- Client-side payment handlers (fetch wrapper)
- Facilitator services
- Custom integrations

## Integration Packages

This core package is used by the following integration packages:

- `@lynoxdotio/x402-express`: Express.js middleware
- `@lynoxdotio/x402-hono`: Hono middleware
- `@lynoxdotio/x402-next`: Next.js middleware
- `@lynoxdotio/x402-fetch`: Fetch API wrapper
- `@lynoxdotio/x402-axios`: Axios interceptor

## Manual Server Integration

If you're not using one of our server middleware packages, you can implement the x402 protocol manually. Here's what you'll need to handle:

1. Return 402 error responses with the appropriate response body
2. Use the facilitator to validate payments
3. Use the facilitator to settle payments
4. Return the appropriate response header to the caller

## Manual Client Integration

If you're not using our `@lynoxdotio/x402-fetch` or `@lynoxdotio/x402-axios` packages, you can manually integrate the x402 protocol in your client application. Here's how:

1. Make a request to a x402-protected endpoint. The server will respond with a 402 status code and a JSON object containing:

   - `x402Version`: The version of the x402 protocol being used
   - `accepts`: An array of payment requirements you can fulfill

2. Select the payment requirement you wish to fulfill from the `accepts` array

3. Create the payment header using the selected payment requirement

4. Retry your network call with:
   - The payment header assigned to the `X-PAYMENT` field
   - The `Access-Control-Expose-Headers` field set to `"X-PAYMENT-RESPONSE"` to receive the server's transaction response
npm package: @lynoxdotio/x402-axios
Description: x402 Payment Protocol
Author: LynoXdotIO
Latest version: 0.8.1

# @lynoxdotio/x402-axios

A utility package that extends Axios to automatically handle 402 Payment Required responses using the x402 payment protocol. This package enables seamless integration of payment functionality into your applications when making HTTP requests with Axios.

## Installation

```bash
npm install @lynoxdotio/x402-axios
```

## Quick Start

```typescript
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { withPaymentInterceptor } from "@lynoxdotio/x402-axios";
import axios from "axios";
import { arcTestnet } from "viem/chains";

// Create a wallet client
const account = privateKeyToAccount("0xYourPrivateKey");
const client = createWalletClient({
  account,
  transport: http(),
  chain: arcTestnet,
});

// Create an Axios instance with payment handling
const api = withPaymentInterceptor(
  axios.create({
    baseURL: "https://api.example.com",
  }),
  client,
);

// Make a request that may require payment
const response = await api.get("/paid-endpoint");
console.log(response.data);
```

## Features

- Automatic handling of 402 Payment Required responses
- Automatic retry of requests with payment headers
- Payment verification and header generation
- Exposes payment response headers

## API

### `withPaymentInterceptor(axiosClient, walletClient)`

Adds a response interceptor to an Axios instance to handle 402 Payment Required responses automatically.

#### Parameters

- `axiosClient`: The Axios instance to add the interceptor to
- `walletClient`: The wallet client used to sign payment messages (must implement the x402 wallet interface)

#### Returns

The modified Axios instance with the payment interceptor that will:

1. Intercept 402 responses
2. Parse the payment requirements
3. Create a payment header using the provided wallet client
4. Retry the original request with the payment header
5. Expose the X-PAYMENT-RESPONSE header in the final response
npm package: @lynoxdotio/x402-express
Description: x402 Payment Protocol
Author: LynoXdotIO
Latest version: 0.8.1

# @lynoxdotio/x402-express

Express middleware integration for the x402 Payment Protocol. This package allows you to easily add paywall functionality to your Express.js applications using the x402 protocol.

## Installation

```bash
npm install @lynoxdotio/x402-express
```

## Quick Start

```typescript
import express from "express";
import { paymentMiddleware, Network } from "@lynoxdotio/x402-express";

const app = express();

// Configure the payment middleware
app.use(
  paymentMiddleware("0xYourAddress", {
    "/protected-route": {
      price: "$0.10",
      network: "arc-testnet",
      config: {
        description: "Access to premium content",
      },
    },
  }),
);

// Implement your route
app.get("/protected-route", (req, res) => {
  res.json({ message: "This content is behind a paywall" });
});

app.listen(3000);
```

## Configuration

The `paymentMiddleware` function accepts three parameters:

1. `payTo`: Your receiving address (`0x${string}`)
2. `routes`: Route configurations for protected endpoints
3. `facilitator`: (Optional) Configuration for the x402 facilitator service
4. `paywall`: (Optional) Configuration for the built-in paywall

See the Middleware Options section below for detailed configuration options.

## Middleware Options

The middleware supports various configuration options:

### Route Configuration

```typescript
type RoutesConfig = Record<string, Price | RouteConfig>;

interface RouteConfig {
  price: Price; // Price in USD or token amount
  network: Network; // ""arc-testnet"
  config?: PaymentMiddlewareConfig;
}
```

### Payment Configuration

```typescript
interface PaymentMiddlewareConfig {
  description?: string; // Description of the payment
  mimeType?: string; // MIME type of the resource
  maxTimeoutSeconds?: number; // Maximum time for payment (default: 60)
  outputSchema?: Record<string, any>; // JSON schema for the response
  customPaywallHtml?: string; // Custom HTML for the paywall
  resource?: string; // Resource URL (defaults to request URL)
}
```

### Facilitator Configuration

```typescript
type FacilitatorConfig = {
  url: string; // URL of the x402 facilitator service
  createAuthHeaders?: CreateHeaders; // Optional function to create authentication headers
};
```

### Paywall Configuration

For more on paywall configuration options, refer to the [paywall README](../x402/src/paywall/README.md).

```typescript
type PaywallConfig = {
  cdpClientKey?: string; // Your CDP Client API Key
  appName?: string; // Name displayed in the paywall wallet selection modal
  appLogo?: string; // Logo for the paywall wallet selection modal
  sessionTokenEndpoint?: string; // API endpoint for Coinbase Onramp session authentication
};
```

## Resources

- [x402 Protocol](https://x402.org)
npm package: @lynoxdotio/x402-fetch
Description: x402 Payment Protocol
Author: LynoXdotIO
Latest version: 0.8.1

# @lynoxdotio/x402-fetch

A utility package that extends the native `fetch` API to automatically handle 402 Payment Required responses using the x402 payment protocol. This package enables seamless integration of payment functionality into your applications when making HTTP requests.

## Installation

```bash
npm install @lynoxdotio/x402-fetch
```

## Quick Start

```typescript
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { wrapFetchWithPayment } from "@lynoxdotio/x402-fetch";
import { arcTestnet } from "viem/chains";

// Create a wallet client
const account = privateKeyToAccount("0xYourPrivateKey");
const client = createWalletClient({
  account,
  transport: http(),
  chain: arcTestnet,
});

// Wrap the fetch function with payment handling
const fetchWithPay = wrapFetchWithPayment(fetch, client);

// Make a request that may require payment
const response = await fetchWithPay("https://api.example.com/paid-endpoint", {
  method: "GET",
});

const data = await response.json();
```

## API

### `wrapFetchWithPayment(fetch, walletClient, maxValue?, paymentRequirementsSelector?)`

Wraps the native fetch API to handle 402 Payment Required responses automatically.

#### Parameters

- `fetch`: The fetch function to wrap (typically `globalThis.fetch`)
- `walletClient`: The wallet client used to sign payment messages (must implement the x402 wallet interface)
- `maxValue`: Optional maximum allowed payment amount in base units (defaults to 0.1 USDC)
- `paymentRequirementsSelector`: Optional function to select payment requirements from the response (defaults to `selectPaymentRequirements`)

#### Returns

A wrapped fetch function that automatically handles 402 responses by:

1. Making the initial request
2. If a 402 response is received, parsing the payment requirements
3. Verifying the payment amount is within the allowed maximum
4. Creating a payment header using the provided wallet client
5. Retrying the request with the payment header

## Example

```typescript
import { config } from "dotenv";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { wrapFetchWithPayment } from "@lynoxdotio/x402-fetch";
import { arcTestnet } from "viem/chains";

config();

const { PRIVATE_KEY, API_URL } = process.env;

const account = privateKeyToAccount(PRIVATE_KEY as `0x${string}`);
const client = createWalletClient({
  account,
  transport: http(),
  chain: arcTestnet,
});

const fetchWithPay = wrapFetchWithPayment(fetch, client);

// Make a request to a paid API endpoint
fetchWithPay(API_URL, {
  method: "GET",
})
  .then(async response => {
    const data = await response.json();
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });
```
npm package: @lynoxdotio/x402-hono
Description: x402 Payment Protocol
Author: LynoXdotIO
Latest version: 0.8.1

# @lynoxdotio/x402-hono

Hono middleware integration for the x402 Payment Protocol. This package allows you to easily add paywall functionality to your Hono applications using the x402 protocol.

## Installation

```bash
npm install @lynoxdotio/x402-hono
```

## Quick Start

```typescript
import { Hono } from "hono";
import { paymentMiddleware, Network } from "@lynoxdotio/x402-hono";

const app = new Hono();

// Configure the payment middleware
app.use(
  paymentMiddleware("0xYourAddress", {
    "/protected-route": {
      price: "$0.10",
      network: "arc-testnet",
      config: {
        description: "Access to premium content",
      },
    },
  }),
);

// Implement your route
app.get("/protected-route", c => {
  return c.json({ message: "This content is behind a paywall" });
});

serve({
  fetch: app.fetch,
  port: 3000,
});
```

## Configuration

The `paymentMiddleware` function accepts three parameters:

1. `payTo`: Your receiving address (`0x${string}`)
2. `routes`: Route configurations for protected endpoints
3. `facilitator`: (Optional) Configuration for the x402 facilitator service
4. `paywall`: (Optional) Configuration for the built-in paywall

See the Middleware Options section below for detailed configuration options.

## Middleware Options

The middleware supports various configuration options:

### Route Configuration

```typescript
type RoutesConfig = Record<string, Price | RouteConfig>;

interface RouteConfig {
  price: Price; // Price in USD or token amount
  network: Network; // "arc-testnet"
  config?: PaymentMiddlewareConfig;
}
```

### Payment Configuration

```typescript
interface PaymentMiddlewareConfig {
  description?: string; // Description of the payment
  mimeType?: string; // MIME type of the resource
  maxTimeoutSeconds?: number; // Maximum time for payment (default: 60)
  outputSchema?: Record<string, any>; // JSON schema for the response
  customPaywallHtml?: string; // Custom HTML for the paywall
  resource?: string; // Resource URL (defaults to request URL)
}
```

### Facilitator Configuration

```typescript
type FacilitatorConfig = {
  url: string; // URL of the x402 facilitator service
  createAuthHeaders?: CreateHeaders; // Optional function to create authentication headers
};
```

### Paywall Configuration

For more on paywall configuration options, refer to the [paywall README](../x402/src/paywall/README.md).

```typescript
type PaywallConfig = {
  cdpClientKey?: string; // Your CDP Client API Key
  appName?: string; // Name displayed in the paywall wallet selection modal
  appLogo?: string; // Logo for the paywall wallet selection modal
  sessionTokenEndpoint?: string; // API endpoint for Coinbase Onramp session authentication
};
```

## Resources

- [x402 Protocol](https://x402.org)
npm package: @lynoxdotio/x402-next
Description: x402 Payment Protocol
Author: LynoXdotIO
Latest version: 0.8.1

# @lynoxdotio/x402-next

Next.js middleware integration for the x402 Payment Protocol. This package allows you to easily add paywall functionality to your Next.js applications using the x402 protocol.

## Installation

```bash
npm install @lynoxdotio/x402-next
```

## Quick Start

Create a middleware file in your Next.js project (e.g., `middleware.ts`):

```typescript
import { paymentMiddleware, Network } from "@lynoxdotio/x402-next";

export const middleware = paymentMiddleware("0xYourAddress", {
  "/protected": {
    price: "$0.01",
    network: "arc-testnet",
    config: {
      description: "Access to protected content",
    },
  },
});

// Configure which paths the middleware should run on
export const config = {
  matcher: ["/protected/:path*"],
};
```

## Configuration

The `paymentMiddleware` function accepts three parameters:

1. `payTo`: Your receiving address (`0x${string}`)
2. `routes`: Route configurations for protected endpoints
3. `facilitator`: (Optional) Configuration for the x402 facilitator service
4. `paywall`: (Optional) Configuration for the built-in paywall

See the Middleware Options section below for detailed configuration options.

## Middleware Options

The middleware supports various configuration options:

### Route Configuration

```typescript
type RoutesConfig = Record<string, Price | RouteConfig>;

interface RouteConfig {
  price: Price; // Price in USD or token amount
  network: Network; // "base" or "base-sepolia"
  config?: PaymentMiddlewareConfig;
}
```

### Payment Configuration

```typescript
interface PaymentMiddlewareConfig {
  description?: string; // Description of the payment
  mimeType?: string; // MIME type of the resource
  maxTimeoutSeconds?: number; // Maximum time for payment (default: 60)
  outputSchema?: Record<string, any>; // JSON schema for the response
  customPaywallHtml?: string; // Custom HTML for the paywall
  resource?: string; // Resource URL (defaults to request URL)
}
```

### Facilitator Configuration

```typescript
type FacilitatorConfig = {
  url: string; // URL of the x402 facilitator service
  createAuthHeaders?: CreateHeaders; // Optional function to create authentication headers
};
```

### Paywall Configuration

For more on paywall configuration options, refer to the [paywall README](../x402/src/paywall/README.md).

```typescript
type PaywallConfig = {
  cdpClientKey?: string; // Your CDP Client API Key
  appName?: string; // Name displayed in the paywall wallet selection modal
  appLogo?: string; // Logo for the paywall wallet selection modal
  sessionTokenEndpoint?: string; // API endpoint for Coinbase Onramp session authentication
};
```

## Resources

- [x402 Protocol](https://x402.org)