Packages
What you install
Install and import @nutrimatic/sdk only. That package gives you createNutrimaticSdk(), helpers, errors, and types. Modules such as easy, routing, and balances appear on the returned sdk object — you do not install them separately.
See SDK — Import. Short version:
- Install
@nutrimatic/sdkonly. - Always import
createNutrimaticSdkto configure the client. Modules (easy,telemetry,routing, …) live on the returned object — e.g.sdk.easy.read.getChart(...). - Import helpers,
NutrimaticError, or types from the same package only when you need them. If you only callsdk.*, you may never import anything else.
// Typical start
import { createNutrimaticSdk } from '@nutrimatic/sdk'
// Later, only if a guide needs it
import { mergeCandleSeries, lastClosedCandleTime } from '@nutrimatic/sdk'| When you need… | Import from @nutrimatic/sdk | Docs |
|---|---|---|
| Client setup | createNutrimaticSdk | Every app |
| Errors | NutrimaticError | Errors |
| Chart refresh helpers | mergeCandleSeries, lastClosedCandleTime, … | Chart windows |
| Feed refresh helpers | mergeFeedSeries, lastFeedCursor, compareFeedCursors, … | Activity feeds |
| TypeScript shapes | WalletAdapter, Quote, CandleSeries, NutrimaticError, … | Types |
Module map
Read path
easy.read → telemetry / catalog
catalog → ledgers, instruments, venues, deployments
telemetry → OHLCV, pool views, instrument stats, venue event feeds
venues → live AMM state, spot rates→ Read operations · Chart windows · Activity feeds
Write path
routing.quote → easy.swap → execution handle / settlement.track
liquidity.add | liquidity.remove → execution handle
balances.approve | staking.* | farming.* → execution handle
positions.* → read-only portfolio rowsWrites need a WalletAdapter for signing. Init (mode, wallet): Configuration — Modes.
→ Write operations · Swaps · Liquidity · Balances · Positions · Staking · Farming · Settlement
Shared
kernel → types, errors, merge helpers (via @nutrimatic/sdk)
transport → config validationNutrimatic does not ship a wallet. You bring your own and implement WalletAdapter.
Runtime failures return typed errors — see Errors. Method naming: Naming conventions.
Internal package map (optional)
Only if you want to know what @nutrimatic/sdk composes under the hood. Do not install or import these packages in your app.
| Package | Role inside the SDK |
|---|---|
@nutrimatic/sdk | Public entry — what you install |
@nutrimatic/kernel | Shared types, errors, candle/feed merge helpers (re-exported by the SDK) |
@nutrimatic/transport | Config validation at start |
@nutrimatic/catalog | Ledgers, instruments, venues, deployments |
@nutrimatic/telemetry | Charts, pool/token views, venue feeds |
@nutrimatic/venues | Live AMM state and spot rates |
@nutrimatic/easy | Convenience reads and easy.swap |
@nutrimatic/routing | routing.quote |
@nutrimatic/settlement | settlement.track |
@nutrimatic/liquidity | Add / remove liquidity |
@nutrimatic/balances | Balances, allowances, approve |
@nutrimatic/positions | Portfolio position reads |
@nutrimatic/staking | Product-token stake / unstake / claim |
@nutrimatic/farming | Farm deposit / withdraw / harvest |