Skip to main content

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 Info

NameMainnet AddressTestnet AddressIdl
InvariantiNvTyprs4TX8m6UeUEkeqDFjAL9zRCRWcexK9Sd4WEUiNvTyprs4TX8m6UeUEkeqDFjAL9zRCRWcexK9Sd4WEUIDL
Invariant AutoSwapAuTonVN41Ne17RGR2o9qTj3TmtKcTwmUUy1ebbTmpiUAuTonVN41Ne17RGR2o9qTj3TmtKcTwmUUy1ebbTmpiUIDL
Invariant LockerLockDkUjGpMHewP4cbP7XRpiiC4ciQaPALbwUALCEJpLockDkUjGpMHewP4cbP7XRpiiC4ciQaPALbwUALCEJpIDL

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)