Skip to main content
Calculate prices and execute buy/sell and mint transactions via the Moonit SDK
Join our developer TG channel for updates

Overview

The Moonit SDK provides the following functions :
  • Make full use of all features for our two curve options: standard and flat curves
  • Mint a Token
  • Retrieve Token Price & Position on Bonding Curve
  • Calculate Collateral & Token Flow (In/Out)
  • Execute Buy & Sell Transactions (both Exact In and Exact Out)
Moonit currently supports the following SDKs:
  • Solana SDK
  • EVM SDK
  • Fogo SDK

Supported SDKs

Solana SDK

Use this SDK to interact with Moonit on Solana. NPM Package: @moonit/sdk
🔗 https://www.npmjs.com/package/@moonit/sdk

EVM SDK

Use this SDK to interact with Moonit on EVM-compatible chains. NPM Package: @moonit/sdk-evm
🔗 https://www.npmjs.com/package/@moonit/sdk-evm

Fogo SDK

Use this SDK to interact with Moonit on Fogo. NPM Package: @moonit/sdk-fogo
🔗 https://www.npmjs.com/package/@moonit/sdk-fogo

Installation

Install the SDK depending on your target environment.

Solana

bash
npm install @moonit/sdk

EVM

bash
npm install @moonit/sdk

Fogo

bash
npm install @moonit/sdk

Example Code

Solana Example

🐙 GitHub - gomoonit/moonit-bot-examples: Examples for using the official SDK
The buy and sell instructions are also available on-chain via the Smart Contract and accessible through CPI (Cross-Program Invocation).

Migration from @wen-moon-ser/moonshot-sdk

If you are using the old moonshot-sdk there is a simple way to migrate to @moonit/sdk as the packages are compatible. Replace the dependency @wen-moon-ser/moonshot-sdk with @moonit/sdk and update all Moonshot class imports with Moonit. Example: 3ee254eced63f4a8320157f1b49d99044c9f46bd2f090834465047b9c5920645 Image 9 C5e9b2e78292deb83c8d7a99ceeb268bb556aea1a1794c5259e66646a890cce2 Image 10