A Typescript SDK for interacting with the Dynamic Fee Sharing Program on Meteora.
A Typescript SDK for interacting with the Dynamic Fee Sharing Program on Meteora.
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.
``bash`
npm install @meteora-ag/dynamic-fee-sharing-sdkor
pnpm install @meteora-ag/dynamic-fee-sharing-sdkor
yarn add @meteora-ag/dynamic-fee-sharing-sdk
`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");
`
Refer to the docs for how to use the functions.
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.
`bash`
bun install
bun test
- Mainnet-beta: dfsdo2UqvwfN8DuUVrMRNfQe11VaiNoKcMqLHVvDPzhdfsdo2UqvwfN8DuUVrMRNfQe11VaiNoKcMqLHVvDPzh`
- Devnet: