open-index/open-npm huggingface dataset:
npm package: @opus-fi/sdk
Description: 🛠 An SDK for building applications on top of Opus.
Latest version: 1.0.9

# Opus SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Actions Status](https://github.com/opus-fi/opus-sdk/workflows/CI/badge.svg)](https://github.com/opus-fi/opus-sdk)
[![npm version](https://img.shields.io/npm/v/@opus-fi/sdk/latest.svg)](https://www.npmjs.com/package/@opus-fi/sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@opus-fi/sdk/latest.svg)](https://bundlephobia.com/result?p=@opus-fi/sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/opus-fi/opus-sdk.git
```

Move into the opus-sdk working directory

```sh
cd opus-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @opus-magnum/rubedo
Description: RUBEDO v1 — deterministic structural fingerprint engine (sealed core of Opus Magnum)
Latest version: 1.0.2

# @opus-magnum/rubedo

**RUBEDO v1** — детерминированный движок структурного фингерпринтинга (canonical JSON + SHA-256), выделенный из sealed-ядра Opus Magnum.

## Гарантии v1
- Независимость от порядка ключей в объектах (canonicalizeJson → stableStringify)
- Независимость от порядка элементов synopsis (сортировка по `id`)
- Детерминированный `fingerprint` (SHA-256) и `artifact_id` (`RUBEDO::v1::<prefix>`)
- Контракт-инварианты через `contract-test`

## Установка
```bash
npm i @opus-magnum/rubedo
npm package: @opuscapita/blob-client
Description: Client for OpusCapita Business Network file storage service.
Author: Christian Drengenberg
Latest version: 2.1.6

# @opuscapita/blob-client
This module provides simple and easy server side access to the blob storage service. For further details of how to use this module, please have a look at the [wiki](https://github.com/OpusCapita/blob-client/wiki) of this module and the [blob service](https://github.com/OpusCapita/blob/wiki) wiki.

---

### Minimum setup

First got to your local code directory and run:

```
npm install @opuscapita/blob-client
```

In order to run BlobClient, you'll need a setup consisting of a running **blob service** and a working **consul** service registry with the blob service being registered under the name *blob*.

Since **version 2.0**, @opuscapita/blob-client defines **multiple classes** depending on which part of blob service one wants to access. Currently there are multiple classes which directly inherit BlobClient and therefor are interface compatible.

* BlobClient
* TempFileClient
* DataFileClient

```JS
const { BlobClient, TempFileClient, DataFileClient } = require('@opuscapita/blob-client');

const blobClient = new BlobClient();
blobClient.getFileInfo('c_tenant', '/public/myFile.ext').then(info => console.log(info)).catch(err => console.log(err));

const tempFileClient = new TempFileClient();
tempFileClient.getFileInfo('c_tenant', '/public/myFile.ext').then(info => console.log(info)).catch(err => console.log(err));

const dataFileClient = new DataFileClient();
dataFileClient.getFileInfo('c_tenant', '/public/myFile.ext').then(info => console.log(info)).catch(err => console.log(err));

```

If an error occurs (HTTP status code >= 400), a result promise gets rejected as defined by the rules of [ServiceClient](https://github.com/OpusCapita/service-client#on-reject).

---

### Default configuration

The default configuration object provides hints about what the module's standard behavior is like and which configuration options are available. For further details about the API, please have a look at the [wiki](https://github.com/OpusCapita/blob-client/wiki).

```JS
{
    consul : {
        host : 'consul'
    },
    serviceClient : null,
    forceServiceToken : false,
    clientType : 'files'
}
```
npm package: @opuscapita/cache
Description: OpusCapita cache abstraction library
Latest version: 1.3.0

# @opuscapita/cache
Cache library for OpusCapita.
By default it ships with three cache providers: dummy, memory and redis.

To have a look at the full API, please visit the related [wiki page](https://github.com/OpusCapita/cache/wiki).


### Minimum setup
First got to your local code directory and run:
```
npm install @opuscapita/cache
```
If you are using the redis back-end, you'll need to have access to a running Consul server to get your endpoint configuration and a Redis server to connect to.

If all this is set up, go to you code and add the following command:

```JS
const Cache = require('@opuscapita/cache');

var cache = new Cache(); // using default: Memory driver

cache.put('hello', 'world').then(() => cache.get('hello')).then(console.log);
```

### Default configuration

The default configuration object provides hints about what the module's standard behavior is like.
In order to set plug-in (driver) specific configurations, you may add a sub-key to the configuration having the same name as the driver property you set and assign a configuration object there.

```JS
{
    driver : 'memory',
    keyPrefix: '',
    defaultExpire: 600, // in seconds
    pluginDirectory: 'plugins'
}
```

Example including memory driver configuration:

```JS
const Cache = require('@opuscapita/cache');

var cache = new Cache({
    driver : 'memory',
    keyPrefix: '',
    checkPeriod: 10,
    memory: {
      checkPeriod: 600,
      useClones: true
    },
    redis: {
      consul: {
        host: 'consul'
      },
      redis: {
        endpointName: 'redis',
        passwordKey: 'redis/password'  // consul KV key name
      }
    }
});
```

# Changes in version 1.2.0

If environment variable KUBERNETES_SERVICE_DISCOVERY is set then config library is not used at all for service discovery. Redis port is read from REDIS_PORT environment variable (6379 is used by default if variable not set).

There is a feature? which cause redis/redis/ path in the configuration... In the future version this shall change
```
{
  driver: "redis",
  redis: {
    consul: {
      host: "consul"
      serviceSecretPath: '/path'
      port:8500,
      retryCount: 50,
      retryTimeout: 1000,
      logger: null,
    },
    redis: {
      endpointName: "redis",
      passwordKey: "redis/password",
    },
  },
}
```

Added new option to change redis retry interval and count.