For the complete documentation index, see llms.txt. This page is also available as Markdown.

@kumbaya_xyz/sdk-core

Core types, chain definitions, and shared primitives used by every other Kumbaya SDK.

npm install @kumbaya_xyz/sdk-core

What's inside

  • Token, CurrencyAmount, Price, Percent - basic value types

  • Ether, WETH9 - native and wrapped ETH helpers

  • MegaETH chain definitions (ChainId.MEGAETH = 4326, ChainId.MEGAETH_TESTNET = 6343)

  • Trade abstractions used by router-sdk and smart-order-router

Use it when

  • You need a Token instance to pass into the V3 SDK or router SDK.

  • You need typed amounts, prices, or percentages.

  • You're checking which chain you're on.

Example

import { Token, ChainId } from '@kumbaya_xyz/sdk-core'

const USDC = new Token(
  ChainId.MEGAETH,
  '0x...USDC_ADDRESS_ON_MEGAETH...',
  6,
  'USDC',
  'USD Coin',
)

More reference coming soon. For now, the upstream Uniswap sdk-core docs are 1:1 applicable except for chain IDs and addresses.

Last updated