# Examples

A comprehensive set of examples has been provided to demonstrate the fundamental usage of the SDK. Please refer to the [detailed guidelines](https://github.com/mmt-finance/clmm-sdk/tree/main/examples) for further information&#x20;

{% embed url="<https://github.com/mmt-finance/clmm-sdk/blob/main/examples/README.md>" %}

A set of typescript scripts are provided to walk through the basic usage of @mmt-finance/clmm-sdk.

#### Running an example

Install dependencies

```typescript
yarn
```

Run a specific example (E.g. swap.ts)

```typescript
yarn scripts examples/swap.ts
```

#### Execute transaction

By default, transaction is evaluated in dryRun mode. To execute transaction, update the script as follows:

```typescript
const mnemonic = ''; // Replace mnemonic here
const signer = Ed25519Keypair.deriveKeypair(mnemonic); // Define the user's mnemonic (should be replaced with an actual mnemonic)
const resp = await executeTxExample({
  tx,
  sdk,
  execution: { dryrun: false, signer: signer },
});
```

#### Set network to Mainnet

Configure SDK to run on Mainnet network:

```typescript
const sdk = MmtSDK.NEW({ network: 'mainnet' });
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.mmt.finance/examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
