open-index/open-npm huggingface dataset:
npm package: @iloop/ido-sdk
Description: iloop IDO sdk
Author: Iloop
Latest version: 1.1.0

# ILoop_SDK_IDO

## Initialize SDK

```javascript
const walletKeyPair = web3.Keypair.fromSecretKey(bs58.decode(process.env.PRIVATE_KEY_WALLET))
const wallet = new Wallet(walletKeyPair)
const iloopSDK = new IloopIDOSDK(connection, TOKEN_PROGRAM_ID, wallet)
```
TOKEN_PROGRAM_ID can be replaced by TOKEN_2022_PROGRAM_ID if IDO token is Token 2022

## Initialize admin ata

```javascript
const instructions = await iloopSDK.initializeAdminAta()
```

## Initialize IDO
Init IDO
```javascript
    const instructions = await iloopSDK.initialize(
        new BN(1),
        7,
        new BN(1742092204),
        new web3.PublicKey('6gZF4YXuBgd3CAYFgZRLXFtBTMy8iQyi53CBgxeB1YQu'),
    )
```
- 1st argument is token price
- 2nd argument is token scale
- 3rd argument is unlock time 
- 4th argument is IDO token

**Eg**: If IDO token has decimals = 9 and token price is 100 USD for 1 token

-> Price for 1 lamport is 10^-7

-> token price = 1 and token price scale = 7

## Update Configuration
Init IDO
```javascript
      const instructions = await iloopSDK.updateConfiguration(null, new BN(1), 7, new BN(1736999413))
```


## Deposit Token
Admin deposit token to vault
```javascript
  const instructions = await iloopSDK.deposit(new BN(1000000000))
```

## Withdraw Token
Admin withdraw token from vault
```javascript
  const instructions = await iloopSDK.withdraw(new BN(1000000000))
```

## Buy Token
User buy token
```javascript
  const instructions = await iloopSDK.buyToken(new BN(1000000000), new web3.PublicKey('So11111111111111111111111111111111111111112'), "Memo")
```

## Claim Token
User buy token
```javascript
  const instructions = await iloopSDK.claimToken()
```
npm package: @iloop/sdk
Author: Iloop
Latest version: 1.14.0

#iloop-sdk


# Calculate adjust leverage

- Deposit: A token JITOSOL
- Current leverage: X
- New leverage: Y

-> New Deposit amount: A * Y/X = B

-> Total withdraw collateral: A - B = C

-> if C > 0 -> decrease leverage -> [flashBorrow SOL, repay flashBorrowSOL, withdraw collateral, swap collateral to SOL, flash repay SOL]

if C < 0 - increase leverage -> [flash borrow SOL, swap into JitoSOL, deposit JitoSOL to reserve, borrow SOL from reserve, flash repay SOL]



# Calculate withdraw collateral

 - total deposit A token JitoSOL
 - Current leverage X
 - withdraw B token 

-> Actual withdraw from Reserve: B * X

-> Swap amount = B * X - B = C

-> [flash borrow SOL from reserve, repay flash borrow amount to reserve, withdraw JITOSOL, swap JITOSOL to SOL, flash repay SOL ]



# Close multiply position

- Borrow A SOL
- Total deposit B SOL

-> [flash borrow A SOL, repay A SOL, withdraw B JitoSOL, swap Y JitoSOL to A SOL, repay A SOL]
npm package: @iloop/sdk-mainnet
Author: Iloop
Latest version: 1.0.19

#iloop-sdk


# Calculate adjust leverage

- Deposit: A token JITOSOL
- Current leverage: X
- New leverage: Y

-> New Deposit amount: A * Y/X = B

-> Total withdraw collateral: A - B = C

-> if C > 0 -> decrease leverage -> [flashBorrow SOL, repay flashBorrowSOL, withdraw collateral, swap collateral to SOL, flash repay SOL]

if C < 0 - increase leverage -> [flash borrow SOL, swap into JitoSOL, deposit JitoSOL to reserve, borrow SOL from reserve, flash repay SOL]



# Calculate withdraw collateral

 - total deposit A token JitoSOL
 - Current leverage X
 - withdraw B token 

-> Actual withdraw from Reserve: B * X

-> Swap amount = B * X - B = C

-> [flash borrow SOL from reserve, repay flash borrow amount to reserve, withdraw JITOSOL, swap JITOSOL to SOL, flash repay SOL ]



# Close multiply position

- Borrow A SOL
- Total deposit B SOL

-> [flash borrow A SOL, repay A SOL, withdraw B JitoSOL, swap Y JitoSOL to A SOL, repay A SOL]
npm package: @iloop/sdk-testnet
Author: Iloop
Latest version: 1.0.11

#iloop-sdk


# Calculate adjust leverage

- Deposit: A token JITOSOL
- Current leverage: X
- New leverage: Y

-> New Deposit amount: A * Y/X = B

-> Total withdraw collateral: A - B = C

-> if C > 0 -> decrease leverage -> [flashBorrow SOL, repay flashBorrowSOL, withdraw collateral, swap collateral to SOL, flash repay SOL]

if C < 0 - increase leverage -> [flash borrow SOL, swap into JitoSOL, deposit JitoSOL to reserve, borrow SOL from reserve, flash repay SOL]



# Calculate withdraw collateral

 - total deposit A token JitoSOL
 - Current leverage X
 - withdraw B token 

-> Actual withdraw from Reserve: B * X

-> Swap amount = B * X - B = C

-> [flash borrow SOL from reserve, repay flash borrow amount to reserve, withdraw JITOSOL, swap JITOSOL to SOL, flash repay SOL ]



# Close multiply position

- Borrow A SOL
- Total deposit B SOL

-> [flash borrow A SOL, repay A SOL, withdraw B JitoSOL, swap Y JitoSOL to A SOL, repay A SOL]
npm package: @iloop/staking-sdk
Description: iloop Staking sdk
Author: Iloop
Latest version: 1.1.1

# ILoop_SDK_Staking

## Initialize SDK

```javascript
const walletKeyPair = web3.Keypair.fromSecretKey(bs58.decode(process.env.PRIVATE_KEY_WALLET))
const wallet = new Wallet(walletKeyPair)
const iloopSDK = new IloopStakingSDK(connection, TOKEN_PROGRAM_ID, wallet)
```
TOKEN_PROGRAM_ID can be replaced by TOKEN_2022_PROGRAM_ID if staking token is Token 2022

## Initialize Staking

```javascript
    const instructions = await  iloopSDK.initialize(token, 25)
```

## Update Configuration
Update configuration

```javascript
      const instructions = await iloopSDK.updateConfiguration(25)
```


## Admin Deposit reward token

```javascript
  const instructions = await iloopSDK.depositRewardToken(new BN(100000000))
```

## Admin Withdraw reward token

```javascript
  const instructions = await iloopSDK.withdrawRewardToken(new BN(5000000))
```

## User Stake token


```javascript
  const instructions = await iloopSDK.stakeToken(new BN(50000000), "stake_id")
```

## User Unstake token


```javascript
  const instructions = await iloopSDK.unstakeToken()
```


## User Claim reward token


```javascript
  const instructions = await iloopSDK.claimReward()
```
npm package: @ilovepdf/ilovepdf-js-core
Description: ILovePDF Api - Core Library
Author: ILOVEPDF S.L.
Latest version: 0.3.2

iLovePDF Api - JS Core Library
--------------------------

Core library to serve a set of classes and functions in order to create new API libraries based in JavaScript or TypeScript. Some examples are @ilovepdf/ilovepdf-js and @ilovepdf/ilovepdf-nodejs.

Develop and automate PDF processing tasks like Compress PDF, Merge PDF, Split PDF, convert Office to PDF, PDF to JPG, Images to PDF, add Page Numbers, Rotate PDF, Unlock PDF, stamp a Watermark and Repair PDF. Each one with several settings to get your desired results.

## Requirements

Requirements to use this library are:

1. NPM - Package built with version @6.14.5 .
2. NodeJS - Package built with version @12.18.2 .

You cand download them [here](https://nodejs.org/en).

## Install

You can install the library via [NPM](https://www.npmjs.com). Run the following command:

```bash
npm install @ilovepdf/ilovepdf-corejs
```

## Documentation

Please see https://developer.ilovepdf.com/docs for up-to-date documentation.
npm package: @ilpp/ilpp-cli
Description: 可以手动或自动发布 npm package 到多个npm 镜像源
Author: ilpp
Latest version: 1.0.0

多 npm 镜像源发布，解决手动修改 npm 镜像源问题

---

## 工程添加依赖

#### npm 安装

```bash
npm install @ilpp/ilpp-cli
```

#### yarn 安装

```bash
yarn add @ilpp/ilpp-cli
```

## 使用

#### 在当前用户目录下创建 nrm.json, 并完善镜像源信息

```json
{
  "npm1": {
    "registry": "https://registry.npmjs.org/", // .npmrc 的 registry
    "_auth": "eHh4JTNBeHh4", // 用户名:密码 对应的 base64
    "email": "xxx@qq.com", // 邮箱
    // package.json 下的 publishConfig 对应的 registry; 
    // registry 和 packageRegistry 可能会不一样;
    "packageRegistry": "https://registry.npmjs.org/" 
  },
  "npm2": {
    "registry": "https://registry.npmjs.org1/",
    "_auth": "eHh4JTNBeHh4",
    "email": "xxx@qq.com",
    "packageRegistry": "https://registry.npmjs.org1/"
  }
}
```

#### 手动选择源发布

```js
ilpp-cli publish 

```

#### 自动发布到 nrm.json 下所有源

```js
ilpp-cli publish -a

```
npm package: @ilpt/systemic-ts-service-runner
Description: Service runner for @ilpt/systemic-ts
Author: Teun Mooij
Latest version: 1.0.0

# @ilpt/systemic-ts-service-runner

Runs [@ilpt//systemic-ts](https://www.npmjs.com/package/@ilpt/systemic-ts) systems

## TL;DR

```typescript
import { systemic } from '@ilpt/systemic-ts';
import { runner } from '@ilpt/systemic-ts-service-runner';

const system = systemic()
  .add('config', initConfig(), { scoped: true })
  .add('logger', initLogger()).dependsOn('config')
  .add('service', initService()).dependsOn('config', 'logger');

runner(system).start();
```

## Installation

```bash
npm install @ilpt/systemic-ts-service-runner
```

## Usage

```typescript
import { runner } from '@ilpt/systemic-ts-service-runner';
import system from './system';
import emergencyLogger from './emergencyLogger';

runner(system, { logger: emergencyLogger }).start().then(components => {
    // Do something with the components
});
```

or with top level await:

```typescript
import { runner } from '@ilpt/systemic-ts-service-runner';
import system from './system';
import emergencyLogger from './emergencyLogger';

const components = await runner(system, { logger: emergencyLogger }).start();
// Do something with the components
```
npm package: @ilsubyeega/sleep-js
Description: Advanced sleep calculator
Author: ilsubyeega
Latest version: 0.0.2

# sleep-js
### The advanced javascript library that calculates when to sleep.


## Install
```
npm i @ilsubyeega/sleep-js
```


## Usage
```js
const sleepjs = require('@ilsubyeega/sleep-js');
var sleep = new sleepjs();

// Calculate recommended Sleep hour.
console.log(sleep.getRecommendedSleepHour(18)); 
// Age 18 -> [ 7, 9 ]

// hour/min to a demical hour
console.log(sleep.getHourNum(20, 21));
// 20:21 -> 20.25

// Calculate the time to wake up
console.log(sleep.getSleepTime(0, 6)); 
// 12 AM (0:00) with 6 sleep cycle -> 9.25 (9:15)
```
npm package: @ilsyaa/adonis-datatables
Description: Package server side datatables on AdonisJS
Author: Ilsyaa
Latest version: 1.1.2

# @ilsyaa/adonis-datatables

[![npm-image]][npm-url]

Adonis datatable is an inspiration from laravel datatable. It is heavily inspired by the PHP library [Laravel Datatables](https://yajrabox.com/docs/laravel-datatables) and even share some code with services, facade and dependency injection.

## Official Documentation

The documentation is available on the [Website](https://ilsyaa.github.io/adonis-datatables-docs)

## License

This package is open-sourced software licensed under the [MIT license](LICENSE.md).

[npm-image]: https://img.shields.io/npm/v/@ilsyaa/adonis-datatables/latest.svg?style=for-the-badge&logo=npm
[npm-url]: https://www.npmjs.com/package/@ilsyaa/adonis-datatables/v/latest 'npm'

Forked from [adityadarma/adonis-datatables](https://github.com/adityadarma/adonis-datatables)
npm package: @ilucy/react-search-box
Description: React search box base on React Material
Author: Ramkumar.Murugarasan
Latest version: 1.0.0-alpha.1

# search-box

> React search box base on React Material

[![NPM](https://img.shields.io/npm/v/search-box.svg)](https://www.npmjs.com/package/search-box) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save search-box
```

## Usage

```jsx
import React, { Component } from 'react'

import { SearchBox } from 'search-box'

const Example = () => {
  
  return (
    <div>
    <SearchBox/>
    </div>
  )
}
```

## License

MIT © [Ramkumar.Murugarasan](https://github.com/Ramkumar.Murugarasan)

---

This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).
npm package: @ilukanets/gulp-to-jst
Description: > A [gulp](http://gulpjs.com/) plugin to compile [underscore](http://underscorejs.org/#template) / [lodash](http://lodash.com/docs#template) templates into a single file.
Author: Ihor Lukanets
Latest version: 1.0.1

# @ilukanets/gulp-to-jst
> A [gulp](http://gulpjs.com/) plugin to compile
[underscore](http://underscorejs.org/#template) / [lodash](http://lodash.com/docs#template)
templates into a single file.

Based on the same gulp plugin [gulp-tojst](https://npmjs.org/package/gulp-tojst).

It has replaced deprecated [gulp-util](https://www.npmjs.com/package/gulp-util) dependency.

## Install
Install using [npm](https://npmjs.org/package/@ilukanets/gulp-to-jst).

    $ npm install @ilukanets/gulp-to-jst

## Usage
```javascript
var toJST = require('@ilukanets/gulp-to-jst');

gulp.task('jst', function () {
  gulp.src('templates/**/*.html')
    .pipe(toJST('jst.js', {
      namespace: 'MY.NAME.SPACE',
      separator: '\n',
      prettify: true,
      templateSettings: {
        interpolate: /\{\{(.+?)\}\}/g
      }
    }))
    .pipe(gulp.dest('build/templates'))
})
```

## Options

amd
----------
Type: `boolean`
Default: `false`

Wraps the output file with an AMD define function and returns the compiled template namespace unless namespace has
been explicitly set to false in which case the template function will be returned directly.

prettify
----------
Type: `boolean`
Default: `false`

When doing a quick once-over of your compiled template file, it's nice to see an easy-to-read format that has one
line per template. This will accomplish that.

namespace
----------
Type: `string`
Default: `JST`

The namespace in which the precompiled templates will be assigned. Use dot notation (e.g. App.Templates) for nested
namespaces or false for no namespace wrapping. When false with amd option set true, templates will be returned
directly from the AMD wrapper.

processName
----------
Type: `function`

This option accepts a function which takes one argument (the template filepath) and returns a string which will
be used as the key for the precompiled template object. The example below stores all templates on the default
JST namespace in capital letters.

processContent
----------
Type: `function`

This option accepts a function which takes one argument (the file content) and returns a string which will be used
 as template string. The example below strips whitespace characters from the beginning and the end of each line.

separator
----------
Type: `string`
Default: `\n`

Concatenated files will be joined on this string.

templateSettings
----------
Type: `object`
Default: `{}`

The settings passed to underscore when compiling templates. Accepts the same _.templateSettings options
as the underscore\lodash library.

## License
MIT
npm package: @ilumin/prettier-config
Description: @ilumin's Prettier Config
Author: ilumin
Latest version: 0.1.1

# @ilumin's Prettier Config

## Install

```
yarn add -D @ilumin/prettier-config
```

## Use

in `packages.json` add

```
{
  "prettier": "@ilumin/prettier-config"
}
```

## Ref

https://dev.to/fullstack_to/sharing-prettier-configuration-files-gba
npm package: @ilurk/bass
Description: A modern alternative to CSS resets.
Author: hylurk
Latest version: 0.0.4

# bass
A modern alternative to CSS resets.

**NPM**

```sh
npm install --save @ilurk/bass
```

or

```sh
yarn add @ilurk/bass
```

## What does it do?

* Preserves useful defaults, unlike many CSS resets.
* Normalizes styles for a wide range of elements.
* Corrects bugs and common browser inconsistencies.
* Improves usability with subtle modifications.
* Explains what code does using detailed comments.


## Browser support

* Chrome
* Edge
* Firefox ESR+
* Internet Explorer 10+
* Safari 8+
* Opera
npm package: @ilurk/drawer
Description: A cascaded drawer UI component for mobile.
Author: hylurk
Latest version: 0.0.2

# drawer

**English** | **[简体中文](https://github.com/hylurk/drawer/blob/master/README_CHINESE.md)**

A cascaded drawer UI component for mobile.

## Installation

```shell
npm install @lurk/drawer
```

or

```shell
yarn add @lurk/drawer
```

## Demo

You can use it like this :

**html**

```html
<body>
  <div id="wrapper"></div>
  <button id="btn">
    Click Me
  </button>
</body>
```

**js**

```js
import '@lurk/drawer/dist/css/drawer.min.css'
import Drawer from '@lurk/drawer'

const drawer = new Drawer({
  wrapper: '#wrapper',
  levels: [
    {
      title: 'Choose Province',
    },
    {
      title: 'Choose City',
    },
    {
      title: 'Choose County',
    }
  ]
})

document.querySelector('#btn').addEventListener('click', function () {
  drawer.show()
})
```

## License

[MIT](https://github.com/hylurk/drawer/blob/master/LICENSE)
npm package: @ily1437/gui
Description: build gui
Author: flow
Latest version: 1.0.3

# version log

## how to use

1. npm install `@ily1437/gui`
2. example

    ```javascript
    import {GUI} from '@ily1437/gui';
    const gui = new GUI();
    const folder = gui.addFolder(name);
    folder.open();
    const controller = {
        name: '',
        age: 3,
        color: '#000',
        sing(){}    //cool style
    };
    const age = gui.add(controller, 'age', [0, 100, 1]);
    age.listen();
    gui.add(controller, 'name');
    const c = gui.addColor(controller, 'color');
    c.onChange((v)=>{
        console.error(v);
    });
    gui.add(controller, 'sing');


    ```

____________

## v1.0.3 [2024-6-4]

1. update `input[type=range]`: if step not is not defined, it will be calculated auto.

____________

## v1.0.2 [2024-5-29]

1. fix `select` and `input[type=range]`
    1. select structure:

        ```javascript
        {
            value: Number,  //or String
            options: [
                Number, //fix
                String,
                {   //new support
                    label: String,
                    value: Number,
                }
            ]
        }
        ```

____________

## v1.0.1 [2024-3-5]

1. fix listen

____________

## v1.0.0 [2024-3-4]