npm package: @mmt-finance/clmm-sui-sdk
Description: Momentum SDK to access the Momentum CLMM
Author: Momentum Finance
Latest version: 1.0.1-beta.2

# MMT Finance CLMM SDK

`@mmt-finance/clmm-sui-sdk` is the official TypeScript SDK for integrating with
MMT Finance CLMM for developers. Please visit
[MMT Developer Docs](https://developers.mmt.finance/clmm-sdk/integrations)
for detailed guideline.

## Getting Started

### Installation

```sh
npm i @mmt-finance/clmm-sui-sdk
```

### Configuration

Our SDK has pre-configured network settings that allows you to connect to MMT CLMM
on both mainnet and testnet.
You can utilize the src/sdk NEW method to swiftly initialize the configuration.

```typescript
import { MmtSDK } from '@mmt-finance/clmm-sui-sdk';

const mmtClmmSDK = new MmtSDK({
  network: 'mainnet',
});
```

Now, you can start using MMT SDK.

### Supported Features

- [Retrieve pool data](https://developers.mmt.finance/features/read-pool-data)
- [Retrieve user data](https://developers.mmt.finance/features/read-user-data)
- [Swap](https://developers.mmt.finance/features/swap)
- [Open and Add Liquidity](https://developers.mmt.finance/features/open-and-add-liquidity)
- [Position Management](https://developers.mmt.finance/features/position-management)
- [Claim Fees and Rewards](https://developers.mmt.finance/features/claim-fees-and-rewards)
- [Close Position](https://developers.mmt.finance/features/close-position)

For a full detailed technical integration doc, please visit
[MMT Developer Docs](https://developers.mmt.finance/clmm-sdk/integrations).

### Examples

A comprehensive set of examples has been provided to demonstrate the fundamental usage of the SDK.
Please refer to the detailed guidelines for further information [example](examples/README.md)

## Development Guidelines

To ensure the quality, maintainability, and consistency of the SDK, we follow a strict set of development guidelines. All contributors are expected to adhere to these standards.

### 1. Code Style & Linting

We enforce code style using **ESLint** (based on Airbnb config) and **Prettier**.

- **Linting**: Run `yarn run lint` to check for issues.
- **Formatting**: Run `yarn run prettier:fix` to automatically format code.
- **IDE Setup**: Configure your editor to run Prettier on save and display ESLint errors.

### 2. Naming Conventions

- **Files**: kebab-case (e.g., `pool-utils.ts`, `clmm-sdk.ts`).
- **Classes/Interfaces/Types**: PascalCase (e.g., `ClmmSdk`, `PoolConfig`).
- **Variables/Functions**: camelCase (e.g., `getPoolData`, `tokenAmount`).
- **Constants**: UPPER_SNAKE_CASE for global constants (e.g., `MAX_TICK_INDEX`).
- **Private Members**: Private functions or properties should start with `_` (e.g., `_internalCalculate`).

### 3. Function Parameters

- **Object Params**: Use an object (interface) for arguments if a function takes more than 3 parameters.

### 4. Git & Commits

We use husky & commitlint.
Format: `<type>(<scope>): <description>`

- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing tests or correcting existing tests
- **chore**: Changes to the build process or auxiliary tools

Example: `feat(pool): add support for fetching tick data`