SDK Initialization

Configure and initialize the Ferra DLMM SDK for your application.

Basic Setup

import { initFerraDlmmSDK } from '@ferra-labs/dlmm'

const sdk = initFerraDlmmSDK({
  network: 'mainnet',
  fullNodeUrl: 'https://fullnode.mainnet.sui.io:443',
  wallet: '0x...' // Your wallet address
})

Configuration Options

Required Parameters

Parameter
Type
Description

network

'mainnet' | 'testnet'

Target network

fullNodeUrl

string

Sui RPC endpoint URL

senderAddress

string

Default sender for transactions

Network Configurations

Mainnet

const sdk = initFerraDlmmSDK({
  network: 'mainnet',
  fullNodeUrl: 'https://fullnode.mainnet.sui.io:443',
  wallet: '0x...'
})

Testnet

Custom RPC

Error Handling

Best Practices

  1. Single Instance: Create one SDK instance per app

  2. Error Handling: Always wrap initialization in try-catch

  3. Network Matching: Ensure wallet and SDK use same network

  4. RPC Selection: Use reliable RPC providers for production

  5. Address Validation: Validate sender address format

Next Steps

SDK initialized! Continue to:

Last updated