open-index/open-npm huggingface dataset:
npm package: @projectsas/eventsource
Description: EventSource client for Node.js and browser (polyfill)
Latest version: 1.0.10

# EventSource

This library is a pure JavaScript implementation of the [EventSource](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) client.

You can use it with Node.js or as a browser polyfill for
[browsers that don't have native `EventSource` support](http://caniuse.com/#feat=eventsource).

## Install

    npm install eventsource

## Example

    npm install
    node ./example/sse-server.js
    node ./example/sse-client.js    # Node.js client
    open http://localhost:8080      # Browser client - both native and polyfill
    curl http://localhost:8080/sse  # Enjoy the simplicity of SSE

## Browser Polyfill

Just add `example/eventsource-polyfill.js` file to your web page:

```html
<script src=/eventsource-polyfill.js></script>
```

Now you will have two global constructors:

```javascript
window.EventSourcePolyfill
window.EventSource // Unchanged if browser has defined it. Otherwise, same as window.EventSourcePolyfill
```

If you're using [webpack](https://webpack.github.io/) or [browserify](http://browserify.org/)
you can of course build your own. (The `example/eventsource-polyfill.js` is built with webpack).

## Extensions to the W3C API

### Setting HTTP request headers

You can define custom HTTP headers for the initial HTTP request. This can be useful for e.g. sending cookies
or to specify an initial `Last-Event-ID` value.

HTTP headers are defined by assigning a `headers` attribute to the optional `eventSourceInitDict` argument:

```javascript
var eventSourceInitDict = {headers: {'Cookie': 'test=test'}};
var es = new EventSource(url, eventSourceInitDict);
```

### Allow unauthorized HTTPS requests

By default, https requests that cannot be authorized will cause the connection to fail and an exception
to be emitted. You can override this behaviour, along with other https options:

```javascript
var eventSourceInitDict = {https: {rejectUnauthorized: false}};
var es = new EventSource(url, eventSourceInitDict);
```

Note that for Node.js < v0.10.x this option has no effect - unauthorized HTTPS requests are *always* allowed.

### HTTP status code on error events

Unauthorized and redirect error status codes (for example 401, 403, 301, 307) are available in the `status` property in the error event.

```javascript
es.onerror = function (err) {
  if (err) {
    if (err.status === 401 || err.status === 403) {
      console.log('not authorized');
    }
  }
};
```

### HTTP/HTTPS proxy

You can define a `proxy` option for the HTTP request to be used. This is typically useful if you are behind a corporate firewall.

```javascript
var es = new EventSource(url, {proxy: 'http://your.proxy.com'});
```


## License

MIT-licensed. See LICENSE
npm package: @projectsienna/x402-clients
Description: Multi-chain X402 payment protocol clients for Solana, Base, and Aptos
Author: Project Sienna
Latest version: 1.0.0

# @projectsienna/x402-clients

Multi-chain X402 payment protocol clients for Solana, Base, and Aptos blockchains.

## Installation

```bash
npm install @projectsienna/x402-clients
```

## Quick Start

### Solana

```typescript
import { SolanaX402Client } from '@projectsienna/x402-clients';
import { Keypair } from '@solana/web3.js';

const client = new SolanaX402Client({
  apiBaseUrl: 'https://api.projectsienna.xyz',
  network: 'solana-devnet'
});

// Set keypair
const keypair = Keypair.fromSecretKey(/* your secret key */);
client.setKeypair(keypair);

// Make payment
const result = await client.pay({ amount: 0.01 });
console.log('Payment successful:', result.txHash);
```

### Base

```typescript
import { BaseX402Client } from '@projectsienna/x402-clients';
import { ethers } from 'ethers';

const client = new BaseX402Client({
  apiBaseUrl: 'https://api.projectsienna.xyz',
  network: 'base-sepolia',
  privateKey: process.env.PRIVATE_KEY
});

// Make payment
const result = await client.pay({ amount: 0.32 });
console.log('Payment successful:', result.txHash);
```

### Aptos

```typescript
import { AptosX402Client } from '@projectsienna/x402-clients';
import { Account, Ed25519PrivateKey } from '@aptos-labs/ts-sdk';

const client = new AptosX402Client({
  apiBaseUrl: 'https://api.projectsienna.xyz',
  network: 'aptos-testnet',
  privateKey: process.env.APTOS_PRIVATE_KEY
});

// Make payment
const result = await client.pay({ amount: 0.5 });
console.log('Payment successful:', result.txHash);
```

## API Reference

### ClientConfig

```typescript
interface ClientConfig {
  apiBaseUrl: string;      // API base URL
  network: string;         // Blockchain network
  privateKey?: string;     // Private key (optional)
  rpcUrl?: string;         // Custom RPC URL (optional)
}
```

### PaymentOptions

```typescript
interface PaymentOptions {
  amount?: number;         // Payment amount in USDC (default: 0.01)
  resource?: string;       // API resource path
  description?: string;    // Payment description
}
```

### PaymentResult

```typescript
interface PaymentResult {
  success: boolean;
  txHash: string;
  amountUSDC: number;
  recipient: string;
  network: string;
  explorerUrl: string;
  data?: any;
}
```

## Supported Networks

### Solana
- `solana-devnet`
- `solana-mainnet`

### Base
- `base-mainnet`
- `base-sepolia`

### Aptos
- `aptos-testnet`
- `aptos-mainnet`

## Documentation

- **API Docs**: https://api.projectsienna.xyz/docs/
- **GitHub**: https://github.com/ProjSienna/x402-clients
- **X402 Protocol**: https://x402.org

## License

MIT
npm package: @projectsophon/events
Description: This package contains a typed, single pub/sub pattern used in the Dark Forest game. Inspired by https://www.npmjs.com/package/monomitter
Author: Blaine Bublitz
Latest version: 0.1.3

# @projectsophon/events

This package contains a typed, single pub/sub pattern used in the Dark Forest game.
Inspired by https://www.npmjs.com/package/monomitter

## Installation

You can install this package using [`npm`](https://www.npmjs.com) or
[`yarn`](https://classic.yarnpkg.com/lang/en/) by running:

```bash
npm install --save @projectsophon/events
```
```bash
yarn add @projectsophon/events
```

When using this in a plugin, you might want to load it with [skypack](https://www.skypack.dev)

```js
import * as events from 'http://cdn.skypack.dev/@projectsophon/events'
```

## Table of contents

### Classes

- [Store](classes/Store.md)

### Type Aliases

- [Callback](README.md#callback)
- [Monomitter](README.md#monomitter)
- [Subscription](README.md#subscription)
- [Unsubscribe](README.md#unsubscribe)

### Functions

- [monomitter](README.md#monomitter-1)

## Type Aliases

### Callback

Ƭ **Callback**<`T`\>: (`data`: `T`) => `Promise`<`void`\> \| `void`

#### Type parameters

| Name |
| :------ |
| `T` |

#### Type declaration

▸ (`data`): `Promise`<`void`\> \| `void`

##### Parameters

| Name | Type |
| :------ | :------ |
| `data` | `T` |

##### Returns

`Promise`<`void`\> \| `void`

___

### Monomitter

Ƭ **Monomitter**<`T`\>: `Object`

#### Type parameters

| Name |
| :------ |
| `T` |

#### Type declaration

| Name | Type |
| :------ | :------ |
| `clear` | () => `void` |
| `publish` | (`data`: `T`) => `Promise`<`void`\> |
| `subscribe` | (`cb`: [`Callback`](README.md#callback)<`T`\>) => { `unsubscribe`: () => `void`  } |

___

### Subscription

Ƭ **Subscription**<`T`\>: (`data`: `T`) => `Promise`<`void`\> \| `void`

#### Type parameters

| Name |
| :------ |
| `T` |

#### Type declaration

▸ (`data`): `Promise`<`void`\> \| `void`

##### Parameters

| Name | Type |
| :------ | :------ |
| `data` | `T` |

##### Returns

`Promise`<`void`\> \| `void`

___

### Unsubscribe

Ƭ **Unsubscribe**: () => `void`

#### Type declaration

▸ (): `void`

##### Returns

`void`

## Functions

### monomitter

▸ **monomitter**<`T`\>(): [`Monomitter`](README.md#monomitter)<`T`\>

Constructs a new event emitter, whose purpose is to emit values of the given type.

#### Type parameters

| Name |
| :------ |
| `T` |

#### Returns

[`Monomitter`](README.md#monomitter)<`T`\>
npm package: @projectsophon/hexgen
Description: This package contains functions for determining various properties of Dark Forest objects based on their ID in hex. You could think of this package like procedural generation for Ethereum addresses.
Author: Blaine Bublitz
Latest version: 0.1.3

# @projectsophon/hexgen

This package contains functions for determining various properties of Dark Forest objects based on their ID in hex. You could think of this package like procedural generation for Ethereum addresses.

**Note:** This package _might_ go away when objects become classes that contain a lot of these helpers as instance methods.

## Installation

You can install this package using [`npm`](https://www.npmjs.com) or
[`yarn`](https://classic.yarnpkg.com/lang/en/) by running:

```bash
npm install --save @projectsophon/hexgen
```
```bash
yarn add @projectsophon/hexgen
```

When using this in a plugin, you might want to load it with [skypack](https://www.skypack.dev)

```js
import * as hexgen from 'http://cdn.skypack.dev/@projectsophon/hexgen'
```

## Table of contents

### Functions

- [bonusFromHex](README.md#bonusfromhex)
- [getBytesFromHex](README.md#getbytesfromhex)
- [planetHasBonus](README.md#planethasbonus)

## Functions

### bonusFromHex

▸ **bonusFromHex**(`hex`): `PlanetBonus`

Extracts the bonuses of a planet given its LocationID.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `hex` | `LocationId` | LocationID of a planet. |

#### Returns

`PlanetBonus`

___

### getBytesFromHex

▸ **getBytesFromHex**(`hexStr`, `startByte`, `endByte`): `bigint`

The core method for extracting planet details from a LocationID.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `hexStr` | `string` | LocationID of a planet. |
| `startByte` | `number` | The first byte to include in the result. |
| `endByte` | `number` | The byte _after_ the last byte to include in the result. |

#### Returns

`bigint`

___

### planetHasBonus

▸ **planetHasBonus**(`planet?`): `boolean`

Checks if the LocationID of the planet indicates any bonuses.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `planet?` | `Planet` | Planet to check for bonuses. |

#### Returns

`boolean`
npm package: @projectsophon/whitelist
Description: This package contains utilities for working with DarkForest whitelist keys.
Author: Blaine Bublitz
Latest version: 0.1.3

# @projectsophon/whitelist

This package contains utilities for working with DarkForest whitelist keys.

## Installation

You can install this package using [`npm`](https://www.npmjs.com) or
[`yarn`](https://classic.yarnpkg.com/lang/en/) by running:

```bash
npm install --save @projectsophon/whitelist
```
```bash
yarn add @projectsophon/whitelist
```

When using this in a plugin, you might want to load it with [skypack](https://www.skypack.dev)

```js
import * as whitelist from 'http://cdn.skypack.dev/@projectsophon/whitelist'
```

## Table of contents

### Variables

- [keysPerTx](README.md#keyspertx)

### Functions

- [bigIntFromKey](README.md#bigintfromkey)
- [generateKey](README.md#generatekey)
- [generateKeys](README.md#generatekeys)
- [keyHash](README.md#keyhash)

## Variables

### keysPerTx

• `Const` **keysPerTx**: ``400``

## Functions

### bigIntFromKey

▸ **bigIntFromKey**(`key`): `bigint`

#### Parameters

| Name | Type |
| :------ | :------ |
| `key` | `string` |

#### Returns

`bigint`

___

### generateKey

▸ **generateKey**(): `string`

#### Returns

`string`

___

### generateKeys

▸ **generateKeys**(`count`): `string`[]

#### Parameters

| Name | Type |
| :------ | :------ |
| `count` | `number` |

#### Returns

`string`[]

___

### keyHash

▸ **keyHash**(`key`): `string`

#### Parameters

| Name | Type |
| :------ | :------ |
| `key` | `string` |

#### Returns

`string`
npm package: @projectstorm/react-core
Latest version: 1.2.11

# STORM React Core


[![NPM](https://img.shields.io/npm/v/@projectstorm/react-core.svg)](https://npmjs.org/package/@projectstorm/react-core)
[![NPM](https://img.shields.io/npm/dt/@projectstorm/react-core.svg)](https://npmjs.org/package/@projectstorm/react-core)
[![CircleCI](https://circleci.com/gh/projectstorm/react-core/tree/master.svg?style=svg)](https://circleci.com/gh/projectstorm/react-core/tree/master) [![Greenkeeper badge](https://badges.greenkeeper.io/projectstorm/react-core.svg)](https://greenkeeper.io/)
[![codecov](https://codecov.io/gh/projectstorm/react-core/branch/master/graph/badge.svg)](https://codecov.io/gh/projectstorm/react-core)

Base project for all the storm projects. It contains a bunch of helper widgets, tools and typescript
objects for make glorious consistency.