Getting Started

1. Introduction

The TucanaSpotSDK provides a set of tools for Initia blockchain networks, specifically designed for handling set up a spot DEX based on the CLMM model (concentrated liquidity market maker) on the Initia. This documentation covers the Spot DEX within the TucanaSpotSDK ecosystem.

@tucana-network/spot-sdk

2. Installation

Before you can use the TucanaSpotSDK Client, you need to set up your project environment.

npm i @tucana-network/spot-sdk

3. Instantiate TucanaSpotSDK

Typescript Example:

import { TucanaSpotSDK, SdkOptions } from '@tucana-network/spot-sdk';

// Configuration for the testnet
export const testnetConfig: SdkOptions = {
  initiaLcdUrl: 'https://lcd.initiation-1.initia.xyz',
  initiaApiUrl: 'https://api.initiation-1.initia.xyz',
  simulateAddress: 'init..', // Replace it with your address 
  clmmPool: {
    package_id: '0x8609f642a8ab1c13d661c14d733cab227bba15635a730af2057051b3f2ada3f6',
    config: {
      poolsHandle: '0xb1e8d74a0f00b44d3e610953f34deb3ce8a48f80bd413379a064e893188a9309'
    }
  }
}

// Configuration for the mainnet
export const mainnetConfig: SdkOptions = {
  initiaLcdUrl: '',
  initiaApiUrl: '',
  simulateAddress: '',
  clmmPool: {
    package_id: '',
    config: {
      poolsHandle: ''
    }
  }
}

// Initialize TucanaSpotSDK with testnetConfig or mainnetConfig
export const sdk = new TucanaSpotSDK(testnetConfig)

4. Set SDK SenderAddress

After linking the wallet, set the Sender Address to the SDK.

sdk.senderAddress = key.accAddress // Set sender address to the SDK

Last updated