Skip to main content
@epicentral/sos-sdk is the TypeScript client for the Solana Option Standard program on Epicentral. Use it to read onchain option markets and build version 1 transactions for Longs, Shorts, OMLP lending, and withdrawals. Import everything from the package root. The package requires @solana/kit ^8.3.0 as a peer dependency and is currently pre-1.0 (0.33.1).

Install

Install @epicentral/sos-sdk alongside @solana/kit:

Client Setup

You bring a @solana/kit RPC client, an RPC subscriptions client, and a transaction signer. Centralize your RPC URLs and token mints in one config module so switching from Devnet to Mainnet takes a single environment update. Set these variables where your app loads environment values. config.ts reads them. Fill UNDERLYING_MINT and COLLATERAL_MINT with the mints for the cluster you are using.
.env
config.ts

First Read

Verify your setup by reading the program address and listing all onchain option pools:

First Write Pattern

Every high-level builder returns a BuiltTransaction containing @solana/kit instructions. Pass that result to sendBuiltTransaction with version: 1:

Switching to Mainnet

The SDK program address and version 1 transaction flow stay identical across clusters. To move a Devnet integration to Mainnet, update three values:
1

Point RPC and Subscriptions to Mainnet

Set SOLANA_RPC_URL and SOLANA_RPC_WS_URL to your Mainnet RPC provider.
2

Replace Paper Mints with Mainnet Mints

Update UNDERLYING_MINT and COLLATERAL_MINT to the Mainnet underlying asset mint and allowlisted Collateral Mint.
3

Remove the Test Collateral Faucet Step

Skip requestTestUsdc. Mainnet wallets fund positions with real tokens.

Next Steps

Concepts

Learn Option Series, base units, cash settlement, and OMLP mechanics.

Test Funds (Devnet)

Claim Devnet test USDC with requestTestUsdc to start testing trades.