Quick start
Setting Up
For any help/setup questions, feel free to ask in # ❓┆questions on Discord!
Installation
Requires Anchor and Solana's web3.js library to be installed.
npm i @invariant-labs/sdk-eclipse
Usage
import { Market, Pair } from '@invariant-labs/sdk-eclipse'
Program IDs
Endpoint | Program ID |
---|---|
<!-- | Devnet |
Testnet | iNvTyprs4TX8m6UeUEkeqDFjAL9zRCRWcexK9Sd4WEU |
Mainnet | iNvTyprs4TX8m6UeUEkeqDFjAL9zRCRWcexK9Sd4WEU |
Data structures are an exact mapping, with the only changes being type and case. Methods called by a user have a corresponding method, that creates instructions, adds them to transaction, signs, and sends it. All methods (including ones used only by admin) have corresponding methods that return just the instruction.
Before you begin making your first pool and position, you must first construct the market as shown below.
const market = await Market.build([Network.MAIN | Network.DEV], provider.wallet, connection)