Skip to main content
The Sui Rust SDK provides a type-safe, high-level interface for interacting with the Sui blockchain. It builds on top of the JSON-RPC API and offers idiomatic Rust patterns for working with Sui.

Installation

Add the Sui SDK to your project:
Or add to your Cargo.toml:

Quick Start

SuiClientBuilder

The SuiClientBuilder provides a fluent interface for configuring and building a SuiClient.

Configuration Options

Network Shortcuts

SuiClient APIs

The SuiClient provides access to different API modules:

ReadApi

Query objects, transactions, and network state:

CoinReadApi

Query coin balances and metadata:

EventApi

Query and subscribe to events:

GovernanceApi

Query staking and validator information:

QuorumDriverApi

Execute transactions:

TransactionBuilder

Build transactions programmatically:

Common Patterns

Query Owned Objects

Execute a Transaction

Stream Events

Error Handling

The SDK uses the SuiRpcResult<T> type, which is an alias for Result<T, Error>:

Type Definitions

The SDK re-exports important types:

Next Steps