nexus-sdk-swap-flows

Installation
SKILL.md

Swap Flows

Call swapWithExactIn(input, options?)

  • Use when input amount is fixed and sources are known.
  • Signature:
    • sdk.swapWithExactIn(input, { onEvent? })
  • Params (ExactInSwapInput):
    • from: { chainId: number; amount: bigint; tokenAddress: Hex }[]
    • toChainId: number
    • toTokenAddress: Hex
  • Notes:
    • Ensure from amounts are in smallest units.
    • Use chain-specific token addresses (see TOKEN_CONTRACT_ADDRESSES).
  • Result (SwapResult):
    • { success: true; result: SuccessfulSwapResult }

Call swapWithExactOut(input, options?)

  • Use when desired output amount is fixed.
  • Signature:
Related skills
Installs
17
GitHub Stars
6
First Seen
Feb 4, 2026