Skip to main content
This guide walks you through installing the Bolt Sui SDK, connecting to the network, and executing your first swap. By the end, you will have a working integration that queries prices, simulates output, and submits an onchain trade.
This guide targets developers building DApps, aggregators, or any application that routes swaps through Bolt on Sui.Contact the team if that is your use case.

Install, connect, and swap

1

Prerequisites

Before you start, make sure you have:
  • Node.js 18+ installed
  • A Sui-compatible wallet (Sui Wallet, Suiet, etc.) for signing transactions
  • Access to Sui RPC endpoints (the SDK uses https://fullnode.mainnet.sui.io:443 for mainnet and https://fullnode.testnet.sui.io:443 for testnet by default)
2

Install the SDK

3

Initialize the client

The SDK connects to mainnet by default. Pass environment: 'testnet' to use testnet instead.
Need a custom RPC endpoint or advanced overrides? See the full client initialization options in the SDK reference.
4

Query supported assets

Fetch all assets available on Bolt and find the denominations you need for your swap.
5

Simulate the swap

Before committing onchain, simulate the swap to preview the expected output, fees, and pool routing. This is a dry run with no gas cost.
simulateSwap() uses current prices and pool state. The output reflects exactly what the onchain swap will return, because Bolt uses deterministic convergence pricing, not a bonding curve.
6

Execute the swap

Submit the swap onchain. The Execution Rail settles at the convergence price committed by the Convergence Engine.
Always set minimumAmountOut in production. This protects against edge cases where oracle prices update between simulation and execution. See slippage protection best practices for a helper function.

What just happened

When you called client.swap(), Bolt used the latest executable onchain quote and settled your trade atomically against available pool inventory.
  1. Bolt formed the quote from broader market data
    The offchain Pricing Engine derives the executable price from the venues driving broader market price discovery.
  2. The quote was published onchain
    Bolt’s onchain Oracle receives the quote and enforces the contract-level publication bounds.
  3. Your swap checked available inventory
    The pool and router contracts read the valid price and confirm that sufficient inventory is available for the trade.
  4. The trade executed and settled atomically
    If the trade fits within the available capacity, the swap settles in a single transaction at the quoted output.
This is the same flow that powers swaps on Cetus, FlowX, and Aftermath Finance today.

What’s next

Sui TypeScript SDK

Full API reference: oracle queries, pool inspection, advanced client configuration, and best practices.

Sui Outpost Addresses

Contract addresses for mainnet and testnet deployments.

Offchain Quoting

Simulate swaps offchain using deterministic pricing for your own UI.

Contract Math

Understand the pricing formula behind simulateSwap().
Need integration support or want to discuss your use case? Book a call with the team.