open-index/open-npm huggingface dataset:
npm package: @marinade.finance/ts-common
Description: TypeScript common utilities for Marinade Finance
Latest version: 4.2.6

# @marinade.finance/ts-common

[`@marinade.finance/ts-common`](https://www.npmjs.com/package/@marinade.finance/ts-common)

Generally usable TypeScript utilities.

## Installation

```sh
pnpm add @marinade.finance/ts-common@latest
```

Dependencies: `decimal.js`, `async-retry`.

## Features

### Retry Decorator

```typescript
import { Retry } from '@marinade.finance/ts-common'

class MyService {
  @Retry({ retries: 3, baseDelay: 1000 })
  async fetchData() {
    // Automatically retries on failure
  }
}
```

### Object Utilities

```typescript
import { omitNullish } from '@marinade.finance/ts-common'

// Filter out null/undefined values
const clean = omitNullish({ a: 1, b: null, c: undefined })
// Result: { a: 1 }
```

### JSON Utilities

```typescript
import {
  parseJson,
  readJsonFile,
  writeJsonFile,
  readJsonLines,
  writeJsonLines,
} from '@marinade.finance/ts-common'

// Safe JSON parsing
const data = parseJson<MyType>('{"key": "value"}')

// File operations
await writeJsonFile('data.json', { key: 'value' })
const loaded = await readJsonFile<MyType>('data.json')

// JSONL (JSON Lines) streaming
await writeJsonLines('items.jsonl', [item1, item2, item3])
const items = await readJsonLines<MyType>('items.jsonl')
```
npm package: @marinade.finance/ts-message
Description: Core types and validation for Marinade Messaging Standard.
Latest version: 1.0.0-beta.1

# ts-message

Core types and validation for Marinade Messaging Standard.

## Types

```typescript
interface Message<T> {
  header: Header
  payload: T
}

interface Header {
  producer_id: string
  message_id: string // Producer-generated unique identifier (UUID v4)
  created_at: number // Client timestamp (ms)
  received_at?: number // Service timestamp (ms), filled on POST
  topic?: string
}
```

## Validation

```typescript
import { HeaderValidator } from 'ts-message'

HeaderValidator.validate(header) // Throws on invalid
```

## Utilities

```typescript
import { createMessageSchema, HEADER_SCHEMA } from 'ts-message'

const schema = createMessageSchema(HEADER_SCHEMA, payloadSchema)
```

## Usage

Producer:

```typescript
import type { Message, Header } from 'ts-message'

const message: Message<PayloadType> = {
  header: {
    producer_id: 'service',
    message_id: crypto.randomUUID(),
    created_at: Date.now(),
  },
  payload: {
    /* ... */
  },
}
```

Consumer:

```typescript
import { HeaderValidator } from 'ts-message'
import { PayloadValidator } from 'generated-package'

HeaderValidator.validate(message.header)
PayloadValidator.validate(message.payload)
```
npm package: @marinade.finance/web3js-1x
Description: solana/web3.js 1.x library tooling for Marinade Finance
Latest version: 4.2.6

# web3js-1x

[`@marinade.finance/web3js-1x`](https://www.npmjs.com/package/@marinade.finance/web3js-1x)

Utilities to work with [Solana web3.js](https://github.com/solana-labs/solana-web3.js/) library
in **version 1.x**

Be aware when working with @solana/web3.js 2.x or @solana/kit use the
[`@marinade.finance/web3js-kit`](https://github.com/marinade-finance/typescript-common/tree/main/packages/web3js-kit) library.

## Usage

### Pre-requisites

The [`@marinade.finance/web3js-1x`](https://www.npmjs.com/package/@marinade.finance/web3js-1x) depends
on [`@marinade.finance/ts-common`](https://www.npmjs.com/package/@marinade.finance/ts-common) library.

```sh
pnpm add @marinade.finance/ts-common@latest
```

### Dependencies

Library defines set of `peerDependencies` that are required to be directly installed by dependent program.


```sh
pnpm add @solana/web3.js@1
pnpm add @marinade.finance/ledger-utils@latest
pnpm add @solana/buffer-layout@4.0.1
pnpm add bn.js@5.2.2
pnpm add borsh@0.7.0
pnpm add bs58@6.0.0
```

### Installation

```sh
# see Pre-requisites and Dependencies
pnpm add @marinade.finance/web3js-1x@latest
```

## History

Before refactoring this library was named as `@marinade.finance/web3js-common`
and it was published in versions `2.x.x`.
At the time, the version `@marinade.finance/web3js-common@2` was part of
the [marinade-ts-cli](https://github.com/marinade-finance/marinade-ts-cli).
After refactoring it was renamed to `@marinade.finance/web3js-1x` and the versioning started from `4.0.0`.
See history notes at [`@marinade.finance/web3js-kit`](../web3js-kit/README.md#history).
npm package: @marinade.finance/web3js-1x-testing
Description: solana/web3.js 1.x testing helper library
Latest version: 4.2.6

# web3js-1x-testing

[`@marinade.finance/web3js-1x-testing`](https://www.npmjs.com/package/@marinade.finance/web3js-1x-testing)

Testing utilities to work with
[Solana web3.js](https://github.com/solana-labs/solana-web3.js/) library
in **version 1.x**

### Dependencies

Library defines set of `peerDependencies` that are required to be directly installed by dependent program.


```sh
pnpm add -D @solana/web3.js@1
pnpm add -D bn.js@5.2.2
```

### Installation

```sh
# see Pre-requisites and Dependencies
pnpm add @marinade.finance/web3js-1x-testing@latest
```

## Jest test equality testers

When used with testing framework jest to use `equalityTesters`, also install

```sh
pnpm add -D @jest/globals@^30.1.2
```

add to `jest.config.js` something like this

```js
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
  preset: 'ts-jest',
  testEnvironment: 'node',
  testTimeout: 90000,
  detectOpenHandles: true,
  modulePathIgnorePatterns: ['<rootDir>/build/'],
  testPathIgnorePatterns: ['__tests__/.*.skip.ts', '__tests__/setup/*'],
  globalSetup:
    '<rootDir>/packages/marinade-ts-cli/__tests__/setup/globalSetup.ts',
  setupFilesAfterEnv: ['<rootDir>/<path-to-package>/node_modules/@marinade.finance/web3js-1x-testing/dist/src/equalityTesters'],
}
```
npm package: @marinade.finance/web3js-common
Description: Solana web3.js 2.0 tooling for Marinade Finance
Latest version: 3.7.0

# web3js-common

[`@marinade.finance/web3js-common`](https://www.npmjs.com/package/@marinade.finance/web3js-common)

Utilities to work with [Solana web3.js](https://github.com/solana-labs/solana-web3.js/) library
in version 2.x/3.0.x.

> *NOTE:* Currently the repository does not provide utilities usable with Solana web3.js in version 1.x
>         but it is expected to be ported from [marinade-ts-cli](https://github.com/marinade-finance/marinade-ts-cli/tree/main/packages/lib/web3js-common).

## Usage

### Pre-requisites

The [`@marinade.finance/web3js-common`](https://www.npmjs.com/package/@marinade.finance/web3js-common) depends
on [`@marinade.finance/ts-common`](https://www.npmjs.com/package/@marinade.finance/ts-common) library.

```sh
pnpm add @marinade.finance/ts-common@latest
```

### Installation

```sh
# see Pre-requisites
pnpm add @marinade.finance/web3js-common@latest
```

### Dependencies

Library defines set of `peerDependencies` that are required to be directly installed by dependent program.

* `class-validator`: is an optional when validation `IsAddress` functions are to be used 
* [`@solana/*`](./package.json): are required Solana web3.js 2.x/3.0.x dependencies to be installed as direct dependency

```sh
pnpm add @solana/addresses
pnpm add @solana/codecs
pnpm add @solana/keys
pnpm add @solana/rpc-types
pnpm add @solana/signers
pnpm add @solana/transactions
```

## Troubleshooting

- `ReferenceError: crypto is not defined`:
  The web3.js 2.0 requires be running on NodeJS version 20+ as there is implemented
  natively `crypto` module. This error suggests an older version being used.
npm package: @marinade.finance/web3js-kit
Description: solana/web3.js or @solana/kit 2.x+ tooling for Marinade Finance
Latest version: 4.2.6

# web3js-kit

[`@marinade.finance/web3js-kit`](https://www.npmjs.com/package/@marinade.finance/web3js-kit)

Utilities to work with [Solana web3.js](https://github.com/solana-labs/solana-web3.js/) library
or with the Anza [`@solana/kit`](https://github.com/anza-xyz/kit) **in version 2.x/3.0.x**.

Be aware when working with @solana/web3.js in version 1.x use the
[`@marinade.finance/web3js-1x`](https://github.com/marinade-finance/typescript-common/tree/main/packages/web3js-1x) library.

## Usage

### Pre-requisites

The [`@marinade.finance/web3js-kit`](https://www.npmjs.com/package/@marinade.finance/web3js-kit) depends
on [`@marinade.finance/ts-common`](https://www.npmjs.com/package/@marinade.finance/ts-common) library.

```sh
pnpm add @marinade.finance/ts-common@latest
```

### Dependencies

Library defines set of `peerDependencies` that are required to be directly installed by dependent program.

* `class-validator`: is an optional when validation `IsAddress` functions are to be used 
* [`@solana/*`](./package.json): are required Solana web3.js 2.x/3.0.x dependencies to be installed as direct dependency

```sh
pnpm add @solana/addresses
pnpm add @solana/codecs
pnpm add @solana/keys
pnpm add @solana/rpc-types
pnpm add @solana/signers
pnpm add @solana/transactions
```

### Installation

```sh
# see Pre-requisites and Dependencies
pnpm add @marinade.finance/web3js-kit@latest
```

## Troubleshooting

- `ReferenceError: crypto is not defined`:
  The web3.js 2.0 requires be running on NodeJS version 20+ as there is implemented
  natively `crypto` module. This error suggests an older version being used.

## History

Before refactoring this library was named as `@marinade.finance/web3js-common`
and it was published in versions `3.x.x`. After refactoring it was renamed
to `@marinade.finance/web3js-kit` and the versioning started from `4.0.0`.
See history notes at [`@marinade.finance/web3js-1x`](../web3js-1x/README.md#history).
npm package: @marinarosa/openai-assistant
Description: To install dependencies:
Latest version: 1.0.0

# @marinacabs/openai-assistant

To install dependencies:

```bash
bun install
```

To run:

```bash
bun run index.ts
```


To test:

```bash
bun test
```

Example on how to use this library:

```typescript
import AssistantLibrary from "@marinarosa/openai-assistant";

const assistant = new AssistantLibrary("OPENAI_API_KEY", "ASSISTANT_ID");
assistant.getResponse("Hello, assistant!").then(response => {
  console.log(response);
});
```
This project was created using `bun init` in bun v1.0.10. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.