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: numbertoTokenAddress: Hex
- Notes:
- Ensure
fromamounts are in smallest units. - Use chain-specific token addresses (see
TOKEN_CONTRACT_ADDRESSES).
- Ensure
- Result (
SwapResult):{ success: true; result: SuccessfulSwapResult }