smart-curve-sdk
v1.1.2
Published
A Typescript SDK for interacting with the Dynamic Bonding Curve on Meteora.
Downloads
75
Maintainers
Readme
Smart Curve SDK (Solayer)
A TypeScript SDK for the Dynamic Bonding Curve. Use it on Solayer for pool creation, trading, and migration (Solayer Dex).
Overview
This SDK provides tools and methods to interact with the Dynamic Bonding Curve program. You can create and manage pools with custom configs and fee structures in the Solayer environment.
Installation
npm install smart-curve-sdk
# or
pnpm add smart-curve-sdk
# or
yarn add smart-curve-sdk
# or (local package)
npm install file:../smart-curve-sdkInitialization
import { Connection } from '@solana/web3.js'
import { DynamicBondingCurveClient } from 'smart-curve-sdk'
// Connect to Solayer devnet or mainnet
const connection = new Connection('https://devnet-rpc.solayer.org', 'confirmed')
const client = new DynamicBondingCurveClient(connection, 'confirmed')Usage
See docs for how to use each function.
Flow (Solayer)
- The partner creates a config key for the pool.
- The creator creates a pool.
- The pool is tradeable on the Dynamic Bonding Curve.
- When the migration quote threshold is met, the pool is migrated to Solayer Dex.
- The graduated pool is tradeable on Solayer Dex.
Program Address
- Mainnet-beta: ABjsGfJzuUKLu8wiGuwgGJ5y9BSYud3rEMNs77nDTMRY
- Devnet: ABjsGfJzuUKLu8wiGuwgGJ5y9BSYud3rEMNs77nDTMRY
Graduated CPMM Pool Config Keys
- FixedBps25 == 0: nzQ4F9nvRz153RoJKak5XSGPfDkieLSzEiturtDR8da
- FixedBps100 == 1: 5yqagBfKTJN5q6o3ptyEkdSin8sy817AGXCoKgPGugq3
