open-index/open-npm huggingface dataset:
npm package: @garipov/react-scripts-ts
Description: It's for of Create React App Scripts
Latest version: 0.1.3

# react-scripts

This package is fork of [Create React App](https://github.com/facebook/create-react-app)
with minor changes to support TypeScript.<br>
Please refer to its documentation:

- [Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
- [User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.

Command to start:

```
npx create-react-app --scripts-version=@garipov/react-scripts-ts my-app
```
npm package: @garizonchain/crypto
Description: crypto libraries for garizon
Author: garizon
Latest version: 0.0.2

# @garizonchain/crypto

This package provides a collection of apis related to address management, kestore, encoding, and encrypt/decrypt.

## Installation

```
npm install @garizonchain/crypto
```

## Usage

```javascript
const {
  encode,
  decode,
  randomBytes,
  toBech32,
  fromBech32,
  GarizonAddress,
  generatePrivateKey,
  getPubkeyFromPrivateKey,
  getAddressFromPublicKey,
  getAddressFromPrivateKey,
  encryptPhrase,
  decryptPhrase
} = require('@garizonchain/crypto');
const { isPrivateKey, isAddress, isPublicKey } = require('@garizonchain/utils');
```

Address apis
```javascript
const bytes = randomBytes(20);
const addr = new GarizonAddress(bytes);

console.log(addr.checksum);
console.log(addr.bech32);

console.log(GarizonAddress.isValidBech32(addr.bech32));
```

RLP apis
```javascript
const encoded = '0x89010101010101010101';
const decoded = '0x010101010101010101';
console.log(encode(decoded));
console.log(decode(encoded));
```

Keystore apis
```javascript
const prv = generatePrivateKey();
const pub = getPubkeyFromPrivateKey(prv);
const addr = getAddressFromPublicKey(pub);
const addrPrv = getAddressFromPrivateKey(prv);
console.log(isPrivateKey(prv));
console.log(isPublicKey(pub));
console.log(isAddress(addr));
console.log(isAddress(addrPrv));
```

Encrypt/decrypt apis
```javascript
const { Wallet } = require('@garizonchain/account');

const myPhrase = new Wallet().newMnemonic();
console.log(myPhrase);
const pwd = '1234';
encryptPhrase(myPhrase, pwd).then((value) => {
  console.log(value);
  decryptPhrase(JSON.parse(value), pwd).then(value => {
    console.log(value);
  });
});
```
npm package: @garizonchain/network
Description: network suites for garizon
Author: garizon
Latest version: 0.0.2

# @garizonchain/network

This package provides a collection of apis to create messengers (HTTP, WebSocket) to connect to blockchain networks.

## Installation

```
npm install @garizonchain/network
```

## Usage

```javascript
const { Messenger, HttpProvider, WSProvider } = require('@garizonchain/network');
const { ChainID, ChainType } = require('@garizonchain/utils');
const testnetHTTP = 'https://api.s0.b.hmny.io';
const testnetWS = 'wss://ws.s0.b.hmny.io';
const localHTTP = 'http://localhost:9500/';
const localWS = 'http://localhost:9800/';
const http = new HttpProvider(testnetHTTP); // for local use localHTTP
const ws = new WSProvider(testnetWS); // for local use testnetWS
const customHTTPMessenger = new Messenger(http, ChainType.Garizon, ChainID.GarTestnet); // for local ChainID.GarLocal
const customWSMessenger = new Messenger(ws, ChainType.Garizon, ChainID.GarTestnet); // for local ChainID.GarLocal
```
npm package: @garizonchain/staking
Description: staking transaction package for garizon
Author: garizon
Latest version: 0.0.2

# @garizonchain/staking

This package provides a collection of apis to create, sign/send staking transaction, and receive confirm/receipt.

## Installation

```
npm install @garizonchain/staking
```

## Usage

Create a Garizon instance connecting to testnet

```javascript
const { Garizon } = require('@garizonchain/core');
const {
  ChainID,
  ChainType,
  hexToNumber,
  numberToHex,
  fromWei,
  Units,
  Unit,
} = require('@garizonchain/utils');

const gar = new Garizon(
    'https://api.s0.b.hmny.io/',
    {
        chainType: ChainType.Garizon,
        chainId: ChainID.GarTestnet,
    },
);
```
Below, examples show how to send delegate, undelegate, and collect rewards staking transactions. First, set the chainId, gasLimit, gasPrice for all subsequent staking transactions
```javascript
gar.stakings.setTxParams({
  gasLimit: 25000,
  gasPrice: numberToHex(new gar.utils.Unit('1').asGwei().toWei()),
  chainId: 2
});
```
<span style="color:red">Note: create and edit validator transactions are not fully supported in the sdk</span>

Create delegate staking transaction
```javascript
const delegate = gar.stakings.delegate({
  delegatorAddress: 'gar103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7',
  validatorAddress: 'gar1vfqqagdzz352mtvdl69v0hw953hm993n6v26yl',
  amount: numberToHex(new Unit(1000).asGar().toWei())
});
const delegateStakingTx = delegate.build();
```

Sign and send the delegate transaction and receive confirmation
```javascript
// key corresponds to gar103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7, only has testnet balance
gar.wallet.addByPrivateKey('45e497bd45a9049bcb649016594489ac67b9f052a6cdf5cb74ee2427a60bf25e');

gar.wallet.signStaking(delegateStakingTx).then(signedTxn => {
  signedTxn.sendTransaction().then(([tx, hash]) => {
    console.log(hash);
    signedTxn.confirm(hash).then(response => {
      console.log(response.receipt);
    });
  });
});
```

Similarily, undelegate and collect reward transactions can be composed, signed and sent
Create undelegate staking transaction
```javascript
const undelegate = gar.stakings.undelegate({
  delegatorAddress: 'gar103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7',
  validatorAddress: 'gar1vfqqagdzz352mtvdl69v0hw953hm993n6v26yl',
  amount: numberToHex(new Unit(1000).asGar().toWei())
});
const undelegateStakingTx = undelegate.build();
```

Create collect rewards staking transaction
```javascript
const collectRewards = gar.stakings.collectRewards({
  delegatorAddress: 'gar103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7'
});
const collectRewardsStakingTx = collectRewards.build();
```

Also, similar to normal transaction, signing and sending can be performed asynchronously.
npm package: @garizonchain/utils
Description: utils for garizon
Author: garizon
Latest version: 0.0.2

# @garizonchain/utils

This package provides a collection of utility apis for unit conversions like `fromWei`, `toWei`, `hexToNumber`, `numberToHex`, `isAddress`, etc.

## Installation

```
npm install @garizonchain/utils
```

## Usage

Available units
```
const { Units } = require('@garizonchain/utils');

[Units.wei, '1'], // 1 wei
[Units.Kwei, '1000'], // 1e3 wei
[Units.Mwei, '1000000'], // 1e6 wei
[Units.Gwei, '1000000000'], // 1e9 wei
[Units.szabo, '1000000000000'], // 1e12 wei
[Units.finney, '1000000000000000'], // 1e15 wei
[Units.ether, '1000000000000000000'], // 1e18 wei
[Units.gar, '1000000000000000000'], // 1e18 wei
[Units.Kether, '1000000000000000000000'], // 1e21 wei
[Units.Mether, '1000000000000000000000000'], // 1e24 wei
[Units.Gether, '1000000000000000000000000000'], // 1e27 wei
[Units.Tether, '1000000000000000000000000000000'], // 1e30 wei
```

Converting between different units
```javascript
const { Units, Unit, numberToString, add0xToString, fromWei, toWei, numToStr} = require('@garizonchain/utils');
const { BN } = require('@garizonchain/crypto');

const gar = new Unit('1').asGar();
const garToGwei = gar.toGwei();
console.log(garToGwei);

// numberToString
const num = 123;
const str = numberToString(num)
console.log(str);

// add0xToString
const str = '12345';
const expected = add0xToString(str)
console.log(expected);

// fromWei
const Wei = new BN('1000000000000000000');
const expected = fromWei(Wei, Units.gar);
console.log(expected);

// toWei
const gar = new BN('1');
const expected = toWei(gar, gar.utils.Units.gar);
const num = numToStr(expected);
console.log(num);
```
npm package: @garl-protocol/sdk
Description: GARL Protocol JavaScript/TypeScript SDK — Universal Trust Standard for AI Agents
Author: garl-protocol
Latest version: 1.0.3

# @garl-protocol/sdk — GARL Protocol JavaScript SDK

The Universal Trust Standard for AI Agents. Submit execution traces, build trust scores, and verify other agents before delegation.

## Install

```bash
npm install @garl-protocol/sdk
```

## Quick Start

```javascript
import { init, logAction, isTrusted } from '@garl-protocol/sdk';

init('garl_your_api_key', 'your-agent-uuid',
     'https://api.garl.ai/api/v1');

// Log an action
await logAction('Generated REST API', 'success', { category: 'coding' });
```

## Trust Gate

Check other agents before delegating work:

```javascript
const result = await isTrusted('target-agent-uuid', { minScore: 60 });
if (result.trusted) {
  delegateTask(...);
}
```

Or use the higher-order function:

```javascript
import { requireTrust } from '@garl-protocol/sdk';

const safeDelegation = requireTrust(delegateTask, { minScore: 60, mode: 'warn' });
await safeDelegation('target-agent-uuid', taskData);
```

Modes:
- `mode: "warn"` (default): Logs warning but executes the function
- `mode: "block"`: Returns null if agent is not trusted

## Full Client

```javascript
import { GarlClient } from '@garl-protocol/sdk';

const client = new GarlClient('garl_key', 'agent-uuid',
                               'https://api.garl.ai/api/v1');

const cert = await client.verify({ status: 'success', task: 'Fixed bug', durationMs: 3200 });
const trust = await client.checkTrust('other-agent-uuid');
const should = await client.shouldDelegate('other-agent-uuid');
```

## Links

- Website: https://garl.ai
- API Docs: https://api.garl.ai/docs
- Python SDK: https://pypi.org/project/garl-protocol/
- MCP Server: https://www.npmjs.com/package/@garl-protocol/mcp-server
npm package: @garlican/storm-react-diagrams
Description: **PSA**: React Diagrams is currently getting a bit of a rewrite to enable much more advanced features. To see the new foundation WIP visit [https://github.com/projectstorm/react-canvas](https://github.com/projectstorm/react-canvas).
Author: dylanvorster
Latest version: 5.2.1
Deprecated: false

# STORM React Diagrams

**PSA**: React Diagrams is currently getting a bit of a rewrite to enable much more advanced features. To see the new foundation WIP visit [https://github.com/projectstorm/react-canvas](https://github.com/projectstorm/react-canvas).

---

**DEMO**: [http://www.projectstorm.io/react-diagrams](http://www.projectstorm.io/react-diagrams)

**DOCS:** [https://projectstorm.gitbooks.io/react-diagrams](https://projectstorm.gitbooks.io/react-diagrams)

**RELEASE NOTES** : [http://dylanv.blog/2018/03/03/storm-react-diagrams-5-0-0/](http://dylanv.blog/2018/03/03/storm-react-diagrams-5-0-0/)

A super simple, no-nonsense diagramming library written in React that just works.

[![Join the chat at https://gitter.im/projectstorm/react-diagrams](https://badges.gitter.im/projectstorm/react-diagrams.svg)](https://gitter.im/projectstorm/react-diagrams?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)  [![NPM](https://img.shields.io/npm/v/storm-react-diagrams.svg)](https://npmjs.org/package/storm-react-diagrams)  [![NPM](https://img.shields.io/npm/dt/storm-react-diagrams.svg)](https://npmjs.org/package/storm-react-diagrams) [![Package Quality](http://npm.packagequality.com/shield/storm-react-diagrams.svg)](http://packagequality.com/#?package=storm-react-diagrams)  [![CircleCI](https://circleci.com/gh/projectstorm/react-diagrams/tree/master.svg?style=svg)](https://circleci.com/gh/projectstorm/react-diagrams/tree/master)

Example implementation using custom models:
![Personal Project](./images/example1.jpg)
![](./images/example2.jpg)
Get started with the default models right out of the box:
![](./images/example3.jpg)


## Introduction

A no-nonsense diagramming library written entirely in React with the help of a few small libraries. It aims to be:

* Simple, and void of any fuss/complications when implementing it into your own application
* Customizable without having to hack the core \(adapters/factories etc..\)
* Simple to operate and understand without sugar and magic
* Fast and optimized to handle large diagrams with hundreds of nodes/links
* Super easy to use, and should work as you expect it to
* Perfect for creating declarative systems such as programmatic pipelines and visual programming languages 

#### Run the demos

After running `yarn install` you must then run:  `yarn run storybook`

#### Building from source

Simply run `webpack` in the root directory \(or `export NODE_ENV=production && webpack` if you want a production build\) and it will spit out the transpiled code and typescript definitions into the dist directory as a single file.   
We use webpack for this because TSC cannot compile a single UMD file \(TSC can currently only output multiple UMD files\).

## [Checkout the docs](https://projectstorm.gitbooks.io/react-diagrams)
npm package: @garlikio/ffmpeg
Description: Installs preferred version off ffmpeg and provides both a wrapper and raw access to ffmpeg.
Author: Tyler Mills
Latest version: 1.0.13-beta.ffmpeg5.0

# @garlikio/ffmpeg

`npm install @garlikio/ffmpeg`

For a specific version off FFmpeg: `npm install @garlikio/ffmpeg@1.0.0-beta.ffmpeg5.0`

> **MacOS Yarn Note:** Due to a known bug in Yarn that prevents the creation of the `node_modules/.bin/ffmpeg` link, you will need to run this after installing:
> 
> `yarn --check-files --ignore-scripts`
> 
> Consider adding it to your `postinstall` script.

## Features

Specify the version of the version of this package you and the FFmpeg version.

```bash
yarn add @garlikio/ffmpeg@{version}-beta.ffmpeg{ffmpeg_veersion}
```

> **Note:** Currently only FFmpeg version 5 has been added. Please submit your merge requests for new versions to the `install.js` file.
> 
> Also, only MacOS and Linux support has been added.

## Usage

Trigger your own process manually.

```js
import { ffmpegPathSync } from '@garlikio/ffmpeg'
// Async: import { ffmpegPath } from '@garlikio/ffmpeg'
import {spawn} from "child_process";

const ffmpegProcess = spawn(ffmpegPathSync(), ['-version'])
```

Or, use this FFmpeg wrapper. In this example we're streaming a local file to RTMP
```js
import ffmpeg, { ffmpegPathSync } from '@garlikio/ffmpeg'

const ffmpegArguments = [
  '-re', '-i', '-',
  '-c:v', 'libx264', '-preset', 'fast', '-strict', '-2',
  '-c:a', 'aac', '-b:a', '128k',
  '-f', 'flv',
  '-flvflags',  'no_duration_filesize',
    "rtmps://server.test"
]

const ffmpegProcess = ffmpeg(ffmpegArgs);

ffmpegProcess.onOutput((data) => process.stdout.write(data))
ffmpegProcess.onMessage((message) => console.log('message: ', message))
ffmpegProcess.onDisconnect(()=> console.log('Lost connection to ffmpeg'))
ffmpegProcess.onError((error)=> console.log('There was stderror:', error))
ffmpegProcess.onExit(code=> process.exit(code))

/**
 * Stream a file to rtmp
 */
const fileStream = fs.createReadStream("path/to/my.webm")
fileStream.on('error', () => {
  console.error('error')
  process.exit()
})

fileStream.on('open', (data)=> {
  ffmpegProcess.streamOut().on('error', function( err ) {
    console.log('stream out error', err)
    if (err.code === "EPIPE") {
      process.exit(0);
    }
  });

  const streamToRtmp = fileStream.pipe(ffmpegProcess.streamIn())
  streamToRtmp.on('error', (error)=> {
    console.log('stream error', error)
  })
});
```