@cetusprotocol/burn-sdk
The primary functionality of this project, referred to as "LP Burn
," is designed for users who wish to permanently lock their liquidity positions. Once locked, the liquidity within these positions cannot be withdrawn; however, users can still claim any transaction fees and mining rewards generated from these positions. This locking mechanism is implemented by wrapping the original position, effectively sealing the liquidity while still allowing the accrual of rewards.
The Burn SDK
is specifically tailored for projects that have established liquidity pools and wish to relinquish their liquidity rights. This feature enables these projects to demonstrate commitment to their community and ecosystem by permanently locking liquidity, thereby enhancing stability and fostering trust in the longevity of the liquidity pool.
Getting Started
How to Use the Burn SDK ?
Installation
To start using the Burn SDK
, you first need to install it in your TypeScript project. You can add it using npm, yarn, or bun:
npm link: https://www.npmjs.com/package/@cetusprotocol/burn-sdk
npm install @cetusprotocol/burn-sdk
Setup
Import the SDK into the TypeScript file where you intend to use it:
import { CetusBurnSDK } from '@cetusprotocol/burn-sdk'
Initializing the SDK
Initialize the SDK with the required configuration parameters. This typically includes setting up the network and API keys, if needed.
If you would like to use the mainnet network and the official Sui rpc url, you can do so as follows:
const sdk = CetusBurnSDK.createSDK()
If you wish to set your own full node URL or network (You have the option to select either 'mainnet' or 'testnet' for the network), you can do so as follows:
const env = 'mainnet'
const full_rpc_url = 'YOUR_FULL_NODE_URL'
const wallet = 'YOUR_WALLET_ADDRESS'
const sdk = CetusBurnSDK.createSDK({ env })
If you wish to set your own full node URL or SuiClient, you can do so as follows:
const sdk = CetusBurnSDK.createSDK({ env, sui_client })
// or
const sdk = CetusBurnSDK.createSDK({ env, full_rpc_url })
Usage
After linking your wallet, if you need use your wallet address to do something, you should set it by sdk.setSenderAddress
.
const wallet = 'YOUR_WALLET_ADDRESS'
sdk.setSenderAddress(wallet)
Last updated