Skip to content
CTRL K
    Browser / SPA

    Browser / SPA

    Use integrationContext: 'client' when the SDK runs in the user’s browser.

    The client talks to Nutrimatic over HTTPS for reads and writes. Whether writes are allowed is mode ('read' vs 'full'), not integrationContext.

    import { createNutrimaticSdk } from '@nutrimatic/sdk'
    
    const sdk = createNutrimaticSdk({
      ledgers: [{ id: 'evm:421018', kind: 'evm', chainId: 421018, alias: 'infinite-mainnet' }],
      mode: 'read',
      integrationContext: 'client',
    })
    
    export async function loadMarketChart(pair: string) {
      return sdk.easy.read.getChart({ pair, interval: '1h' })
    }

    Initialise once (module singleton or React context) and reuse the same client across components. The SDK is framework-agnostic.

    First-day path

    Follow Quick start — First day for reads → wallet → balance → quote → swap → status. Then map screens:

    Screen you are buildingStart here
    Price chartChart windows
    Recent trades / pool activityActivity feeds
    SwapSwaps · Fees and costs
    Portfolio (LP / stake / farm)Positions
    Connect wallet / signWallet adapter · Whose wallet (owner)

    Related

    GoalStart here
    All read methodsRead operations
    Swap, liquidity, settlementWrite operations
    Balances, portfolio, stake, farmBalances · Positions · Staking · Farming
    ConfigConfiguration