Mainly

SDKs

Install an official Mainly client for TypeScript, Go, or Rust.

Mainly's official SDKs provide typed requests and responses, authentication, timeouts, and automatic retries on top of the same REST API documented here. You can still use any HTTP client if an SDK is not the right fit.

LanguagePackageInstall
TypeScript@mainly-live/sdkpnpm add @mainly-live/sdk
Gogithub.com/mainly-live/mainly-gogo get github.com/mainly-live/mainly-go@latest
Rustmainlycargo add mainly

All three SDKs support Solana mainnet and devnet, plus Ethereum mainnet and Sepolia, through a single client.

Before you start

Create an API key in the dashboard and expose it to your server process as MAINLY_API_KEY:

export MAINLY_API_KEY="mnly_live_..."

Treat the key like a password. Do not embed it in browser JavaScript, mobile application bundles, public repositories, or logs.

Choose a client

  • TypeScript SDK — Node.js and TypeScript applications.
  • Go SDK — Go services and command-line tools.
  • Rust SDK — Rust services and applications using async Rust.

Each guide makes the same Solana balance request, so it is easy to compare the clients. For endpoint behavior and response fields, use the API reference.

Source repositories

The generated SDK sources are available on GitHub:

On this page