Skip to main content
This guide shows how to install and initialize the official Dynamic Fee Sharing TypeScript SDK, @meteora-ag/dynamic-fee-sharing-sdk. Before you begin, here are the main resources:

TypeScript SDK

Dynamic Fee Sharing TypeScript SDK repository.

Dynamic Fee Sharing NPM Package

Published package for transaction builders, state reads, PDA helpers, and examples.

Install

To use the SDK in your project, install it with your preferred package manager:

Dependencies

Create A Client

The client builds unsigned transactions. Your application is responsible for signing, simulating, sending, and confirming them.

Program IDs

Derive Addresses

Create A Fee Vault

Use createFeeVault for a keypair-based fee vault:
Use createFeeVaultPda when the vault must be deterministic or must sign whitelisted source-program fee claims:

Fund And Claim

Use claimUserFee2 when the user signs but the claimed fee should be delivered to a separate receiver token account owner.

SDK Examples

Dynamic Fee Sharing Examples

Example scripts for creating fee vaults, funding vaults, claiming user fees, reading state, and source-program funding.

Testing The SDK

If you have cloned the SDK repository, start with package-level checks and tests: