open-index/open-npm huggingface dataset:
npm package: @meteora-ag/dynamic-fee-sharing-sdk
Description: A Typescript SDK for interacting with the Dynamic Fee Sharing Program on Meteora.
Author: Dann Wee
Latest version: 1.0.6

# Meteora Dynamic Fee Sharing SDK

A Typescript SDK for interacting with the Dynamic Fee Sharing Program on Meteora.

## Overview

This SDK provides a set of tools and methods to interact with the Meteora Dynamic Fee Sharing Program. It enables developers to dynamically fee share.

## Installation

```bash
npm install @meteora-ag/dynamic-fee-sharing-sdk
# or
pnpm install @meteora-ag/dynamic-fee-sharing-sdk
# or
yarn add @meteora-ag/dynamic-fee-sharing-sdk
```

## Initialization

```typescript
import { Connection } from "@solana/web3.js";
import { DynamicFeeSharingClient } from "@meteora-ag/dynamic-fee-sharing-sdk";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const client = new DynamicFeeSharingClient(connection, "confirmed");
```

## Usage

Refer to the [docs](./docs.md) for how to use the functions.

## Flow

The generic flow of how Dynamic Fee Sharing works is as follows:

1. Create a fee vault or a fee vault PDA.
   - This process will also need to establish the `UserShare` for each user.
2. Fund the fee vault.
3. Users can claim the fee from the fee vault.

## Test

```bash
bun install
bun test
```

## Program Address

- Mainnet-beta: `dfsdo2UqvwfN8DuUVrMRNfQe11VaiNoKcMqLHVvDPzh`
- Devnet: `dfsdo2UqvwfN8DuUVrMRNfQe11VaiNoKcMqLHVvDPzh`
npm package: @meteora-ag/liquidity-distributor-sdk
Description: A Typescript SDK for interacting with the Liquidity Distributor Program on Meteora.
Author: Dann Wee
Latest version: 1.0.1

# Meteora Liquidity Distributor SDK

A Typescript SDK for interacting with the Liquidity Distributor Program on Meteora.

## Overview

This SDK provides a set of tools and methods to interact with the Meteora Liquidity Distributor Program. It enables developers to distribute liquidity in the form of NFTs to their users.

## Installation

```bash
npm install @meteora-ag/liquidity-distributor-sdk
# or
pnpm install @meteora-ag/liquidity-distributor-sdk
# or
yarn add @meteora-ag/liquidity-distributor-sdk
```

## Initialization

```typescript
import { Connection } from "@solana/web3.js";
import { LiquidityDistributorClient } from "@meteora-ag/liquidity-distributor-sdk";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const tokenMint = new PublicKey("YOUR_TOKEN_MINT");
const claimProofEndpoint = "YOUR_CLAIM_PROOF_ENDPOINT";
const client = new LiquidityDistributorClient(
  tokenMint,
  claimProofEndpoint,
  connection,
  "confirmed"
);
```

## Usage

Refer to the [docs](./docs.md) for how to use the functions.

## Test

```bash
pnpm install
pnpm test
```

## Program Address

- Mainnet-beta: `pDisRpxvnFw4osSqDPqMJ62tLsVQGsHL4tMX23ArYrL`
- Devnet: `pDisRpxvnFw4osSqDPqMJ62tLsVQGsHL4tMX23ArYrL`
npm package: @meteora-ag/merkle-distributor-sdk
Description: A Typescript SDK for interacting with the Merkle Distributor Program on Meteora.
Author: Dann Wee
Latest version: 1.0.1

# Meteora Merkle Distributor SDK

A Typescript SDK for interacting with the Merkle Distributor Program on Meteora.

## Overview

This SDK provides a set of tools and methods to interact with the Meteora Merkle Distributor Program. It enables developers to distribute tokens to their users.

## Installation

```bash
npm install @meteora-ag/merkle-distributor-sdk
# or
pnpm install @meteora-ag/merkle-distributor-sdk
# or
yarn add @meteora-ag/merkle-distributor-sdk
```

## Initialization

```typescript
import { Connection } from "@solana/web3.js";
import { MerkleDistributorClient } from "@meteora-ag/merkle-distributor-sdk";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const tokenMint = new PublicKey("YOUR_TOKEN_MINT");
const claimProofEndpoint = "YOUR_CLAIM_PROOF_ENDPOINT";
const client = new MerkleDistributorClient(
  tokenMint,
  claimProofEndpoint,
  connection,
  "confirmed"
);
```

## Usage

Refer to the [docs](./docs.md) for how to use the functions.

## Test

```bash
pnpm install
pnpm test
```

## Program Address

- Mainnet-beta: `DiSLRwcSFvtwvMWSs7ubBMvYRaYNYupa76ZSuYLe6D7j`
- Devnet: `DiSLRwcSFvtwvMWSs7ubBMvYRaYNYupa76ZSuYLe6D7j`
npm package: @meteora-ag/met-lock-sdk
Description: A Typescript SDK for interacting with the Lock Program on Meteora.
Author: Dann Wee
Latest version: 1.0.1

# Meteora Lock SDK

A Typescript SDK for interacting with the Lock Program on Meteora.

## Overview

This SDK provides a set of tools and methods to interact with the [Meteora Lock Program](https://github.com/jup-ag/jup-lock). It enables developers to easily lock vest tokens.

## Installation

```bash
npm install @meteora-ag/met-lock-sdk
# or
pnpm install @meteora-ag/met-lock-sdk
# or
yarn add @meteora-ag/met-lock-sdk
```

## Initialization

```typescript
import { Connection } from "@solana/web3.js";
import { LockClient } from "@meteora-ag/met-lock-sdk";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const client = new LockClient(connection, "confirmed");
```

## Usage

Refer to the [docs](./docs.md) for how to use the functions.

## Flow

The generic flow of how Lock works is as follows:

1. Create and fund a vesting escrow using `createVestingEscrowV2`.
2. Users can claim the escrow using `claimV2`.

## Program Address

- Mainnet-beta: `LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn`
- Devnet: `LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn`
npm package: @meteora-ag/optimist
Description: A set of react contexts, hooks and solana helpers
Author: zhengyutay
Latest version: 0.1.1

# Optimist

A set of react contexts, hooks and solana helpers

TODO: Move jupiter and mercurial duplicated code to this package

![An optimist](https://cdn.discordapp.com/attachments/889605233104289802/889728254943039528/optimist-armani.png)
npm package: @meteora-ag/position-nft-distribution-sdk
Description: A Typescript SDK for interacting with the Position NFT Distribution Program on Meteora.
Author: Minh Do
Latest version: 1.0.3

# Position NFT Distribution

A simple program for distribution of DAMM v2 NFT positions.

## Process

There are 2 main processes:

1. Register:

In order to get a position NFT, MET's user would need to register firstly

- Admin would send an instruction `initialize_vault`, that includes `creation_fee` and `end_time` for registering
- User send `register` instruction to confirm they would join in position NFT distribution, they would need to pay `creation_fee` as prepaid for rent fee when creating position NFT and transaction fee
- After `end_time`, admin can withdraw total fee to an operator wallet to prepare for distributing position NFT

2. Distribution position NFT

Operator would need to prepare a script that including following instructions for each transaction:

- Create position (damm v2)
- Add liquidity (damm v2)
- Transfer position NFT (damm v2)
- `record_tx`with hash as user to get that NFT

Because record_tx is PDA of Operator and user, so it can't be double spending

Note: The whole process is trusted, we just add some simple steps to:

- Record user to register in position NFT distribution
- Collect prepaid fee for position NFT
- Avoid double spending to create position NFT for an user

## Program

Program ID: `opp8FuZQ47KoEAmQgdeyiyCFDahnfxLEX15zoo51Z8t`

### Build Program

```bash
anchor build
```

## SDK

This SDK provides a set of tools and methods to interact with the Meteora Position NFT Distribution Program. It enables developers to distribute DAMM v2 position NFTs as an airdrop.

### Installation

```bash
npm install @meteora-ag/position-nft-distribution-sdk
# or
pnpm install @meteora-ag/position-nft-distribution-sdk
# or
yarn add @meteora-ag/position-nft-distribution-sdk
```

### Initialization

```typescript
import { Connection } from "@solana/web3.js";
import { PositionNftDistributionClient } from "@meteora-ag/position-nft-distribution-sdk";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const client = new PositionNftDistributionClient(connection, "confirmed");
```

### Usage

Refer to the [docs](./ts-client/docs.md) for how to use the functions.

### Test

```bash
pnpm install
pnpm test
```
npm package: @meteora-digital/accordion-grids
Description: A class to make accordion grid layouts a breeze
Author: Emmanuel Davies
Latest version: 0.1.1

# Accordion Grid

Use this class to make Accordion Grid Layouts a breeze

## Installation

```bash
npm i @meteora-digital/accordion-grids
yarn add @meteora-digital/accordion-grids
```

## Usage

```es6
import AccordionGridController from '@meteora-digital/accordion-grids';

// Setting animate to false will prevent the TweenController dependency from being loaded and allow you to animate the content yourself
const Dropdown = new AccordionGridController(element, {
    // Defaults
    animate: true,
    duration: 300,
});

// Load the content into the dropdown controller
Dropdown.setContent(content);

// Event listeners
Dropdown.on('open', () => element.classList.add('active'));
Dropdown.on('close', () => element.classList.remove('active'));

element.addEventListener('click', () => Dropdown.toggle());
```

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @meteora-digital/classy
Description: Extend this class to add 'on' event listeners to your other es6 classes
Author: Emmanuel Davies
Latest version: 0.0.4

# Classy

Extend this class to add 'on' event listeners to your other es6 classes

## Installation

```bash
npm i @meteora-digital/classy
yarn add @meteora-digital/classy
```

## Usage

```es6
import Classy from '@meteora-digital/classy';

// Create a new class that extends Classy
class MyClassController extends Classy {
  constructor() {
    super();
  }

  init() {
    // Do something

    // Include the callback method in your class to trigger the event
    this.callback('init', data);
  }
}

// Create a new instance of your class
const MyClass = new MyClassController();

// Add an event listener to your class
MyClass.on('init', (data) => {
  // do something with the data
});

// Trigger the method, which will trigger the event
MyClass.init();
```

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @meteora-digital/filters
Description: This will act as our filtering engine. We will pass in filters, Then call apply(). An xhr request will be sent in the form of URL parameters, the response will be accessed via the on('success', (response) => {}) method.
Author: Emmanuel Davies
Latest version: 3.0.2

# Filters

A class to make URL Paramter XHR Requests super easy

#### Note: version 2.0.0 includes breaking changes since the previous version 1.0.0
#### Note: version 1.0.0 includes breaking changes since the previous beta version 0.1.1

## Installation

```bash
npm i @meteora-digital/filters
yarn add @meteora-digital/filters
```

## Usage

```html
<select name="colours" id="colours">
    <option value="red">red</option>
    <option value="blue">blue</option>
    <option value="green">green</option>
    <option value="purple">purple</option>
    <option value="yellow">yellow</option>
</select>
```

```es6
import FiltersController from '@meteora-digital/filters';

const Filter = new FiltersController('/my/endpoint');
const select = document.querySelector('select');

Filter.on('success', (response) => {
  // do something with the response
})

select.addEventListener('change', () => {
  Filter.set(select.name, select.value);
  Filter.apply();
});
```

## Arguments

| Argument | Type | Description |
|--------|------|-------------|
| api | string | This is the URL that will be used in the ajax call |

## Methods

First argument should either be an object or a string. The second argument will only be used if the first argument is a string.
The second argument can either be a string or an array of strings.

```set()```

This will remove any current values in this parameter and set it to a specific value in the value object.

```javascript
Filter.set({
  colour: ['purple', 'red', 'blue'],
});

Filter.set('colour', ['purple', 'red', 'blue']);
```

```add()```

Add more values to the filters object

```javascript
Filter.add({
  colour: 'green',
});

Filter.add('colour', 'green');
```

```remove()```

Remove data from the filters object

```javascript
Filter.remove({
  colour: 'red',
});

Filter.remove('colour', 'red');
```

```clear()```

Remove all data from the filters object

```javascript
Filter.clear();
```

```apply()```

Make the XHR Request to load new content

```javascript
Filter.apply();
```

```updateURL()```

Replace the history state and update the URL to a string

```javascript
Filter.updateURL(Filter.api.segmentURL);
```

## Events

Each method has it's own event that is fired when the method is called. These can be accessed using the on() method

```on()```

```javascript
Filter.on('success', (response) => {
  // do something with the response
});

Filter.on('change', (value) => {
  // do something when the filters changes
});
```

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @meteora-digital/gallery
Description: An es6 class to create a simple image gallery.
Author: Emmanuel Davies
Latest version: 0.0.4

# Gallery

Gallery is an es6 Class which can be used to easily make a basic fading gallery with dots and autoplay.

## Installation

with webpack

```bash
yarn add @meteora-digital/gallery
```

## HTML Usage

```html
<div [ js-my-gallery ]>
  <img src"path/to/image_001.jpg" alt="image_001" class="[ js-gallery--item ]">
  <img src"path/to/image_002.jpg" alt="image_002" class="[ js-gallery--item ]">
</div>
```

```es6
import Gallery from '@meteora-digital/gallery';

const myGallery = new Gallery(document.querySelector('.js-my-gallery'), {
  class: 'js-my-gallery',
  autoplay: true,
  duration: 5000,
  dots: true,
});
```

```scss
.js-my-gallery {
  @include meteora-gallery;
}
```

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @meteora-digital/lazy
Description: es6 class to lazy load images
Author: Emmanuel Davies
Latest version: 2.2.1

# Lazy Load

##### Note: version 2.0.0+ has updates that will break previous versions, updates to your code will be required.

```sh 
yarn add @meteora-digital/lazy
```

```javascript
import Lazy from '@meteora-digital/lazy';

window.Lazy = new Lazy({
    offset: 500,
});

window.Lazy.watch('selector');
```

- selector is a string
- offset is a pixel value from the bottom of the screen
npm package: @meteora-digital/modal
Description: An es6 class to create some basic modals.
Author: Emmanuel Davies
Latest version: 0.1.2

# Modal

Modal is a dependancy free class which can be used to create some basic modals easily.

## Installation

```bash
yarn add @meteora-digital/modal
```

## HTML Usage

```es6
import Modal from '@meteora-digital/modal';

const popup = new Modal;
const content = document.querySelector('.content');
```

## Options

| Option | Type | Description |
|--------|------|-------------|
| className | string (default: 'modal') | If you want more than one style of modal, you can change this class to suit your needs |
| allowClose | boolean (default: true) | If you want to disable the close button, set this to false |
| removeFromDOM | boolean (default: true) | If you want to keep the modal in the DOM, set this to false |
| parent | string (default: 'body') | If you want to append the modal to a different element, set this to the selector of that element |

#### Content Loading

Fill your modal with something interesting!

The append method can take either a string, an html element, or an array of both!

```javascript
popup.append(['<h1>Modal Heading</h1>', content]);
```

#### Empty the modal

Dont like your modal's content? Delete it!

The empty method simply removes the content from the modal.

```javascript
popup.empty();
```

#### Opening the modal

It would help if we could see it right?

```javascript
popup.open();
```

#### Closing the modal

Get it out the way!

```javascript
popup.close();
```

#### Event Listeners

What if I need something to happen after it opens or closes?

```javascript
popup.on('open', () => console.log('Your modal has been opened!'));
```

| Events |
|--------|
| open |
| close |
| append |
| empty |

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @meteora-digital/object-builder
Description: A package to dynamically create JavaScript objects with ease.
Author: Emmanuel Davies
Latest version: 0.0.0

# Object Builder

Readme coming soon

## Installation

```bash
npm i @meteora-digital/object-builder
yarn add @meteora-digital/object-builder
```

## Usage

```es6
import ObjectBuilder from '@meteora-digital/object-builder';


## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @meteora-digital/orbit
Description: Orbiting bodies
Author: Emmanuel Davies
Latest version: 1.1.1

# Orbit System

This orbit system is an es6 class that simulates orbiting planets or bodies.

## Installation

with webpack

```bash
yarn add @meteora-digital/orbit
```

## HTML Usage

```html
<canvas class="canvas-orbit"></canvas>
```

```css
.canvas-orbit {
  width: 100vw;
  height: 100vh;
}
```

```javascript
import OrbitSystem from '@meteora-digital/orbit';

const random = (min, max) => {
  return Math.floor(Math.random() * (max - min + 1) + min);
}

const System = new OrbitSystem(document.querySelector('canvas.canvas-orbit'));

for (var i = 0; i < 30; i++) {
  let mass = random(300,500);
  let radius = mass / 100;

  System.createBody({
    x: random(0,window.innerWidth),
    y: random(0, window.innerHeight),
    mass: mass,
    radius: radius,
  });
}

System.start();
```


## OrbitSystem Arguments

| Argument | Type | Description |
|----------|------|-------------|
| 1 | Dom Element | The canvas we want to draw our system in |
| 2 | Object | Options | Determines global settings for our system |

## OrbitSystem Options

```Gravity```

determines the global gravity force.

```javascript

{
  gravity: 1,
}

```

# OrbitSystem Methods

```createBody```

Creates a new body in the system

```javascript

System.createBody({
  x: random(0,window.innerWidth),
  y: random(0, window.innerHeight),
  mass: mass,
  radius: radius,
});

```

```start```

Begins the system

```javascript

System.start();

```

```stop```

Stops the system

```javascript

System.stop();

```

## Body Options

| Option | Type | Description | Default |
|--------|------|-------------|---------|
| x | Number | X Coordinate to place the body | 0 |
| y | Number | Y Coordinate to place the body | 0 |
| v | Number | Initial velocity of the body | 0 |
| angle | Number | The initial angle the body is moving | 0 |
| mass | Number | How attractive this body is | 1 |
| radius | Number | The size of our body | 5 |
| boundary | Number | Radius of interactive area | true |
| color | string | Colour of the body | '#000000' |
| trail | number | Length of our trails - limit this depending on computer memory | 0 |
| mobile | Boolean | Controls the mobility of the body | true |

## Inspired by
[guest73's YouTube Video](https://youtu.be/p2quAZ5fVdA)

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @meteora-digital/tween
Description: A class to tween number values - can be used to animate element styles
Author: Emmanuel Davies
Latest version: 1.0.5

# Tween

An easy to use tweening class.
Any number can be tweened from one value to another over a set period of time.
The class will handle the tweening, you do the rest!

## Installation

```bash
npm i @meteora-digital/tween
yarn add @meteora-digital/tween
```

## Usage

#### HTML
```html
<section class="banner">
  <div class="banner__image" style="background-image: url('path/to/your/image.jpg');"></div>
</section>
```

#### JavaScript
```javascript
import Tween from '@meteora-digital/tween';

const banner = document.querySelector('.banner');
const image = document.querySelector('.banner__image');
```

#### Create a controller!

```javascript
const Controller = new Tween({
  fps: 60,
});
```

| Option | Type | Description | Default |
|--------|------|-------------|---------|
| fps | number | the frame rate for the tween | 60 |


#### Tweening - smoothly animate a number from one value to another.

```javascript
Controller.tween({ from: 0, to: 100 }, (value) => image.style.opacity = value / 100, 300);
```

The tween method will load the controller with a new task, it can currently only have one task at a time.
the tween() method takes 3 arguments:

| Type | Description | Defaults |
|------|-------------|----------|
| object | Two keys - "from" and "to" | from: 0, to: 100 |
| function | A function that returns the current value | (value) => console.log(value); |
| duration | A length of time in milliseconds | 300 |


###### Note this function uses rounding to stop the function from looping continuously without any visual changes, therefore is is best to use whole numbers for situations like the example above.


#### Stopping the tween

```javascript
Controller.stop();
```

If we ever need to stop the animation we can use the stop() method


#### Restarting the tween

```javascript
Controller.start();
```

If we have stopped the animation we can restart it using the start() method

#### Callbacks

###### The available callbacks are 'start', 'stop' and 'end'. 

| Event | Description |
|------|-------------|
| start | Triggered when the animation starts |
| stop | Triggered when the animation is stopped via the .stop() method |
| end | Triggered when the animation has come to it's end naturally |

```javascript
Controller.on('start', () => console.log('Animation has started!'));
```

If we have stopped the animation we can restart it using the start() method


###### License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @meteoric/core
Description: The core library of the meteoric framework.
Author: Aadit M Shah
Latest version: 1.2.0

# Meteoric Framework: Core Library

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/meteoric-framework/core/continuous-deployment.yml?branch=main&logo=github)](https://github.com/meteoric-framework/core/actions/workflows/continuous-deployment.yml)
[![GitHub license](https://img.shields.io/github/license/meteoric-framework/core)](https://github.com/meteoric-framework/core/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/v/@meteoric/core?logo=npm)](https://www.npmjs.com/package/@meteoric/core)
[![semantic-release: gitmoji](https://img.shields.io/badge/semantic--release-gitmoji-E10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
[![Twitter](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fmeteoric-framework%2Fcore)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fmeteoric-framework%2Fcore)

The core library of the meteoric framework.
npm package: @meteorjs/babel
Description: Babel wrapper package for use with Meteor
Author: Meteor
Latest version: 7.20.1

# @meteorjs/babel [![Build Status](https://travis-ci.com/meteor/babel.svg)](https://travis-ci.com/meteor/babel)

[Babel](https://babeljs.io/) wrapper package for use with [Meteor](https://github.com/meteor/meteor).

## Updating:

If while updating this package the CI starts failing due inconsistencies
in the package-lock.json file, you can run `npm install --package-lock-only`
to update the package-lock.json file to the latest version of the package.