Skip to main content
This guide walks you through installing the Bolt Sui SDK, connecting to the network, and executing your first zero slippage swap. By the end, you will have a working integration that queries oracle prices, simulates output, and submits a trade on-chain.
This guide targets developers building DApps, aggregators, or any application that routes swaps through Bolt on Sui. Market maker integration requires a separate onboarding flow. 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

npm install @bolt-liquidity-hq/sui-client
3

Initialize the client

The SDK connects to mainnet by default. Pass environment: 'testnet' to use testnet instead.
type Environment = 'mainnet' | 'testnet';
import { BoltSuiClient } from '@bolt-liquidity-hq/sui-client';

const client = new BoltSuiClient();
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.
// Get all supported assets
const assets = await client.getAssets();
assets.forEach((asset) => {
  console.log(`${asset.symbol} (${asset.name}): ${asset.denom}`);
  console.log(`  Decimals: ${asset.decimals}`);
});

// Find a specific asset
const suiAsset = assets.find((a) => a.symbol === 'SUI');
console.log(`SUI type: ${suiAsset?.denom}`); // "0x2::sui::SUI"
5

Simulate the swap

Before committing on-chain, simulate the swap to preview the expected output, fees, and pool routing. This is a dry run with no gas cost.
const simulation = await client.simulateSwap({
  assetIn: '0x2::sui::SUI',
  amountIn: '1000000000', // 1 SUI (9 decimals)
  assetOut: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',
});

console.log(`Expected output: ${simulation.amountOut} USDC`);
console.log(`Protocol fee: ${simulation.protocolFee}`);
console.log(`LP fee: ${simulation.lpFee}`);
console.log(`Total fees: ${simulation.totalFees}`);
simulateSwap() uses current oracle prices and pool state. The output reflects exactly what the on-chain swap will return, because Bolt uses deterministic oracle-referenced pricing, not a bonding curve.
6

Execute the swap

Submit the swap on-chain. Bolt’s prop-AMM executes at the oracle-validated price with zero slippage.
// Get signer from wallet (implementation depends on wallet)
const signer: Signer = await getSuiWalletSigner();

// Execute a swap: exactly 1 SUI for USDC
const result = await client.swap({
  assetIn: '0x2::sui::SUI',
  amountIn: '1000000000', // 1 SUI (9 decimals)
  assetOut: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',
  minimumAmountOut: '1900000', // Minimum 1.9 USDC (6 decimals)
}, signer);

console.log(`Swapped 1 SUI for ${result.amountOut} USDC`);
console.log(`Transaction digest: ${result.txHash}`);
console.log(`Gas cost: ${result.txOutput.effects.gasUsed.computationCost}`);
console.log(`Status: ${result.txOutput.effects.status.status}`);
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(), your transaction went through Bolt’s execution layer:
  1. The Oracle provided a deterministic reference price from aggregated market data
  2. The Outpost (on-chain smart contract) validated the price, checked expiry and deviation limits, and matched your order against the liquidity pool
  3. The Market Maker settled the order on-chain, providing immediate liquidity at the oracle-validated price
  4. You received USDC at exactly the quoted rate, with zero slippage
This is the same flow that powers swaps on 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.

Off-Chain Quoting

Simulate swaps off-chain 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? Join the Developer Telegram or book a call with the team.