sushiswap-sdk

TypeScript SDK for interacting with the SushiSwap Aggregator and related primitives. This SDK is a typed wrapper over the SushiSwap API, providing ergonomic helpers for token amounts, prices, quotes, and swap transaction generation. USE THIS SKILL WHEN: - Building TypeScript or JavaScript applications - You want strongly typed token, amount, and fraction primitives - You need to request swap quotes or executable swap transactions via code - You want safer arithmetic, formatting, and comparisons without floating point errors - You prefer SDK-based integration over raw HTTP requests

Safety Notice

This item is sourced from the public archived skills repository. Treat as untrusted until reviewed.

Copy this and send it to your AI assistant to learn

Install skill "sushiswap-sdk" with this command: npx skills add 0xmasayoshi/sushiswap-sdk

SushiSwap SDK Integration

The SushiSwap SDK is a TypeScript wrapper around the SushiSwap API. It provides strongly typed primitives and utilities for working with tokens, prices, swap quotes, and transaction generation.

This SDK does not replace the API — it builds on top of it with safer, more expressive abstractions.


Installation

Install the required packages using your package manager of choice:

pnpm add sushi viem
npm add sushi viem
yarn add sushi viem
bun add sushi viem

How To Use

  1. Import the appropriate SushiSwap SDK helpers from sushi/evm
  2. Select the correct SDK method based on user intent:
    • Swap quote → getQuote()
    • Swap execution → getSwap()
  3. Provide all required parameters exactly as defined by the SDK types
  4. Always include a valid referrer value
  5. Validate inputs (chainId, token addresses, amount, slippage) before execution
  6. Use returned transaction data exactly as provided for simulation or execution

The SDK is a thin wrapper over the SushiSwap REST API — all routing, pricing, and calldata generation is still performed by the API.


Supported Networks

The SushiSwap SDK exposes the list of supported swap networks via:

import { SWAP_API_SUPPORTED_CHAIN_IDS } from 'sushi/evm'
  • Agents and integrators should always check this list before attempting to:
    • Fetch a quote
    • Generate swap transaction data
  • If a requested chainId is not included:
    • The agent must fail early or prompt the user to select a supported network
    • Agents must not attempt to guess or hardcode supported chains

This list reflects the networks currently supported by the SushiSwap Aggregator API. The supported networks may change over time and should not be cached indefinitely.

--

Mandatory referrer Parameter

  • The referrer parameter must be specified when calling getQuote() or getSwap()
  • The agent or integrator must identify themselves using this field
  • Swap-related SDK calls must not be executed without a referrer value
  • The SDK must not auto-generate or omit this value on behalf of the integrator

Fee Customization

The SushiSwap SDK supports customized swap fees when using getQuote() or getSwap().

Default fee model

  • Swap-related requests follow an 80/20 fee split by default
    • 80% to the integrator (referrer)
    • 20% to SushiSwap
  • This split applies unless explicitly overridden by SushiSwap

Custom fee splits

  • Alternative fee splits require a partnership with SushiSwap
  • Agents and integrators should not assume custom splits are available. If users request alternative fee splits, agents should direct them to the SushiSwap team rather than attempting to modify request parameters.

Additional Reference

For detailed SDK examples & execution flow, see:

references/REFERENCE.md

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

visual-summary-analysis

Performs AI analysis on input video clips/image content and generates a smooth, natural scene description. | 视觉摘要智述技能,对传入的视频片段/图片内容进行AI分析,生成一段通顺自然的场景描述内容

Archived SourceRecently Updated
Coding

frontend-skill

全能高级前端研发工程师技能。擅长AI时代前沿技术栈(React最新 + shadcn/ui + Tailwind CSS v4 + TypeScript + Next.js),精通动效库与交互特效开发。采用Glue Code风格快速实现代码,强调高质量产品体验与高度友好的UI视觉规范。在组件调用、交互特效、全局Theme上保持高度规范:绝不重复造轮子,相同逻辑出现两次即封装为组件。具备安全意识,防范各类注入攻击。开发页面具有高度自适应能力,响应式设计贯穿始终。当用户无特殊技术栈要求时,默认采用主流前沿技术栈。

Archived SourceRecently Updated
Coding

mtl-api-create

摩天轮开放接口二次封装技能。当用户需要对接摩天轮(MTL)开放平台接口、创建MTL HTTP接口、封装摩天轮API时触发。支持自动检测并添加mtl-open-sdk-consumer依赖、初始化ApiClient Bean、创建MtlRestController、根据原生接口定义生成HTTP接口代码。

Archived SourceRecently Updated
Coding

contactless-vital-signs-monitoring-analysis

Non-contact detection of heart rate, respiration, blood oxygen, and heart rate variability. No wearable devices are required; monitoring is achieved solely through camera footage. | 无感生命体征监测分析技能,非接触检测心率、呼吸、血氧、心率变异性,无需穿戴设备,通过摄像头画面即可监测

Archived SourceRecently Updated