For the complete documentation index, see llms.txt. This page is also available as Markdown.

Getting Started

The TypeScript SDK to interact with Ferra DAMM (Dynamic Automated Market Maker) protocol.

Installation

Install Ferra DAMM SDK:

npm install @ferra-labs/damm

Optional:

npm install @mysten/sui

Initialize SDK

Initialize the Ferra DAMM SDK with default values using the Sui mainnet RPC:

import { dammMainnet, initFerraSDK } from "@ferra-labs/damm"

const useFerraSDK = (address: string) => {
  return useMemo(
    () =>
      initFerraSDK({
        network: 'beta', // can be 'mainnet' or 'testnet', 'beta'
        fullNodeUrl: 'YOUR_RPC_FULL_NODE',
        wallet: 'YOUR_WALLET_ADDRESS',
      }),
    [address]
  );
};

Get Coin Assets & Balances

Query wallet coin data directly from the SDK instance.

Get Coin Assets

Returns detailed coin objects (object IDs, balances) for a wallet:

Get Coin Balances

Returns aggregated balances (lighter than getOwnerCoinAssets):

Last updated