open-index/open-npm huggingface dataset:
npm package: @horizon-backend/domain-data-core
Description: Core domain data utilities for Horizon Platform - Schema generators, data enrichers, converters and specifications
Author: Horizon Platform
Latest version: 1.0.0

# @horizon-backend/domain-data-core

Core domain data utilities for Horizon Platform - Schema generators, data enrichers, converters and specifications.

## 📦 Installation

```bash
npm install @horizon-backend/domain-data-core
# or
yarn add @horizon-backend/domain-data-core
# or
pnpm add @horizon-backend/domain-data-core
```

## 🚀 Features

### 1. JSON Schema to Zod Generator
Convert Horizon Fields Metadata Pattern schemas to Zod validation schemas.

```typescript
import { JsonToZodGenerator } from '@horizon-backend/domain-data-core'

const generator = new JsonToZodGenerator()
const zodCode = await generator.generateFromFile('schema.json')
```

### 2. Domain Data Display Enricher
Enrich raw domain data with metadata for UI display.

```typescript
import { enrichDomainDataForDisplay } from '@horizon-backend/domain-data-core'

const enrichedData = enrichDomainDataForDisplay({
  data: rawData,
  metadata: fieldMetadata,
  locale: 'pt-BR',
  currency: 'BRL'
})
```

## 📚 Documentation

- [JSON to Zod Generator](./docs/json-to-zod-generator.md)
- [Domain Data Display Enricher](./docs/domain-data-display-enricher.md)
- [Domain Data Schema Specification](./docs/__domain-data-schema-specification.md)

## 🔧 Development

```bash
# Install dependencies
pnpm install

# Build
pnpm build

# Run tests
pnpm test

# Type check
pnpm typecheck
```

## 📄 License

MIT

---

*Part of the Horizon Platform ecosystem*
npm package: @horizon-msft/afwcw
Description: @Horizon-msft/afwcw is a collection of wrappers around Fluent UI web components v3. What is a web component wrapper? Each wrapper is a very light weight angular component that takes as its template the web component of the same name. The angular component
Author: mibaraka@microsoft.com
Latest version: 0.0.51-test.20240306

# Angular Web Component Wrappers for Fluent UI web components

@Horizon-msft/afwcw is a collection of wrappers around Fluent UI web components v3. What is a web component wrapper? Each wrapper is a very light weight angular component that takes as its template the web component of the same name. The angular component consists of the same inputs as the web component in its template and passes all its inputs to the html attributes of the web component. In addition to passing the inputs, the ComponentModules will also register the web component with the browser customElements so it can be loaded in the angular application with just a single import and no further configuration.

## Usage

To use import the wrapper module into the root of your angular application:

```
// main.ts

import { BadgeWrapperModule } from '@horizon-msft/afwcw';

@Component({
  selector: 'my-app',
  imports: [CommonModule, BadgeWrapperModule],
  ...
})
export class App {
  ...
}
```

In your application template:

```
<fluent-badge
  appearance="solid"
  color="warning"
  shape="rounded"
  size="medium"
>
  badge name
</fluent-badge>
```

All modules are named accordingly: _NameOfComponentWrapperModule_

[For specific guidance on usage see storybook implementations here](https://6436de75bd900018550234f5-udrxhqowrn.chromatic.com/)

## Applying styles using the fluent theme methods

Also available from Angular Fluent Web Component Wrappers are the methods required for enabling styles and themes. In the root of your application styling can be enabled like this:

```js
import { DesignToken, fabricLightTheme, setTheme } from "@horizon-msft/afwcw";

DesignToken.registerDefaultStyleTarget();

setTheme(fabricLightTheme);

// or use the base fluent theme
// setTheme(webLightTheme);
```

Here is a Stackblitz component implementation - [Stackblitz](https://stackblitz.com/edit/angular-j7hhre?file=src%2Fmain.ts)

## Some notes on styling

All the controls styles are connected to css variables with a naming convention that maps to the Fluent UI design token language. For guidance on this naming please refer to the Fluent UI design guidelines for web. [Fluent UI design guidelines](https://developer.microsoft.com/en-us/fluentui#/resources#design-resources)

## Current Components in Library:

1.  Accordion
1.  Anchor Button
1.  Avatar
1.  Badge
1.  Button
1.  Compound Button
1.  Divider
1.  Image
1.  Label
1.  Menu Button
1.  Progress Bar
1.  Radio
1.  Radio Group
1.  Slider
1.  Spinner
1.  Switch
1.  Tabs
1.  Text
npm package: @horizon-msft/ahwcw
Description: Angular Horizon web component wrappers
Author: harankin@microsoft.com
Latest version: 0.0.33-test.20240306

# Angular Web Component Wrappers for Horizon web components

@horizon-msft/ahwcw is a collection of wrappers around Horizon web components. Each wrapper is a lightweight angular component that takes as its template the web component of the same name. The angular component consists of the same inputs as the web component in its template and passes all its inputs to the html attributes of the web component. In addition to passing the inputs, the ComponentModules will also register the web component with the browser customElements so it can be loaded in the angular application with just a single import and no further configuration.
npm package: @horizon-msft/rhwcw
Description: React Horizon web component wrappers
Author: harankin@microsoft.com
Latest version: 0.0.35-test.20240306

# @horizon-msft/rhwcw

#### React Wrappers for Horizon Web Compoennts

This package is a collection of react wrappers for the @horizon-msft/web-components package.

Under the hood these wrappers use the @microsoft/fast-react-wrapper package, which does the heavy lifting of converting web components into react components.

## Installation

`npm i @horizon-msft/rfwcw --save-dev`

or

`yarn add -D @horizon-msft/rfwcw`

## Usage

Import the component into your react project and use just like any react component:

```
import { Badge } from "@horizon-msft/rfwcw"

const PageElement = () => (
    <Badge shape="rounded" size="large" color="danger"/>
)
```

## Applying styles using the fluent theme methods

Also available for Angular Fluent Web Component Wrappers are the methods required for enabling styles and themes. In the root of your application styling can be enabled like this:

```js
import { DesignToken, fabricLightTheme, setTheme } from "@horizon-msft/afwcw";

DesignToken.registerDefaultStyleTarget();

setTheme(fabricLightTheme);

// or use the base fluent theme
// setTheme(webLightTheme);
```

Here is a Stackblitz component implementation - [Stackblitz](#)

Current Components:

- Accordion (placeholder)
npm package: @horizon-protocol/contracts-interface
Description: A library for interacting with Horizon smart contracts
Author: HorizonProtocol
Latest version: 3.0.26

# Contracts Interface to Synthetix

The official JavaScript library for interacting with Synthetix protocol contracts.

This library can be used in 2 different environments:

1. Common-js module for node environments
2. UMD module for browser environments

## Instantiating in node.js or the browser

```javascript
// For node environments:
const { synthetix } = require('@synthetixio/contracts-interface');

// For single page applications:
import { synthetix } from '@synthetixio/contracts-interface';

// For browsers you can use a CDN of the minified files
// E.g. <script src="https://cdn.jsdelivr.net/npm/@synthetixio/contracts-interface/build/index.min.js"></script>
// then you can access synthetix on the window object:
const { synthetix } = window;

// Instantiate the library with or without a provider
const hznjs = synthetix({ network: 'mainnet' });

// Note: for typescript applications
import { synthetix, Network } from '@synthetixio/contracts-interface';
const hznjs = synthetix({ network: Network.Mainnet });
```

## Reading state

```javascript
const hznjs = synthetix({ network: 'mainnet' });

// If you want to interact with a contract, simply follow the convention:
// await hznjs[contractName].methodName(arguments)

const owner = await hznjs.contracts.Synthetix.owner();

// many arguments require being formatted toBytes32, which we also provide with the library

const { toBytes32 } = snx;

const totalIssuedSynths = await hznjs.contracts.Synthetix.totalIssuedSynths(toBytes32('sUSD'));

// We also expose ethers utils which provides handy methods for formatting responses to queries.
const { formatEther } = hznjs.utils;

formatEther(await hznjs.contracts.SynthsUSD.totalSupply());

formatEther(await hznjs.contracts.ExchangeRates.rateForCurrency(hznjs.toBytes32('SNX')));

// Note can optionally pass in a { blockTag: someBlockNumber } to get data from a specific block instead of {}
const snxAtBlock12m = await hznjs.contracts.ExchangeRates.rateForCurrency(hznjs.toBytes32('SNX'), {
  blockTag: 12e6,
});
```

## Signing transactions

```javascript
// any old provider will do
const provider = ethers.providers.getDefaultProvider('kovan');

// create a signer with a provider attached
const signer = new ethers.Wallet(
  // just a dummy kovan wallet with a little keth from the faucet
  '0xa0d951c494421559c63089093b020cf2f7aac003c916967dc36e989bc695222e',
  provider
);

// and then instantiate synthetix with the signer
const hznjs = synthetix({ network: 'mainnet', signer });

// mint 0.01 sETH via the NativeEtherWrapper
const response = await hznjs.contracts.NativeEtherWrapper.mint({
  value: parseEther('0.01'),
  gasPrice: parseUnits('5', 'gwei'),
  gasLimit: 500e3,
});
console.log('Submitted', response.hash);
await response.wait();
console.log('Mined', `https://etherscan.io/tx/${response.hash}`);
```

See the examples folder for more usage details.
npm package: @horizon-protocol/ethcall
Description: ethers.js-compatible wrapper around Multicall
Author: Timur Badretdinov
Latest version: 4.6.5

# ethcall

Utility library to make calls to Ethereum blockchain.

Uses MakerDAO's [Multicall contracts](https://github.com/makerdao/multicall) to make multiple requests in a single HTTP query. Encodes and decodes data automatically.

Powered by [abi-coder](https://github.com/Destiner/abi-coder) and [ethers.js](https://github.com/ethers-io/ethers.js/).

```
npm install ethcall
```

## API

* `Contract(address, abi)`: create contract instance; calling `contract.call_func_name` will yield a `call` object.
* `all(calls)`: execute all calls in a single request.
* `tryAll(calls)`: execute all calls in a single request. Ignores reverted calls and returns `null` value in place of return data (wrapper on top of `tryAggregate` method).
* `tryEach(calls, canFail)`: execute all calls in a single request. Ignores reverted calls and returns `null` value in place of return data for the calls that are allowed to fail (wrapper on top of `aggregate3` method).
* `calls`: list of helper call methods
  * `getEthBalance(address)`: returns account ether balance

## Example

```js
import { InfuraProvider } from '@ethersproject/providers';
import { Contract, Provider } from 'ethcall';

import erc20Abi from './abi/erc20.json';

const infuraKey = 'INSERT_YOUR_KEY_HERE';
const provider = new InfuraProvider('mainnet', infuraKey);

const daiAddress = '0x6b175474e89094c44da98b954eedeac495271d0f';

async function call() {
  const ethcallProvider = new Provider();
  await ethcallProvider.init(provider);

  const daiContract = new Contract(daiAddress, erc20Abi);

  const uniswapDaiPool = '0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667';

  const ethBalanceCall = ethcallProvider.getEthBalance(uniswapDaiPool);
  const daiBalanceCall = daiContract.balanceOf(uniswapDaiPool);

  const data = await ethcallProvider.all([ethBalanceCall, daiBalanceCall]);

  const ethBalance = data[0];
  const daiBalance = data[1];

  console.log('eth balance', ethBalance.toString());
  console.log('dai balance', daiBalance.toString());
}

call();
```

## Contributing

All Mulitcall contracts are stored in `src/multicall.ts` file. There are three `getMulticall` methods corresponding to three Multicall versions. To add a new contract, you need to know its version, address, chain id of the underlying chain, and (optionally) block at which the Multicall contract was deployed.

## Deployless Multicall

If you query a chain on which Multicall is not deployed, or if you query a historical block before the deployment of the contract, the deployless version will be used instead. In short, deployless Multicall "emulates" the deployed contract and returns the exact same data. Note that you can't query ETH balance using deployless version.

You can read more about deployless Multicall [here](https://insights.magmatic.xyz/posts/deployless-multicall/).
npm package: @horizon-suite/vue-horizon-suite-viewer
Description: A Vue plugin for viewing projects created with Horizon Suite.
Latest version: 0.0.9

# Vue Horizon Suite Viewer

**Vue Horizon Suite Viewer** is a Vue.js component that allows you to easily integrate the Horizon Suite Viewer into
your Vue.js applications. This plugin provides a simple interface to display Horizon Suite deployments using a
unique `deployment-id`.

## Installation

To install the plugin, run the following command:

```bash
npm install @horizon-suite/vue-horizon-suite-viewer
```

## Usage

Once you have installed the package, you can import and use the HorizonSuiteViewer component in your Vue.js project.
Make sure to provide the deployment-id as a prop to the component. You can find the deployment-id in the Horizon Suite
dashboard at https://horizon-suite.com.

## Example

Below is an example of how to use the Vue Horizon Suite Viewer component in your Vue.js application:

```vue
<template>
  <div>
    <h1>My Horizon Suite Deployment</h1>
    <HorizonSuiteViewer deployment-id="XYZ" />
  </div>
</template>

<script>
import {HorizonSuiteViewer} from '@horizon-suite/vue-horizon-suite-viewer';
</script>
```
Replace the XYZ with your deployment-id.

## Getting the deployment-id

To get the deployment-id, follow these steps:

- Log in to your Horizon Suite account at https://horizon-suite.com.
- Navigate to the dashboard.
- Select the desired project and copy the deployment-id.

If you need further assistance, feel free to contact us at [contact@horizon-suite.com](mailto:contact@horizon-suite.com).
npm package: @horizon/server
Description: Server for RethinkDB Horizon, an open-source developer platform for building realtime, scalable web apps.
Author: RethinkDB
Latest version: 2.0.0

# Horizon Server

An extensible middleware server built on top of [RethinkDB](https://github.com/rethinkdb/rethinkdb) which exposes a websocket API to front-end applications.

## Documentation

Follow our documentation at [horizon.io/install](https://horizon.io/install) for instructions on installing Horizon.

## Requirements
The Horizon server requires some tools and libraries to be available before it
can run:

 * `node.js` - interpreter to run the Horizon server
 * `openssl` - generating ssl certificates
 * [`rethinkdb`](https://github.com/rethinkdb/rethinkdb) - for running a RethinkDB server

### OpenSSL

OpenSSL is required to generate the cert and key pair necessary to serve Horizon securely via HTTPS and WSS. Usually this is done on the production server where you are running Horizon, however to do this locally you'll need to have the OpenSSL installed.

* **OSX**    - `brew install openssl`
* **Ubuntu** -  [Follow this guide here](https://help.ubuntu.com/community/OpenSSL#Practical_OpenSSL_Usage).
* **Windows** - [Unofficial list of Windows OpenSSL Binaries](https://wiki.openssl.org/index.php/Binaries)

### RethinkDB

Check out [rethinkdb.com/install](https://rethinkdb.com/install) for the best method of installing RethinkDB on your platform.
npm package: @horizondex/hrz-sdk-classic
Description: 🛠 An SDK for building applications on top of Dynamic AMM.
Latest version: 0.0.13

# Dynamic AMM SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
![Travis (.org)](https://img.shields.io/travis/dynamic-amm/dmm-sdk)
[![npm version](https://img.shields.io/npm/v/@dynamic-amm/sdk/latest.svg)](https://www.npmjs.com/package/@dynamic-amm/sdk/v/latest)
[![install size](https://img.shields.io/bundlephobia/minzip/@dynamic-amm/sdk/latest.svg)](https://bundlephobia.com/result?p=@dynamic-amm/sdk@latest)

In-depth documentation on this SDK is available at [https://docs.dmm.exchange/](https://docs.dmm.exchange/).

## 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/dynamic-amm/dmm-sdk.git
```

Move into the dmm-sdk working directory

```sh
cd dmm-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: @horizoneng/raven-client
Description: sdk rtn
Author: Devanshj11
Latest version: 0.0.1

# rtn-client

sdk rtn

## Installation


```sh
npm install rtn-client
```


## Usage


```js
import { multiply } from 'rtn-client';

// ...

const result = multiply(3, 7);
```


## Contributing

- [Development workflow](CONTRIBUTING.md#development-workflow)
- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
- [Code of conduct](CODE_OF_CONDUCT.md)

## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
npm package: @horizongames/node-logger
Description: Node logger
Author: Peter Kieltyka
Latest version: 1.0.8

node-logger
===========

An application logger for node with structured logging support, traceable log entries,
and built-in express.js requestLogger and exception recovery middlewares.

## Install

`npm install @horizongames/node-logger`


## Usage

For a combined example, see the [_example](./_example/index.ts) project.

**Logger:**

```ts
import { createLogger } from '@horizongames/node-logger'

// Setup a new logger passing a custom config (see logger.ts Config type for info)
const logger = createLogger({
  service: 'my-service',
  level: 'info',
  json: true,
  concise: false,
  tags: { 'version': 'v1.0.0' }
})

// Just a simple info log to record
logger.info('hi there')

// Log entry example to build a log payload with multiple log prints.
// Very useful in a structured logging situation with a central logger.
const entry = logger.createEntry()
entry.set('userID', 123)
entry.set('user', 'peterk')
entry.set('action', { purchase: { book: 'Sams Teach Yourself C in 21 Days' } })
entry.info('user made a purchase, yeay')

entry.set('sent', new Date())
entry.info('weve shipped the book')
```

**Request Logger for express:**
```ts
const logger = createLogger({ service: 'example' })

const app = express()
app.use(requestLogger(logger))
app.get('/', (req, res) => {
  res.status(200).send('welcome')
})

app.listen(3001, () => {
  logger.info('listening on port 3001')
})
```

**Request Recoverer + Logger for express (to catch/log exceptions):**

```ts
const logger = createLogger({ service: 'example' })

const app = express()
app.use(requestLogger(logger))
app.get('/', (req, res) => {
  res.status(200).send('welcome')
})

// the recoverer must be at the very end otherwise "express" will not
// catch the exception and handle this request properly. Super lame.
app.use(requestRecoverer)

app.listen(3001, () => {
  logger.info('listening on port 3001')
})
```

## License

MIT