open-index/open-npm huggingface dataset:
npm package: @orbs-network/orbs-client
Description: Client side gateway to access ORBS nodes by IP randomly or round robin
Author: yuval@orbs.com
Latest version: 1.0.1

# orbs-client
Client side gateway to access ORBS nodes by IP randomly or round robin

## Install
```
npm install @orbs-network/orbs-client
```

## Get Started
```js
const client = import "@orbs-network/orbs-client"

async function start(){
    await client.init();
    // get a live ORBS node IP
    const node = client.getRandomNode();
    // get nodes status
    const url = 'http://'+node.Ip+'/services/management-service/status';
    const response = await axios.get(url);
    console.log(`${node.Name} status`)
    console.log(response);
}
```

## API

### Node (type)
```JSON
{
    "EthAddress": "0874bc1383958e2475df73dc68c4f09658e23777",
    "OrbsAddress": "067a8afdc6d7bafa0ccaa5bb2da867f454a34dfa",
    "Ip": "46.101.165.46",
    "Port": 0,
    "Name": "Wings Stiftung"
}
```

### init
```JS
// optional array of seed HostNames of nodes
// if node provided- a hard coded array is used
const seed = [
    '54.95.108.148',
    '0xcore.orbs.network'
];
client.init(seed);
```

> TODO: init with infura to get the committee from ethereum network
### getRandomNode
```JS
// select weather to get any node or only a node from orbs 21 node committee
const committeeOnly = true;
// use random index to select the node.
const node = client.getRandomNode(committeeOnly)
```

### getNextNode
```JS
// select weather to get any node or only a node from orbs 21 node committee
const committeeOnly = false;
// uses round robin to fetch next node
const node = client.getNextNode(committeeOnly)
```

> Please notice the health of the node is checked every 10 minutes. Its the user's responsibility to call another node upon a failure.
npm package: @orbs-network/orbs-project-generator
Description: Generates basic project. Result consists of several parts:
Author: Kirill Maksimov
Latest version: 0.3.0

# Orbs project generator

Generates basic project. Result consists of several parts:

* contract in `src/contract/app/contract.go`
* JS interface in `src/app.js`
* Deployment script in `src/deploy_app.js`
* End to end test in `test/app_test.js`
* `package.json` with all required dependencies
* `.gitignore`

## Installation

```
npm install -g @orbs-network/orbs-project-generator
```

## Run

Plase note that app name should be camel case: `AppName`.

You can safely run the generator multiple times in the same directory to generate scaffolding for different contracts.

```
orbs-project-generator create <AppName> <path>
```

```
orbs-project-generator create Hello .
```

## Testing the project

```
npm test
```
npm package: @orbs-network/transfer-sim
Description: Simulate ERC20 transfers via state overrides to detect fee-on-transfer tokens.
Latest version: 0.1.3

# transfer-sim

🧪 Simulate ERC20 transfers via state overrides to detect fee-on-transfer tokens.

## ⚡ Install

```bash
go get github.com/orbs-network/transfer-sim
```

## ✅ Usage

```go
client, _ := ethclient.Dial("https://eth-mainnet.alchemyapi.io/v2/YOUR-API-KEY")
token := common.HexToAddress("0x...")
from := common.HexToAddress("0x...")
to := common.HexToAddress("0x...")
amount := big.NewInt(1000000000000000000) // 1 token (18 decimals)

received, err := transfersim.TransferSim(client, token, from, to, amount)
if err != nil {
    // On error, received == amount. Treat as unknown.
    fmt.Printf("Simulation error: %v\n", err)
    return
}

if received.Cmp(amount) == 0 {
    fmt.Println("No fee on transfer detected")
} else {
    fee := new(big.Int).Sub(amount, received)
    fmt.Printf("Fee on transfer detected: %s tokens\n", fee.String())
}
```

## Node.js Usage

The Go library is the canonical implementation. A Node.js translation is provided in `js/transfer-sim.js` for convenience.

```js
const Web3 = require("web3");
const { transferSim } = require("./js/transfer-sim");

const web3 = new Web3(process.env.RPC_URL);

const token = "0x...";
const from = "0x...";
const to = "0x...";
const amount = 10n ** 18n;

(async () => {
  const { received, error } = await transferSim(web3, token, from, to, amount);
  if (error) {
    console.warn("Simulation error:", error.message || error);
  }
  console.log("received:", received.toString());
})();
```

- Requires `from` to approve `to` to spend `amount` on-chain.
- Requires an RPC that supports `eth_call` with state overrides.

## 🧰 API

```go
func TransferSim(
    client *ethclient.Client,
    token, from, to common.Address,
    amount *big.Int,
) (*big.Int, error)
```

- Returns the actual amount received by `to` (balance delta).
- If `amount` is `nil`/`0`, returns `0` without calling RPC.
- On failure, returns `amount` alongside the error.
- Requires `from` to approve `to` to spend `amount`.
- Uses `eth_call` with state overrides (no on-chain tx).

## 🧪 Tests

```bash
npm run test:unit
```

```bash
npm run test
```
npm package: @orbstation/cling
Description: Textual status helper, for CLI progress or API result log
Author: bemit
Latest version: 0.0.2

# OrbStation: cling

[![npm (scoped)](https://img.shields.io/npm/v/@orbstation/cling?style=flat-square)](https://www.npmjs.com/package/@orbstation/cling)
[![Github actions Build](https://github.com/modelize/orbstation/actions/workflows/blank.yml/badge.svg)](https://github.com/modelize/orbstation/actions)
[![MIT license](https://img.shields.io/npm/l/@orbstation/cling?style=flat-square)](https://github.com/modelize/orbstation/blob/main/LICENSE)
![Typed](https://flat.badgen.net/badge/icon/Typed?icon=typescript&label&labelColor=blue&color=555555)

Textual status helper, for CLI progress or API result log.

```shell
npm i --save @orbstation/cling
```

> ESM only package

## Usage

Using the default `stdout` configured instance:

```typescript
import { cling } from '@orbstation/cling'

cling.line('some simple line to output')

cling.message('succes', 'line with severity level')
cling.message('error', 'line with severity level')

const end = cling.progress('waiting for upload')
// will print / animate:
// waiting for upload .
// waiting for upload ..
// waiting for upload ...
// waiting for upload .
// when done, end the logging with one final line:
end()
// waiting for upload ...

```

Using the default `array-log` configured instance:

```typescript
import { clingLog } from '@orbstation/cling'
import { ClingLogEntry } from '@orbstation/cling/outputLog'

const store: ClingLogEntry[] = []
const cling = clingLog(store)

cling.line('some line')
cling.line('and another line')

// flushing the current content of the store:
console.log(store.splice(0, store.length))

// when not "flushed" again, this line won't be shown anywhere
cling.line('and another line')
```

Building a custom instance:

```typescript
import { ClingFns, ClingLevels, makeCling } from '@orbstation/cling/make'
import { symbolsUTF8 } from '@orbstation/cling/symbols'
import { clingOutputStd } from '@orbstation/cling/outputStd'

export const cling: ClingFns<ClingLevels> =
    makeCling({
        onOutput: clingOutputStd(symbolsUTF8),
    })
```

```typescript
import { ClingFns, ClingLevels, makeCling } from '@orbstation/cling/make'
import { ClingLogEntry, clingOutputLog } from '@orbstation/cling/outputLog'

export const clingLog: <L extends ClingLevels = ClingLevels>(store: ClingLogEntry[]) => ClingFns<L> =
    (store) =>
        makeCling({
            onOutput: clingOutputLog(store),
        })
```

## License

[MIT License](https://github.com/modelize/orbstation/blob/main/LICENSE)

© 2023 [bemit](https://bemit.codes)
npm package: @orbstation/command
Description: Simple CLI command dispatcher and file-resolver for config-less setup.
Author: bemit
Latest version: 0.3.1

# OrbStation: Command

[![npm (scoped)](https://img.shields.io/npm/v/@orbstation/command?style=flat-square)](https://www.npmjs.com/package/@orbstation/command)
[![Github actions Build](https://github.com/modelize/orbstation/actions/workflows/blank.yml/badge.svg)](https://github.com/modelize/orbstation/actions)
[![MIT license](https://img.shields.io/npm/l/@orbstation/command?style=flat-square)](https://github.com/modelize/orbstation/blob/main/LICENSE)
![Typed](https://flat.badgen.net/badge/icon/Typed?icon=typescript&label&labelColor=blue&color=555555)

Simple CLI command dispatcher and file-resolver for config-less setup.

```shell
npm i --save @orbstation/command
```

> ESM only package

## License

[MIT License](https://github.com/modelize/orbstation/blob/main/LICENSE)

© 2022 [bemit](https://bemit.codes)
npm package: @orbstation/oas
Description: Simple OpenAPI typings and definition helper.
Author: bemit
Latest version: 0.0.2

# OrbStation: OpenAPI

[![npm (scoped)](https://img.shields.io/npm/v/@orbstation/oas?style=flat-square)](https://www.npmjs.com/package/@orbstation/oas)
[![Github actions Build](https://github.com/modelize/orbstation/actions/workflows/blank.yml/badge.svg)](https://github.com/modelize/orbstation/actions)
[![MIT license](https://img.shields.io/npm/l/@orbstation/oas?style=flat-square)](https://github.com/modelize/orbstation/blob/main/LICENSE)
![Typed](https://flat.badgen.net/badge/icon/Typed?icon=typescript&label&labelColor=blue&color=555555)

Simple OpenAPI typing and helper for NodeJS routing in express apps.

```shell
npm i --save @orbstation/route express @orbstation/oas
npm i --save-dev @types/express
```

> ESM only package

## License

[MIT License](https://github.com/modelize/orbstation/blob/main/LICENSE)

© 2023 [bemit](https://bemit.codes)
npm package: @orbstation/route
Description: NodeJS routing helper for express apps.
Author: bemit
Latest version: 0.0.7

# OrbStation: Route

[![npm (scoped)](https://img.shields.io/npm/v/@orbstation/route?style=flat-square)](https://www.npmjs.com/package/@orbstation/route)
[![Github actions Build](https://github.com/modelize/orbstation/actions/workflows/blank.yml/badge.svg)](https://github.com/modelize/orbstation/actions)
[![MIT license](https://img.shields.io/npm/l/@orbstation/route?style=flat-square)](https://github.com/modelize/orbstation/blob/main/LICENSE)
![Typed](https://flat.badgen.net/badge/icon/Typed?icon=typescript&label&labelColor=blue&color=555555)

NodeJS routing helper for express apps.

```shell
npm i --save @orbstation/route express
npm i --save-dev @types/express
```

> ESM only package

## License

[MIT License](https://github.com/modelize/orbstation/blob/main/LICENSE)

© 2022 [bemit](https://bemit.codes)
npm package: @orbstation/service
Description: Service configuration and extension setup helper for NodeJS apps.
Author: bemit
Latest version: 0.0.3

# OrbStation: Service

[![npm (scoped)](https://img.shields.io/npm/v/@orbstation/service?style=flat-square)](https://www.npmjs.com/package/@orbstation/service)
[![Github actions Build](https://github.com/modelize/orbstation/actions/workflows/blank.yml/badge.svg)](https://github.com/modelize/orbstation/actions)
[![MIT license](https://img.shields.io/npm/l/@orbstation/service?style=flat-square)](https://github.com/modelize/orbstation/blob/main/LICENSE)
![Typed](https://flat.badgen.net/badge/icon/Typed?icon=typescript&label&labelColor=blue&color=555555)

Service configuration and extension setup helper for NodeJS apps.

```shell
npm i --save @orbstation/route express @orbstation/oas @orbstation/service
npm i --save-dev @types/express
```

> ESM only package

## License

[MIT License](https://github.com/modelize/orbstation/blob/main/LICENSE)

© 2023 [bemit](https://bemit.codes)
npm package: @orca-fe/clsx-dedupe
Description: `clsx` dedupe version
Author: Luke Edwards
Latest version: 1.2.1

# clsx [![CI](https://github.com/lukeed/clsx/workflows/CI/badge.svg)](https://github.com/lukeed/clsx/actions?query=workflow%3ACI) [![codecov](https://badgen.net/codecov/c/github/lukeed/clsx)](https://codecov.io/gh/lukeed/clsx)

> A tiny (228B) utility for constructing `className` strings conditionally.<Br>Also serves as a [faster](/bench) & smaller drop-in replacement for the `classnames` module.

This module is available in three formats:

* **ES Module**: `dist/clsx.m.js`
* **CommonJS**: `dist/clsx.js`
* **UMD**: `dist/clsx.min.js`


## Install

```
$ npm install --save clsx
```


## Usage

```js
import clsx from 'clsx';
// or
import { clsx } from 'clsx';

// Strings (variadic)
clsx('foo', true && 'bar', 'baz');
//=> 'foo bar baz'

// Objects
clsx({ foo:true, bar:false, baz:isTrue() });
//=> 'foo baz'

// Objects (variadic)
clsx({ foo:true }, { bar:false }, null, { '--foobar':'hello' });
//=> 'foo --foobar'

// Arrays
clsx(['foo', 0, false, 'bar']);
//=> 'foo bar'

// Arrays (variadic)
clsx(['foo'], ['', 0, false, 'bar'], [['baz', [['hello'], 'there']]]);
//=> 'foo bar baz hello there'

// Kitchen sink (with nesting)
clsx('foo', [1 && 'bar', { baz:false, bat:null }, ['hello', ['world']]], 'cya');
//=> 'foo bar hello world cya'
```


## API

### clsx(...input)
Returns: `String`

#### input
Type: `Mixed`

The `clsx` function can take ***any*** number of arguments, each of which can be an Object, Array, Boolean, or String.

> **Important:** _Any_ falsey values are discarded!<br>Standalone Boolean values are discarded as well.

```js
clsx(true, false, '', null, undefined, 0, NaN);
//=> ''
```

## Benchmarks

For snapshots of cross-browser results, check out the [`bench`](/bench) directory~!

## Support

All versions of Node.js are supported.

All browsers that support [`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Browser_compatibility) are supported (IE9+).

>**Note:** For IE8 support and older, please install `clsx@1.0.x` and beware of [#17](https://github.com/lukeed/clsx/issues/17).

## Tailwind Support

Here some additional (optional) steps to enable classes autocompletion using `clsx` with Tailwind CSS.
<details>

<summary>
  Visual Studio Code
</summary>

1. [Install the "Tailwind CSS IntelliSense" Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)

2. Add the following to your [`settings.json`](https://code.visualstudio.com/docs/getstarted/settings):

  ```json
   {
    "tailwindCSS.experimental.classRegex": [
      ["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
    ]
   }
  ```
</details>

## Related

- [obj-str](https://github.com/lukeed/obj-str) - A smaller (96B) and similiar utility that only works with Objects.

## License

MIT © [Luke Edwards](https://lukeed.com)
npm package: @orca-fe/ejs-gen
Description: A file generator base on EJS
Latest version: 0.0.9

# @orca-fe/ejs-gen

这是一个基于 [`ejs`](https://github.com/mde/ejs) 的文件生成工具。

你可以使用一个目录，用于存放 `ejs` 模板，该工具可以扫描模板目录，并将每一个文件进行 `ejs` 模板渲染，再输出到指定目录。

该工具主要用于基于项目模板创建项目代码。

## 使用方式

### CLI

```bash
ejs-gen [source] [target] --data <data> --ejs-only [ejsOnly]
```

### NodeJS

```ts
import gen from '@orca-fe/ejs-gen';

gen('source', 'target', {
  data: {},
  ejsOnly: false,
});
```

## API

| 属性    | 说明                                                                                                                             | 类型                 | 默认值     |
| ------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ---------- |
| source  | 模板目录                                                                                                                         | `string`             | `required` |
| target  | 目标目录，在该目录下生成文件                                                                                                     | `string`             | `required` |
| data    | 用于 `ejs` 渲染的数据                                                                                                            | `JSON5`              | `{}`       |
| ejsOnly | 是否只转换 `ejs` 文件，开启后，只对后缀为 `.ejs` 的文件进行渲染，其它文件仅作复制。你也可以传入字符串，指定 `ejs` 文件的特殊后缀 | `boolean` / `string` | `false`    |

## 内置方法

内置了 [`change-case`](https://github.com/blakeembrey/change-case) 的用于处理字符串的方法。包含  `camelCase`, `pascalCase`, `paramCase`, `noCase`, `dotCase`, `capitalCase`, `pathCase`, `snakeCase`, `headerCase`, `sentenceCase`, `constantCase`. 详情请查看 [`change-case`](https://github.com/blakeembrey/change-case) 的文档。

### 示例

EJS Template:

```ejs
// data: { name: 'checkBox' }

const className = '<%= paramCase(name) %>';

export default class <%= pascalCase(name) %> {
  // ...
}
```

Output:

```javascript
const className = 'check-box';

export default class CheckBox {
  // ...
}
```