Skip to content
Logo

SDK overview

Flint perps ships clients in three languages. All three release together as one SDK suite version and decode the same program ABI, pinned by the same golden fixtures.

LanguagePackagesGuide
Rustflint-margin-user-client, flint-margin-maker-client, flint-margin-onchainRust
Pythonflint-api-client (flint.margin.api, flint.margin.onchain, flint.margin.quoting)Python
TypeScript@superis-labs/flint-margin-user-client, @superis-labs/flint-margin-maker-client, @superis-labs/flint-idlTypeScript

Capabilities

CapabilityRustPythonTypeScript
Instruction builders, account and type codecs, PDAs, error tableYesYesYes
Checked account decode (owner, discriminator, exact length)parse::FlintAccountdecode_flint_accountdecodeFlintAccount
Event batch decodeYesYesYes
Transaction decode, including inner instructionsdecode_flint_transactiondecode_flint_transactiondecodeFlintTransaction
Program error name from codeerror_nameflint_error_namegetFlintErrorMessage
Trader spot and perp positionsYesYesYes
Resting order book readerread_resting_ordersread_resting_ordersreadRestingOrders
Maker quote book decodedecode_aggregated_quote_bookdecode_aggregated_quote_bookdecodeAggregatedQuoteBook
Build place-order and close instructions with crossing makersYesYesYes
Grid math (lots, ticks, slippage bounds)YesYesYes
Prepare an order from chain (prepare_perp_order)rpc feature of the user clientYes (async)preparePerpOrder
Public margin-user servicesClientMarginUserClientcreate*Client
Maker auth (signed nonce, refresh) and maker servicesYesYesYes
TxService with Solana-RPC fallback and status pollingIn QuotingCorewith_tx_fallback, poll_tx_statuswithTxFallback, pollTxStatus
QuoteBuilderYesYesYes (builds instructions only)
QuotingCore (sign, submit, retry, receipts, spread protection)YesYesNo
Session heartbeat (SessionService)YesYesNo (gRPC-Web has no bidi streams)
Passkey / WebAuthn delegate helpersNoNoYes
Lazer oracle-report helpersNoNoYes

TypeScript targets web apps, so like the spot SDKs it has no long-running quoting core; build quotes with QuoteBuilder and submit them yourself. Passkey and Lazer helpers depend on browser APIs and stay TypeScript-only.

Devnet server gaps

On devnet today RiskService.SimulateAccountRisk returns INTERNAL ("perp risk inputs are unavailable") and OrderService.ListOrders returns UNIMPLEMENTED, in every language. Read resting orders from chain with the resting order book reader until the server serves them.