# Table of Contents - [Sui Documentation](#sui-documentation) - [Guides | Sui Documentation](#guides-sui-documentation) - [Concepts | Sui Documentation](#concepts-sui-documentation) - [References Overview | Sui Documentation](#references-overview-sui-documentation) - [Validator Deployment and Configuration | Sui Documentation](#validator-deployment-and-configuration-sui-documentation) - [Sui Standards Overview | Sui Documentation](#sui-standards-overview-sui-documentation) - [Sui Developer Cheat Sheet | Sui Documentation](#sui-developer-cheat-sheet-sui-documentation) - [Install Sui | Sui Documentation](#install-sui-sui-documentation) - [Hello, World! | Sui Documentation](#hello-world-sui-documentation) - [Move Concepts | Sui Documentation](#move-concepts-sui-documentation) - [Cryptography | Sui Documentation](#cryptography-sui-documentation) - [Sui Bridge Validator Node Configuration | Sui Documentation](#sui-bridge-validator-node-configuration-sui-documentation) - [Sui Full Node Configuration | Sui Documentation](#sui-full-node-configuration-sui-documentation) - [Sui RPC | Sui Documentation](#sui-rpc-sui-documentation) - [Awesome Sui | Sui Documentation](#awesome-sui-sui-documentation) - [Sui Tokenomics | Sui Documentation](#sui-tokenomics-sui-documentation) - [Unknown](#unknown) - [Unknown](#unknown) - [Getting Started | Sui Documentation](#getting-started-sui-documentation) - [Configure a Sui Client | Sui Documentation](#configure-a-sui-client-sui-documentation) - [Install from Binaries | Sui Documentation](#install-from-binaries-sui-documentation) - [Connecting to a Local Network | Sui Documentation](#connecting-to-a-local-network-sui-documentation) - [Connect a Frontend to a Move Package | Sui Documentation](#connect-a-frontend-to-a-move-package-sui-documentation) - [Get SUI from Faucet | Sui Documentation](#get-sui-from-faucet-sui-documentation) - [Install from Source | Sui Documentation](#install-from-source-sui-documentation) - [Next Steps | Sui Documentation](#next-steps-sui-documentation) - [Create a Sui Address | Sui Documentation](#create-a-sui-address-sui-documentation) - [Operator Guides | Sui Documentation](#operator-guides-sui-documentation) - [Troubleshooting Common Errors | Sui Documentation](#troubleshooting-common-errors-sui-documentation) - [Nautilus | Sui Documentation](#nautilus-sui-documentation) - [NFTs | Sui Documentation](#nfts-sui-documentation) - [Transaction Overview | Sui Documentation](#transaction-overview-sui-documentation) - [SuiPlay0X1 Development Guide for Game Developers | Sui Documentation](#suiplay0x1-development-guide-for-game-developers-sui-documentation) - [Currencies and Tokens | Sui Documentation](#currencies-and-tokens-sui-documentation) - [Cryptography | Sui Documentation](#cryptography-sui-documentation) - [App Examples | Sui Documentation](#app-examples-sui-documentation) - [Ethereum -> Sui | Sui Documentation](#ethereum-sui-sui-documentation) - [Sui-Related Research Papers | Sui Documentation](#sui-related-research-papers-sui-documentation) - [Solana -> Sui | Sui Documentation](#solana-sui-sui-documentation) - [Coin Management | Sui Documentation](#coin-management-sui-documentation) - [Sui Architecture | Sui Documentation](#sui-architecture-sui-documentation) - [Gaming on Sui | Sui Documentation](#gaming-on-sui-sui-documentation) - [Accessing Data | Sui Documentation](#accessing-data-sui-documentation) - [GraphQL for Sui RPC (Beta) | Sui Documentation](#graphql-for-sui-rpc-beta-sui-documentation) - [Sui API Reference | Sui Documentation | Sui Documentation](#sui-api-reference-sui-documentation-sui-documentation) - [RPC Best Practices | Sui Documentation](#rpc-best-practices-sui-documentation) - [Sui Full Node gRPC | Sui Documentation](#sui-full-node-grpc-sui-documentation) - [Sui CLI | Sui Documentation](#sui-cli-sui-documentation) - [Sui and Community SDKs | Sui Documentation](#sui-and-community-sdks-sui-documentation) - [Move Analyzer VS Code Extension | Sui Documentation](#move-analyzer-vs-code-extension-sui-documentation) - [Sui Move CLI | Sui Documentation](#sui-move-cli-sui-documentation) - [Sui Keytool CLI | Sui Documentation](#sui-keytool-cli-sui-documentation) - [Sui Trace Analysis | Sui Documentation](#sui-trace-analysis-sui-documentation) - [Sui Replay CLI | Sui Documentation](#sui-replay-cli-sui-documentation) - [PTB Commands | Sui Documentation](#ptb-commands-sui-documentation) - [Move References | Sui Documentation](#move-references-sui-documentation) - [Sui Client PTB CLI | Sui Documentation](#sui-client-ptb-cli-sui-documentation) - [Sui Validator CLI | Sui Documentation](#sui-validator-cli-sui-documentation) - [Glossary | Sui Documentation](#glossary-sui-documentation) - [Move Trace Debugger | Sui Documentation](#move-trace-debugger-sui-documentation) - [Sui CLI Cheat Sheet | Sui Documentation](#sui-cli-cheat-sheet-sui-documentation) - [Rust SDK | Sui Documentation](#rust-sdk-sui-documentation) - [Sui Framework | Sui Documentation](#sui-framework-sui-documentation) - [Contribute to Sui Documentation | Sui Documentation](#contribute-to-sui-documentation-sui-documentation) - [Release Notes | Sui Documentation](#release-notes-sui-documentation) - [Genesis | Sui Documentation](#genesis-sui-documentation) - [Unknown](#unknown) - [Sui Node Monitoring | Sui Documentation](#sui-node-monitoring-sui-documentation) - [Sui Kiosk | Sui Documentation](#sui-kiosk-sui-documentation) - [Sagat | Sui Documentation](#sagat-sui-documentation) - [Kiosk Apps | Sui Documentation](#kiosk-apps-sui-documentation) - [Wallet Standard | Sui Documentation](#wallet-standard-sui-documentation) - [Sui Object Display | Sui Documentation](#sui-object-display-sui-documentation) - [Payment Kit Standard | Sui Documentation](#payment-kit-standard-sui-documentation) - [Updating a Full Node | Sui Documentation](#updating-a-full-node-sui-documentation) - [Sui Validator Alert Reference | Sui Documentation](#sui-validator-alert-reference-sui-documentation) - [DeepBookV3 | Sui Documentation](#deepbookv3-sui-documentation) - [Data Management | Sui Documentation](#data-management-sui-documentation) - [Sui Archives | Sui Documentation](#sui-archives-sui-documentation) - [Database Snapshots | Sui Documentation](#database-snapshots-sui-documentation) - [Move Conventions | Sui Documentation](#move-conventions-sui-documentation) - [Sui Exchange Integration Guide | Sui Documentation](#sui-exchange-integration-guide-sui-documentation) - [Packages | Sui Documentation](#packages-sui-documentation) - [Sui Validators | Sui Documentation](#sui-validators-sui-documentation) - [Migrating to Move 2024 | Sui Documentation](#migrating-to-move-2024-sui-documentation) - [Bridging Tokens | Sui Documentation](#bridging-tokens-sui-documentation) - [Validator Node Management | Sui Documentation](#validator-node-management-sui-documentation) - [Validator Node Rewards | Sui Documentation](#validator-node-rewards-sui-documentation) - [DeepBook Margin | Sui Documentation](#deepbook-margin-sui-documentation) - [Closed-Loop Token | Sui Documentation](#closed-loop-token-sui-documentation) - [Nautilus Design | Sui Documentation](#nautilus-design-sui-documentation) - [Gas Fees | Sui Documentation](#gas-fees-sui-documentation) - [Validator Node Tools | Sui Documentation](#validator-node-tools-sui-documentation) - [GraphQL and General-Purpose Indexer | Sui Documentation](#graphql-and-general-purpose-indexer-sui-documentation) - [Passkey | Sui Documentation](#passkey-sui-documentation) - [Staking and Unstaking | Sui Documentation](#staking-and-unstaking-sui-documentation) - [Building PTBs | Sui Documentation](#building-ptbs-sui-documentation) - [zkLogin | Sui Documentation](#zklogin-sui-documentation) - [Checkpoint Verification | Sui Documentation](#checkpoint-verification-sui-documentation) - [GraphQL and General-Purpose Indexer (Beta) | Sui Documentation](#graphql-and-general-purpose-indexer-beta-sui-documentation) - [gRPC | Sui Documentation](#grpc-sui-documentation) - [Manifest Reference | Sui Documentation](#manifest-reference-sui-documentation) - [Epochs, Equivocation, and Reconfiguration | Sui Documentation](#epochs-equivocation-and-reconfiguration-sui-documentation) - [Upgrading Packages | Sui Documentation](#upgrading-packages-sui-documentation) - [Access On-Chain Time | Sui Documentation](#access-on-chain-time-sui-documentation) - [Using gRPC | Sui Documentation](#using-grpc-sui-documentation) - [Move Package Management | Sui Documentation](#move-package-management-sui-documentation) - [Package Management Migration | Sui Documentation](#package-management-migration-sui-documentation) - [SuiLink | Sui Documentation](#suilink-sui-documentation) - [Programmable Transaction Blocks (PTBs) | Sui Documentation](#programmable-transaction-blocks-ptbs-sui-documentation) - [Consensus | Sui Documentation](#consensus-sui-documentation) --- # Sui Documentation [Skip to main content](https://docs.sui.io/#__docusaurus_skipToContent_fallback) Sui Documentation ================= Discover the power of Sui through examples, guides, and concepts ---------------------------------------------------------------- #### Developers [Getting Started](https://docs.sui.io/guides/developer/getting-started/sui-install) [Sui Developer Basics](https://docs.sui.io/guides) [Move](https://docs.sui.io/concepts/sui-move-concepts) #### Validators and Node operators [Validator Configuration](https://docs.sui.io/guides/operator/validator/validator-config) [Run a Sui Full Node](https://docs.sui.io/guides/operator/sui-full-node) [Sui Bridge Node Configuration](https://docs.sui.io/guides/operator/bridge-node-configuration) #### About Sui [Tokenomics](https://docs.sui.io/concepts/tokenomics) [Cryptography](https://docs.sui.io/concepts/cryptography) [Standards](https://docs.sui.io/standards) #### References [Sui dApp Kit](https://sdk.mystenlabs.com/dapp-kit?ref=blog.sui.io) [Sui API](https://docs.sui.io/references/sui-api) [Sui Framework](https://github.com/MystenLabs/sui/tree/main/crates/sui-framework/docs) [Rust SDK](https://github.com/MystenLabs/sui/tree/main/crates/sui-sdk) #### Resources [Sui Ecosystem](https://sui.directory/?_project_type=api%2Cdeveloper-tools%2Cinfrastructure%2Csdk) [Awesome Sui](https://docs.sui.io/references/awesome-sui) [Sui blog](https://blog.sui.io/) [Sui Developer Cheat Sheet](https://docs.sui.io/guides/developer/dev-cheat-sheet) [Build your dApp on Sui](https://docs.sui.io/guides/developer/getting-started/hello-world) --- # Guides | Sui Documentation [Skip to main content](https://docs.sui.io/guides#__docusaurus_skipToContent_fallback) On this page This section provides practical, implementation-focused examples designed to accelerate your journey developing on Sui. Whether you are new to blockchain development or an experienced Sui developer, these resources offer structured guidance for building applications, creating assets, and leveraging Sui's unique technical features effectively. Get started developing on Sui[​](https://docs.sui.io/guides#get-started-developing-on-sui "Direct link to Get started developing on Sui") ------------------------------------------------------------------------------------------------------------------------------------------ Install tooling, setup your environment, and deploy a "Hello, World!" Move package**Package**Smart contracts on Sui. to start your Sui developer experience. 1\. Install Sui --------------- Install the Sui framework and its required prerequisites on your system. 2\. Configure a Sui Client -------------------------- The Sui client configuration specifies which network to connect to and which address to send transactions. 3\. Create a Sui Address ------------------------ You need an address on the Sui network before you can build packages and own objects. 4\. Get SUI from Faucet ----------------------- Use the Sui faucet to obtain free SUI tokens for use on the Sui Devnet and Testnet networks. 5\. Hello, World! ----------------- Create and publish your first Move package using a basic 'Hello, World!' example. 6\. Next Steps -------------- To continue your journey building on Sui, you can review other documentation, join the community of other Sui builders, or check out the Awesome Sui repo. Objects[​](https://docs.sui.io/guides#objects "Direct link to Objects") ------------------------------------------------------------------------ Learn about Sui's object**Object**The basic unit of storage on Sui. model, ownership patterns, and how to work with dynamic fields. Object Model ------------ Everything on the Sui blockchain is an object that has metadata, a type of ownership, and a referencing scheme. Object Ownership ---------------- On Sui, object ownership can be represented in different ways. Weigh the benefits of each to decide the best approach for your project. Transfers --------- Everything on Sui is an object. To use objects, they must be transferred between owners, which can be an address or another object. Dynamic Fields -------------- Dynamic fields and dynamic object fields on Sui are added and removed dynamically, affect gas only when accessed, and store heterogeneous values. Object Versioning ----------------- Versioning provides the ability to upgrade packages and objects on the Sui network. Simulating References --------------------- Use the borrow module in the Sui framework to include objects by reference in your programmable transaction blocks. Packages[​](https://docs.sui.io/guides#packages "Direct link to Packages") --------------------------------------------------------------------------- Learn how to manage, upgrade, and configure Move packages on Sui. Move Package Management ----------------------- Learn how to use the Move package manager system. Package Upgrades ---------------- Sui provides a method of upgrading your packages while still retaining their immutable properties. Custom Policies --------------- Custom upgrade policies are used to upgrade live packages while addressing the security risks of single key ownership upgrades. Automated Address Management ---------------------------- Packages published across Mainnet, Testnet, and Devnet each have different addresses. Automated address management tracks these addresses for you. Transactions[​](https://docs.sui.io/guides#transactions "Direct link to Transactions") --------------------------------------------------------------------------------------- Learn about signing and sending transactions, building programmable transaction blocks**Programmable transaction blocks**Define all user transactions on Sui., and sponsored transactions**Sponsored transaction**When one address pays the gas fee for a transaction submitted by another address.. Sign and Send Transactions -------------------------- Each transaction on Sui represents a call to a specific functionality that executes with inputs that define the result of the transaction. Building PTBs ------------- Using the Sui TypeScript SDK, you can create programmable transaction blocks to perform multiple commands in a single transaction. Sponsored Transactions ---------------------- Sponsored transactions let you pay gas fees on behalf of another user, reducing onboarding friction for users who don't own SUI. Accessing data[​](https://docs.sui.io/guides#accessing-data "Direct link to Accessing data") --------------------------------------------------------------------------------------------- Build your own custom indexer, query data with GraphQL, and work with events. Using gRPC ---------- Learn how to use gRPC clients for the Sui network with grpcurl, Buf CLI, and popular programming languages. Query with GraphQL ------------------ Practical guide to making queries of the Sui RPC using the GraphQL service, with examples for common tasks. Custom Indexing Framework ------------------------- The \`sui-indexer-alt-framework\` is a powerful Rust framework for building high-performance, custom blockchain indexers on Sui. It provides customizable, production-ready components for data ingestion, processing, and storage. Build Your First Custom Indexer ------------------------------- Build a custom indexer using the \`sui-indexer-alt-framework\` module. The example indexer demonstrates a sequential pipeline that extracts transaction digests from Sui checkpoints and stores them in a local PostgreSQL. Custom Indexer and Walrus ------------------------- Walrus is a content-addressable storage protocol, where data is retrieved using a unique identifier derived from the content itself, rather than from a file path or location. Integrating a custom Sui Indexer with Walrus can provide novel user experiences. Using Events ------------ Use events to notify on-chain assets of activity your smart contracts initiate and query events from other packages to trigger logic based on emitted events. Currencies and tokens[​](https://docs.sui.io/guides#currencies-and-tokens "Direct link to Currencies and tokens") ------------------------------------------------------------------------------------------------------------------ Learn how to create and manage coins and tokens on Sui. Create Currencies and Tokens ---------------------------- Learn how to create currencies and mint coins and tokens on the Sui network using the Coin Registry system. Regulated Currency and Deny List -------------------------------- You can create regulated currencies on Sui using the Coin Registry system. These coins include the ability to control access using a deny list. In-Game Currency ---------------- Use the Sui Closed-Loop Token standard to create tokens that you can use as currency within a game application. Loyalty Token ------------- Use the Sui Closed-Loop Token standard to create tokens that are only valid within specific workflows and services. One example of Closed-Loop Tokens is a loyalty token. Vesting Strategies ------------------ If you plan to launch a token on Sui, then you might consider implementing a vesting strategy to strengthen the long-term outlook of your token. NFTs[​](https://docs.sui.io/guides#nfts "Direct link to NFTs") --------------------------------------------------------------- Learn how to create NFTs, implement soulbound**Soulbound**An asset that is bound to an account and cannot be transferred. tokens, and tokenize assets. Create an NFT ------------- On Sui, everything is an object. Moreover, everything is a non-fungible token (NFT) as its objects are unique, non-fungible, and owned. Soulbound NFT ------------- An example using Sui Move struct abilities and the Sui Framework's \`transfer\` module to make a NFT soulbound (non-transferable). NFT Rental Example ------------------ An example using the Kiosk Apps standard that provides the ability for users to rent NFTs according to the rules of a provided policy instead of outright owning them. This approach closely aligns with the ERC-4907 renting standard, making it a suitable choice for Solidity-based use cases intended for implementation on Sui. Asset Tokenization ------------------ Learn how to tokenize assets on the Sui blockchain. Asset tokenization refers to the process of representing real-world assets, such as real estate, art, commodities, stocks, or other valuable assets, as digital tokens on the blockchain network. On-chain primitives[​](https://docs.sui.io/guides#on-chain-primitives "Direct link to On-chain primitives") ------------------------------------------------------------------------------------------------------------ Learn how to work with time and randomness on-chain. Access On-Chain Time -------------------- Access network-based time for your transactions. Sui provides a Clock module to capture near-real time or epoch time in your Sui packages. On-Chain Randomness ------------------- Randomness is a valuable tool to simulate chance on chain, but can also expose flaws in your logic. Understanding the vulnerabilities and accounting for them can mitigate the threat exposure for your smart contracts. Cryptography[​](https://docs.sui.io/guides#cryptography "Direct link to Cryptography") --------------------------------------------------------------------------------------- Learn about on-chain signatures, multisig**Multisig**Multi-signature transactions that require multiple keys for authorization. authentication, and zkLogin**zkLogin**A Sui primitive that allows you to send transactions using an OAuth credential.. Sui On-Chain Signatures Verification in Move -------------------------------------------- Sui supports verification within Move smart contracts through several signature schemes. Signature schemes include Ed25519, Secp256k1 recoverable, Secp256k1 non-recoverable, Secp256r1 non-recoverable, Secp256r1 recoverable, BLS G1, and BLS G2. Groth16 ------- Zero-knowledge proofs are used to validate statements without revealing information about the proof's inputs. Hashing ------- Sui supports SHA2-256, SHA3-256, Keccak256, and Blake2b-256 cryptographic hash functions. ECVRF ----- Elliptic curve verifiable random function is a cryptographic algorithm that enables you to generate a random number and provide proof that the number used a secret key for generation. Multisig Authentication ----------------------- Guide on how to create a multisig transaction and then submit it against a local network using the Sui CLI. zkLogin Integration Guide ------------------------- zkLogin can be integrated into applications deployed on Sui. Configure OpenID Providers -------------------------- zkLogin can be integrated with an application using an OpenID provider's OAuth Client ID and redirect URI. zkLogin Example --------------- An example that breaks down the logic behind each step of zkLogin. Nautilus**Nautilus**Secure and verifiable off-chain computation on Sui.[​](https://docs.sui.io/guides#nautilus "Direct link to nautilus") ------------------------------------------------------------------------------------------------------------------------------------------ Nautilus Overview ----------------- Run secure, off-chain logic in trusted execution environments (TEEs), and verify it on-chain to trigger safe smart contract workflows. Using Nautilus -------------- Details on how to use Nautilus with the reproducible build template. Customize Nautilus ------------------ Details on how to customize Nautilus server logic, test functionality locally, and manage the enclave. Example applications[​](https://docs.sui.io/guides#example-applications "Direct link to Example applications") --------------------------------------------------------------------------------------------------------------- Try out these example applications to learn more about Sui. End-to-End Counter ------------------ An app that allows users to create counters that anyone can increment, but only the owner can reset. Trustless Swap -------------- An app that performs atomic swaps on Sui. Atomic swaps are similar to escrows but without requiring a trusted third party. Coin Flip --------- Learn Sui through a coin flip app that covers the full end-to-end flow of building a Sui Move module and connecting it to a React Sui app. Review Rating ------------- This example app creates a food rating service that stores all review data and algorithms on-chain. Blackjack --------- Learn Sui using an example implementation of the popular casino game Blackjack. Plinko ------ Learn Sui through an example implementation of the popular casino game, Plinko. Tic-Tac-Toe ----------- This example demonstrates how to create three variations of a tic-tac-toe app on Sui. Oracles ------- Oracles connect smart contracts deployed on-chain with data that is stored off-chain. Weather Oracle -------------- Write a module (smart contract) in Move that fetches the weather data from the OpenWeather API every 10 minutes and updates the weather conditions for over 1,000 locations around the world. Meta Pricing Oracle ------------------- Operator guides[​](https://docs.sui.io/guides#operator-guides "Direct link to Operator guides") ------------------------------------------------------------------------------------------------ Processes and guides for validators and node operators on the Sui network. Operator Overview ----------------- Guides for operators on the Sui network. Whether you are running a full node for your app or operating as a validator on the Sui network, these guides help you set up your environment and operate your network. Run a Sui Full Node ------------------- Operate a Sui full node to validate blockchain activities, like transactions, checkpoints, and epoch changes. Full Node Data Management ------------------------- A high-level description of data management on the Sui network that you can use to optimize your Sui full node configuration. Monitoring ---------- Monitor Sui node metrics to ensure the health and performance of your node. Validator Configuration ----------------------- Learn how to set up, configure, and manage a Sui validator node. Sui Bridge Node Configuration ----------------------------- Correct configuration of your node ensures optimal performance and valid metrics data. SuiPlay0X1[​](https://docs.sui.io/guides#suiplay0x1 "Direct link to SuiPlay0X1") --------------------------------------------------------------------------------- Guides for developing games for the SuiPlay0X1 handheld gaming device. SuiPlay0X1 Overview ------------------- Learn how to build games for the SuiPlayX01 handheld gaming device. Integration ----------- Integrate with SuiPlay0X1 using the Playtron GameOS SDK. Migration Strategies -------------------- SuiPlay0X1 is part of the Sui gaming ecosystem. Users can migrate accounts between on-device and off-device versions of a game. Wallet Integration ------------------ SuiPlay0X1 supports integration with several wallet solutions, including self-custodial wallets, zkLogin wallets, Playtron wallets, and custodial wallets. Best Practices -------------- Adhere to best practices when developing for SuiPlay0X1. * [Get started developing on Sui](https://docs.sui.io/guides#get-started-developing-on-sui) * [Objects](https://docs.sui.io/guides#objects) * [Packages](https://docs.sui.io/guides#packages) * [Transactions](https://docs.sui.io/guides#transactions) * [Accessing data](https://docs.sui.io/guides#accessing-data) * [Currencies and tokens](https://docs.sui.io/guides#currencies-and-tokens) * [NFTs](https://docs.sui.io/guides#nfts) * [On-chain primitives](https://docs.sui.io/guides#on-chain-primitives) * [Cryptography](https://docs.sui.io/guides#cryptography) * [Nautilus](https://docs.sui.io/guides#nautilus) * [Example applications](https://docs.sui.io/guides#example-applications) * [Operator guides](https://docs.sui.io/guides#operator-guides) * [SuiPlay0X1](https://docs.sui.io/guides#suiplay0x1) * Was this page helpful? Yes No --- # Concepts | Sui Documentation [Skip to main content](https://docs.sui.io/concepts#__docusaurus_skipToContent_fallback) On this page Architecture[​](https://docs.sui.io/concepts#architecture "Direct link to Architecture") ----------------------------------------------------------------------------------------- Networks -------- Sui operates multiple networks including Mainnet for production, Testnet for staging, Devnet for developing new features, and Localnet for local development. Storage ------- Historical data and storage pricing provide insights into the cost of operations on the Sui network. Consensus --------- Overview of the Sui consensus mechanism. Epochs and Reconfiguration -------------------------- Epochs define time periods on Sui where the validator set remains unchanged. Equivocation occurs when objects are used incorrectly across transactions. Reconfiguration adjusts network parameters at epoch boundaries. Security -------- Assets on Sui, including coins and tokens, are types of objects, and can only be used by their owners unless otherwise defined according to predefined logic in a smart contract. Protocol Upgrades ----------------- The Sui protocol, framework, and execution engine are frequently extended to include new functionality and bug fixes. The upgrade process ensures all clients use the same source. Transactions[​](https://docs.sui.io/concepts#transactions "Direct link to Transactions") ----------------------------------------------------------------------------------------- Transaction Lifecycle --------------------- The life of a transaction on the Sui network has some differences compared to those from other blockchains. Programmable Transaction Blocks ------------------------------- Programmable transaction blocks are a group of commands that complete a transaction on Sui. Sponsored Transactions ---------------------- Sponsored transactions let you pay gas fees on behalf of another user, reducing onboarding friction for users who don't own SUI. Gas Smashing ------------ Sui optimizes coin management by combining multiple coins into a single object to pay for gas fees. Coin Management --------------- Transaction Authentication -------------------------- Understanding cryptographic keys, addresses, and signatures on Sui. Sui supports multiple cryptography algorithms and primitives with rapid switching between them. Tokenomics[​](https://docs.sui.io/concepts#tokenomics "Direct link to Tokenomics") ----------------------------------------------------------------------------------- SUI Tokenomics -------------- Sui's tokenomics is designed to support the long-term financial needs of Web3. It uses the native SUI token as the currency of the network and to pay for the network's gas fees. Staking and Unstaking --------------------- Staking and unstaking SUI with validators earns a percentage of rewards they receive from gas fees. SUI Bridging ------------ Moving tokens from one blockchain to another is called bridging. To bridge tokens from another blockchain to Sui, you can use the Sui Bridge, Wormhole Connect, Wormhole Portal Bridge, or ZetaChain. Gas Fees -------- A Sui transaction must pay for both the computational cost of execution and the long-term cost of storing the objects a transaction creates or mutates. Move**Move**An open source programming language used for all activity on Sui.[​](https://docs.sui.io/concepts#move "Direct link to move") ------------------------------------------------------------------------------------------------------------------------------------------ Move Concepts ------------- Move is an open source language for writing safe packages to manipulate on-chain objects. Packages -------- A Move package on Sui includes one or more modules that define that package's interaction with on-chain objects. Upgrading packages lets you improve code or add features without breaking packages that depend on them. Conventions ----------- Recommended Move 2024 best practices for Sui development. Move 2024 Migration ------------------- New features are becoming available to Move in 2024. These features are opt-in, so existing code will continue to function as expected. If you want to use these features in code you've already written, however, there are some steps you must take and breaking changes to be aware of to migrate to Move 2024. Accessing data[​](https://docs.sui.io/concepts#accessing-data "Direct link to Accessing data") ----------------------------------------------------------------------------------------------- Accessing Data -------------- Overview of the types of data access mechanisms available in Sui. GraphQL Indexer --------------- The GraphQL RPC Beta service offers a structured way for your clients to interact with data on the Sui blockchain. It accesses data processed by a general-purpose indexer and can connect to an archival store for historical network state. GraphQL RPC ----------- Use GraphQL to make Sui RPC calls. This feature is currently in Beta. Cryptography[​](https://docs.sui.io/concepts#cryptography "Direct link to Cryptography") ----------------------------------------------------------------------------------------- Cryptography ------------ Sui supports multiple cryptography algorithms and primitives, while also defining its own such as public keys, signatures, aggregated signatures, and hash functions. zkLogin ------- zkLogin is a Sui primitive that enables you to send transactions from a Sui address using an OAuth credential without publicly linking the two. Passkeys -------- Sui supports the passkey signature scheme that enables you to sign in to apps and sign transactions using a private key stored securely on a passkey authenticator. It uses the WebAuthn standard. Nautilus -------- Overview of the design aspects of Nautilus, including its trust model. Checkpoint Verification ----------------------- On the Sui network, checkpoints define the history of the blockchain. Checkpoint verification is how full nodes and other clients guarantee their state is exactly the same as the Sui network. Additional resources[​](https://docs.sui.io/concepts#additional-resources "Direct link to Additional resources") ----------------------------------------------------------------------------------------------------------------- Gaming on Sui ------------- Sui offers features like dynamic NFTs, Kiosk, soulbound assets, and on-chain randomness to provide builders with the tools to create immersive, transparent, and fair gaming experiences. Research Papers --------------- Research papers that are relevant to Sui and that one or more Sui team members have co-authored. * [Architecture](https://docs.sui.io/concepts#architecture) * [Transactions](https://docs.sui.io/concepts#transactions) * [Tokenomics](https://docs.sui.io/concepts#tokenomics) * [Move](https://docs.sui.io/concepts#move) * [Accessing data](https://docs.sui.io/concepts#accessing-data) * [Cryptography](https://docs.sui.io/concepts#cryptography) * [Additional resources](https://docs.sui.io/concepts#additional-resources) * Was this page helpful? Yes No --- # References Overview | Sui Documentation [Skip to main content](https://docs.sui.io/references#__docusaurus_skipToContent_fallback) On this page Already familiar with Sui? Use these valuable resources to continue your development journey. Sui RPC[​](https://docs.sui.io/references#sui-rpc "Direct link to Sui RPC") ---------------------------------------------------------------------------- Reference the Sui framework and Sui RPC documentation for details of the code that powers the Sui blockchain. GraphQL for Sui RPC ------------------- GraphQL is a public service for the Sui RPC that enables you to efficiently interact with the Sui network. JSON-RPC -------- Use GraphQL for the Sui RPC for new projects. Use the JSON-RPC reference for legacy projects that have not migrated to GraphQL yet. Move**Move**An open source programming language used for all activity on Sui.[​](https://docs.sui.io/references#move "Direct link to move") -------------------------------------------------------------------------------------------------------------------------------------------- Move powers smart contract logic for the Sui blockchain. Use these resources to learn Move or refresh your memory. Sui framework ------------- The Sui framework libraries include Move modules that provide the logic for Sui and its standards. A Rust process creates the documentation for the modules directly from comments in the code. The Move Book ------------- The Move Book is a comprehensive guide to the Move programming language on the Sui blockchain. The Move Reference ------------------ The Move Reference documents the architecture and syntax of the Move programming language. Sui CLI[​](https://docs.sui.io/references#sui-cli "Direct link to Sui CLI") ---------------------------------------------------------------------------- Interact directly with Sui networks and its features using the Sui command line interface (CLI). The CLI is divided into separate base commands that target a specific set of features. Sui Client CLI -------------- Create a client on a Sui network to generate addresses**Address**A unique, anonymous identity on a blockchain network., access networks, and more with the Sui Client CLI. Sui Client PTB CLI ------------------ Build, preview, and execute programmable transaction blocks**Programmable transaction blocks**Define all user transactions on Sui. directly from your terminal with the Sui Client PTB CLI. Sui Move CLI ------------ Access Sui Move functions on chain using the Sui Move CLI. Sui Replay CLI -------------- Access Sui Move functions on chain using the Sui Move CLI. Sui IDE support[​](https://docs.sui.io/references#sui-ide-support "Direct link to Sui IDE support") ---------------------------------------------------------------------------------------------------- Use the [Move](https://marketplace.visualstudio.com/items?itemName=mysten.move) and [Move Trace Debugger](https://marketplace.visualstudio.com/items?itemName=mysten.move-trace-debug) extensions for VSCode to quickly navigate and edit your Move codebase, and debug execution traces. Move ---- The Move extension provides language support features like code navigation, completion, and diagnostics for Move source code. Move Trace Debugger ------------------- Debug Move execution traces directly in VS Code to understand how your code executes. Sui software development kits[​](https://docs.sui.io/references#sui-software-development-kits "Direct link to Sui software development kits") ---------------------------------------------------------------------------------------------------------------------------------------------- Official software development kits (SDKs) available for Sui include the TypeScript SDK and Rust SDK. Sui TypeScript SDK ------------------ The Sui TypeScript SDK has its own microsite. Click this box to go there. Sui Rust SDK ------------ The Sui Rust SDK provides Rust wrappers around the Sui API. Using the SDK, you can interact with Sui networks using the Rust programming language. * [Sui RPC](https://docs.sui.io/references#sui-rpc) * [Move](https://docs.sui.io/references#move) * [Sui CLI](https://docs.sui.io/references#sui-cli) * [Sui IDE support](https://docs.sui.io/references#sui-ide-support) * [Sui software development kits](https://docs.sui.io/references#sui-software-development-kits) * Was this page helpful? Yes No --- # Validator Deployment and Configuration | Sui Documentation [Skip to main content](https://docs.sui.io/guides/operator/validator/validator-config#__docusaurus_skipToContent_fallback) On this page Validators on Sui run specialized validator**Validator**Responsible for executing tasks like staking, gas price references, and tallying rules. nodes that can execute more tasks than full nodes. Validators are used for staking, gas**Gas**The computational cost of execution and object storage for a transaction. price reference, and tallying rules. Validator requirements[​](https://docs.sui.io/guides/operator/validator/validator-config#validator-requirements "Direct link to validator-requirements") --------------------------------------------------------------------------------------------------------------------------------------------------------- To run a Sui validator, you must set up and configure a Sui validator node. Specific steps you must take include: 1. Install and configure Sui. 2. Configure port and protocol settings. 3. Configure key management. 4. Configure storage. 5. Update software. 6. Execute on-chain commands to interact with the network. 7. Update the gas price survey. 8. Report to other validators. ### Hardware requirements[​](https://docs.sui.io/guides/operator/validator/validator-config#hardware-requirements "Direct link to Hardware requirements") Suggested minimum hardware specifications to run a Sui validator node: * CPU: 24 physical cores (or 48 virtual cores) * Memory: 128 GB * Storage: 4 TB NVME * Network: 1 Gbps ### Validator**Validator**Responsible for executing tasks like staking, gas price references, and tallying rules. staking pool requirements[​](https://docs.sui.io/guides/operator/validator/validator-config#validator-staking-pool-requirements "Direct link to validator-staking-pool-requirements") There are minimum staking requirements a validator must satisfy to become active and to stay in the active validator set. ##### Stake requirements[​](https://docs.sui.io/guides/operator/validator/validator-config#stake-requirements "Direct link to Stake requirements") The Sui network is rolling out [SIP-39](https://github.com/sui-foundation/sips/blob/main/sips/sip-39.md) , which will significantly lower the barrier to entry for validators. Instead of requiring a minimum amount of SUI tokens, validators will need a minimum amount of _voting power_. When fully rolled out, SIP-39 will mean the following validator requirements: * A validator candidate must accrue at least 3 voting power before they can request to join the validator set. * If an active validator's stake falls below 2 voting power, they have seven epochs of grace period to gain back the stake before being removed from the validator set. * If an active validator's stake falls below 1 voting power, they are removed from the validator set at the end of the current epoch**Epoch**A period of time defined by the network. boundary. Sui uses 24-hour epochs. For more information on voting power, see [Understanding the voting power formula](https://docs.sui.io/concepts/tokenomics#understanding-the-voting-power-formula) . tip Want to be a Sui validator? If you have the required stake and plan to operate a validator on Sui, your participation is welcome and Sui is committed to supporting your onboarding. Kindly complete [this form](https://docs.google.com/forms/d/e/1FAIpQLSf6ZngRJ6Q5RdEiBfnbpUq4Htj8ShL58I6JRkmRTwTVSzeNtQ/viewform) to be added to our Validator Discord and keep up with upcoming validator releases and technical support. To set up staking on your validator node: 1. Call `request_add_validator_candidate` to become a candidate. This creates the on-chain validator information and initializes a staking pool for delegators to contribute to. 2. Acquire 30M SUI by staking to the validator staking pool created in the previous step. Call the `request_add_stake` with the address**Address**A unique, anonymous identity on a blockchain network. of the validator (this is not the same as the staking pool ID). 3. Call `request_add_validator` to have the validator become a pending validator. At the next epoch**Epoch**A period of time defined by the network., it joins the validator set. Before the next epoch, you should stand up the validator so that when the epoch changes, it can participate. [Learn more about validator staking rewards](https://docs.sui.io/guides/operator/validator/validator-rewards) . Deployment[​](https://docs.sui.io/guides/operator/validator/validator-config#deployment "Direct link to Deployment") --------------------------------------------------------------------------------------------------------------------- You can deploy Sui node in a number of ways. 1. Use pre-built container images available in [Docker Hub](https://hub.docker.com/r/mysten/sui-node/tags) . 2. Use pre-built `linux/amd64` binaries available in S3 that you can fetch using one of the following methods: $ wget https://releases.sui.io/$SUI_SHA/sui-node Copy Copied $ curl https://releases.sui.io/$SUI_SHA/sui-node -o sui-node Copy Copied Or, to build directly from source: $ git clone https://github.com/MystenLabs/sui.git && cd sui$ git checkout [SHA|BRANCH|TAG]$ cargo build --release --bin sui-node Copy Copied For more information on deploying a validator, refer to the [Sui for Node Operators](https://github.com/MystenLabs/sui/blob/main/nre/sui_for_node_operators.md) guide. Configuration[​](https://docs.sui.io/guides/operator/validator/validator-config#configuration "Direct link to Configuration") ------------------------------------------------------------------------------------------------------------------------------ Configuration guides are available for the following deployment options: * [Systemd](https://github.com/MystenLabs/sui/blob/main/nre/systemd/README.md) * [Ansible](https://github.com/MystenLabs/sui/blob/main/nre/ansible/README.md) * [Docker Compose](https://github.com/MystenLabs/sui/blob/main/nre/docker/README.md) `sui-node` runs with a single configuration file provided as an argument, for example: $ ./sui-node --config-path /opt/sui/config/validator.yaml Copy Copied For more information on configuring a validator, refer to the [Sui for Node Operators](https://github.com/MystenLabs/sui/blob/main/nre/sui_for_node_operators.md) guide. See [Validator](https://github.com/MystenLabs/sui/blob/main/nre/config/validator.yaml) for configuration templates. Connectivity[​](https://docs.sui.io/guides/operator/validator/validator-config#connectivity "Direct link to Connectivity") --------------------------------------------------------------------------------------------------------------------------- `sui-node` uses the following ports by default: | protocol/port | reachability | purpose | | --- | --- | --- | | TCP/8080 | Inbound | Validator/transaction**Transaction**A number of commands that execute on inputs to define the result of the transaction. interface | | TCP/8081 | Inbound/outbound | Consensus**Consensus**The process by which the majority of nodes agree on the current state of the network interface | | UDP/8084 | Inbound/outbound | Peer-to-peer state sync interface | | TCP/8443 | Outbound | Metrics pushing | | TCP/9184 | Localhost | Metrics scraping | To run a validator successfully, it is critical that ports 8080-8084 are open as outlined, including the specific protocol (TCP/UDP). Network buffer[​](https://docs.sui.io/guides/operator/validator/validator-config#network-buffer "Direct link to Network buffer") --------------------------------------------------------------------------------------------------------------------------------- Load testing Sui validator networks suggests that the default Linux network buffer sizes are too small. It is recommend to increase them using one of the following two methods: ### Option 1: With `/etc/sysctl.d/`[​](https://docs.sui.io/guides/operator/validator/validator-config#option-1-with-etcsysctld "Direct link to option-1-with-etcsysctld") Add these settings to a new `sysctl` file specifically for `sui-node` or append to an existing file. Modifications made in this way persist across system restarts. Create a new `sysctl` file for the `sui-node`: $ sudo nano /etc/sysctl.d/100-sui-node.conf Copy Copied Add these lines to the file, overwriting existing settings if necessary: net.core.rmem_max = 104857600net.core.wmem_max = 104857600net.ipv4.tcp_rmem = 8192 262144 104857600net.ipv4.tcp_wmem = 8192 262144 104857600 Copy Copied Apply the settings immediately, before the next restart: $ sudo sysctl --system Copy Copied ### Option 2: With `sysctl` command[​](https://docs.sui.io/guides/operator/validator/validator-config#option-2-with-sysctl-command "Direct link to option-2-with-sysctl-command") These modifications do not persist across system restarts. Therefore, run the commands each time the host restarts. $ sudo sysctl -w net.core.wmem_max=104857600$ sudo sysctl -w net.core.rmem_max=104857600$ sudo sysctl -w net.ipv4.tcp_rmem="8192 262144 104857600"$ sudo sysctl -w net.ipv4.tcp_wmem="8192 262144 104857600" Copy Copied ### Verification[​](https://docs.sui.io/guides/operator/validator/validator-config#verification "Direct link to Verification") To verify that the system settings have successfully been updated, check the output of the following command: $ sudo sysctl -a | egrep [rw]mem Copy Copied * [Validator requirements](https://docs.sui.io/guides/operator/validator/validator-config#validator-requirements) * [Hardware requirements](https://docs.sui.io/guides/operator/validator/validator-config#hardware-requirements) * [Deployment](https://docs.sui.io/guides/operator/validator/validator-config#deployment) * [Configuration](https://docs.sui.io/guides/operator/validator/validator-config#configuration) * [Connectivity](https://docs.sui.io/guides/operator/validator/validator-config#connectivity) * [Network buffer](https://docs.sui.io/guides/operator/validator/validator-config#network-buffer) * [Option 1: With `/etc/sysctl.d/`](https://docs.sui.io/guides/operator/validator/validator-config#option-1-with-etcsysctld) * [Option 2: With `sysctl` command](https://docs.sui.io/guides/operator/validator/validator-config#option-2-with-sysctl-command) * [Verification](https://docs.sui.io/guides/operator/validator/validator-config#verification) * Was this page helpful? Yes No --- # Sui Standards Overview | Sui Documentation [Skip to main content](https://docs.sui.io/standards#__docusaurus_skipToContent_fallback) Standards on Sui are features, frameworks, or apps that you can extend or customize. Closed-Loop Token ----------------- Closed-Loop tokens can only be used for a specific service or by authorized users. Coin ---- The Coin standard enables you to create a broad range of fungible tokens on the Sui network to satisfy a number of use cases. Currency -------- The Sui Currency Standard enables you to create a broad range of fungible tokens on the Sui network using either the legacy coin creation or the centralized coin registry system. DeepBook -------- A central limit order book that offers features and functionality for marketplaces on Sui. Token exchanges leveraging the layer can feature transparency, a full range of trading options, and customer privacy. Kiosk ----- Kiosk is a decentralized system for commerce applications on Sui. Kiosk is a part of the Sui framework, native to the system, and available to everyone. Kiosk Apps ---------- Kiosk apps are a way to extend the functionality of Sui Kiosk while keeping the core functionality intact. You can develop apps to add new features to a kiosk without having to modify the core code or move the assets elsewhere. Sui Object Display ------------------ The Sui Object Display standard is a template engine that enables on-chain management of off-chain representation (display) for a type. Wallet Standard --------------- The Wallet Standard defines how apps can automatically discover and interact with wallets. Payment Kit ----------- The Sui Payment Kit is a robust, open-source payment processing toolkit that provides secure payment verification, receipt management, and duplicate prevention for applications built on the Sui blockchain. --- # Sui Developer Cheat Sheet | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/dev-cheat-sheet#__docusaurus_skipToContent_fallback) On this page Quick reference on best practices for Sui Network developers. Move**Move**An open source programming language used for all activity on Sui.[​](https://docs.sui.io/guides/developer/dev-cheat-sheet#move "Direct link to move") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ ### General[​](https://docs.sui.io/guides/developer/dev-cheat-sheet#general "Direct link to General") * Read the [Code Quality Checklist](https://move-book.com/guides/code-quality-checklist/) for best practices in Move development. * Follow the [Move conventions](https://docs.sui.io/concepts/sui-move-concepts/conventions) for consistent naming and coding style. * Use `vector`\-backed collections (`vector`, `VecSet`, `VecMap`, `PriorityQueue`) with a known maximum size of ≤ 1000 items. * Use dynamic field-backed collections (`Table`, `Bag`, `ObjectBag`, `ObjectTable`, `LinkedTable`) for any collection that allows third-party addition, larger collections, and collections of unknown size. * Move objects have a maximum size of 250KB. Any attempt to create a larger object**Object**The basic unit of storage on Sui. leads to an aborted transaction**Transaction**A number of commands that execute on inputs to define the result of the transaction.. Ensure that your objects do not have an ever-growing `vector`\-backed collection. * If your function `f` needs a payment in, for example, SUI from the caller, use `fun f(payment: Coin)` not `fun f(payment: &mut Coin, amount: u64)`. This is safer for callers; they know exactly how much they are paying, and do not need to trust `f` to extract the right amount. ### Composability[​](https://docs.sui.io/guides/developer/dev-cheat-sheet#composability "Direct link to Composability") * Use the [Sui Object Display](https://move-book.com/programmability/display) to customize how your objects show up in wallets, apps, and explorers. * Avoid “self-transfers." When possible, return the object from the current function, so it can be used in a different command in a [programmable transaction block](https://docs.sui.io/guides/developer/transactions/building-ptb) . ### Package**Package**Smart contracts on Sui. upgrades[​](https://docs.sui.io/guides/developer/dev-cheat-sheet#package-upgrades "Direct link to package-upgrades") * Read about [package upgrades](https://docs.sui.io/guides/developer/packages/upgrade) before publishing your package. * Packages are immutable, so any published package can be called forever. Use [object versioning](https://docs.sui.io/guides/developer/packages/upgrade#versioned-shared-objects) to prevent older versions from being called. * If you upgrade a package `P1` to `P2`, other packages and clients that depend on `P1` will continue using `P1`. They do not auto-update to `P2`. Both dependent packages and client code must be explicitly updated to point at `P2`. * Packages that expect to be extended by dependent packages can avoid breaking their extensions with each upgrade by providing a standard (unchanging) interface that all versions conform to. See the [message sending](https://github.com/wormhole-foundation/wormhole/blob/74dea3bf22f0e27628b432c3e9eac05c85786a99/sui/wormhole/sources/publish_message.move) across a bridge example from Wormhole. Extension packages that produce outbound messages can use [`prepare_message`](https://github.com/wormhole-foundation/wormhole/blob/74dea3bf22f0e27628b432c3e9eac05c85786a99/sui/wormhole/sources/publish_message.move#L68-L90) from any version of the Wormhole package to produce a [`MessageTicket`](https://github.com/wormhole-foundation/wormhole/blob/74dea3bf22f0e27628b432c3e9eac05c85786a99/sui/wormhole/sources/publish_message.move#L52-L66) while client code that sends the message must pass that `MessageTicket` into [`publish_message`](https://github.com/wormhole-foundation/wormhole/blob/74dea3bf22f0e27628b432c3e9eac05c85786a99/sui/wormhole/sources/publish_message.move#L92-L152) in the latest version of the package. * `public` function signatures cannot be deleted or changed, but `public(friend)` functions can. Use `public(friend)` or private visibility liberally unless you are exposing library functions that will live forever. * It is not possible to delete `struct` types, change their definition or add new [abilities](https://move-book.com/reference/abilities) via an upgrade. Introduce new types carefully as they will live forever. ### Testing[​](https://docs.sui.io/guides/developer/dev-cheat-sheet#testing "Direct link to Testing") * Use the [`sui::test_scenario`](https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/packages/sui-framework/sources/test/test_scenario.move) module**Module**A component of a Move package that defines interaction with on-chain objects. to mimic multi-transaction, multi-sender test scenarios. * Use the [`std::unit_test`](https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/packages/move-stdlib/sources/unit_test.move) module for `assert_eq!` and `assert_ref_eq!` macros for better test error messages. * Use the [`sui::test_utils`](https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/packages/sui-framework/sources/test/test_utils.move#L5) module for black-hole function `destroy`. * Use the [`std::debug`](https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/packages/move-stdlib/sources/debug.move) module for debug printing via `print`. * Use `sui move test --coverage` to compute code coverage information for your tests, and `sui move coverage source --module ` to see uncovered lines highlighted in red. Push coverage all the way to 100% if feasible. Apps[​](https://docs.sui.io/guides/developer/dev-cheat-sheet#apps "Direct link to Apps") ----------------------------------------------------------------------------------------- * For optimal performance and data consistency, apps should submit writes and reads for the same full node**Full node**Responsible for validating blockchain activity.. In the TS SDK, this means that apps should use the wallet's [`signTransactionBlock`](https://sdk.mystenlabs.com/dapp-kit) API, then submit the transaction via a call to [`execute_transactionBlock`](https://docs.sui.io/references/sui-api/sui-graphql/beta/reference/operations/mutations/execute-transaction) on the app's full node, _not_ use the wallet's `signAndExecuteTransactionBlock` API. This ensures read-after-write-consistency--reads from the app's full node will reflect writes from the transaction right away instead of waiting for a checkpoint**Checkpoint**Created after transaction execution to provide a certified record of chain history.. * Apps should implement a local cache for frequently read data rather than over-fetching from the full node. * Whenever possible, use programmable transaction blocks**Programmable transaction blocks**Define all user transactions on Sui. to compose existing on-chain functionality rather than publishing new smart contract code. Programmable transaction blocks allow large-scale batching and heterogeneous composition, driving already-low gas**Gas**The computational cost of execution and object storage for a transaction. fees down even further. * Apps should leave gas budget, gas price, and coin selection to the wallet. This gives wallets more flexibility, and it's the wallet's responsibility to dry run a transaction to ensure it doesn't fail. Signing[​](https://docs.sui.io/guides/developer/dev-cheat-sheet#signing "Direct link to Signing") -------------------------------------------------------------------------------------------------- * **Never** sign two concurrent transactions that are touching the same owned object. Either use independent owned objects, or wait for one transaction to conclude before sending the next one. Violating this rule might lead to client [equivocation](https://docs.sui.io/sui-glossary#equivocation) , which locks up the owned objects involved in the two transactions until the end of the current epoch**Epoch**A period of time defined by the network.. * Any `sui client` command that crafts a transaction (e.g., `sui client publish`, `sui client call`) can accept the `--serialize-output` flag to output a base64 transaction to be signed. * Sui supports several signature schemes for transaction signing, including native multisig**Multisig**Multi-signature transactions that require multiple keys for authorization.. zkLogin**zkLogin**A Sui primitive that allows you to send transactions using an OAuth credential.[​](https://docs.sui.io/guides/developer/dev-cheat-sheet#zklogin "Direct link to zklogin") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Call the proving service as sparingly as possible. Design your app flows such that you call the proving service only when the user is about to perform a real transaction. * Beware of how you cache the ephemeral private key. Treat the private key akin to a piece of highly sensitive data, e.g., password. If an (unexpired) ephemeral private key and its corresponding ZK proof are leaked, then an attacker can steal user's assets. * [Move](https://docs.sui.io/guides/developer/dev-cheat-sheet#move) * [General](https://docs.sui.io/guides/developer/dev-cheat-sheet#general) * [Composability](https://docs.sui.io/guides/developer/dev-cheat-sheet#composability) * [Package upgrades](https://docs.sui.io/guides/developer/dev-cheat-sheet#package-upgrades) * [Testing](https://docs.sui.io/guides/developer/dev-cheat-sheet#testing) * [Apps](https://docs.sui.io/guides/developer/dev-cheat-sheet#apps) * [Signing](https://docs.sui.io/guides/developer/dev-cheat-sheet#signing) * [zkLogin](https://docs.sui.io/guides/developer/dev-cheat-sheet#zklogin) * Was this page helpful? Yes No --- # Install Sui | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/sui-install#__docusaurus_skipToContent_fallback) On this page Sui is a scalable and performant layer-1 blockchain that is home to a complete stack of native primitives ideal for building decentralized applications. Such primitives, such as those for [encryption](https://seal-docs.wal.app/UsingSeal/) , [data storage](https://docs.wal.app/usage/setup.html) , verification, and access control, provide developers with every piece of the application stack without needing to use layer-2 chains or off-chain solutions. In contrast to other chains, Sui uses an [object-centric model](https://docs.sui.io/guides/developer/objects/object-model) , where every item on the network is an object. [Transactions](https://docs.sui.io/guides/developer/transactions/txn-overview) use objects as input, which mutate an existing object or create new objects. Each object has a unique on-chain ID. To create objects, submit transactions, and start building an application on Sui, first you must install Sui. This installation includes the [Sui CLI](https://docs.sui.io/references/cli) , a tool that creates and manages address balances, builds and publishes smart contracts, and queries information from the network. * Prerequisites * [x] Have a machine with one of the following supported operating systems: * Linux: Ubuntu version 22.04 (Jammy Jellyfish) or newer * macOS: macOS Monterey or newer * Microsoft Windows: Windows 10 or 11 Quick install[​](https://docs.sui.io/guides/developer/getting-started/sui-install#quick-install "Direct link to Quick install") -------------------------------------------------------------------------------------------------------------------------------- The Sui CLI is used to interact with the Sui network, deploy packages, and manage assets. To install the Sui CLI, you can use [`suiup`](https://github.com/MystenLabs/suiup) . [`suiup`](https://github.com/MystenLabs/suiup) is the most effective installation method, as it allows you to easily install and switch between different versions of not only the Sui CLI but also other Sui stack components like [`walrus`](https://docs.wal.app/usage/setup.html) and [`mvr`](https://github.com/MystenLabs/mvr) . Alternative quick install instructions for [Homebrew](https://brew.sh/) or [Chocolately](https://chocolatey.org/) do not support installing other Sui stack components. Other components will need to be installed through their individual binaries if you'd like to use them in the future. caution Installations using Homebrew or Chocolatey might take several minutes if you do not have any of the [Sui prerequisites](https://docs.sui.io/guides/developer/getting-started/install-source) installed. Using `suiup` is often much faster and highly recommended. * suiup * Homebrew * Chocolatey First, install `suiup`: $ curl -sSfL \ https://raw.githubusercontent.com/Mystenlabs/suiup/main/install.sh \ | sh Then, install Sui: $ suiup install sui@testnet For alternative installation methods, refer to the [`suiup` repository](https://github.com/MystenLabs/suiup) . danger Installing Sui with `suiup` does not configure the client. To use `sui` commands, you must [configure the Sui client](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) . To confirm that Sui installed correctly: 1. Open a terminal or console 2. Type `sui --version` and press Enter If you receive a "command not found" error, verify the Sui binaries directory is in your `PATH` environment variable. You must have [Homebrew](https://brew.sh/) installed before running the following command: $ brew install sui To confirm that Sui installed correctly: 1. Open a terminal or console 2. Type `sui --version` and press Enter If you receive a "command not found" error, verify the Sui binaries directory is in your `PATH` environment variable. You must have [Chocolately](https://chocolatey.org/) installed before running the following command: $ choco install sui Find more [versions of Sui for Windows](https://community.chocolatey.org/packages/sui) on the Chocolatey community website. To confirm that Sui installed correctly: 1. Open a terminal or console 2. Type `sui --version` and press Enter If you receive a "command not found" error, verify the Sui binaries directory is in your `PATH` environment variable. The quick install is suitable for most use cases. For those wanting more control over the installation process, you can [install from source](https://docs.sui.io/guides/developer/getting-started/install-source) or [install binaries](https://docs.sui.io/guides/developer/getting-started/install-binaries) . If Sui is already installed from a previous development environment, be sure to upgrade to the [latest version](https://docs.sui.io/guides/developer/getting-started/install-binaries) . Looking for a project to clone? Before you can create and publish a smart contract, you must [configure a Sui client](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) and [obtain SUI tokens](https://docs.sui.io/guides/developer/getting-started/get-coins) . Then, you can [create a "Hello, World!" example](https://docs.sui.io/guides/developer/getting-started/hello-world) or [clone another example](https://docs.sui.io/guides/developer/app-examples) to start building. Installation details[​](https://docs.sui.io/guides/developer/getting-started/sui-install#installation-details "Direct link to Installation details") ----------------------------------------------------------------------------------------------------------------------------------------------------- ### `suiup` installation details[​](https://docs.sui.io/guides/developer/getting-started/sui-install#suiup-installation-details "Direct link to suiup-installation-details") Refer to the `suiup` repository's [README](https://github.com/mystenLabs/suiup?tab=readme-ov-file#paths-used-by-the-suiup-tool) for information regarding installation files and their locations. ### Default configuration file[​](https://docs.sui.io/guides/developer/getting-started/sui-install#default-configuration-file "Direct link to Default configuration file") Regardless of whether you used `suiup`, Homebrew, or Chocolately, Sui will store a primary configuration in the `~/.sui/sui_config/client.yaml` file. This file defines settings and preferences for your environment, such as: * Network environment details for Mainnet, Testnet, Devnet, and Localnet networks. * Active environment, which specifies the network the CLI commands will target. * Active address, which specifies the Sui address the CLI will use for transactions and queries. * Keystore location, which specifies where Sui stores your address' private keys. ### Next steps Configure a Sui Client ---------------------- Configure a Sui client to get a Sui address and connect to Testnet. Get SUI from Faucet ------------------- Obtain SUI from a faucet to deploy packages on Testnet. Hello, World! ------------- Clone the "Hello, World!" project. * [Quick install](https://docs.sui.io/guides/developer/getting-started/sui-install#quick-install) * [Installation details](https://docs.sui.io/guides/developer/getting-started/sui-install#installation-details) * [`suiup` installation details](https://docs.sui.io/guides/developer/getting-started/sui-install#suiup-installation-details) * [Default configuration file](https://docs.sui.io/guides/developer/getting-started/sui-install#default-configuration-file) --- # Hello, World! | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/hello-world#__docusaurus_skipToContent_fallback) On this page You'll build a "Hello, World!" program to learn the fundamentals of programming on Sui. You create programs on Sui by writing and deploying smart contracts to the network. The most basic unit of storage on Sui is an [_object_](https://docs.sui.io/guides/developer/objects/object-model) . Other blockchains typically structure storage using key-value stores. Sui centers storage around objects with unique ID addresses on-chain. Every Sui smart contract is an object that manipulates other objects. Objects can be immutable or mutable: * **Immutable** objects cannot be transferred, changed, or deleted. No one owns them and anyone can access them publicly. * **Mutable** objects can be transferred, changed, and deleted. A Sui address can own them, or they can be shared for public access. Every object's unique ID and version number references it on-chain. Every transaction on the network takes objects as input, then reads, writes, and mutates the inputs to produce new or altered objects as output. Every object knows the hash of the transaction that produced it. When an object is modified by a transaction, the transaction's output writes the object's mutated contents to the same object ID but with a new version number. Sui has limits on the maximum transaction size (128KB) and number of objects (2,048) used in a transaction. For more information on limits, see [Building Against Limits](https://move-book.com/guides/building-against-limits/) in The Move Book. What is Move?[​](https://docs.sui.io/guides/developer/getting-started/hello-world#what-is-move "Direct link to what-is-move") ------------------------------------------------------------------------------------------------------------------------------ [Move](https://docs.sui.io/concepts/sui-move-concepts) is the programming language Sui uses to create smart contracts. It is platform agnostic and enables common libraries, tooling, and developer communities across blockchains with vastly different data and execution models. There are three ways to use Move in the context of Sui: Move packages, Move modules, and Move objects. A Sui **Move package** is also referred to as a Move smart contract. It is a set of Move bytecode published to the Sui network. It is immutable and cannot be changed or removed, however you can upgrade it. Upgrading creates a new version of the package object on-chain, leaving the original intact. All prior versions of a package still exist on-chain. Once you publish it, other packages can import and use the modules it provides. Anyone can view a package's contents and use a Sui Explorer to see how its logic manipulates other objects. Every Move package on Sui includes one or more **Sui Move modules** that define the package's interaction with on-chain objects. A module's name is always unique within the package that contains it. A Sui Move module governs a Sui **Move object**, which is typed data from a Sui Move package. Each Move object value is a struct with fields that can contain primitive types, such as integers and addresses, other objects, and non\-object structs. Clone "Hello, World!"[​](https://docs.sui.io/guides/developer/getting-started/hello-world#clone-hello-world "Direct link to Clone "Hello, World!"") ---------------------------------------------------------------------------------------------------------------------------------------------------- * Prerequisites * [Install the latest version of Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) . * [Configure the Sui client](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) . * [Create a Sui address](https://docs.sui.io/guides/developer/getting-started/get-address) . * [Get SUI Testnet tokens](https://docs.sui.io/guides/developer/getting-started/get-coins) . * Download and install an IDE. The following are recommended, as they offer Move extensions: * [VSCode](https://code.visualstudio.com/) , corresponding [Move extension](https://marketplace.visualstudio.com/items?itemName=mysten.move) * [Emacs](https://www.gnu.org/software/emacs/) , corresponding [Move extension](https://github.com/amnn/move-mode) * [Vim](https://www.vim.org/download.php) , corresponding [Move extension](https://github.com/yanganto/move.vim) * [Zed](https://zed.dev/) , corresponding [Move extension](https://github.com/Tzal3x/move-zed-extension) Alternatively, you can use the [Move web IDE](https://www.playmove.dev/) , which does not require a download. It does not support all functions necessary for this guide, however. * [Download and install Git](https://git-scm.com/downloads) . To demonstrate creating objects, packages, and how to build your first Sui application, start by cloning the "Hello, World!" example: $ git clone \ https://github.com/MystenLabs/sui-stack-hello-world.git$ cd sui-stack-hello-world/move/hello-world In this project, there are two important files that define the package's logic, information, and its dependencies: * `move/hello-world/sources/greeting.move`: Defines the package's logic. In this example, it defines a basic shared greeting object and public functions to interact with it. * `move/hello-world/Move.toml`: The package's configuration file that defines the package name, dependencies, and addresses. Click to open`move/hello-world/Move.toml` File not found in manifest: `move/hello-world/Move.toml`. You probably need to run \`pnpm prebuild\` and restart the site. ### View the smart contract code[​](https://docs.sui.io/guides/developer/getting-started/hello-world#view-the-smart-contract-code "Direct link to View the smart contract code") Open the `greeting.move` file in your IDE of choice. You can see the following Move code: File not found in manifest: `move/hello-world/sources/greeting.move`. You probably need to run \`pnpm prebuild\` and restart the site. ### Code explanation[​](https://docs.sui.io/guides/developer/getting-started/hello-world#code-explanation "Direct link to Code explanation") First, this code defines a module called `greeting`: module hello_world::greeting { use std::string; ...} Then, it defines a public struct called `Greeting` that contains a unique object ID and text. A struct is a type of _resource_: File not found in manifest: `move/hello-world/sources/greeting.move`. You probably need to run \`pnpm prebuild\` and restart the site. Then, it defines the function `new` that makes an API call to the `Greeting` struct and initializes it with the text `"Hello world!"`, storing it in a new shared object: File not found in manifest: `move/hello-world/sources/greeting.move`. You probably need to run \`pnpm prebuild\` and restart the site. Lastly, the package defines a function called `update_text` that can be called to update the text stored in `Greeting`: File not found in manifest: `move/hello-world/sources/greeting.move`. You probably need to run \`pnpm prebuild\` and restart the site. ### Resource safety[​](https://docs.sui.io/guides/developer/getting-started/hello-world#resource-safety "Direct link to Resource safety") A unique aspect of programming applications on Sui is the resource safety enforced by the Move Bytecode Verifier. Move packages must satisfy the following resource safety parameters: * All resources must be either moved into global storage or destroyed by the end of a transaction. * Resources cannot be copied. In the "Hello, World!" example, the struct `Greeting` is a resource type. To satisfy the requirement that all resources must be moved or destroyed by the end of a transaction, `Greeting` is assigned to `new_greeting`, which the call to `transfer::share_object(new_greeting)` then moves into global storage. To mutate `Greeting`, the function `update_text` takes the input `(&mut Greeting)` rather than the resource itself. This function satisfies resource safety as the function does not copy the resource and mutates it via a reference. [Learn more](https://github.com/MystenLabs/sui/blob/main/external-crates/move/move-execution/v1/crates/move-bytecode-verifier/README.md) about the Move Bytecode Verifier. #### How does this differ from EVM applications?[​](https://docs.sui.io/guides/developer/getting-started/hello-world#how-does-this-differ-from-evm-applications "Direct link to How does this differ from EVM applications?") The Ethereum Virtual Machine adopts a gas\-based resource safety strategy. Every opcode on an EVM chain has an associated gas price that makes transactions costly, preventing the network from running a single transaction indefinitely. Build the Move package[​](https://docs.sui.io/guides/developer/getting-started/hello-world#build-the-move-package "Direct link to build-the-move-package") ----------------------------------------------------------------------------------------------------------------------------------------------------------- Before you can publish a Move package to the network, you must first build it. Building your package is necessary because the `.move` source file is a human-readable piece of code, while the network can only understand bytecode. To build your "Hello, World!" package, first confirm your working directory is `~/sui-stack-hello-world/move/hello-world`, then run the following command: $ sui move build The build process fetches and compiles the dependencies defined in the `Move.toml` file. The Move compiler checks your `.move` code for type errors, syntax errors, and enforces [resource safety](https://docs.sui.io/guides/developer/getting-started/hello-world#resource-safety) , then translates your `.move` code into bytecode that Sui can execute. info You must build your package before you can publish it, but also before you test it. You cannot run tests (`sui move test`) on your code until it has been built. Publish the Move package[​](https://docs.sui.io/guides/developer/getting-started/hello-world#publish-the-move-package "Direct link to publish-the-move-package") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Now that your package has been built, you need to publish it. After you publish it, other packages and users can use the package's modules and functions by making calls to the package ID. First, confirm your client is configured to use Testnet as the active environment: $ sui client active-env This should return `testnet`. If it does not return `testnet`, follow the [client configuration instructions](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) before continuing. Then, check your balance of SUI tokens to confirm you have enough to publish to Testnet: $ sui client balance You should have a balance of SUI tokens: ╭────────────────────────────────────────────╮│ Balance of coins owned by this address │├────────────────────────────────────────────┤│ ╭────────────────────────────────────────╮ ││ │ coin balance (raw) balance │ ││ ├────────────────────────────────────────┤ ││ │ Sui 56804696124 0.50 SUI │ ││ ╰────────────────────────────────────────╯ │╰────────────────────────────────────────────╯ If you do not have a balance, follow the [SUI faucet instructions](https://docs.sui.io/guides/developer/getting-started/get-coins) . Now, publish the package to Testnet with the command: $ sui client publish Click to openOutput Transaction Digest: 8R39iKKLGPDG3QkW2SrRW3QX71csRP2BLhK9H7oz9SwW╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ Transaction Data │├──────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ Sender: 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ││ Gas Owner: 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ││ Gas Budget: 9843200 MIST ││ Gas Price: 1000 MIST ││ Gas Payment: ││ ┌── ││ │ ID: 0x816e5ec6ff457f18232498b57af8a0e1e219307a3a43fb5df5a4c2198296510c ││ │ Version: 591332925 ││ │ Digest: FLC4NXntT7WiHcqCkpDuBUq14DFTfi3EFeUiJcSNHdPu ││ └── ││ ││ Transaction Kind: Programmable ││ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ ││ │ Input Objects │ ││ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────┤ ││ │ 0 Pure Arg: Type: address, Value: "0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803" │ ││ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ││ ╭─────────────────────────────────────────────────────────────────────────╮ ││ │ Commands │ ││ ├─────────────────────────────────────────────────────────────────────────┤ ││ │ 0 Publish: │ ││ │ ┌ │ ││ │ │ Dependencies: │ ││ │ │ 0x0000000000000000000000000000000000000000000000000000000000000001 │ ││ │ │ 0x0000000000000000000000000000000000000000000000000000000000000002 │ ││ │ └ │ ││ │ │ ││ │ 1 TransferObjects: │ ││ │ ┌ │ ││ │ │ Arguments: │ ││ │ │ Result 0 │ ││ │ │ Address: Input 0 │ ││ │ └ │ ││ ╰─────────────────────────────────────────────────────────────────────────╯ ││ ││ Signatures: ││ mUxqMIofPq+yIzPxxYM+2mSIPTFneDxhWGGxJ7tM02hnRBRy5/FosnnWKxd4OSAjmaw6FNylwVdqUoUlJSxWCQ== ││ │╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯╭───────────────────────────────────────────────────────────────────────────────────────────────────╮│ Transaction Effects │├───────────────────────────────────────────────────────────────────────────────────────────────────┤│ Digest: 8R39iKKLGPDG3QkW2SrRW3QX71csRP2BLhK9H7oz9SwW ││ Status: Success ││ Executed Epoch: 875 ││ ││ Created Objects: ││ ┌── ││ │ ID: 0x136e41f505888066f189fb823d710ec96ab4fd75144b3d8008b91d58de85fd12 ││ │ Owner: Account Address ( 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ) ││ │ Version: 591332926 ││ │ Digest: BGfc1tihsYPTLLozrj58HmRkDeQ1DWZfqeaR4SZDb1cX ││ └── ││ ┌── ││ │ ID: 0xa7ed855d30500c485a94c0849f70b508d6b6adf6b0767ab93cc0756c075ecbb1 ││ │ Owner: Immutable ││ │ Version: 1 ││ │ Digest: EtGAG9RHHCsguX4iuX1cbRDvW4QAkJXgDCMJjiufHtxB ││ └── ││ Mutated Objects: ││ ┌── ││ │ ID: 0x816e5ec6ff457f18232498b57af8a0e1e219307a3a43fb5df5a4c2198296510c ││ │ Owner: Account Address ( 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ) ││ │ Version: 591332926 ││ │ Digest: CiU5KNZALUmuckc2YUFmJq5YXgbB8oG3rs4cnh2rdDXd ││ └── ││ Gas Object: ││ ┌── ││ │ ID: 0x816e5ec6ff457f18232498b57af8a0e1e219307a3a43fb5df5a4c2198296510c ││ │ Owner: Account Address ( 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ) ││ │ Version: 591332926 ││ │ Digest: CiU5KNZALUmuckc2YUFmJq5YXgbB8oG3rs4cnh2rdDXd ││ └── ││ Gas Cost Summary: ││ Storage Cost: 7843200 MIST ││ Computation Cost: 1000000 MIST ││ Storage Rebate: 978120 MIST ││ Non-refundable Storage Fee: 9880 MIST ││ ││ Transaction Dependencies: ││ 2dkJtqsoQcyCZJvjZnskNVPQeynwVtwCcA9goAru6tTi ││ 7PStztXyh92keJmrDD1aghHaKVdgCoVkVx4ZmLUfmQeK ││ Dd9pn1zFcSJjinxQewFd2gQdR4XKsHxFioD5MYnwLZQz │╰───────────────────────────────────────────────────────────────────────────────────────────────────╯╭─────────────────────────────╮│ No transaction block events │╰─────────────────────────────╯╭──────────────────────────────────────────────────────────────────────────────────────────────────╮│ Object Changes │├──────────────────────────────────────────────────────────────────────────────────────────────────┤│ Created Objects: ││ ┌── ││ │ ObjectID: 0x136e41f505888066f189fb823d710ec96ab4fd75144b3d8008b91d58de85fd12 ││ │ Sender: 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ││ │ Owner: Account Address ( 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ) ││ │ ObjectType: 0x2::package::UpgradeCap ││ │ Version: 591332926 ││ │ Digest: BGfc1tihsYPTLLozrj58HmRkDeQ1DWZfqeaR4SZDb1cX ││ └── ││ Mutated Objects: ││ ┌── ││ │ ObjectID: 0x816e5ec6ff457f18232498b57af8a0e1e219307a3a43fb5df5a4c2198296510c ││ │ Sender: 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ││ │ Owner: Account Address ( 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ) ││ │ ObjectType: 0x2::coin::Coin<0x2::sui::SUI> ││ │ Version: 591332926 ││ │ Digest: CiU5KNZALUmuckc2YUFmJq5YXgbB8oG3rs4cnh2rdDXd ││ └── ││ Published Objects: ││ ┌── ││ │ PackageID: 0xa7ed855d30500c485a94c0849f70b508d6b6adf6b0767ab93cc0756c075ecbb1 ││ │ Version: 1 ││ │ Digest: EtGAG9RHHCsguX4iuX1cbRDvW4QAkJXgDCMJjiufHtxB ││ │ Modules: greeting ││ └── │╰──────────────────────────────────────────────────────────────────────────────────────────────────╯╭───────────────────────────────────────────────────────────────────────────────────────────────────╮│ Balance Changes │├───────────────────────────────────────────────────────────────────────────────────────────────────┤│ ┌── ││ │ Owner: Account Address ( 0x9ac241b2b3cb87ecd2a58724d4d182b5cd897ad307df62be2ae84beddc9d9803 ) ││ │ CoinType: 0x2::sui::SUI ││ │ Amount: -7865080 ││ └── │╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ When you publish a Move package to the network, the network uploads and stores the bytecode as a Move package with a unique package ID and version number. The network consumes SUI tokens as gas and processes the transaction on-chain. After successfully executing, the output provides details about the transaction used to publish the package, including the gas cost, transaction digest, dependencies, owner, and sender. For this guide, the most important section is **Published Objects**, which includes the package's ID, version, and its modules: │ Published Objects: ││ ┌── ││ │ PackageID: 0xa7ed855d30500c485a94c0849f70b508d6b6adf6b0767ab93cc0756c075ecbb1 ││ │ Version: 1 ││ │ Digest: EtGAG9RHHCsguX4iuX1cbRDvW4QAkJXgDCMJjiufHtxB ││ │ Modules: greeting ││ └── Both the package ID and module are required to interact with the package from the command line. Take note of both values for future use in the [Connecting a Frontend](https://docs.sui.io/guides/developer/getting-started/app-frontends) guide. Interact with the Move package[​](https://docs.sui.io/guides/developer/getting-started/hello-world#interact-with-the-move-package "Direct link to interact-with-the-move-package") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Interact with the newly published package by first making a call to the `new` function that creates a new `Greeting` object and initialize it with the text `"Hello world!"`: $ sui client call --package --module greeting --function new Replace `` with the package ID the output of the `sui client publish` command returned. You must include the `--package`, `--module`, and `--function` flags. The output of this call includes a newly created object: ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮│ Transaction Effects │├───────────────────────────────────────────────────────────────────────────────────────────────────┤│ Digest: 6xB9Foy5vyhXG99xppaCxrNvpPTV3UZsH39zqUKNoGsD ││ Status: Success ││ Executed Epoch: 875 ││ ││ Created Objects: ││ ┌── ││ │ ID: 0x2834aa3d2ed1b5060f4e5d400092544fa9c95430fd894b139b7dfb0312501594 ││ │ Owner: Shared( 591332927 ) ││ │ Version: 591332927 ││ │ Digest: 8xJRijHHp3gNXLExTG98KX5jYAQDVKqsBD8ATFMJXCbA ││ └── ... To verify that the object contains the text `"Hello world!"`, make a call to query the object's information: $ sui client object Replace `` with the value under `Created Objects, ID:`. You should see the object's details, including a value of `text: Hello world!`: ╭───────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ objectId │ 0x2834aa3d2ed1b5060f4e5d400092544fa9c95430fd894b139b7dfb0312501594 ││ version │ 591332927 ││ digest │ 8xJRijHHp3gNXLExTG98KX5jYAQDVKqsBD8ATFMJXCbA ││ objType │ 0xa7ed855d30500c485a94c0849f70b508d6b6adf6b0767ab93cc0756c075ecbb1::greeting::Greeting ││ owner │ ╭────────┬──────────────────────────────────────────╮ ││ │ │ Shared │ ╭────────────────────────┬─────────────╮ │ ││ │ │ │ │ initial_shared_version │ 591332927 │ │ ││ │ │ │ ╰────────────────────────┴─────────────╯ │ ││ │ ╰────────┴──────────────────────────────────────────╯ ││ prevTx │ 6xB9Foy5vyhXG99xppaCxrNvpPTV3UZsH39zqUKNoGsD ││ storageRebate │ 1413600 ││ content │ ╭───────────────────┬──────────────────────────────────────────────────────────────────────────────────────────╮ ││ │ │ dataType │ moveObject │ ││ │ │ type │ 0xa7ed855d30500c485a94c0849f70b508d6b6adf6b0767ab93cc0756c075ecbb1::greeting::Greeting │ ││ │ │ hasPublicTransfer │ false │ ││ │ │ fields │ ╭──────┬───────────────────────────────────────────────────────────────────────────────╮ │ ││ │ │ │ │ id │ ╭────┬──────────────────────────────────────────────────────────────────────╮ │ │ ││ │ │ │ │ │ │ id │ 0x2834aa3d2ed1b5060f4e5d400092544fa9c95430fd894b139b7dfb0312501594 │ │ │ ││ │ │ │ │ │ ╰────┴──────────────────────────────────────────────────────────────────────╯ │ │ ││ │ │ │ │ text │ Hello world! │ │ ││ │ │ │ ╰──────┴───────────────────────────────────────────────────────────────────────────────╯ │ ││ │ ╰───────────────────┴──────────────────────────────────────────────────────────────────────────────────────────╯ │╰───────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ### Important transaction considerations[​](https://docs.sui.io/guides/developer/getting-started/hello-world#important-transaction-considerations "Direct link to important-transaction-considerations") You cannot send 2 or more transactions simultaneously, otherwise you encounter an error such as: Failed to sign transaction by a quorum of validators because one or more of its objects is reserved for another transaction. If you receive this error, you must wait until the current epoch is over before submitting your transaction again. You can see how long is left in the current epoch using [Sui Explorer](https://suivision.xyz/) or another network explorer like [SuiScan](https://suiscan.xyz/mainnet/home) . To prevent the same object from being modified by multiple transactions at once, your address 'locks' the object to prevent conflicting modifications. If you'd like to batch multiple transaction commands together, you can use [programmable transaction blocks](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) . Transactions also have limitations regarding total size, number of objects, and number of inputs. Learn more about limitations in [Building Against Limits](https://move-book.com/guides/building-against-limits/) in The Move Book. ### Next steps Create a Full Stack App ----------------------- Connect a frontend interface to your "Hello, World!" smart contract. Access Sui Data --------------- Learn more about accessing data on Sui. Join the Community ------------------ Join the Sui developer community, try out other example projects, or read more documentation. * [What is Move?](https://docs.sui.io/guides/developer/getting-started/hello-world#what-is-move) * [Clone "Hello, World!"](https://docs.sui.io/guides/developer/getting-started/hello-world#clone-hello-world) * [View the smart contract code](https://docs.sui.io/guides/developer/getting-started/hello-world#view-the-smart-contract-code) * [Code explanation](https://docs.sui.io/guides/developer/getting-started/hello-world#code-explanation) * [Resource safety](https://docs.sui.io/guides/developer/getting-started/hello-world#resource-safety) * [Build the Move package](https://docs.sui.io/guides/developer/getting-started/hello-world#build-the-move-package) * [Publish the Move package](https://docs.sui.io/guides/developer/getting-started/hello-world#publish-the-move-package) * [Interact with the Move package](https://docs.sui.io/guides/developer/getting-started/hello-world#interact-with-the-move-package) * [Important transaction considerations](https://docs.sui.io/guides/developer/getting-started/hello-world#important-transaction-considerations) --- # Move Concepts | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/sui-move-concepts#__docusaurus_skipToContent_fallback) On this page Move is an open source language for writing safe packages to manipulate on-chain objects (sometimes referred to as _smart contracts_). Move is a platform-agnostic language to enable common libraries, tooling, and developer communities across blockchains with vastly different data and execution models. Move is adaptable to meet the needs of the blockchain the code operates on, see [Move on Sui](https://docs.sui.io/concepts/sui-move-concepts#differences) to review enhancements made to Move for optimization on the Sui blockchain. You can use Move to define, create, and manage programmable Sui objects representing assets and smart contracts. Sui's [object system](https://docs.sui.io/guides/developer/objects/object-model) is implemented by adding new functionality to Move while also imposing additional restrictions. Move on Sui contains some important differences from Move on other blockchains. Sui takes advantage of Move's security and flexibility, enhancing it with the features to vastly improve throughput, reduce delays in finality, and make Move programming more approachable. For full details, see the [Sui Smart Contracts Platform](https://docs.sui.io/assets/files/sui-6251a5c5b9d2fab6b1df0e24ba7c6322.pdf) whitepaper. tip Where the Sui documentation refers to the Move language, the content is documenting the specific Move implementation on the Sui blockchain. If relevant, the documentation expressly refers to the original use case for the Move language as Move on Diem. Key differences[​](https://docs.sui.io/concepts/sui-move-concepts#differences "Direct link to Key differences") ---------------------------------------------------------------------------------------------------------------- Key differences of Move on Sui include: * Sui uses its own [object-centric global storage](https://docs.sui.io/concepts/sui-move-concepts#global-storage) * Addresses represent [object IDs](https://docs.sui.io/concepts/sui-move-concepts#object-ids) * Sui objects have [globally unique IDs](https://docs.sui.io/concepts/sui-move-concepts#global-unique) * Sui has [module initializers (`init`)](https://docs.sui.io/concepts/sui-move-concepts#module-initializers) * Sui has unique use cases for the [`entry` keyword](https://docs.sui.io/concepts/sui-move-concepts#entry-functions) ### Object\-centric global storage[​](https://docs.sui.io/concepts/sui-move-concepts#global-storage "Direct link to global-storage") In Move on Diem, global storage is part of the programming model. Resources and modules are held in global storage, owned by an account which has an address. Transactions are free to access resources from any account in global storage when they run, using special operations such as `move_to` and `move_from`. This approach introduces a scaling issue, as it is not possible to statically determine which transactions are contending over the same resource and which are not. This is similar to the scaling issues faced by other blockchains where smart contracts typically store account information in large, internal mappings, which limit throughput. Move on Sui addresses the scaling issue by not having global storage or its related operations. When objects (in contrast to resources) and packages (sets of modules) are stored on Sui, they are each given unique identifiers. All of a transaction's inputs are explicitly specified up front using these unique identifiers to allow the network to schedule transactions with non-overlapping inputs in parallel. ### Addresses represent object IDs[​](https://docs.sui.io/concepts/sui-move-concepts#object-ids "Direct link to object-ids") In Move on Diem, there is a 16 byte `address` type used to represent account addresses in global storage. A 16 byte address is sufficient for the Move on Diem security model. Sui doesn't have global storage, so `address` is repurposed as a 32 byte identifier used for both objects and accounts. Each transaction is signed by an account (the sender) that is accessible from the transaction context, and each object stores its `address` wrapped in its `id: UID` field. See the [address section](https://move-book.com/reference/primitive-types/address.html) in The Move Book for an overview on addresses and refer to [object.move](https://docs.sui.io/references/framework/sui-framework/sui_sui/object) in the Sui framework for implementation details. ### Object with key ability, globally unique IDs[​](https://docs.sui.io/concepts/sui-move-concepts#global-unique "Direct link to global-unique") In Move on Diem, the `key` ability indicates that the type is a resource, meaning it, along with an account address, can be used as a key in global storage. On Sui, the `key` ability indicates that a struct is an object type and comes with an additional requirement that the first field of the struct has signature `id: UID` to contain the object's unique address on-chain. Sui's bytecode verifier ensures that new objects are always assigned fresh `UID`s. Identifiers are never reused. ### Module initializers[​](https://docs.sui.io/concepts/sui-move-concepts#module-initializers "Direct link to module-initializers") As described in [object-centric global storage](https://docs.sui.io/concepts/sui-move-concepts#global-storage) , you publish Move modules into Sui storage. The Sui runtime executes a special initializer function you optionally define in a module only once at the time of module publication to pre-initialize module\-specific data, for example, creating singleton objects. See the [module initializer section](https://move-book.com/programmability/module-initializer.html) in The Move Book for more information. ### Entry functions[​](https://docs.sui.io/concepts/sui-move-concepts#entry-functions "Direct link to Entry functions") The `entry` keyword has a specific use case in Move on Sui. Use `entry` when you want some functionality to be usable by anyone on chain, but not be wrapped around other Move logic. In other words, a function can be called in [programmable transaction blocks (PTBs)](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) but not in other Sui packages. For example, this is utilized when using Sui's on-chain randomness standard to prevent other smart contract engineers from creating logic to essentially front-run or back-run the randomness generation. Find more information about this in the [on-chain randomness page](https://docs.sui.io/guides/developer/on-chain-primitives/randomness-onchain#use-non-public-entry-functions) . Make your function private (don't add the `public` visibility keyword) and mark it with the `entry` keyword, as in `entry fun example_function`. In addition to this Sui-specific use case, there are other rules and restrictions for `entry` functions: * `entry` functions can only return types with the `drop` ability. * `entry` functions can only take objects as inputs if they weren't used as inputs in any non-`entry` functions in the same PTB. Related links[​](https://docs.sui.io/concepts/sui-move-concepts#related-links "Direct link to Related links") -------------------------------------------------------------------------------------------------------------- • [The Move Book](https://move-book.com/) A comprehensive guide to the Move programming language on the Sui blockchain. • [The Move Reference](https://move-book.com/reference) Language reference for Move on Sui. * [Key differences](https://docs.sui.io/concepts/sui-move-concepts#differences) * [Object-centric global storage](https://docs.sui.io/concepts/sui-move-concepts#global-storage) * [Addresses represent object IDs](https://docs.sui.io/concepts/sui-move-concepts#object-ids) * [Object with key ability, globally unique IDs](https://docs.sui.io/concepts/sui-move-concepts#global-unique) * [Module initializers](https://docs.sui.io/concepts/sui-move-concepts#module-initializers) * [Entry functions](https://docs.sui.io/concepts/sui-move-concepts#entry-functions) * [Related links](https://docs.sui.io/concepts/sui-move-concepts#related-links) --- # Cryptography | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/cryptography#__docusaurus_skipToContent_fallback) Cryptographic agility is core to Sui. The system supports multiple cryptography algorithms and primitives and can switch between them rapidly. With Sui, you can choose the right cryptography solution for your system and implement the latest algorithms as they become available. Sui defines its cryptography primitives, such as public key, signature, aggregated signature, and hash functions, under one unified type alias or enum wrapper that is shared across the entire repository. Making changes to these primitives affects all of an application's components. You can quickly update application cryptography and be assured of uniform security. Transaction Authentication -------------------------- zkLogin ------- zkLogin is a Sui primitive that enables you to send transactions from a Sui address using an OAuth credential without publicly linking the two. Passkey ------- Sui supports the passkey signature scheme that enables you to sign in to apps and sign transactions using a private key stored securely on a passkey authenticator. It uses the WebAuthn standard. --- # Sui Bridge Validator Node Configuration | Sui Documentation [Skip to main content](https://docs.sui.io/guides/operator/bridge-node-configuration#__docusaurus_skipToContent_fallback) On this page Running a bridge validator node (bridge node) requires registering your node with the bridge committee. Correct configuration of your node ensures optimal performance and valid metrics data. Follow this topic to make sure your bridge node is set up properly. * Prerequisites * [x] Install `sui` and `sui-bridge-cli`. Click to open Installation instructions To set up and run a bridge node, you need to You can install them using one of the following options: Install from tip of `main`: $ cargo install --locked --git "https://github.com/MystenLabs/sui.git" sui sui-bridge-cli Install with a commit sha: $ cargo install --locked --git "https://github.com/MystenLabs/sui.git" --rev {SHA} sui sui-bridge-cli Committee registration[​](https://docs.sui.io/guides/operator/bridge-node-configuration#committee-registration "Direct link to Committee registration") -------------------------------------------------------------------------------------------------------------------------------------------------------- To join the network you must first register with the bridge validator committee. ### Prepare for metadata[​](https://docs.sui.io/guides/operator/bridge-node-configuration#prepare-for-metadata "Direct link to Prepare for metadata") The required metadata includes two things: * `BridgeAuthorityKey`, an ECDSA key to sign messages. Because this is a hot key that is kept in memory, it’s fine to use the following tool to generate one and write it to file. * A REST API URL where the bridge node listens to and serves requests. Example: `https://bridge.example-sui-validator.io:443`. Make sure the port is correct and the URL does not contain any invalid characters, like quotes for example. To create a `BridgeAuthorityKey`, run $ sui-bridge-cli create-bridge-validator-key where `` is the location to write the key pair to. info It's highly recommended you create a new key pair in a secure environment (for example, in the same machine where your node runs) to avoid key compromise. ### Registration[​](https://docs.sui.io/guides/operator/bridge-node-configuration#registration "Direct link to Registration") After you have both authority key file and REST API URL ready, you can register them by using Sui CLI: $ sui validator register-bridge-committee --bridge-authority-key-path --bridge-authority-url #### Offline signing[​](https://docs.sui.io/guides/operator/bridge-node-configuration#offline-signing "Direct link to Offline signing") If you keep your validator account key in cold storage or you want to perform offline signing, use flags `--print-only` and `--validator-address` (with the value for the validator address). This prints serialized unsigned transaction bytes, then you can use your preferred signing process to produce signed bytes. Run the following command to execute it: $ sui client execute-signed-tx #### Update metadata (before committee is finalized)[​](https://docs.sui.io/guides/operator/bridge-node-configuration#update-metadata-before-committee-is-finalized "Direct link to Update metadata (before committee is finalized)") Both key and URL are changeable **before the committee is finalized**. If you wish to update metadata, simply rerun `sui validator register-bridge-committee`. #### View registered metadata[​](https://docs.sui.io/guides/operator/bridge-node-configuration#view-registered-metadata "Direct link to View registered metadata") To double check you registered the correct metadata on chain, run $ sui-bridge-cli view-bridge-registration --sui-rpc-url {SUI-FULLNODE-URL} Update metadata (after committee is finalized)[​](https://docs.sui.io/guides/operator/bridge-node-configuration#update-metadata-after-committee-is-finalized "Direct link to Update metadata (after committee is finalized)") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Use the following command to update bridge node URL: $ sui validator update-bridge-committee-node-url Refer to [offline signing section](https://docs.sui.io/guides/operator/bridge-node-configuration#offline-signing) in this page for how to sign the transaction offline. Authority key rotation is not supported yet. Bridge node[​](https://docs.sui.io/guides/operator/bridge-node-configuration#bridge-node "Direct link to Bridge node") ----------------------------------------------------------------------------------------------------------------------- You have several options when configuring your bridge node for performance and metrics monitoring. Follow the instructions that follow to configure your node for best results in your environment. ### Bridge node hardware requirements[​](https://docs.sui.io/guides/operator/bridge-node-configuration#bridge-node-hardware-requirements "Direct link to Bridge node hardware requirements") Suggested hardware requirements: * CPU: 6 physical cores * Memory: 16GB * Storage: 200GB * Network: 100Mbps ### Web application firewall (WAF) protection for bridge node[​](https://docs.sui.io/guides/operator/bridge-node-configuration#web-application-firewall-waf-protection-for-bridge-node "Direct link to Web application firewall (WAF) protection for bridge node") To protect against distributed denial of service (DDoS) attacks and similar attacks intended to expend validator resources, you must provide rate limit protection for the bridge server. In addition to protection, this gives node operators fine-grained control over the rate of requests they receive, and observability into those requests. The currently recommended rate limit is `50 requests/second per unique IP`. #### Web application firewall (WAF) options[​](https://docs.sui.io/guides/operator/bridge-node-configuration#web-application-firewall-waf-options "Direct link to Web application firewall (WAF) options") You can use a managed cloud service, for example: * [Cloudflare WAF](https://www.cloudflare.com/en-ca/application-services/products/waf/) * [AWS WAF](https://aws.amazon.com/waf/) * [GCP Cloud Armor](https://cloud.google.com/security/products/armor) It's also possible to use an open source load balancer, such as [HAProxy](https://www.haproxy.org/) for a practical, IP-based rate limit. A shortened example HAProxy configuration looks like the following: frontend http-in bind *:80 # Define an ACL to count requests per IP and block if over limit acl too_many_requests src_http_req_rate() gt 50 # Track the request rate per IP stick-table type ip size 1m expire 1m store http_req_rate(1s) # Check request rate and deny if the limit is exceeded http-request track-sc0 src http-request deny if too_many_requests default_backend bridgevalidatorbackend bridgevalidator # Note the port needs to match the value in bridge node config, default is 9191 server bridgevalidator 0.0.0.0:9191 If choosing to use an open source load balancing option, make sure to set up metrics collection and alerting on the service. ### Bridge node config[​](https://docs.sui.io/guides/operator/bridge-node-configuration#bridge-node-config "Direct link to Bridge node config") Use `sui-bridge-cli` command to create a template. If you want to run `BridgeClient` (see the following section), pass `--run-client` as a parameter. $ sui-bridge-cli create-bridge-node-config-template {PATH}$ sui-bridge-cli create-bridge-node-config-template --run-client {PATH} The generated configuration includes the following parameters: | Parameter | Description | | --- | --- | | `server-listen-port` | The port that bridge node listens to for handling requests. | | `metrics-port` | Port to export Prometheus metrics. | | `bridge-authority-key-path` | The path to the Bridge Validator key, generated from `sui-bridge-cli create-bridge-validator-key` command referenced previously. | | `run-client` | Whether Bridge Client should be enabled in bridge node (more instructions follow). | | `approved-governance-actions` | A list of governance actions that you want to support. | | `sui:sui-rpc-url` | Sui RPC URL. | | `sui:sui-bridge-chain-id` | `0` for Sui Mainnet, `1` for Sui Testnet. | | `eth:eth-rpc-url` | Ethereum RPC URL. | | `eth:eth-bridge-proxy-address` | The proxy address for Bridge Solidity contracts on Ethereum. | | `eth:eth-bridge-chain-id` | `10` for Ethereum Mainnet, `11` for Sepolia Testnet. | | `eth:eth-contracts-start-block-fallback` | The starting block BridgeNodes queries for from Ethereum FullNode. This number should be the block where Solidity contracts are deployed or slightly before. | | `metrics:push-url` | The url of the remote Sui metrics pipeline (for example, `https://metrics-proxy.[testnet_OR_mainnet].sui.io:8443/publish/metrics`). See the [metrics push section](https://docs.sui.io/guides/operator/bridge-node-configuration#metrics-push)
that follows for more details. | With `run-client: true`, you can find these additional fields in the generated config: | Parameter | Description | | --- | --- | | `db-path` | Path of BridgeClient database, for BridgeClient. | | `sui:bridge-client-key-path` | The file path of Bridge Client key. This key can be generated with `sui-bridge-cli create-bridge-client-key` as previously shown. When `run-client` is true but you do not provide `sui:bridge-client-key-path`, it defaults to use the Bridge Validator key to submit transactions on Sui. This is not recommended for the sake of key separation. | ### BridgeClient[​](https://docs.sui.io/guides/operator/bridge-node-configuration#bridgeclient "Direct link to BridgeClient") `BridgeClient` orchestrates bridge transfer requests. It is **optional** to run for a `BridgeNode`. `BridgeClient` submits transaction on the Sui network. Thus when it's enabled, you need a Sui account key with enough SUI balance. To enable `bridge_client` feature on a `BridgeNode`, set the following parameters in `BridgeNodeConfig`: run-client: truedb-path: sui: bridge-client-key-path: To create a `BridgeClient` key pair, run $ sui-bridge-cli create-bridge-client-key This prints the newly created Sui Address. Then we need to fund this address with some SUI for operations. ### Build bridge node[​](https://docs.sui.io/guides/operator/bridge-node-configuration#build-bridge-node "Direct link to Build bridge node") Build or install bridge node in one of the following ways: * Use `cargo install`. $ cargo install --locked --git "https://github.com/MystenLabs/sui.git" --branch {BRANCH-NAME} sui-bridge Or $ cargo install --locked --git "https://github.com/MystenLabs/sui.git" --rev {SHA-NAME} sui-bridge * Compile from source code $ git clone https://github.com/MystenLabs/sui.git $ cd sui $ git fetch origin {BRANCH-NAME|SHA} $ git checkout {BRANCH-NAME|SHA} $ cargo build --release --bin sui-bridge * Use `curl`/`wget` pre-built binaries (for Linux/AMD64 only). $ curl https://sui-releases.s3.us-east-1.amazonaws.com/{SHA}/sui-bridge -o sui-bridge * Use pre-built Docker image. Pull from Docker Hub: `mysten/sui-tools:{SHA}` ### Run bridge node[​](https://docs.sui.io/guides/operator/bridge-node-configuration#run-bridge-node "Direct link to Run bridge node") Running bridge node is similar to running a Sui node using systemd or Ansible. The command to start the bridge node is: $ RUST_LOG=info,sui_bridge=debug sui-bridge --config-path {BRIDGE-NODE-CONFIG-PATH} ### Ingress[​](https://docs.sui.io/guides/operator/bridge-node-configuration#ingress "Direct link to Ingress") Bridge node listens for TCP connections over port `9191` (or the preferred port in the configuration file). You must allow incoming connections for that port on the host that is running bridge node. Test ingress with `curl` on a remote machine and expect a `200` response: $ curl -v {YOUR_BRIDGE_URL} ### Bridge node monitoring[​](https://docs.sui.io/guides/operator/bridge-node-configuration#bridge-node-monitoring "Direct link to Bridge node monitoring") Use `uptime` to check if the node is running. You can find a full list of bridge node metrics and their descriptions in the [`sui-bridge` crate](https://github.com/MystenLabs/sui/blob/main/crates/sui-bridge/src/metrics.rs) . #### When `run-client: false`[​](https://docs.sui.io/guides/operator/bridge-node-configuration#when-run-client-false "Direct link to when-run-client-false") In this case bridge node runs as a passive observer and does not proactively poll on-chain activities. Important metrics to monitor in this case are the request handling metrics, such as: * `bridge_requests_received` * `bridge_requests_ok` * `bridge_err_requests` * `bridge_requests_inflight` * `bridge_eth_rpc_queries` * `bridge_eth_rpc_queries_latency` * `bridge_signer_with_cache_hit` * `bridge_signer_with_cache_miss` * `bridge_sui_rpc_errors` #### When `run-client: true`[​](https://docs.sui.io/guides/operator/bridge-node-configuration#when-run-client-true "Direct link to when-run-client-true") In this case, Bridge Client is toggled on and syncs with blockchains proactively. The best metrics to track progress are: * `bridge_last_synced_sui_checkpoints` * `bridge_last_synced_eth_blocks` * `bridge_last_finalized_eth_block` * `bridge_sui_watcher_received_events` * `bridge_eth_watcher_received_events` * `bridge_sui_watcher_received_actions` * `bridge_eth_watcher_received_actions` `bridge_gas_coin_balance` is also a critical metric to track the balance of your client gas coin, and top up after it dips below a certain threshold. ### Metrics push[​](https://docs.sui.io/guides/operator/bridge-node-configuration#metrics-push "Direct link to Metrics push") The Bridge Nodes can push metrics to the remote proxy for network-level observability. To enable metrics push, set the following parameters in `BridgeNodeConfig`: metrics: push-url: https://metrics-proxy.[testnet|mainnet].sui.io:8443/publish/metrics The proxy authenticates pushed metrics by using the metrics key pair. It is similar to `sui-node` pushing metrics with `NetworkKey`. Unlike `NetworkKey`, the bridge node metrics key is not recorded on chain and can be ephemeral. The metrics key is loaded from the `metrics-key-pair` field in `BridgeNodeConfig` if provided, otherwise a new key pair is generated on the fly. The proxy queries node public keys periodically by hitting the metrics public API key of each node. When bridge node starts, it might log this line once: unable to push metrics: error sending request for url (xyz); new client will be created This is okay to ignore as long as it does not persist. Otherwise, try: $ curl -i {your-bridge-node-url-on-chain}/metrics_pub_key and make sure the public key is correctly returned. * [Committee registration](https://docs.sui.io/guides/operator/bridge-node-configuration#committee-registration) * [Prepare for metadata](https://docs.sui.io/guides/operator/bridge-node-configuration#prepare-for-metadata) * [Registration](https://docs.sui.io/guides/operator/bridge-node-configuration#registration) * [Update metadata (after committee is finalized)](https://docs.sui.io/guides/operator/bridge-node-configuration#update-metadata-after-committee-is-finalized) * [Bridge node](https://docs.sui.io/guides/operator/bridge-node-configuration#bridge-node) * [Bridge node hardware requirements](https://docs.sui.io/guides/operator/bridge-node-configuration#bridge-node-hardware-requirements) * [Web application firewall (WAF) protection for bridge node](https://docs.sui.io/guides/operator/bridge-node-configuration#web-application-firewall-waf-protection-for-bridge-node) * [Bridge node config](https://docs.sui.io/guides/operator/bridge-node-configuration#bridge-node-config) * [BridgeClient](https://docs.sui.io/guides/operator/bridge-node-configuration#bridgeclient) * [Build bridge node](https://docs.sui.io/guides/operator/bridge-node-configuration#build-bridge-node) * [Run bridge node](https://docs.sui.io/guides/operator/bridge-node-configuration#run-bridge-node) * [Ingress](https://docs.sui.io/guides/operator/bridge-node-configuration#ingress) * [Bridge node monitoring](https://docs.sui.io/guides/operator/bridge-node-configuration#bridge-node-monitoring) * [Metrics push](https://docs.sui.io/guides/operator/bridge-node-configuration#metrics-push) --- # Sui Full Node Configuration | Sui Documentation [Skip to main content](https://docs.sui.io/guides/operator/sui-full-node#__docusaurus_skipToContent_fallback) On this page info These instructions are for advanced users. If you just need a local development environment, you should instead follow the instructions in [Create a Local Sui Network](https://docs.sui.io/guides/developer/getting-started/local-network) to create a local full node, validators, and faucet. Sui full nodes validate blockchain activities, including transactions, checkpoints, and epoch changes. Each full node stores and services the queries for the blockchain state and history. This role enables validators to focus on servicing and processing transactions. When a validator commits a new set of transactions (or a block of transactions), the validator pushes that block to all connected full nodes that then service the queries from clients. Features[​](https://docs.sui.io/guides/operator/sui-full-node#features "Direct link to Features") -------------------------------------------------------------------------------------------------- Sui full nodes: * Track and verify the state of the blockchain, independently and locally. * Serve read requests from clients. State synchronization[​](https://docs.sui.io/guides/operator/sui-full-node#state-synchronization "Direct link to State synchronization") ----------------------------------------------------------------------------------------------------------------------------------------- Sui full nodes sync with validators to receive new transactions on the network. A transaction requires a few round trips to 2f+1 validators to form a transaction certificate (TxCert). This synchronization process includes: 1. Following 2f+1 validators and listening for newly committed transactions. 2. Making sure that 2f+1 validators recognize the transaction and that it reaches finality. 3. Executing the transaction locally and updating the local DB. This synchronization process requires listening to at a minimum `2f+1` validators to ensure that a full node has properly processed all new transactions. Sui will improve the synchronization process with the introduction of checkpoints and the ability to synchronize with other full nodes. Architecture[​](https://docs.sui.io/guides/operator/sui-full-node#architecture "Direct link to Architecture") -------------------------------------------------------------------------------------------------------------- A Sui full node is essentially a read-only view of the network state. Unlike validator nodes, full nodes cannot sign transactions, although they can validate the integrity of the chain by re-executing transactions that a quorum of validators previously committed. Today, a Sui full node has the potential to maintain the full history of the chain. That will change with gRPC and as JSON-RPC gets phased out. Validator nodes store only the latest transactions on the frontier of the object graph (for example, transactions with >0 unspent output objects). Full node setup[​](https://docs.sui.io/guides/operator/sui-full-node#full-node-setup "Direct link to full-node-setup") ----------------------------------------------------------------------------------------------------------------------- Follow the instructions here to run your own Sui full node. Sui full nodes run using the `sui-node` binary. ### Hardware requirements[​](https://docs.sui.io/guides/operator/sui-full-node#hardware-requirements "Direct link to Hardware requirements") Suggested minimum hardware to run a Sui full node: * CPUs: 8 physical cores / 16 vCPUs * RAM: 128 GB * Storage (SSD): 4 TB NVMe drive ### Software requirements[​](https://docs.sui.io/guides/operator/sui-full-node#software-requirements "Direct link to Software requirements") Sui recommends running Sui full nodes on Linux. Sui supports the Ubuntu and Debian distributions. You can run a Sui full node on macOS, but this is only recommended for development and not for production use. Make sure to [update Rust](https://doc.rust-lang.org/book/ch01-01-installation.html#updating-and-uninstalling) . Use the following command to install additional Linux dependencies. $ sudo apt-get update \&& sudo apt-get install -y --no-install-recommends \tzdata \libprotobuf-dev \ca-certificates \build-essential \libssl-dev \libclang-dev \libpq-dev \pkg-config \openssl \protobuf-compiler \git \clang \cmake ### Considerations to enable gRPC[​](https://docs.sui.io/guides/operator/sui-full-node#considerations-to-enable-grpc "Direct link to considerations-to-enable-grpc") You must enable gRPC support on your full nodes. JSON-RPC is **deprecated**. Refer to [Sui's data serving roadmap](https://docs.sui.io/concepts/data-access/data-serving#grpc-api) for guidance on the overall transition plan. To serve the [gRPC API](https://docs.sui.io/concepts/data-access/grpc) , you must enable it on your full node by indexing gRPC\-specific data. During the initial gRPC indexing phase, your full node may not be able to handle other traffic, including the [**deprecated** JSON-RPC](https://docs.sui.io/references/sui-api) requests. Plan your rollout carefully (such as using the `rolling upgrade` mechanism), and communicate any downtime to your customers and partners in advance. The time required to sync gRPC indexes depends on your full node's hardware and software configuration. Enable gRPC indexing on your full node by adding the following entry to the `fullnode.yaml` configuration: rpc: enable-indexing: true Running gRPC alongside JSON-RPC increases your full node’s storage usage. You can reclaim this storage by disabling JSON-RPC after all your client applications have migrated from JSON-RPC. All applications must gradually migrate to gRPC or [GraphQL RPC](https://docs.sui.io/concepts/data-access/graphql-indexer) . You can also run gRPC and JSON-RPC on separate nodes to optimize resource usage and provide a performant and resilient RPC experience to client applications. Add the following to the `fullnode.yaml` configuration of your full node to selectively disable JSON-RPC on it: enable-index-processing: false You can configure the retention window for the gRPC index on your full node by adding the following to its `fullnode.yaml` configuration: authority-store-pruning-config: num-epochs-to-retain: 14 num-epochs-to-retain-for-checkpoints: 14 Adjust the gRPC data retention period based on your full node’s resource profile and whether you've disabled JSON-RPC or not. In any case, test the longer retention period for performance and scalability before using gRPC in your application or offering it to other developers. Running a full node[​](https://docs.sui.io/guides/operator/sui-full-node#running-a-full-node "Direct link to running-a-full-node") ----------------------------------------------------------------------------------------------------------------------------------- Instructions for building, installing, or downloading the `sui-node` binary are available in the [Install from Binaries](https://docs.sui.io/guides/developer/getting-started/install-binaries) guide. These install instructions are specific to the `sui` CLI, but apply to the `sui-node` binary as well. There are many ways to run a Sui full node (bare metal, virtual machine, Kubernetes StatefulSet, and so on), and the solution that you choose depends on your specific needs as well as the infrastructure that you have available. There are some specific considerations to keep in mind when running a Sui full node that apply to all environments: * [Genesis](https://docs.sui.io/guides/operator/genesis) : You must download the genesis blob for the network that you want to connect to, and make it available to the `sui-node`. * [Data Storage](https://docs.sui.io/guides/operator/data-management) : Sui full nodes _can_ require a significant amount of disk space to store the blockchain history. If you plan to use your full node to serve RPC requests, you must also plan for the storage of index files, which requires a significant amount of disk space. * [Monitoring](https://docs.sui.io/guides/operator/monitoring) : Sui full nodes expose metrics about the node's health and the state of the Sui network. * [Updates](https://docs.sui.io/guides/operator/updates) : Sui full nodes must be updated to the latest version to remain in sync with the network. * [Archival Fallback](https://docs.sui.io/guides/operator/archives) : The archival fallback allows you to sync checkpoints from any point in the chain's history. The network `seed-peers` below only keep a few epochs of history. ### Using Docker Compose[​](https://docs.sui.io/guides/operator/sui-full-node#using-docker-compose "Direct link to Using Docker Compose") There's a guide in the Sui repository on running a full node via [Docker Compose](https://github.com/MystenLabs/sui/tree/main/docker/fullnode#readme) . This alone is not suitable for a production environment, but can be used to get a full node up and running quickly on a virtual machine or local machine for development purposes. Refer to [Running a full node](https://docs.sui.io/guides/operator/sui-full-node#running-a-full-node) for instructions relevant to production use cases. ### Setting up a full node[​](https://docs.sui.io/guides/operator/sui-full-node#setting-up-a-full-node "Direct link to setting-up-a-full-node") When you are ready to run `sui-node` in your production environment, you can set up your full node by completing the following steps: 1. Make a copy of the [full node YAML template](https://github.com/MystenLabs/sui/blob/main/crates/sui-config/data/fullnode-template.yaml) : $ cp crates/sui-config/data/fullnode-template.yaml fullnode.yaml 2. Download the genesis blob for the network to use: * [Devnet genesis blob](https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob) : $ curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob * [Testnet genesis blob](https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob) : $ curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob * [Mainnet genesis blob](https://github.com/MystenLabs/sui-genesis/raw/main/mainnet/genesis.blob) : $ curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/mainnet/genesis.blob 3. For Testnet or Mainnet: Edit the `fullnode.yaml` file to include peer nodes for state synchronization. Append the following to the end of the current configuration: * Mainnet * Testnet p2p-config: seed-peers: - address: /dns/mel-00.mainnet.sui.io/udp/8084 peer-id: d32b55bdf1737ec415df8c88b3bf91e194b59ee3127e3f38ea46fd88ba2e7849 - address: /dns/ewr-00.mainnet.sui.io/udp/8084 peer-id: c7bf6cb93ca8fdda655c47ebb85ace28e6931464564332bf63e27e90199c50ee - address: /dns/ewr-01.mainnet.sui.io/udp/8084 peer-id: 3227f8a05f0faa1a197c075d31135a366a1c6f3d4872cb8af66c14dea3e0eb66 - address: /dns/lhr-00.mainnet.sui.io/udp/8084 peer-id: c619a5e0f8f36eac45118c1f8bda28f0f508e2839042781f1d4a9818043f732c - address: /dns/sui-mainnet-ssfn-1.nodeinfra.com/udp/8084 peer-id: 0c52ca8d2b9f51be4a50eb44ace863c05aadc940a7bd15d4d3f498deb81d7fc6 - address: /dns/sui-mainnet-ssfn-2.nodeinfra.com/udp/8084 peer-id: 1dbc28c105aa7eb9d1d3ac07ae663ea638d91f2b99c076a52bbded296bd3ed5c - address: /dns/sui-mainnet-ssfn-ashburn-na.overclock.run/udp/8084 peer-id: 5ff8461ab527a8f241767b268c7aaf24d0312c7b923913dd3c11ee67ef181e45 - address: /dns/sui-mainnet-ssfn-dallas-na.overclock.run/udp/8084 peer-id: e1a4f40d66f1c89559a195352ba9ff84aec28abab1d3aa1c491901a252acefa6 - address: /dns/ssn01.mainnet.sui.rpcpool.com/udp/8084 peer-id: fadb7ccb0b7fc99223419176e707f5122fef4ea686eb8e80d1778588bf5a0bcd - address: /dns/ssn02.mainnet.sui.rpcpool.com/udp/8084 peer-id: 13783584a90025b87d4604f1991252221e5fd88cab40001642f4b00111ae9b7e p2p-config: seed-peers: - address: /dns/yto-tnt-ssfn-01.testnet.sui.io/udp/8084 peer-id: 2ed53564d5581ded9b6773970ac2f1c84d39f9edf01308ff5a1ffe09b1add7b3 - address: /dns/yto-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: 6563732e5ab33b4ae09c73a98fd37499b71b8f03c27b5cc51acc26934974aff2 - address: /dns/nrt-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: 23a1f7cd901b6277cbedaa986b3fc183f171d800cabba863d48f698f518967e1 - address: /dns/ewr-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: df8a8d128051c249e224f95fcc463f518a0ebed8986bbdcc11ed751181fecd38 - address: /dns/lax-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: f9a72a0a6c17eed09c27898eab389add704777c03e135846da2428f516a0c11d - address: /dns/lhr-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: 9393d6056bb9c9d8475a3cf3525c747257f17c6a698a7062cbbd1875bc6ef71e - address: /dns/mel-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: c88742f46e66a11cb8c84aca488065661401ef66f726cb9afeb8a5786d83456e 4. Optional: Set up the [Archival Fallback](https://docs.sui.io/guides/operator/archives) , which allows you to sync checkpoints if you fall behind the network's `seed-peers`. 5. Optional: Skip this step to accept the default paths to resources. Edit the `fullnode.yaml` file to use custom paths. 6. Update the `db-path` field with the path to the full node database. `db-path: "/db-files/sui-fullnode"` 7. Update the `genesis-file-location` with the path to genesis.blob. genesis: genesis-file-location: "/sui-fullnode/genesis.blob" ### Starting your full node[​](https://docs.sui.io/guides/operator/sui-full-node#starting-a-full-node "Direct link to starting-a-full-node") You should not start syncing your full node from the start of the genesis. This will take a very long time and consume a lot of resources (including likely filling up your disk). Instead, start your full node from a recent snapshot. You can find details on how to obtain a snapshot from the [Sui Snapshots guide](https://docs.sui.io/guides/operator/snapshots) . Now that you have your full node config file set up, and you've obtained a snapshot, you can start your full node by running the `sui-node` binary with your `fullnode.yaml` configuration file: $ sui-node --config-path fullnode.yaml It's a good idea to use something like systemd to manage your full node in a production environment. ### Troubleshooting[​](https://docs.sui.io/guides/operator/sui-full-node#troubleshooting "Direct link to Troubleshooting") If you receive a `cannot find -lpq` error, you are missing the `libpq` library. Use `sudo apt-get install libpq-dev` to install on Linux, or `brew install libpq` on MacOS. After you install on MacOS, create a Homebrew link using `brew link --force libpq`. For further context, reference the [issue on Stack Overflow](https://stackoverflow.com/questions/70313347/ld-library-not-found-for-lpq-when-build-rust-in-macos?rq=1) . If you receive the following error: panicked at error binding to 0.0.0.0:9184: error creating server listener: Address already in use (os error 98) Then update the metrics address in your `fullnode.yaml` file to use port `9180`. metrics-address: "0.0.0.0:9180" * [Features](https://docs.sui.io/guides/operator/sui-full-node#features) * [State synchronization](https://docs.sui.io/guides/operator/sui-full-node#state-synchronization) * [Architecture](https://docs.sui.io/guides/operator/sui-full-node#architecture) * [Full node setup](https://docs.sui.io/guides/operator/sui-full-node#full-node-setup) * [Hardware requirements](https://docs.sui.io/guides/operator/sui-full-node#hardware-requirements) * [Software requirements](https://docs.sui.io/guides/operator/sui-full-node#software-requirements) * [Considerations to enable gRPC](https://docs.sui.io/guides/operator/sui-full-node#considerations-to-enable-grpc) * [Running a full node](https://docs.sui.io/guides/operator/sui-full-node#running-a-full-node) * [Using Docker Compose](https://docs.sui.io/guides/operator/sui-full-node#using-docker-compose) * [Setting up a full node](https://docs.sui.io/guides/operator/sui-full-node#setting-up-a-full-node) * [Starting your full node](https://docs.sui.io/guides/operator/sui-full-node#starting-a-full-node) * [Troubleshooting](https://docs.sui.io/guides/operator/sui-full-node#troubleshooting) --- # Sui RPC | Sui Documentation [Skip to main content](https://docs.sui.io/references/sui-api#__docusaurus_skipToContent_fallback) On this page info **JSON-RPC is deprecated**. Migrate to either [gRPC](https://docs.sui.io/concepts/data-access/grpc) or [GraphQL RPC](https://docs.sui.io/concepts/data-access/graphql-indexer) by April 2026. Refer to the [list of RPC or data providers](https://www.notion.so/mystenlabs/RPC-providers-offering-future-Sui-data-primitives-2466d9dcb4e980a99a36e9aafd8c17e0?source=copy_link) that have enabled gRPC on their full nodes or offer GraphQL RPC. Contact a provider directly to request access. If your RPC or data provider doesn’t yet support these data access methods, ask them to enable support or contact the Sui Foundation team on Discord, Telegram, or Slack for help. info Refer to [Access Sui Data](https://docs.sui.io/concepts/data-access/data-serving) for an overview of options to access Sui network data. The GraphQL RPC release stage is currently in beta. Refer to the high-level timeline for releases. _SuiJSON_ is a JSON-based format with restrictions that allow Sui to align JSON inputs more closely with Move call arguments. This table shows the restrictions placed on JSON types to make them SuiJSON compatible: | JSON | SuiJSON restrictions | Move type mapping | | --- | --- | --- | | Number | Must be unsigned integer | u8, u6, u32, u64 (encoded as String), u128 (encoded as String), u256 (encoded as String) | | String | No restrictions | Vector``, Address, ObjectID, TypeTag, Identifier, Unsigned integer (256 bit max) | | Boolean | No restrictions | Bool | | Array | Must be homogeneous JSON and of SuiJSON type | Vector | | Null | Not allowed | N/A | | Object | Not allowed | N/A | Type coercion reasoning[​](https://docs.sui.io/references/sui-api#type-coercion-reasoning "Direct link to Type coercion reasoning") ------------------------------------------------------------------------------------------------------------------------------------ Due to the loosely typed nature of JSON/SuiJSON and the strongly typed nature of Move types, you sometimes need to overload SuiJSON types to represent multiple Move types. For example `SuiJSON::Number` can represent both _u8_ and _u32_. This means you have to coerce and sometimes convert types. Which type you coerce depends on the expected Move type. For example, if the Move function expects a u8, you must have received a `SuiJSON::Number` with a value less than 256. More importantly, you have no way to easily express Move addresses in JSON, so you encode them as hex strings prefixed by `0x`. Additionally, Move supports u128 and u256 but JSON doesn't. As a result Sui allows encoding numbers as strings. Type coercion rules[​](https://docs.sui.io/references/sui-api#type-coercion-rules "Direct link to Type coercion rules") ------------------------------------------------------------------------------------------------------------------------ | Move Type | SuiJSON Representations | Valid Examples | Invalid examples | | --- | --- | --- | --- | | Bool | Bool | true, false | | | u8 | Supports 3 formats: Unsigned number < 256. Decimal string with value < 256. One byte hex string prefixed with 0x. | 7 "70" "0x43" | \-5: negative not allowed 3.9: float not allowed NaN: not allowed 300: U8 must be less than 256 " 9": Spaces not allowed in string "9A": Hex num must be prefixed with 0x "0x09CD": Too large for U8 | | u16 | Three formats are supported Unsigned number < 65536. Decimal string with value < 65536. Two byte hex string prefixed with 0x. | 712 "570" "0x423" | \-5: negative not allowed 3.9: float not allowed NaN: not allowed 98342300: U16 must be less than 65536 " 19": Spaces not allowed in string "9EA": Hex num must be prefixed with 0x "0x049C1D": Too large for U16 | | u32 | Three formats are supported Unsigned number < 4294967296. Decimal string with value < 4294967296. One byte hex string prefixed with 0x. | 9823247 "987120" "0x4BADE93" | \-5: negative not allowed 3.9: float not allowed NaN: not allowed 123456789123456: U32 must be less than 4294967296 " 9": Spaces not allowed in string "9A": Hex num must be prefixed with 0x "0x3FF1FF9FFDEFF": Too large for U32 | | u64 | Supports two formats Decimal string with value < U64::MAX. Up to 8 byte hex string prefixed with 0x. | "747944370" "0x2B1A39A15E" | 123434: Although this is a valid U64 number, it must be encoded as a string | | u128 | Two formats are supported Decimal string with value < U128::MAX. Up to 16 byte hex string prefixed with 0x. | "74794734937420002470" "0x2B1A39A1514E1D8A7CE" | 34: Although this is a valid U128 number, it must be encoded as a string | | u256 | Two formats are supported Decimal string with value < U256::MAX. Up to 32 byte hex string prefixed with 0x. | "747947349374200024707479473493742000247" "0x2B1762FECADA39753FCAB2A1514E1D8A7CE" | 123434: Although this is a valid U256 number, it must be encoded as a string 0xbc33e6e4818f9f2ef77d020b35c24be738213e64d9e58839ee7b4222029610de | | Address | 32 byte hex string prefixed with 0x | "0xbc33e6e4818f9f2ef77d020b35c24be738213e64d9e58839ee7b4222029610de" | 0xbc33: string too short bc33e6e4818f9f2ef77d020b35c24be738213e64d9e58839ee7b4222029610de: missing 0x prefix 0xG2B1A39A1514E1D8A7CE45919CFEB4FEE70B4E01: invalid hex char G | | ObjectID | 32 byte hex string prefixed with 0x | "0x1b879f00b03357c95a908b7fb568712f5be862c5cb0a5894f62d06e9098de6dc" | Similar to above | | Identifier | Typically used for module and function names. Encoded as one of the following: A String whose first character is a letter and the remaining characters are letters, digits or underscore. A String whose first character is an underscore, and there is at least one further letter, digit or underscore | "function", "\_function", "some\_name", "\_\_\_\_some\_name", "Another" | "\_": missing trailing underscore, digit or letter, "8name": cannot start with digit, ".function": cannot start with period, " ": cannot be empty space, "func name": cannot have spaces | | Vector`` / Option`` | Homogeneous vector of aforementioned types including nested vectors of primitive types (only "flat" vectors of ObjectIDs are allowed) | \[1,2,3,4\]: simple U8 vector \[\[3,600\],\[\],\[0,7,4\]\]: nested U32 vector \["0x2B1A39A1514E1D8A7CE45919CFEB4FEE", "0x2B1A39A1514E1D8A7CE45919CFEB4FEF"\]: ObjectID vector | \[1,2,3,false\]: not homogeneous JSON \[1,2,null,4\]: invalid elements \[1,2,"7"\]: although Sui allows encoding numbers as strings meaning this array can evaluate to \[1,2,7\], the array is still ambiguous so it fails the homogeneity check. | | Vector`` | For convenience, Sui allows: U8 vectors represented as UTF-8 (and ASCII) strings. | "√®ˆbo72 √∂†∆˚–œ∑π2ie": UTF-8 "abcdE738-2 \_=?": ASCII | | * [Type coercion reasoning](https://docs.sui.io/references/sui-api#type-coercion-reasoning) * [Type coercion rules](https://docs.sui.io/references/sui-api#type-coercion-rules) --- # Awesome Sui | Sui Documentation [Skip to main content](https://docs.sui.io/references/awesome-sui#__docusaurus_skipToContent_fallback) On this page info Visit the [Awesome Sui repo](https://github.com/sui-foundation/awesome-sui/tree/main) on GitHub for the source content of these pages. Sui is the first blockchain built for internet scale, enabling fast, scalable, and low-latency transactions. It's programmable and composable, powered by the Move language, making it easy to build and integrate dApps. Sui prioritizes developer experience and frictionless user interactions, designed to support next-gen decentralized applications with minimal complexity. > ⚠️ This warning icon means that the tool may not be functioning correctly at the moment. Please check these tools carefully. [**Submit your own developer tool here**](https://github.com/sui-foundation/awesome-sui/blob/main/CONTRIBUTING.md) Move IDEs[​](https://docs.sui.io/references/awesome-sui#move-ides "Direct link to move-ides") ---------------------------------------------------------------------------------------------- ### Web IDEs[​](https://docs.sui.io/references/awesome-sui#web-ides "Direct link to Web IDEs") #### BitsLab IDE Online Move code editor that requires no configuration and supports Move code syntax highlighting. Beginner friendly and supports interacting with Sui. * [Homepage](https://www.bitslab.xyz/bitslabide) * [IDE](https://ide.bitslab.xyz/) * [Tutorial](https://www.youtube.com/watch?v=-9-WkqQwtu8) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [x] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** BitsLab IDE is an out-of-the-box, configuration-free online development environment that supports end-to-end development of Move smart contracts. It is powerful, easy to use, user friendly, includes built-in tutorials, and supports plugin extensions. **Features** * Move * Move 2024 is supported * Compilation * Unit Testing * Deployment * Multiple `sui` binary versions to choose from * Project Management * Multiple workspaces * Persistent session * Share project snapshot link * Import from local file system * Utilities * Lightweight object explorer * Lightweight package explorer * Package function call * Example templates **Latest Version Number of Sui Tested On** * Devnet v1.31.0 * Testnet v1.32.0 * Mainnet v1.31.0 #### MoveStudio Online IDE for Sui smart contract development. * [Homepage](https://www.movestudio.dev/) * [GitHub](https://github.com/dantheman8300/move-studio) * [IDE](https://www.movestudio.dev/build) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-1 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [x] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** Online IDE for Sui smart contract development **Features** * Move * Move 2024 is supported * Compilation * Unit Testing * Deployment * Only support one default `sui` binary version * Project Management * Multiple workspaces * Persistent session * Import from local file system * Utilities * Lightweight object explorer * Lightweight package explorer * Package function call * Example templates **Latest Version Number of Sui Tested On** * `sui 1.25.0-b10ea7331e1c` #### ChainIDE Move Cloud-Powered Development Platform. * [Homepage](https://chainide.com/) * [Documentation](https://chainide.gitbook.io/chainide-english-1/ethereum-ide-1/9.-sui-ide) * [IDE](https://chainide.com/s/sui) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-2 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [x] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** ChainIDE is cloud-based IDE for creating decentralized applications to deploy on blockchains. It supports Sui smart contract development. **Features** * Move * Move 2024 is supported * Compilation * Unit Testing * Deployment * Project Management * Multiple workspaces * Persistent session * Integrated terminal * Utilities * Lightweight object explorer * Lightweight package explorer * Package function call * Example templates **Latest Version Number of Sui Tested On** #### ⚠️ WELLDONE Code Remix IDE plugin supports non-EVM smart contract development including Sui. * [Homepage](https://docs.welldonestudio.io/code) * [Documentation & Tutorial](https://docs.welldonestudio.io/code/deploy-and-run/sui) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-3 "Direct link to Further Information") > \[!WARNING\] The tool is currently not working. **Tooling Category** * [ ] dApp Development * [ ] Explorer * [x] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** WELLDONE Code is a Remix IDE Plugin. Using WELLDONE Code, developers can easily develop and test smart contracts in Remix IDE for non-EVM networks such as NEAR and Cosmos, in addition to EVM-compatible networks. Sui is also supported. **Features** * Move * ❌ Move 2024 not supported * Compilation * Unit Testing * Deployment * Project Management * Multiple workspaces * Persistent session * Utilities * Lightweight object explorer * Lightweight package explorer * Package function call * Example templates **Latest Version Number of Sui Tested On** ⚠️ N/A ### Desktop IDEs[​](https://docs.sui.io/references/awesome-sui#desktop-ides "Direct link to Desktop IDEs") #### VSCode Move by Mysten Labs VSCode Extension supports Move on Sui development with LSP features through Move Analyzer developed by Mysten Labs. * [GitHub](https://github.com/MystenLabs/sui/tree/main/external-crates/move/crates/move-analyzer) * [Documentation & Tutorial](https://marketplace.visualstudio.com/items?itemName=mysten.move) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-4 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [x] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** * VSCode Extension for Move on Sui smart contract development powered by LSP Move Analyzer language server developed by Mysten Labs. **Features** * Autocomplete * On-hover support * Real-time diagnostics * Go to definition * Inlay hints * Go/Find references * Move * Move 2024 is supported * Move 2024 syntax highlight ([VSCode Move Syntax](https://marketplace.visualstudio.com/items?itemName=damirka.move-syntax) ) * Utilities * Integration with `sui` binary (Sui CLI) **Latest Version Number of Sui Tested On** Testnet v1.32.0 #### VSCode Sui Move Analyzer by MoveBit Alternative VSCode extension developed by MoveBit. * [Homepage](https://movebit.xyz/analyzer) * [GitHub](https://github.com/movebit/sui-move-analyzer) * [Documentation & Tutorial](https://marketplace.visualstudio.com/items?itemName=MoveBit.sui-move-analyzer) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-5 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [x] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** * VSCode Extension for Move on Sui smart contract development powered by LSP Sui Move Analyzer language server developed by Movebit. **Features** * Autocomplete * On-hover support * Real-time diagnostics * Go to definition * Go/Find references * Move * ⚠️ Latest Move 2024 is not supported (`2024.alpha` supported while latest is `2024.beta`) * Move 2024 syntax highlight ([VSCode Move-Msl-Syx](https://marketplace.visualstudio.com/items?itemName=MoveBit.move-msl-syx) ) * Utilities * Integration with `sui` binary (Sui CLI) **Latest Version Number of Sui Tested On** ⚠️ Testnet v1.32.0 #### IntelliJ Sui Move Language Plugin IntelliJ-based plugin for Move on Sui development. * [Homepage](https://plugins.jetbrains.com/plugin/23301-sui-move-language) * [GitHub](https://github.com/movefuns/intellij-move) #### [Emacs move-mode](https://github.com/amnn/move-mode) The move\-mode package is an Emacs major-mode for editing smart contracts written in the Move programming language. #### [Move.vim](https://github.com/yanganto/move.vim) Syntax highlighting that supports the Move 2024 edition. ### IDE Utilities[​](https://docs.sui.io/references/awesome-sui#ide-utilities "Direct link to IDE Utilities") #### [Prettier Move Plugin](https://github.com/MystenLabs/sui/tree/main/external-crates/move/crates/move-analyzer/prettier-plugin) A Move language plugin for the Prettier code formatter. #### [Sui Extension](https://github.com/zktx-io/sui-extension) The Sui extension provides seamless support for compiling, deploying, and testing Sui smart contracts directly within VS Code. * [Homepage](https://marketplace.visualstudio.com/items?itemName=zktxio.sui-extension) * [Documentation](https://docs.zktx.io/vsce/sui/) #### ⚠️ Sui Simulator VSCode Extension to streamline Sui development workflow with intuitive UI. * [Homepage](https://marketplace.visualstudio.com/items?itemName=weminal-labs.sui-simulator-vscode) * [GitHub](https://github.com/Weminal-labs/sui-simulator-vscode) * [Demo](https://www.youtube.com/watch?v=BHRxeF_visM&pp=ygUMd2VtaW5hbCBsYWIg) #### [Tree Sitter Move](https://github.com/tzakian/tree-sitter-move) Tree Sitter for Move. Client SDKs & Libraries[​](https://docs.sui.io/references/awesome-sui#client-sdks--libraries "Direct link to Client SDKs & Libraries") --------------------------------------------------------------------------------------------------------------------------------------- ### Client SDKs[​](https://docs.sui.io/references/awesome-sui#client-sdks "Direct link to Client SDKs") #### Sui TypeScript SDK (Mysten Labs) TypeScript modular library of tools for interacting with the Sui blockchain. * [GitHub](https://github.com/MystenLabs/sui/tree/main/sdk/typescript) * [Documentation](https://sdk.mystenlabs.com/typescript) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-6 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** The Sui TypeScript SDK is a modular library of tools for interacting with the Sui blockchain. Use it to send queries to RPC nodes, build and sign transactions, and interact with a Sui or local network. **Features** * [Module packages](https://sdk.mystenlabs.com/typescript#module-packages) * [GraphQL (RPC 2.0)](https://sdk.mystenlabs.com/typescript/graphql) is supported. * [Sui BCS types are supported](https://github.com/MystenLabs/sui/blob/main/sdk/typescript/src/bcs) * [Kiosk SDK](https://sdk.mystenlabs.com/kiosk) * [zkSend (Stashed) SDK](https://sdk.mystenlabs.com/zksend) * [DeepBookV3 SDK](https://docs.sui.io/standards/deepbookv3-sdk) * [SuiNS SDK](https://docs.suins.io/developer/sdk) #### Sui Kit(Scallop) Toolkit for interacting with the Sui network in TypeScript. * [GitHub](https://github.com/scallop-io/sui-kit) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-7 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** TypeScript Client Kit SDK for Sui blockchain **Features** * Transfer SUI, Custom Coin, and objects. * Move call functionality. * Programmable transaction support. * Query on-chain data. * HD wallet with multi-account management. #### Sui Rust SDK (Mysten Labs) Rust SDK to interact with Sui blockchain. * [GitHub](https://github.com/MystenLabs/sui/tree/main/crates/sui-sdk) * [Documentation](https://mystenlabs.github.io/sui/sui_sdk/index.html) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-8 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** Sui Rust SDK contains APIs to interact with Sui blockchain. **Features** * [Supported operations](https://arc.net/l/quote/gmkrkhqg) * ⚠️ GraphQL is not supported yet * [Sui BCS types are supported](https://github.com/MystenLabs/sui/blob/main/crates/sui-types/src/base_types.rs) #### Pysui Python SDK to interact with Sui blockchain. * [GitHub](https://github.com/FrankC01/pysui?tab=readme-ov-file) * [Documentation](https://pysui.readthedocs.io/en/latest/index.html) * [Pypi](https://pypi.org/project/pysui/) * [Discord](https://discord.gg/uCGYfY4Ph4) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-9 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** Python Client SDK for Sui blockchain **Features** * [Supported features](https://pysui.readthedocs.io/en/latest/index.html) * GraphQL (beta) is supported. * [Sui BCS types are supported](https://github.com/FrankC01/pysui/blob/main/pysui/sui/sui_types/bcs.py) * [Pysui Gadgets](https://github.com/FrankC01/pysui_gadgets) - Sui utilities built on top of Pysui #### Sui Go SDK (SuiVision) Golang SDK to interact with Sui blockchain. * [GitHub](https://github.com/block-vision/sui-go-sdk) * [API Documentation](https://pkg.go.dev/github.com/block-vision/sui-go-sdk) * [Examples](https://github.com/block-vision/sui-go-sdk?tab=readme-ov-file#examples) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-10 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** The Sui-Go-SDK provided by BlockVision aims to offer access to all Sui RPC methods with Golang and also offers some additional features that make the integration easier. Sui-Go-SDK is designed for Sui in Go programming language. **Features** * [Features](https://github.com/block-vision/sui-go-sdk?tab=readme-ov-file#examples) * ⚠️ GraphQL is not supported yet. #### Sui Go SDK (Pattonkan) Golang SDK to interact with Sui blockchain. Support PTB and devInspect. * [Github](https://github.com/pattonkan/sui-go) * [API Documentation](https://pkg.go.dev/github.com/pattonkan/sui-go) * [Examples](https://github.com/pattonkan/sui-go/tree/main/examples) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-11 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** The go-sui tool from Pattonkan facilitates basic Sui interactions. Additionally, this SDK features cleaner type definitions, supports devInspect transactions, and includes PTB by default. **Features** * [Features](https://github.com/pattonkan/sui-go/tree/main/examples) * [GraphQL](https://github.com/pattonkan/sui-go/pull/118) is supported. #### Sui Dart SDK Dart SDK to interact with Sui blockchain. * [GitHub](https://github.com/mofalabs/sui) * [API documentation](https://pub.dev/documentation/sui/latest/) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-12 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** Dart Client SDK for Sui blockchain **Features** * [Features](https://github.com/mofalabs/sui?tab=readme-ov-file#usage) * ⚠️ GraphQL is not supported yet. * [Sui BCS types are supported](https://github.com/mofalabs/sui/tree/main/lib/bcs) * [zkLogin SDK](https://github.com/mofalabs/zklogin) * ⚠️ [Deepbook SDK](https://github.com/mofalabs/deepbook) (not actively maintained) #### Sui Kotlin SDK Kotlin Multiplatform (KMP) SDK for integrating with the Sui blockchain. * [GitHub](https://github.com/mcxross/ksui) * [Documentation](https://suicookbook.com/) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-13 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** Kotlin Multiplatform (KMP) SDK for integrating with the Sui blockchain. It is designed to be a type-safe, client-configurable, and multiplatform SDK that can be used across different platforms such as Android, iOS, JS, and JVM. It is built on top of the KMM toolchain and is designed to be extensible and easy to use. **Features** * [Features](https://github.com/mcxross/ksui?tab=readme-ov-file#features) * GraphQL is supported * [Sui BCS types are supported](https://github.com/mcxross/ksui/tree/master/lib/src/commonMain/kotlin/xyz/mcxross/ksui/serializer) #### SuiKit (OpenDive) Swift SDK natively designed to make developing for the Sui blockchain easy. * [GitHub](https://github.com/opendive/suikit?tab=readme-ov-file) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-14 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** SuiKit is a Swift SDK natively designed to make developing for the Sui Blockchain easy. **Features** * [Features](https://github.com/OpenDive/SuiKit/tree/main?tab=readme-ov-file#features) * ⚠️ `Bech32` encoded private key is not supported. * ⚠️ GraphQL is partially supported. * [Sui BCS types are supported](https://github.com/OpenDive/SuiKit/tree/main/Sources/SuiKit/Types) * ⚠️ [Kiosk is supported](https://github.com/OpenDive/SuiKit/tree/main/Sources/SuiKit/Types/Structs/Kiosk) (might not be actively maintained) * ⚠️ [SuiNS is supported](https://github.com/OpenDive/SuiKit/tree/main/Sources/SuiKit/Types/Structs/SuiNS) (might not be actively maintained) #### Sui Unity SDK (OpenDive) The OpenDive Sui Unity SDK is the first fully-featured Unity SDK with offline transaction building. * [GitHub](https://github.com/OpenDive/Sui-Unity-SDK) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-15 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [x] SDK **Description** The OpenDive Sui Unity SDK is the first fully-featured Unity SDK with offline transaction building. This means that games built with our SDK can directly craft custom Move calls without relying Sui's "unsafe" RPC calls under the [Transaction Builder API](https://docs.sui.io/sui-api-ref#transaction-builder-api) -- which in turn reduces the number of RPC / Network requests. **Features** * [Features](https://github.com/OpenDive/Sui-Unity-SDK?tab=readme-ov-file#features) * ⚠️ `Bech32` encoded private key is not supported. * ⚠️ GraphQL is not supported. * Sui BCS types are supported #### Dubhe Client (Dubhe Engine) Supports various platforms including browsers, Node.js, and game engine. It provides a simple interface to interact with your Sui Move contracts. * [GitHub](https://github.com/0xobelisk/dubhe/tree/main/packages/sui-client) * [Documentation](https://dubhe.obelisk.build/dubhe/sui/client) ### DeFi SDKs[​](https://docs.sui.io/references/awesome-sui#defi-sdks "Direct link to DeFi SDKs") #### [NAVI Protocol SDK](https://github.com/naviprotocol/navi-sdk) The NAVI TypeScript SDK Client provides tools for interacting with the Sui blockchain networks, designed for handling transactions, accounts, and smart contracts efficiently. #### [Bucket Protocol SDK](https://github.com/Bucket-Protocol/bucket-protocol-sdk) The TypeScript SDK for interacting with Bucket Protocol. #### [Suilend SDK](https://github.com/solendprotocol/suilend-public/tree/production/sdk) The TypeScript SDK for interacting with the Suilend program published on npm as [`@suilend/sdk`](https://www.npmjs.com/package/@suilend/sdk) . #### [Scallop SDK](https://github.com/scallop-io/sui-scallop-sdk) The TypeScript SDK for interacting with the Scallop lending protocol on the Sui network. #### [Cetus CLMM SDK](https://github.com/CetusProtocol/cetus-clmm-sui-sdk) The official Cetus SDK specifically designed for seamless integration with Cetus-CLMM on Sui. #### [Aftermath SDK](https://github.com/AftermathFinance/aftermath-ts-sdk) The TypeScript SDK for interacting with Aftermath Protocol. #### [FlowX SDK](https://github.com/FlowX-Finance/sdk) The official FlowX TypeScript SDK that allows developers to interact with FlowX protocols using the TypeScript programming language. #### [7k Aggregator SDK](https://github.com/7k-ag/7k-sdk-ts) The TypeScript SDK for interacting with 7k Aggregator protocol. #### [Hop Aggregator SDK](https://docs.hop.ag/hop-sdk) The TypeScript SDK for interacting with Hop Aggregator. ### Client Libraries[​](https://docs.sui.io/references/awesome-sui#client-libraries "Direct link to Client Libraries") #### [BCS TypeScript (Mysten Labs)](https://sdk.mystenlabs.com/bcs) BCS with TypeScript. #### [BCS Rust](https://github.com/zefchain/bcs) BCS with Rust. #### [BCS Dart](https://github.com/mofalabs/bcs) BCS with Dart. #### BCS Kotlin BCS with Kotlin. * [GitHub](https://github.com/mcxross/kotlinx-serialization-bcs) * [Documentation](https://suicookbook.com/bcs.html) #### [BCS Swift](https://github.com/OpenDive/SuiKit/tree/main/Sources/SuiKit/Utils/BCS) BCS with Swift. #### [BCS Unity](https://github.com/OpenDive/Sui-Unity-SDK/tree/main/Assets/Sui-Unity-SDK/Code/OpenDive.BCS) BCS with Unity C#. #### [Sui Client Gen (Kuna Labs)](https://github.com/kunalabs-io/sui-client-gen/tree/master) A tool for generating TS SDKs for Sui Move smart contracts. Supports code generation both for source code and on-chain packages with no IDLs or ABIs required. #### [TypeMove (Sentio)](https://github.com/sentioxyz/typemove/blob/main/packages/sui/Readme.md) Generate TypeScript bindings for Sui contracts. #### Sui Wallet Standard (Mysten Labs) A suite of standard utilities for implementing wallets and libraries based on the [Wallet Standard](https://github.com/wallet-standard/wallet-standard/) . * [GitHub](https://github.com/MystenLabs/sui/tree/main/sdk/wallet-standard) * [Documentation](https://docs.sui.io/standards/wallet-standard) #### [CoinMeta (Polymedia)](https://github.com/juzybits/polymedia-coinmeta) Library for fetching coin metadata for Sui coins. #### [Dubhe Client BCS Decoding (Dubhe Engine)](https://github.com/0xobelisk/dubhe-docs/blob/main/pages/dubhe/sui/client.mdx#bcs-data-decoding) Library for supports automatic parsing of BCS types based on contract metadata information and automatic conversion formatting. dApp Development[​](https://docs.sui.io/references/awesome-sui#dapp-development "Direct link to dApp Development") ------------------------------------------------------------------------------------------------------------------- ### dApp Toolkits[​](https://docs.sui.io/references/awesome-sui#dapp-toolkits "Direct link to dApp Toolkits") #### [@mysten/create-dapp](https://sdk.mystenlabs.com/dapp-kit/create-dapp) CLI tool that helps you create Sui dApp projects. #### Sui dApp Kit (Mysten Labs) Set of React components, hooks, and utilities to help you build a dApp for the Sui ecosystem. * [GitHub](https://github.com/MystenLabs/sui/tree/main/sdk/dapp-kit) * [Documentation](https://sdk.mystenlabs.com/dapp-kit) #### Sui dApp Starter Full-stack boilerplate which lets you scaffold a solid foundation for your Sui project and focus on the business logic of your dapp from day one. * [GitHub](https://github.com/suiware/sui-dapp-starter?tab=readme-ov-file) * [Documentation](https://sui-dapp-starter.dev/docs/) * [Demo app](https://demo.sui-dapp-starter.dev/) #### Suiet Wallet Kit React toolkit for aApps to interact with all wallet types in Sui easily. * [GitHub](https://github.com/suiet/wallet-kit) * [Documentation](https://kit.suiet.app/docs/QuickStart) #### SmartKit React library that allows your dapp to connect to the Sui network in a simple way. * [Homepage](https://smartkit.vercel.app/) * [GitHub](https://github.com/heapup-tech/smartkit) #### [Sui Suitcase](https://github.com/juzybits/polymedia-suitcase) Sui utilities for TypeScript, Node, and React. #### [Sui MultiSig Toolkit (Mysten Labs)](https://multisig-toolkit.vercel.app/offline-signer) Toolkit for transaction signing. #### [Sui dApp Scaffold (Bucket Protocol)](https://github.com/Bucket-Protocol/sui-dapp-scaffold-v1) A frontend scaffold for a decentralized application (dApp) on the Sui blockchain. #### [Wormhole Kit (zktx.io)](https://github.com/zktx-io/wormhole-kit-monorepo) React library that enables instant integration of Wormhole into your dapp. #### SuiBase Suibase makes it easy to create "workdirs", each defining a distinct development environment targeting a network. * [GitHub](https://github.com/chainmovers/suibase) * [Documentation](https://suibase.io/) #### [create-dubhe (Dubhe Engine)](https://github.com/0xobelisk/dubhe/tree/main/packages/create-dubhe) Create a new Dubhe project on Sui. * [Documentation](https://dubhe.obelisk.build/dubhe/sui/quick-start) #### [Sui Tools](https://sui-tools.vercel.app/ptb-generator) Scaffolding TypeScript PTBs for any on-chain function you might want to invoke. #### [Enoki (Mysten Labs)](https://docs.enoki.mystenlabs.com/) Make zkLogin and Sponsored Transactions more accessible. #### [Sui Gas Pool (Mysten Labs)](https://github.com/MystenLabs/sui-gas-pool) Service that powers sponsored transactions on Sui at scale. #### [useSuiZkLogin](https://github.com/pixelbrawlgames/use-sui-zklogin) React hook and functions for seamless zkLogin integration on Sui. #### @suiware/kit Opinionated React components and hooks for Sui dApps. * [Homepage](https://kit.suiware.io/) * [Documentation](https://github.com/suiware/kit/tree/main/packages/kit#readme) * [GitHub](https://github.com/suiware/kit) #### React ZK Login Kit Ready-to-use Component with Hook (sign-in + sign\-transaction) * [GitHub](https://github.com/denyskozak/react-sui-zk-login-kit) * [YouTube Guide](https://www.youtube.com/watch?v=2qnjmKg3ugY) ### zkLogin[​](https://docs.sui.io/references/awesome-sui#zklogin "Direct link to zkLogin") #### [zkLogin Demo (Polymedia)](https://github.com/juzybits/polymedia-zklogin-demo) #### [Sui zkLogin Demo by @jovicheng](https://github.com/jovicheng/sui-zklogin-demo) #### [Sui zkWallet Demo by @ronanyeah](https://github.com/ronanyeah/sui-zk-wallet) #### [zkLogin Demo using use-sui-zklogin by @pixelbrawlgames](https://pixelbrawlgames.github.io/use-sui-zklogin/) #### [zkLogin Demo using react-zk-login-kit by @denyskozak](https://demo.react-sui-zk-login.com/) ### Misc[​](https://docs.sui.io/references/awesome-sui#misc "Direct link to Misc") #### [`sui-sniffer`](https://www.app.kriya.finance/sui-sniffer/) Checking security of Sui tokens. #### RPC Tools (Polymedia) A webapp that lets users find the fastest RPC for their location. * [GitHub](https://github.com/juzybits/polymedia-rpcs) * [Documentation](https://rpcs.polymedia.app/) #### [Polymedia Commando (Polymedia)](https://github.com/juzybits/polymedia-commando) Sui command line tools to help with Sui airdrops (send coins to many addresses), gather data from different sources (Sui RPCs, Indexer.xyz, Suiscan), and more. #### [YubiSui (MystenLabs)](https://github.com/MystenLabs/yubigen) Create a Sui Wallet inside a yubikey and sign Sui transactions with it. #### [`sui-dapp-kit-theme-creator`](https://sui-dapp-kit-theme-creator.app/) Build custom Sui dApp Kit themes. #### [Minting Server (Mysten Labs)](https://github.com/MystenLabs/minting-server) A scalable system architecture that can process multiple Sui transactions in parallel using a producer-consumer worker scheme. #### [SuiInfra](https://suinfra.io/) Provide users and developers with up-to-date recommendations on the ideal RPCs to use for their needs. #### [Sui RPC Proxy](https://github.com/SuiSec/sui-rpc-proxy) Monitor and analyze the network requests made by the Sui wallet application and Sui dApps. #### [PTB Studio](https://ptb.studio/) Visual Programmable Transaction Block Builder. * [Documentation](https://suicookbook.com/ptb-studio.html) #### [Indexer generator](https://www.npmjs.com/package/sui-events-indexer) Code generating tool that will generate an indexer given a smart contract for all the events present. After that the user should remove unwanted events and fix the database schema and handlers (that write to the DB) according to their needs. The tool is written in typescript and uses prisma as an ORM. ### Smart Contract Toolkits[​](https://docs.sui.io/references/awesome-sui#smart-contract-toolkits "Direct link to Smart Contract Toolkits") #### [Sui CLI](https://docs.sui.io/references/cli) CLI tool to interact with the Sui network, its features, and the Move programming language. #### [Sentio Debugger](https://docs.sentio.xyz/docs/debugger) Shows the trace of the transaction [Explorer App](https://app.sentio.xyz/explorer) (mainnet only). #### [`std::debug`](https://docs.sui.io/guides/developer/first-app/debug#related-links) Print arbitrary values to the console to help with debugging process. #### [Sui Tears 💧 (Interest Protocol)](https://docs.interestprotocol.com/overview/sui-tears) Open source production ready Sui Move library to increase the productivity of new and experienced developers alike. #### [Sui Codec](https://github.com/sui-potatoes/app/tree/main/packages/codec) Ultimate encoding solution for Sui. #### [SkipList (Cetus)](https://github.com/CetusProtocol/move-stl) A skip link list implement by Move language in Sui. #### [IntegerMate (Cetus)](https://github.com/CetusProtocol/integer-mate) A Library of move module provides signed integer and some integer math functions. #### [Cetus CLMM](https://github.com/CetusProtocol/cetus-contracts/tree/main/packages/cetus_clmm) The Cetus CLMM DEX open-source code. #### [SuiDouble Metadata](https://github.com/suidouble/suidouble_metadata) A Sui Move library and a set of tools to store, retrieve, and manage any type of primitive data as chunks in a `vector`. Store any data in the `vector` without dependencies and without any `Struct` defined. #### [Move on Sui examples (Mysten Labs)](https://github.com/MystenLabs/sui/tree/main/examples/move) Examples of Move on Sui applications. #### [SuiGPT Decompiler](https://suigpt.tools/decompile) Uses generative AI to convert Move bytecode back to source code. #### [Revela](https://revela.verichains.io/) Decompile Sui smart contracts to recover Move source code. #### Package Source Code Verification Verify your package source code on Suiscan, powered by WELLDONE Studio and Blockberry. * [Documentation](https://docs.blockberry.one/docs/contract-verification) * [Form Submission](https://suiscan.xyz/mainnet/package-verification) #### [Dubhe CLI (Dubhe Engine)](https://github.com/0xobelisk/dubhe/tree/main/packages/sui-cli) For building, and managing Dapps built on Dubhe Engine in Sui. * [Documentation](https://dubhe.obelisk.build/dubhe/sui/cli) #### [Sui Token CLI RPC](https://github.com/otter-sec/sui-token-gen-rpc) A Rust-based RPC service for generating and verifying Sui token smart contracts effortlessly. * [Sui Token CLI Tool](https://github.com/otter-sec/sui-token-gen) * A Rust-based Command-Line Interface (CLI) tool designed to simplify the process of generating and verifying Sui token smart contracts Indexers & Data Services[​](https://docs.sui.io/references/awesome-sui#indexers--data-services "Direct link to Indexers & Data Services") ------------------------------------------------------------------------------------------------------------------------------------------ #### ZettaBlock Generate custom GraphQL or REST APIs from SQL queries and incorporate your private off-chain data. * [Homepage](https://zettablock.com/) * [Docs](https://docs.zettablock.com/) * [Pricing](https://zettablock.com/pricing) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-16 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [x] Indexer * [ ] Oracle * [ ] SDK **Homepage or Repo or Download Link** **Description** Redefining the way Web3 developers interact and build on top of blockchain data. Generate custom GraphQL or REST APIs from SQL queries and incorporate your private off-chain data. **Features** * [DataHub & DevStudio](https://docs.zettablock.com/docs/datahub-and-devstudio) * Pre-built GraphQL APIs * Custom API with SQL queries * Custom API can be easily deployed through single click. GraphQL API is supported * API can be realtime if it is built from realtime refresh table * [Data Catalog](https://app.zettablock.com/v2/explore/tables) **Latest Version Number of Sui Tested On** #### Sentio Transform raw indexed data (transactions, events, etc.) into meaningful queryable data by writing custom processor logic. * [Homepage](https://www.sentio.xyz/indexer/) * [Documentation](https://docs.sentio.xyz/docs/data-collection) * [Examples](https://github.com/sentioxyz/sentio-processors/tree/main/projects) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-17 "Direct link to Further Information") **Tooling Category** * [ ] **AI** * [ ] **dApp Development** * [ ] **Explorer** * [ ] **IDE** * [x] **Indexer** * [ ] **Oracle** * [ ] **SDK** **Description** Transform raw indexed data (transactions, events,...) into meaningful usable data by writing custom processor logic. **Features** * Write SQL Query and export as API. * Only SQL API is supported * [Sentio Dash](https://dash.sentio.xyz/) is similar to Dune * [Data Catalog](https://dash.sentio.xyz/sql) * Sentio Processor transform prebuilt indexed data into Metrics and Event Logs that can be used to create Sentio Dash (dashboard) * ⚠️ Sui specific documentation is missing. **Latest Version Number of Sui Tested On** #### BlockVision Provide Sui indexed data for developers through pre-built APIs, such as, Token, NFT, and DeFi, etc. * [Homepage](https://blockvision.org/) * [Documentation](https://docs.blockvision.org/reference/welcome-to-blockvision) #### BlockBerry (Suiscan) The Blockberry Sui API provides endpoints that reveal data about significant entities on the Sui Network. It indexes useful object metadata, including NFTs, domains, collections, coins, etc. Some data is drawn from third-party providers, particularly market data (coin prices, market cap, etc.). * [Homepage](https://blockberry.one/) * [Documentation](https://docs.blockberry.one/reference/sui-quickstart) #### Space And Time (SxT) Verifiable compute layer for AI x blockchain. Decentralized data warehouse with sub-second ZK proof. * [Homepage](https://www.spaceandtime.io/) * [Documentation](https://docs.spaceandtime.io/) ##### Further Documentation[​](https://docs.sui.io/references/awesome-sui#further-documentation "Direct link to Further Documentation") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [x] Indexer * [ ] Oracle * [ ] SDK **Description** Space and Time (SxT) is the verifiable compute layer that scales zero-knowledge proofs on a decentralized data warehouse to deliver trustless data processing to smart contracts, LLMs, and enterprises. Space and Time joins indexed blockchain data from major chains with offchain datasets. Proof of SQL, the novel ZK-proof developed by Space and Time, ensures tamperproof computations at scale and proves that query results haven’t been manipulated. Space and Time is trusted by the most prominent financial institutions, enterprises, and Web3 apps. **Features** * [Developer Use Cases](https://docs.spaceandtime.io/docs/welcome-to-space-and-time#developers-use-space-and-time-to) * [Sui Supported Dataset](https://app.spaceandtime.ai/data-sets?selectedChain=sui) * [SQL API](https://docs.spaceandtime.io/reference/sql-overview) to query data using SQL * [GraphQL API](https://docs.spaceandtime.io/reference/graphql-overview) to query data with GraphQL * AI assistance to help with refining SQL * ZK-powered and tamperproof data * ⚠️ No Sui specific documentation is provided #### Birdeye Data Services Access Crypto Market Data APIs on Sui. * [Homepage](https://bds.birdeye.so/) * [Blog](https://blog.sui.io/birdeye-data-services-crypto-api-websocket/) * [API Documentation](https://docs.birdeye.so/reference/intro/authentication) #### Indexer.xyz (behind TradePort) The ultimate toolkit for accessing NFT data and integrating trading functionality into your app on Sui. * [Homepage](https://www.indexer.xyz/) * [API Explorer](https://www.indexer.xyz/api-explorer) * [API Docs](https://tradeport.xyz/docs) #### Dubhe Indexer (Dubhe Engine) Automatic integration with Dubhe Engine, automatic indexing of all events based on Dubhe Engine to build Dapp on Sui, based on dubhe configuration files. * [Homepage](https://github.com/0xobelisk/dubhe/tree/main/packages/sui-indexer) * [API Documentation](https://dubhe.obelisk.build/dubhe/sui/indexer) #### [![Surflux logo](https://docs.sui.io/awesome-sui/media/surflux_logo.svg)](https://surflux.dev/) Surflux Developer infrastructure for Sui. Build production-ready apps with powerful APIs, indexing, and real-time data streams. * [Homepage](https://surflux.dev/) * [Documentation](https://docs.surflux.dev/) * [Blog](https://surflux.dev/blog) Explorers[​](https://docs.sui.io/references/awesome-sui#explorers "Direct link to Explorers") ---------------------------------------------------------------------------------------------- #### SuiVision Data analytics covering transactions, wallets, staking, and validators. * [Homepage](https://suivision.xyz/) * [Documentation](https://docs.blockvision.org/reference/integrate-suivision-into-your-dapp) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-18 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [x] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** Data analytics covering transactions, wallets, staking, and validators **Features** * Fundamental blockchain data (transactions, epoch,...) * Analytics: * DeFi * Coins * NFTs * Validators * On chain usage * Performance stats * Automatic portfolio tracking * Verify and publish contract code * Function execution * SuiNS is supported * Supported networks: * Mainnet * Testnet * Devnet * Administration: * [Verified Coin Submit](https://forms.gle/wCCHPisRgvxr3uv89) * [Verified Package Submit](https://forms.gle/Hhpdh2KsWLUHDvkx5) * [Verified NFT Collection Submit](https://forms.gle/Hhpdh2KsWLUHDvkx5) #### Suiscan Explorer and analytics platform for Sui. * [Homepage](https://suiscan.xyz/mainnet/home) * [Documentation](https://docs.blockberry.one/reference/welcome-to-blockberry-api) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-19 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [x] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** Explorer and analytics platform for Sui. **Features** * [Data APIs](https://docs.blockberry.one/reference/sui-quickstart) * Fundamental blockchain data (transactions, epoch,...) * Analytics: * DeFi * Coins * NFTs * Validators * On chain usage * Performance stats * Automatic portfolio tracking * Verify and publish contract code * Function execution * News hub * Apps Directory * Supported networks: * Mainnet * Testnet * Devnet * Custom nodes * Administration: * [Submit Hub](https://suiscan.xyz/submit-hub) #### OKLink Provide fundamental explorer and data APIs on Sui. * [Homepage](https://www.oklink.com/sui) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-20 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [x] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** Provide fundamental explorer and data APIs on Sui. **Features** * Fundamental network data (transactions, epoch,...) * [Fundamental blockchain data APIs](https://www.oklink.com/docs/en/#fundamental-blockchain-data) * Supported networks: * Mainnet #### Polymedia Explorer A fork of the original Sui Explorer. * [Homepage](https://explorer.polymedia.app/) * [GitHub](https://github.com/juzybits/polymedia-explorer) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-21 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [x] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** A fork of the original Sui Explorer, which was discontinued by Mysten Labs. **Features** * Fundamental network data (transactions, epoch,...) * Function execution * Analytics: * Validators * Supported networks: * Mainnet * Testnet * Devnet * Local * Custom nodes #### PTB Explorer A fork of the Polymedia Explorer. * [Homepage](https://explorer.walrus.site/) * [GitHub](https://github.com/zktx-io/polymedia-explorer-ptb-builder) #### Local Sui Explorer Sui Explorer for your localnet maintained by [suiware](https://github.com/suiware) * [GitHub](https://github.com/suiware/sui-explorer) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-22 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [x] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** Sui Explorer for your localnet. Sui Explorer Local is integrated into [Sui dApp Starter](https://github.com/suiware/sui-dapp-starter?tab=readme-ov-file) and [Suibase](https://github.com/chainmovers/suibase) . **Features** * Object and transaction data view * Supported networks: * Local (default) * Custom nodes #### Suimon Powerful command line tool designed to provide detailed dashboards for monitoring the Sui network. * [GitHub](https://github.com/bartosian/suimon) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-23 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [x] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK **Description** Powerful command line tool designed to provide detailed dashboards for monitoring SUI network **Features** * Supported entities for monitoring: * Full Nodes * Validators * System State and Protocol * Release History * Active Validators * Validator Parameters * Validator Reports * Supported networks: * Devnet * Testnet * Mainnet Oracles[​](https://docs.sui.io/references/awesome-sui#oracles "Direct link to Oracles") ---------------------------------------------------------------------------------------- #### Pyth Network Oracle protocol that connects the owners of market data to applications on multiple blockchains including Sui. * [Homepage](https://www.pyth.network/) * [Documentation](https://docs.pyth.network/home) * [Sui Tutorial](https://docs.pyth.network/price-feeds/use-real-time-data/sui) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-24 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [x] Oracle * [ ] SDK **Description** Pyth Network is an oracle protocol that connects the owners of market data to applications on multiple blockchains. **Features** * [Pull-based oracles](https://docs.pyth.network/price-feeds/pull-updates#pull-oracles) * Except Solana, price data is transmitted from Pythnet to Sui through Wormhole behind the scene * [Sui JS SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/sui/sdk/js) * Hermes is a service facilitating fetching updated price info and its signature for on-chain verification * [Hermes API](https://hermes.pyth.network/docs/) * [Hermes JS SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/client/js) * Price Feeds: * [Supported pairs on Sui](https://docs.pyth.network/price-feeds/sponsored-feeds#sui) * [Benchmarks - Historical Price](https://docs.pyth.network/benchmarks) #### Supra Oracles Oracle protocol to provide reliable data feed. * [Homepage](https://supra.com/) * [Sui Tutorial](https://docs.supra.com/docs/developer-tutorials/move) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-25 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [x] Oracle * [ ] SDK **Features** * [Pull-based price feed](https://docs.supra.com/docs/data-feeds/pull-model) ([Sui is supported](https://docs.supra.com/docs/data-feeds/pull-model/networks) ) * [Push-based price feed](https://docs.supra.com/docs/data-feeds/decentralized) ([Sui is supported](https://docs.supra.com/docs/data-feeds/decentralized/networks) ) * [Live Data Feed](https://supra.com/data) * [Supported pairs](https://docs.supra.com/docs/data-feeds/data-feeds-index) #### Switchboard Data feed customization and management. * [Documentation](https://docs.switchboard.xyz/docs) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-26 "Direct link to Further Information") **Tooling Category** * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [x] Oracle * [ ] SDK **Homepage or Repo or Download Link** **Description** Data feed customization and management **Features** * [On-demand data feed](https://docs.switchboard.xyz/docs) (Sui is not supported) * [Push-based data feed](https://docs.switchboard.xyz/docs/switchboard/switchboard-v2-push) (Sui is supported): * [Sui SDK](https://github.com/switchboard-xyz/sui-sdk) * [Sui examples](https://github.com/switchboard-xyz/sui-sdk/tree/main/programs/mainnet/feed-parser/sources) * [Sui supported feeds](https://app.switchboard.xyz/sui/mainnet) * Build custom feed through [portal](https://app.switchboard.xyz/build) * Generic data feed protocol allowing devs to build their own feed with customizable oracle jobs. Similar to ChainLink Security[​](https://docs.sui.io/references/awesome-sui#security "Direct link to Security") ------------------------------------------------------------------------------------------- #### [![Sui Prover logo](https://docs.sui.io/awesome-sui/media/prover_logo.svg)](https://info.asymptotic.tech/sui-prover) [Sui Prover](https://info.asymptotic.tech/sui-prover) Prover for doing Formal Verification of Move on Sui code. #### [SuiSecBlockList](https://github.com/SuiSec/SuiSecBlockList) Block malicious websites and packages, Identify and hide phishing objects. #### [DryRunTransactionBlockResponsePlus](https://github.com/SuiSec/DryRunTransactionBlockResponsePlus) Decorator of `DryRunTransactionBlockResponse`, highlight `SenderChange`. #### [Guardians](https://github.com/suiet/guardians) Phishing Website Protection. #### [HoneyPotDetectionOnSui](https://github.com/SuiSec/HoneyPotDetectionOnSui) Detect HoneyPot SCAM on Sui. AI[​](https://docs.sui.io/references/awesome-sui#ai "Direct link to AI") ------------------------------------------------------------------------- #### ⚠️ [RagPool](https://ragpool.digkas.nl/) RAG based chat with docs. #### [Cookbook](https://docsbot-demo-git-sui-cookbookdev.vercel.app/) Gemini-based RAG built for docs. #### [Atoma](https://atoma.network/) Developer-focused infrastructure for private, verifiable, and fully customized AI experiences. #### [Eliza](https://github.com/elizaOS/eliza) Autonomous agents for everyone. Infrastructure as Code[​](https://docs.sui.io/references/awesome-sui#infrastructure-as-code "Direct link to Infrastructure as Code") ------------------------------------------------------------------------------------------------------------------------------------- #### Sui Terraform Modules All-in-one solution for deploying, monitoring, and managing SUI infrastructure with ease. * [GitHub](https://github.com/bartosian/sui-terraform-modules) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-27 "Direct link to Further Information") **Tooling Category** * [ ] AI * [ ] dApp Development * [ ] Explorer * [ ] IDE * [ ] Indexer * [ ] Oracle * [ ] SDK * [ ] Walrus * [x] Infrastructure as Code **Description** All-in-one solution for deploying, monitoring, and managing SUI infrastructure with ease. **Features** * Supported entities for monitoring: * Sui * Validator * Walrus * Storage Node #### [Dubhe Engine (Obelisk Labs)](https://github.com/0xobelisk/dubhe) Engine for Everyone to Build Intent-Centric Worlds ⚙️ An Open-Source toolchain for Move Applications. * [Documentation](https://dubhe.obelisk.build/) ##### Further Information[​](https://docs.sui.io/references/awesome-sui#further-information-28 "Direct link to Further Information") **Tooling Category** * [x] dApp Development * [ ] Explorer * [ ] IDE * [x] Indexer * [ ] Oracle * [x] SDK **Description** Engine for Everyone to Build Intent-Centric Worlds ⚙️ An Open-Source toolchain for Move Applications. **Features** * ⚡️ Built with [Move](https://move-language.github.io/move/) * 🏛️ Harvard Structural Architecture * 📦 Structured [Schema-based](https://dubhe.obelisk.build/dubhe/sui/schemas) Storage * 🌐 Multi\-Move Ecosystem Support * 🛠️ Development Tools: * Sandbox Networking & Indexing * Type-safe SDKs * Hot Updates * Logic Upgrades & Data Migration * Automatic indexer Faucets[​](https://docs.sui.io/references/awesome-sui#faucets "Direct link to Faucets") ---------------------------------------------------------------------------------------- #### [Sui Faucet](https://faucet.sui.io/) Official web faucet for claiming testnet SUI, with wallet integration. #### [n1stake](https://faucet.n1stake.com/) Community web faucet for claiming testnet SUI, with wallet integration. #### [Blockbolt](https://faucet.blockbolt.io/) Community web faucet for claiming testnet SUI, with wallet integration. #### SuiwareFaucetBot Sui Faucet Bot for Telegram. * [GitHub](https://github.com/suiware/SuiwareFaucetBot) * [Telegram Bot](https://t.me/SuiwareFaucetBot) #### [Suiware Faucet Chrome Extension](https://github.com/suiware/suiware-faucet-extension) An experimental Chrome extension for receiving devnet and testnet SUI. * [Move IDEs](https://docs.sui.io/references/awesome-sui#move-ides) * [Web IDEs](https://docs.sui.io/references/awesome-sui#web-ides) * [Desktop IDEs](https://docs.sui.io/references/awesome-sui#desktop-ides) * [IDE Utilities](https://docs.sui.io/references/awesome-sui#ide-utilities) * [Client SDKs & Libraries](https://docs.sui.io/references/awesome-sui#client-sdks--libraries) * [Client SDKs](https://docs.sui.io/references/awesome-sui#client-sdks) * [DeFi SDKs](https://docs.sui.io/references/awesome-sui#defi-sdks) * [Client Libraries](https://docs.sui.io/references/awesome-sui#client-libraries) * [dApp Development](https://docs.sui.io/references/awesome-sui#dapp-development) * [dApp Toolkits](https://docs.sui.io/references/awesome-sui#dapp-toolkits) * [zkLogin](https://docs.sui.io/references/awesome-sui#zklogin) * [Misc](https://docs.sui.io/references/awesome-sui#misc) * [Smart Contract Toolkits](https://docs.sui.io/references/awesome-sui#smart-contract-toolkits) * [Indexers & Data Services](https://docs.sui.io/references/awesome-sui#indexers--data-services) * [Explorers](https://docs.sui.io/references/awesome-sui#explorers) * [Oracles](https://docs.sui.io/references/awesome-sui#oracles) * [Security](https://docs.sui.io/references/awesome-sui#security) * [AI](https://docs.sui.io/references/awesome-sui#ai) * [Infrastructure as Code](https://docs.sui.io/references/awesome-sui#infrastructure-as-code) * [Faucets](https://docs.sui.io/references/awesome-sui#faucets) --- # Sui Tokenomics | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/tokenomics#__docusaurus_skipToContent_fallback) On this page The term tokenomics is a combination of two words: token and economics. It is generally used to describe the economic principles and behaviors of a blockchain. Blockchains often have a native token which acts as the currency of the network. Native tokens are used to pay for transactions and resource usage, such as compute and storage. Native token: SUI[​](https://docs.sui.io/concepts/tokenomics#native-token-sui "Direct link to Native token: SUI") ------------------------------------------------------------------------------------------------------------------ The native token of Sui is SUI. The Sui tokenomics structure is designed to support the long-term financial needs of Web3. The SUI token serves four purposes on the Sui network: 1. Provides the opportunity to stake SUI to participate in the proof-of-stake mechanism. 2. SUI is the asset denomination needed to pay the gas fees required to execute transactions or other operations on the network. 3. SUI acts as a versatile and liquid asset for various applications. 4. SUI tokens play an important role in governance by acting as a right to participate in on-chain voting on issues such as protocol upgrades. Stakeholders[​](https://docs.sui.io/concepts/tokenomics#stakeholders "Direct link to Stakeholders") ---------------------------------------------------------------------------------------------------- Stakeholders in a blockchain's tokenomics have a vested interest in the viability of the blockchain economy. The Sui economy has three main groups of stakeholders: * **Users**, who submit transactions to the network to create, mutate, and transfer digital assets or interact with smart contracts. * **SUI token holders**, who have the option of staking their tokens to validators. SUI owners also hold the rights to participate in Sui governance. * **Validators**, who manage transaction processing and execution on the Sui platform. ### Delegated proof of stake[​](https://docs.sui.io/concepts/tokenomics#delegated-proof-of-stake "Direct link to Delegated proof of stake") Sui uses a delegated proof of stake (DPoS) [consensus mechanism](https://docs.sui.io/concepts/sui-architecture/consensus) where [validators](https://docs.sui.io/guides/operator/validator-index) lock a certain amount of SUI as collateral for the duration of an [epoch](https://docs.sui.io/concepts/sui-architecture/epochs) . Validators cannot make changes to their stake during an epoch, and any changes are applied when a new epoch begins. They then earn rewards for processing operations, such as validating transactions, and for providing resources. Users of the network hold their own SUI, which they can delegate to validators of their choice as part of a validator's stake. In so doing, the validators reward users based on the amount of SUI they delegate. Users are free to withdraw their SUI or place stake in a different validator before a new [epoch](https://docs.sui.io/concepts/sui-architecture/epochs) begins. ![Sui tokenomics flow](https://docs.sui.io/assets/images/sui-tokenomics-flow-f63d253d408a181505f05465ddc39630.png "Flowchart showing the tokenomics structure.") Token supply[​](https://docs.sui.io/concepts/tokenomics#token-supply "Direct link to Token supply") ---------------------------------------------------------------------------------------------------- There is a finite supply of SUI. The total supply of SUI tokens on Mainnet is capped at 10,000,000,000 SUI. This is the total number of SUI that can ever be minted, but the total supply is not available for transactions. Supply availability follows the designed unlocking schedules in place to enhance the tokenomics stability of the network and provide a long-term level of security. Token distribution[​](https://docs.sui.io/concepts/tokenomics#token-distribution "Direct link to Token distribution") ---------------------------------------------------------------------------------------------------------------------- At the beginning of each \[epoch\], three important events happen: 1. SUI holders stake their tokens to validators and a new [committee](https://docs.sui.io/concepts/sui-architecture/consensus) is formed. * The reference gas prices are set as described in [Sui Gas Fees](https://docs.sui.io/concepts/tokenomics/gas-in-sui) . * The [storage fund](https://docs.sui.io/concepts/tokenomics#storage-fund) size is adjusted using the net inflow of the previous epoch. Following these actions, the protocol computes the total amount of stake as the sum of staked SUI plus the storage fund. During each epoch, users submit transactions to the Sui platform and validators process them. For each transaction, users pay the associated computation and storage gas fees. In cases where users delete previous transaction data, users obtain a partial [rebate of their storage fees](https://docs.sui.io/concepts/tokenomics#storage-fund-rewards) . Validators observe the behavior of other validators and evaluate each other's performance. At the end of each epoch, the protocol distributes stake rewards to participants. This occurs through two main steps: 1. The total amount of stake rewards is calculated as the sum of computation fees accrued throughout the epoch plus the epoch's stake reward subsidies. The latter component is temporary in that it only exists in the network's first years and disappears in the long run as the amount of SUI in circulation reaches its total supply. 2. The total amount of stake rewards is distributed across various entities. The storage fund is taken into account in the calculation of the epoch total stake, which is not owned by any entities in the way that staked SUI is. Instead, the Sui economic model distributes the stake rewards accruing to the storage fund to validators for compensation of their storage costs. The distribution mechanisms built into Sui tokenomics encourages a healthy competition for fair prices where validators set low gas fees while operating with viable business models. Refer to the [whitepaper](https://docs.sui.io/paper/tokenomics.pdf) for in-depth review of the mathematical proofs that support this structure. ### Vesting schedules[​](https://docs.sui.io/concepts/tokenomics#vesting-schedules "Direct link to Vesting schedules") A vesting schedule dictates when certain blocks of SUI become accessible to the market. The Sui tokenomics design includes a multi-tiered SUI vesting schedule. When Sui first launched its Mainnet network (initial SUI mint), there was a one-year cliff period. During this time, all initial investors were blocked from transferring their initial stake of SUI to the marketplace. A common practice for new cryptocurrency, the cliff period protected early network stability against large-scale sell-offs from early investors. The cliff period ended in May 2024. ### Airdrops[​](https://docs.sui.io/concepts/tokenomics#airdrops "Direct link to Airdrops") Often, when a new token launches, its minters set aside a percentage of the sum to distribute to early adopters to drive interest in the associated blockchain project. This process is called an _airdrop_. There were no SUI airdrops to support the launch of Sui's Mainnet network. This was a publicly-stated, intentional decision for the following reasons: 1. Airdrops expose a potential for bad actors to take advantage of the excitement around a new launch. By publicly stating there would be no airdrops, Sui attempted to mitigate the risk its users faced. 2. Cryptocurrency is regulated differently across the globe. Airdrops can be viewed as taxable events in some jurisdictions, creating legal or financial complications. 3. Sui is committed to the long-term success of the network and its stakeholders. Airdrops might generate excitement early in a project's lifecycle, but the long-term benefits are minimal. Storage fund[​](https://docs.sui.io/concepts/tokenomics#storage-fund "Direct link to Storage fund") ---------------------------------------------------------------------------------------------------- SUI pays for the gas fees and data storage on the network. A potential problem arises, however, when new validators come on-chain. Even though the validator is new, it still must pay the storage cost for activity that happened before it was part of the network. Sui addresses this problem with the storage fund, a cache of SUI that never fully depletes. Each on-chain transaction that adds data to the chain includes a fee for storage, which the protocol adds to the storage fund. The storage fund itself has a stake in the network, so it collects rewards based on that stake just like every other on-chain stakeholder. The protocol then regularly distributes those storage fund rewards to Sui validators to pay for storage. In this way, new validators to the network get paid for storing data from past transactions. ### Storage fund rewards[​](https://docs.sui.io/concepts/tokenomics#storage-fund-rewards "Direct link to Storage fund rewards") Total stake is calculated as the sum of user stake plus the SUI tokens deposited in the storage fund. The storage fund receives a proportional share of the overall stake rewards depending on its size relative to total stake. The largest share of these stake rewards are paid out to current validators to compensate for storage costs. The rewards that remain are reinvested into the fund. When on-chain storage requirements are high, validators receive substantial additional rewards to compensate for their storage costs. The storage fund includes three key features: 1. Past transactions contribute to the storage fund, which functions as a tool for shifting gas fees across different epochs. This ensures that future validators are compensated for their storage costs by the past users who created those storage requirements in the first place. 2. The storage fund pays out only the returns on its capital and does not distribute its principal. In practice, this means validators borrow the storage fund's SUI as additional stake and keep the majority of stake rewards. Validators do not, however, receive funds directly from the storage fund. This guarantees the fund never loses its capitalization and can survive indefinitely. This feature is further strengthened by the stake rewards reinvested into the fund. 3. The storage fund includes a deletion option. If you delete data, you get a partial refund of the storage fees paid originally. ### Deflation[​](https://docs.sui.io/concepts/tokenomics#deflation "Direct link to Deflation") Unlike traditional economics, deflation is a feature of Sui rather than a bug. The total supply of SUI is capped, so increased activity on the network has a deflationary effect as the storage fund grows in relation to the amount of data stored, which effectively takes more SUI out of circulation. The value for SUI increases in relation to the decrease in circulating supply. Validator rewards[​](https://docs.sui.io/concepts/tokenomics#validator-rewards "Direct link to validator-rewards") ------------------------------------------------------------------------------------------------------------------- All honest validators on Sui receive their staking rewards with full certainty. The rewards are based only on the amount of stake the validators hold, removing randomness from the equation. ### Staking pools[​](https://docs.sui.io/concepts/tokenomics#staking-pools "Direct link to Staking pools") Each Sui validator maintains its own staking pool to track the amount of stake and to compound staking rewards. Validator pools operate together with a time series of exchange rates that are computed at each epoch boundary. These exchange rates determine the amount of SUI tokens that each past SUI staker can withdraw in the future. Importantly, the exchange rates increase as more rewards are deposited into a staking pool. The longer an amount of SUI is deposited in a staking pool, the more rewards it accrues. When SUI is deposited to the staking pool in epoch `E`, those SUI are converted into liquidity tokens at the epoch `E` exchange rate. As the staking pool earns rewards, the exchange rate appreciates. At epoch `E'`, those liquidity tokens are worth more and translate into more SUI. The only difference between Sui staking pools and typical liquidity pools is that in Sui the liquidity tokens do not exist. Rather, the global exchange rate table is used to track the accounting. Because all SUI tokens in the staking pool are treated the same, all SUI tokens immediately count as stake and thus compound rewards immediately. The staking pool is implemented in a system-level smart contract ([`staking_pool.move`](https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/packages/sui-system/sources/staking_pool.move) ) and is part of the Sui framework. ### Validator pool exchange rate[​](https://docs.sui.io/concepts/tokenomics#validator-pool-exchange-rate "Direct link to validator-pool-exchange-rate") The exchange rate for each validator pool is calculated at each epoch boundary as follows: ExchangerateatE+1\=(1+(third−partystakerrewardsatE/third−partystakeatE))×(exchangerateatE)Exchange rate at E+1 = (1 + (third-party staker rewards at E / third-party stake at E)) × (exchange rate at E)ExchangerateatE+1\=(1+(third−partystakerrewardsatE/third−partystakeatE))×(exchangerateatE) The distinction between third-party owned versus validator\-owned rewards and stake is relevant in that validators earn commission on the staking pool's tokens but third-party stakers do not. This accounting enables Sui to keep track of the rewards accrued by both validators and third-party token holders using a single global exchange rate table. ### Validator staking pool requirements[​](https://docs.sui.io/concepts/tokenomics#validator-staking-pool-requirements "Direct link to validator-staking-pool-requirements") There are minimum staking requirements a validator must satisfy to become active and to stay in the active validator set. ##### Stake requirements[​](https://docs.sui.io/concepts/tokenomics#stake-requirements "Direct link to Stake requirements") The Sui network is rolling out [SIP-39](https://github.com/sui-foundation/sips/blob/main/sips/sip-39.md) , which will significantly lower the barrier to entry for validators. Instead of requiring a minimum amount of SUI tokens, validators will need a minimum amount of _voting power_. When fully rolled out, SIP-39 will mean the following validator requirements: * A validator candidate must accrue at least 3 voting power before they can request to join the validator set. * If an active validator's stake falls below 2 voting power, they have seven epochs of grace period to gain back the stake before being removed from the validator set. * If an active validator's stake falls below 1 voting power, they are removed from the validator set at the end of the current epoch boundary. Sui uses 24-hour epochs. For more information on voting power, see [Understanding the voting power formula](https://docs.sui.io/concepts/tokenomics#understanding-the-voting-power-formula) . tip Want to be a Sui validator? If you have the required stake and plan to operate a validator on Sui, your participation is welcome and Sui is committed to supporting your onboarding. Kindly complete [this form](https://docs.google.com/forms/d/e/1FAIpQLSf6ZngRJ6Q5RdEiBfnbpUq4Htj8ShL58I6JRkmRTwTVSzeNtQ/viewform) to be added to our Validator Discord and keep up with upcoming validator releases and technical support. #### Understanding the voting power formula[​](https://docs.sui.io/concepts/tokenomics#understanding-the-voting-power-formula "Direct link to Understanding the voting power formula") [SIP-39](https://github.com/sui-foundation/sips/pull/39) uses the following formula to determine if a validator can join the set: S / (S + T) > V / 10000 * `S` = The validator candidate's stake amount. * `T` = Total amount already staked in the network. * `V` = Minimum voting power threshold (3 in the final phase). * `10000` = Total voting power units in the Sui system. This formula checks if the validator would have at least `V` voting power after joining. 1. `S / (S + T)` calculates what proportion of the total stake the validator would control. 2. When multiplied by `10000`, this gives their voting power in Sui's standardized units. 3. The validator can join if this value is greater than or equal to the threshold `V`. For example, with a network stake of 7.69B SUI and `V`\=3, a validator with 2.31M SUI would have: 2,310,000 / (2,310,000 + 7,694,950,773) ≈ 0.0003 proportion, converting to voting power: 0.0003 × 10000 ≈ 3 units. Since 3 ≥ 3, they meet the threshold to join. As the total network stake changes, the minimum required amount adjusts automatically. Related links[​](https://docs.sui.io/concepts/tokenomics#related-links "Direct link to Related links") ------------------------------------------------------------------------------------------------------- • [The Sui Smart Contracts Platform: Economics and Incentives](https://docs.sui.io/paper/tokenomics.pdf) Whitepaper that details Sui tokenomics. • [Gas Fees](https://docs.sui.io/concepts/tokenomics/gas-in-sui) A Sui transaction must pay for both the computational cost of execution and the long-term cost of storing the objects a transaction creates or mutates. * [Native token: SUI](https://docs.sui.io/concepts/tokenomics#native-token-sui) * [Stakeholders](https://docs.sui.io/concepts/tokenomics#stakeholders) * [Delegated proof of stake](https://docs.sui.io/concepts/tokenomics#delegated-proof-of-stake) * [Token supply](https://docs.sui.io/concepts/tokenomics#token-supply) * [Token distribution](https://docs.sui.io/concepts/tokenomics#token-distribution) * [Vesting schedules](https://docs.sui.io/concepts/tokenomics#vesting-schedules) * [Airdrops](https://docs.sui.io/concepts/tokenomics#airdrops) * [Storage fund](https://docs.sui.io/concepts/tokenomics#storage-fund) * [Storage fund rewards](https://docs.sui.io/concepts/tokenomics#storage-fund-rewards) * [Deflation](https://docs.sui.io/concepts/tokenomics#deflation) * [Validator rewards](https://docs.sui.io/concepts/tokenomics#validator-rewards) * [Staking pools](https://docs.sui.io/concepts/tokenomics#staking-pools) * [Validator pool exchange rate](https://docs.sui.io/concepts/tokenomics#validator-pool-exchange-rate) * [Related links](https://docs.sui.io/concepts/tokenomics#related-links) --- # Unknown The Sui Smart Contracts Platform: Economics and Incentives The Mysten Labs Team econ@mystenlabs.com May 2022 1 Introduction The Sui Smart Contracts Platform is an environmentally-friendly, cost-efficient, high- throughput, and low-latency permissionless blockchain. Sui’s capabilities are well be- yond the frontier of existing blockchain systems. Recent tests show that an unoptimized single-worker Sui validator running on an 8-core M1 Macbook Pro can execute and com- mit 120,000 token transfer transactions per second (TPS). 1 This achievement augurs the genesis of a platform that can meet the Herculean requirements needed to serve billions of users across a wide range of web3 applications. Sui’s cutting-edge performance is enabled by major advancements in the fields of distributed systems, cryptography, and programming languages. In the same spirit, the Sui economy has been designed at the frontier of blockchain economic and incentives research. The overarching goal has been to implement an economic system aligning in- centives across the various entities participating in the Sui ecosystem. The aim is for Sui’s financial plumbing to be at par with its engineering design so that Sui delivers a flour- ishing economy with billions of participants. This tokenomics paper describes the core elements of the Sui economy. We refer the reader to the “Sui Smart Contracts Platform” white paper at https://sui.io/whitepaper for details on Sui’s technical design and rec- ommend both papers be read in parallel. The Sui economy is characterized by three sets of entities: • Users submit transactions to the Sui platform in order to create, mutate, and trans- fer digital assets or interact with more sophisticated applications enabled by smart contracts, interoperability, and composability. 1 A full performance report will be published when Sui’s testnet is released. 1 • Owners of Sui’s native asset – called SUI and available in finite supply – bear the option of delegating their holdings to validators and participating in the proof-of- stake mechanism. SUI owners also hold the rights to participate in Sui’s governance. • validators manage transaction processing and execution on the Sui platform. The Sui economy has four core components: • The SUI token is the Sui platform’s native asset and provides on-chain liquidity for the Sui economy. • Gas fees are charged on all network operations and used to reward participants of the proof-of-stake mechanism and prevent spam and denial-of-service attacks. • The proof-of-stake mechanism is used to select, incentivize, and reward honest be- havior by the Sui platform’s operators – i.e. validators and the SUI delegators. • On-chain governance is used to modify and improve the functioning of the Sui pro- tocol across time. Sui’s main economic novelty is its specific implementation of the proof-of-stake mech- anism – a direct consequence of Sui’s object-centric design. Sui objects can encode any type of asset – including fungible and non-fungible tokens – and determine Sui’s global state. 2 Transactions on Sui take objects as inputs and deliver new objects as outputs. Conditional on the object-centric design, Sui processes and executes transactions us- ing a causal-ordering approach. Loosely speaking, if the objects in two transactions are fully independent, then it matters not which transaction is processed first. Indeed, it will often be the case that some validators process one transaction first and some validators the other. 3 This design is remarkably powerful because it lets Sui parallelize transaction processing of non-shared objects – i.e. objects owned by a single address (see section 2.4). Hence, each validator can scale itself horizontally and increase its transaction through- put by adding more computing power. This delivers highly efficient unit economics in that both throughput and costs scale linearly with network activity on independent data. Sui’s “multi-lane” design contrasts markedly with traditional blockchain designs relying on total ordering – where every single transaction is ordered relative to each other, even fully independent transactions. Sui’s proof-of-stake mechanism leverages the causal ordering approach such that pro- cessing and executing each transaction requires a quorum of 2/3’s of the validators by stake. Validators participate passively by receiving incoming transactions, validating their authenticity, and sending back signatures to the users. Hence, Sui both processes 2 Sui objects are not limited to digital assets, but can also encode smart contracts and the Move packages used to create and manage other objects. For the purposes of this paper, objects will be treated as if they were synonymous with digital assets. See the Sui white paper for a detailed discussion of Sui objects. 3 Causal ordering does require some degree of ordering, however. For example, if transaction B utilizes transaction A’s output objects as inputs then transaction B must necessarily follow transaction A. Ordering is also important in the case of shared objects – where objects are owned by multiple addresses. 2 different transactions in parallel and enables validators to process transactions shortly af- ter submission. Since Sui is leaderless and every validator has an equal role in validation and execution, all honest validators reap the benefits and obtain stake rewards according to their share of delegated stake. Consequently, Sui requires no wasteful computation and avoids the “rich-get-richer” forces present in other proof-of-stake implementations where high-stake validators are more likely to obtain protocol rewards. Sui’s gas pricing mechanism achieves the triple outcomes of delivering users with low, predictable transaction fees, of incentivizing validators to optimize their transaction processing operations, and of preventing denial of service attacks. Importantly, a unique feature of Sui’s gas mechanism is that Sui users pay separate fees for execution and stor- age. Execution or, computation gas prices, are determined thorough a three-step process operating repeatedly across Sui epochs (time is divided into consecutive periods lasting roughly 24 hours each): 1. A gas price survey asks validators to submit reservation prices at the epoch start – that is, the minimum gas price at which they are willing to process transactions. The protocol sets the 2/3’s percentile by stake as the epoch’s reference gas price. 2. As the epoch progresses with users submitting transactions and validators process- ing them, validators obtain signals over the operations of other validators. 3. At the epoch close, each validator submits their (subjective) beliefs over every other validator’s behavior and this information is used as an input into the stake reward distribution rule. Validators who submitted low price quotes during the gas survey – namely, lower than the reference price – or who processed all transactions above their self-declared reservation price promptly get boosted rewards. Contrarily, val- idators who submit high price quotes during the gas survey or who do not honor their self-declared reservation price get penalized with discounted rewards. Sui’s gas pricing mechanism provides end users with good user experience and cre- ates the incentives for validators to operate sustainable business models. On the user side, Sui does not require gas prices to be above or below the reference gas price – indeed, users are free to submit any gas price. However, the gas pricing mechanism is designed so that validators are incentivized to both elicit their true reservation gas price and to honor such prices. Consequently, Sui users can expect transactions submitted with gas prices close to or at the reference price to be processed promptly. Sui users thus avoid the inefficiencies of having to forecast the current gas price and overpaying as a result. On the validator side, a quorum of validators should always be able to operate with healthy gross margins since they collectively decide the reference gas price. Moreover, since the most efficient validators receive boosted rewards, Sui’s gas mechanism includes incen- tives to avoid cartel-like behavior at the time of price setting. In sum, Sui’s gas price mechanism creates a healthy competition for fair prices: Validators are incentivized to set low gas prices but not too low – lest they be penalized for failing to honor such prices. 3 Sui’s gas pricing mechanism bestows Sui users with an important monitoring role. On the one hand, users want their transactions to be processed as quickly and efficiently as possible. User clients such as wallets encourage this by prioritizing communication with the most responsive validators. Such efficient operations are compensated with boosted rewards relative to less responsive validators. On the other hand, SUI token delegators re- ceive the same boosted or penalized rewards as their delegate validator. An unresponsive validator is thus doubly exposed to the gas pricing mechanism: they lose directly through slashed rewards and indirectly through reduced delegated stake in future epochs as stak- ers move their tokens to more responsive validators. Sui also includes an efficient and sustainable economic mechanism for pricing data storage. Beyond Sui’s high throughput and low latency, a key Sui feature is its ability to handle arbitrary amounts of on-chain data. Financially, this feature introduces a severe intertemporal challenge: Validators who process and write data into storage today may differ from the future validators needing to store that data. If users were to pay only the fees for computation power at write, effectively, future users would need to subsidize past users for their storage and pay disproportionately high fees. This negative network externality can become highly taxing for Sui in the long-run if left unaddressed. Sui’s economic design includes a storage fund that redistributes past transaction fees to future validators. In a nutshell, users pay fees upfront for both computation and stor- age. The storage fees are deposited into a storage fund used to adjust the share of stake re- wards distributed to validators relative to SUI delegators. When on-chain storage require- ments are high, validators receive substantial additional rewards in order to compensate their costs. Vice versa when storage requirements are low. Importantly, the storage fund never distributes rewards directly out of its principal, thus providing an economic mech- anism that is viable in the long-run and that can fund storage costs indefinitely. The storage fund introduces various desirable incentives into the Sui economy. First, it includes a “deletion option” by which users obtain a storage fee rebate whenever they delete previously stored on-chain data. 4 This introduces a useful self-regulating throttle mechanism by which users delete data whenever storage no longer makes sense finan- cially. Second, because the Sui storage fund is denominated in SUI, increased activity leads to larger storage requirements and to more SUI removed from circulation. The storage fund thus kills two birds with one stone: it delivers a financially viable storage model and also creates deflationary pressure on SUI – benefitting the network’s owners and users. Third, the storage fund is capital efficient in that it is economically equivalent to a rent model where users pay for storage through a pay-per-period model. The stor- age fund is arguably cleaner, however, since it needs not rely on the vast complexities in establishing rent models where a myriad of users individually pay for rent each period. 4 This should not be confused with deleting past transactions. Activity on Sui is finalized at each epoch boundary and thus past transactions are immutable and can never be reversed. The type of data that can be deleted is, for example, data corresponding to objects that are no longer live such as an NFT’s metadata, tickets that have been redeemed, auctions that have concluded, etc. 4 The Sui economics white paper proceeds as follows. Section 2 begins by describing the main primitives and operations of the Sui platform. Section 3 introduces the main building blocks of the Sui economy and offers an overview of Sui’s proof-of-stake eco- nomic model. Sections 4 and 5 delve deeply into the design and incentives present in Sui’s gas price mechanism and storage fund, respectively. Section 6 discusses the long-term dy- namics of Sui’s economic model. Finally, section 7 offers some concluding thoughts. The appendix contains a summary of the model’s free parameters. 2 Primitives of the Sui Platform 2.1 The SUI Token The Sui platform’s native asset is called SUI – and we will generally use the capitalized version of SUI to distinguish the token from the Sui platform. The Sui platform divides time into sequential epochs that we index with the time subscripte=0, 1, 2, . . . We denote the total supply of SUI at epocheasM e . The SUI token’s monetary rule is such that supply is non-decreasing over time – i.e. SUI tokens are never burnt andM e ≤M e+1 for alle. The long-run SUI supply is capped at lim e→∞ M e = 10, 000, 000, 000 tokens. 5 We will refer toe=0 as the genesis epoch, at which point a non-zero amount of SUI tokensM 0 >0 are minted. The SUI token serves four purposes on the Sui platform. First, the SUI token can be staked within an epoch in order to participate in the proof-of-stake mechanism. Second, the SUI token is the asset denomination needed for paying the gas fees to execute trans- actions or other operations on the Sui platform. Third, SUI can be used as a versatile and liquid asset for various applications including the standard features of money – a unit of account, a medium of exchange, or a store of value – and more complex functionality enabled by smart contracts, interoperability, and composability across the Sui ecosystem. Fourth, and finally, the SUI token plays an important role in governance by acting as a right to participate in on-chain voting on issues such as protocol upgrades. 2.2 Sui Objects and Transactions The Sui platform relies on objects as its main building block. Sui objects can represent any type of digital asset, including fungible and non-fungible tokens. We will refer to actions on the Sui platform – such as object creations, deletions, mutations, or transfers – as transactions. A generic transaction takes objects as inputs, operates a specified set of instructions on the inputs, and produces subsequent objects as outputs. Non-shared objects – objects owned by a single address – have three important char- acteristics. First, every object is tied with single-ownership by including an “address” 5 While the Sui protocol does not include mechanisms for burning tokens explicitly, in practice various forces have a similar deflationary effect as that of burning tokens (see section 6.1). Note each SUI token is divisible up to a large number of decimal places. 5 field. Second, objects can be used in a transaction but only when authenticated by the sig- nature of the owning address. Third, objects include a digest indicating the transaction that had said object as an output. The set of objects that have not yet been used as inputs in a transaction is called the set of “live objects.” The Sui platform’s programming language is built such that non- live objects – i.e. objects already used as inputs in previous transactions – cannot be used again by future transactions. Consequently, the full set of objects and transactions across all epochs can be used to construct a directed acyclical graph (DAG) representing the evolution of Sui’s state across time. In this DAG, objects correspond to vertices, transac- tions correspond to edges, and the set of live objects correspond to childless vertices and vertices with fewer outgoing edges than the transaction has outputs. While objects represent the core elements of the Sui platform, the economics of Sui are best understood through the lens of transactions. For this reason, we will use the notation τto refer to a generic transaction and refrain from modeling objects explicitly. The reader should keep in mind, however, that all transactionsτare associated with a list of object inputs, outputs, and actions. 2.3 Staking The Sui platform relies on delegated proof-of-stake to determine the set of validators who process transactions. Within each epoche, operations are processed by a setV e of validators, with each validatorv∈V e participating with an amountS e (v)of stake. The amount of stake is relevant in that it determines the share of voting power each validator has to process transactions. Call the collection of validators and delegated stakeC e = ( V e ,S e ( · )) a committee and denote the total amount of delegated stakeS e = ∑ v∈V e S e ( v ) . It will be useful to define an validator’s stake share asσ e ( v ) =S e ( v ) /S e . By construction, the following conditions hold:S e ≤M e and ∑ v∈V e σ e ( v ) =1 for all epochse. The Sui platform implements delegation by allowing any owner of the SUI token to delegate all or part of their holdings to a specific validator and participate in the staking rewards earned by such validator. When SUI token holders delegate SUI, the SUI tokens are locked at the chosen validator for the entire epoch. SUI token holders can unlock their SUI or delegate them to different validators when the epoch changes. As a result of changes in delegation, committees evolve across epochs with both the set of live validators and distribution of managed stake potentially chang- ing at the epoch boundary. That is, between two epochseande+1, bothV e 6=V e+1 and S e ( v ) 6=S e+1 ( v ) forv∈V e ,V e+1 will be generally true. Rewards from Sui’s operations are distributed across various entities, including the set of validators and SUI delegators, at the epoch close. The next section discusses the procedure by which users, clients, and validators submit, process, and record transactions on the Sui platform. 6 2.4 System Operations Sui’s operations are secure as long as less than 1/3rd of the validators (weighted by stake) are Byzantine – i.e. that they deviate arbitrarily from the protocol (see the Sui white paper for further details). Processing a transaction on Sui requires two broad steps: 1. In the first step, a user cryptographically signs transactionτwith their private key and sends it to the current epoch’s validator setV e . Each validator validates the transaction and, in case of success, signs the transaction with their own private key and sends the signed transaction back to the user. 2. The second step occurs once signatures from at least 2/3’s of the validators by stake have been received. Formally, this takes place once the user receives signatures from a quorumQ e ⊂V e such that ∑ v∈Q e σ e ( v ) ≥2/3. These responses are then collected to form a transaction certificate. This certificate is subsequently sent to the validators, who check its signatures and execute the transaction. Finality is achieved once a quorum of validators has executed the certificate. Note that the user was required to cryptographically sign their transaction only at the very beginning, when submitting the transaction for validation by the validator set. Hence, in practice, the subsequent process need not be carried out by the user itself but can instead be managed by a third-party client or gateway service. The main economic benefit of Sui’s transaction flow is it can be parallelized. For ex- ample, take two transactionsτandτ ′ such that their two sets of mutable input objects is disjoint. It is easy to see that the above two steps can be processed simultaneously forτ andτ ′ with the only requirement being that each validator devote separate resources to process each transaction. Without loss of generality, the same argument applies to the case of thousands or millions of simultaneous transactions. The ability to parallelize transac- tions emanates from Sui’s object-centric design, which makes it trivial for the protocol to keep track of which transactions can be parallelized and in what manner. The Sui platform thus scales throughput linearly by adding more computing power to each validator, while also scaling costs linearly. This delivers a cost-effective platform that remains fast and cheap regardless of the aggregate demand for the network’s resources. More generally, the case of shared objects – whereτandτ ′ call the same input objects – is more complex. Shared objects imply that not all transactions can be fully parallelized and, moreover, that validators must run a consensus protocol to agree on the current state of a shared object. In these cases, a degree of parallelization is still possible by noting that while shared objects create causal dependencies, different non-causally-dependent shared objects can be parallelized. Together with this lighter parallelization, the Sui plat- form obtains agreement through a high-throughput DAG-based consensus mechanism to process shared objects. The reader can refer to the Sui white paper for technical details. 7 3 The Sui Economy: Basic Building Blocks We now describe the economics of the Sui platform both within and across epochs. For the purposes of this discussion, we abstract away from some of the engineering intricacies that are less relevant to the network economics and incentives. The Sui platform generates rewards to incentivize its operators and distributes these SUI tokens across network participants. We split this process into three steps. First, we describe the platform’s ability to generate rewards through gas fees. Second, we introduce the Sui storage fund and show how it enables Sui to shift rewards across different epochs. Third, we review the platform’s economic model for distributing rewards within a given epoch. 3.1 Gas Fees The Sui platform generates rewards by charging users with gas fees. 6 Letτbe an arbitrary transaction on Sui – for example, an object creation, mutation, transfer, or deletion. The gas fees associated with processing transactionτduring epocheequal: GasFees e \[ τ \] =ComputationUnits e \[ τ \] ×P C e \[ τ \] ︸ ︷︷︸ computation fees in SUI +StorageUnits e \[ τ \] ×P S e ︸︷︷︸ storage fees in SUI .(1) The gas functions ComputationUnits e \[ τ \] and StorageUnits e \[ τ \] measure the amount of computation and storage resources, respectively, required to process and store the data associated withτ. We index the gas functions with a time subscript since the comput- ing and storage cost may change across epochs due to protocol upgrades, improvements in software and hardware, and other factors. Within an epoch, however, the gas func- tion is deterministic and common across all network participants. The gas pricesP C e \[ τ \] andP S e capture the cost of one unit of computation or storage, respectively, in SUI units. Both computation and storage fees are invoiced in and must be paid for with the SUI token. Importantly, note that the computation gas price may differ across transactions both within and across epochs while the storage gas prices is constant within an epoch but varies across epochs. In practice, the average user of the Sui platform uses fiat as their standard unit of account. This implies that for most users, what matters is not the SUI value of gas but the dollar value of gas. LetP $ e be the dollar price of the SUI token at the start of epoche. The dollar cost of processing transactionτequals: GasFees $ e \[ τ \] =GasFees e \[ τ \] ×P $ e , =ComputationUnits e \[ τ \] ×P C e \[ τ \] ×P $ e ︸ ︷︷︸ computation fees in $ +StorageUnits e \[ τ \] ×P S e ×P $ e ︸ ︷︷︸ . storage fees in $ 6 Gas fees have the added benefit of discouraging spam by introducing non-zero costs of network uti- lization. 8 The Sui economy is designed to keep gas fees low in dollar terms. As discussed above, the gas functions ComputationUnits e \[ τ \] and StorageUnits e \[ τ \] are determined by techno- logical constraints while SUI’s dollar priceP $ e is determined by market forces. Hence, the only degree of freedom in GasFees $ e \[ τ \] lies in the gas pricesP C e \[ τ \] andP S e . Keeping gas fees low in dollar terms thus requires gas prices to move counter-cyclically with SUI’s dollar price. WhenP $ e is high thenP C e \[ τ \] andP S e should be low; vice-versa whenP $ e is low. The Sui economy achieves this by incorporating market-based incentives to keep the productsP C e \[ τ \] ×P $ e andP S e ×P $ e roughly low and constant both within and across epochs. The gas price mechanism achieving this property is described in section 4. 3.2 Sui Storage Fund The Sui platform is optimized to deliver high throughput and low latency even while storing, potentially, arbitrary amounts of on-chain data. This imposes an important chal- lenge from an economic standpoint. The Sui network operates by relying on validators to process and execute transactions. Providing these services, however, requires having the data associated with past transactions on hand. The challenge is that if users only pay gas fees for computation, then validators will have to fund both their current operations and storage overhead with gas fees from cur- rent computations. This represents a tax on the system since current users do not inter- nalize the storage cost they’re imposing on future validators. This is further complicated by the fact that the validator setV e changes over time, implying that future validators will have to store data associated with past transactions from which they might not have obtained any rewards. Since future validators need a viable business model to survive, future computation fees would have to cover the costs of storage. In other words, future users would have to subsidize past users – an inefficient economic outcome. Sui’s economic model addresses the storage challenge by charging users storage fees upfront: a user submitting transactionτmust pay both for current execution and for fu- ture storage. In practice, operationalizing such a model in a sustainable manner becomes itself a complicated endeavor. To see why, note that charging storage fees delivers a finite amount of SUI tokens while storage costs are potentially infinite since data might need to be stored forever. Moreover, storage costs themselves are volatile and hard to predict. On one extreme, a solution is to simply charge upfront for storage for a finite amount of time and delete the data automatically if the user does not renew their storage fees at the time of expiry. On the other extreme, a solution is to design a storage fee model that can cover storage costs indefinitely. We take the view that the latter approach is better for user experience and the platform’s overall economic model. Sui’s economic model includes a storage fund designed to provide a sustainable and viable long-run mechanism for compensating validators for the cost of storage. In a nut- shell, the storage fund is used to adjust the staking rewards paid to validators, so that validators obtain an additional source of rewards to help offset their storage costs. 9 The storage fund has three key features. First, the storage fund is funded by past transactions. This ensures that future validators are compensated for their storage costs by the past users who created those storage requirements in the first place. In other words, the storage fund provides a tool for shifting stake rewards across different epochs. Sec- ond, the storage fund distributes tokens indirectly through the stake rewards accrued to its SUI deposits but does not actually pay out the deposits directly. This preserves the fund’s capitalization and guarantees it can survive indefinitely. Third, the storage fund’s mechanics incentivize users to delete data and obtain a rebate on their storage fees when the cost of storing such data exceeds the value obtained from maintaining that data on- chain. Hence, this design is efficient since it distributes rewards to compensate for existing storage and also includes a market-based mechanism for eliminating storage when it is no longer attractive from an economic standpoint. At a high-level, mechanics of the storage fund are as follows (details described in sec- tion 5). The storage fund’s size is fixed throughout the duration of an epoch and adjusted at the epoch boundary. Inflows correspond to the fund’s reinvestment of a share of the return on its capital into new principal, plus the epoch’s gas storage fees. Outflows corre- spond to the rebates accrued to users who delete data. Formally, the storage fund at the epoch boundary betweeneande+1 is given by: F e+1 =F e +Reinvestment e + ∑ τ∈T e StorageUnits e \[ τ \] ×P S e ︸ ︷︷︸ inflows − ∑ τ∈R e Rebates e \[ τ \] ︸ ︷︷︸ outflows ,(2) whereT e represents the set of transactions processed throughout epoche,R e represents the set of past transactions – i.e. fromeor before – whose data was eliminated throughout epoche, and Rebates e \[ τ \] is function capturing the rebates accrued by the users deleting the data associated withτ. Note that the storage fund is denominated in SUI units. 3.3 An Economic Model with Proof-of-Stake and Storage We now discuss how the above elements interact with each other in order to introduce Sui’s economic model. Throughout this section, we will use the visual representation in Figure 1 to aid the discussion. There are two key high-level differences between Sui’s economic model and traditional proof-of-stake systems. First, entities participating in the system’s operations can expect to achieve a smooth source of rewards across time, as opposed to the volatile reward streams in some alterna- tive models. This is a consequence of Sui validators playing a passive role as opposed to the active role validators play elsewhere. Since processing each transaction requires that a quorum of validators participate, all validators can benefit in proportion to their share of total stake during every epoch if they behave honestly. This is in contrast to other re- ward systems where the probability of receiving rewards at a given moment in time is proportional to the share of stake. This feature has important implications for the evolu- tion of the stake distribution across validators over time (see section 6.3.) This design also has important implications for the quality of service provided by each validator. While a 10 7RWDO6WDNH ᶓ GHOHJDWHG VWDNH ᶓ  VWRUDJH IXQG XVHUV VWRUDJH IHHV UHEDWHV FRPSXWDWLRQ IHHV VWDNH UHZDUGV GHOHJDWRUV YDOLGDWRUV ᶖ ᶓ ᶖᶓᶕ ᶓ ᶕ ᶓ QHZWRNHQV RSWLRQDO Figure 1: The Sui Economy larger stake share lets validators reap more stake rewards, large validators are also more likely to be prioritized by clients during regular network operations. Consequently, larger rewards are partially offset by the increased costs of scaling operations; thus ensuring all validators enjoy viable business models regardless of their delegated stake size. Second, the presence of the Sui storage fund delivers the ability to shift rewards across epochs. This implies that the proof-of-stake mechanism needs to be adjusted to account for the storage fund’s presence. In particular, the economic model needs to be carefully designed in order to preserve the incentives arising from the proof-of-stake mechanism while accommodating the additional incentives arising from the storage fund. The Sui economic model works as follows: • At the beginning of epoche: Three important things happen at the epoch boundary betweene−1 ande. First, SUI holders delegate (some of their) tokens to validators, and a new validator committeeC e = ( V e ,S e ( · )) is formed. Second, the reference gas prices are set (see section 4). Third, the size of the storage fund is updated toF e as described in equation (2). This last action is important because the Sui economic model will assume that the total amount of stake is given by the sum of delegated stake plus the storage fund. In other words, the total amount of staked SUI during epocheis given by:S e +F e , where remember thatS e = ∑ v∈V S e ( v ) . It will be useful to define the auxiliary variableα e as the share of delegated stake: α e = S e S e +F e . Note thatα e is an endogenous variable that changes over time in response to the aggregate decisions of Sui’s users, delegators, and validators. 11 • During epoche: Users submit transactions to the Sui platform, and validators pro- cess them. Remember thatT e is the set of transactions processed during the epoch. For each transactionτ∈T e users pay the GasFees e \[ τ \] described in equation (1). Ifτ corresponds to a transaction deleting the data associated with a past transactionτ ′ then the user receives a SUI transfer of Rebate e \[ τ ′ \] . • At the end of epoche: validators vote to end the current epoch and exchange in- formation to commit to a checkpoint with the aid of an agreement protocol. The union of all transactions processed by a quorum of validators is calculated in order to agree on the current state of the Sui platform. The final step is to distribute the epoch’s rewards to the different entities. This occurs in two steps: –First, we must calculate the total amount of rewards generated throughout the epoch. These rewards are distributed to the entities who participated in the staking process. In Sui, there are two sources of stake rewards: computation fees and new token issuance. Formally: StakeRewards e = ∑ τ∈T e ComputationUnits e \[ τ \] ×P C e \[ τ \] + ( M e+1 −M e ) . As Figure 1 shows, stake rewards from new token issuance are optional in the sense that some epochs may see zero stake rewards raised through this channel. Indeed, in the long-term it is necessarily the case that no new tokens are issued given that the total amount of SUI in circulation is capped. More likely, most of the new token issuance designated as stake rewards will be paid out in Sui’s initial epochs to subsidize validators when network activity is still nascent. –Second, we determine the split of stake rewards across network participants. To do this we need to discuss the role of the storage fund, one of the most important elements of the Sui economy. Simply put, the storage fund lets validators increase the number of SUI tokens they receive relative to delegators by adjusting their share of staking rewards. Since the storage fund is tallied into the calculation of total stake, a share 1−α e of the staking rewards accrue to the storage fund. In contrast to delegated stake, however, the storage fund is not owned by the delegators; and this opens the question of who should receive these rewards. The Sui economic model takes the view that the rewards accruing to the storage fund should be used to compensate for storage. Since validators are the entities storing data, they should be the entities entitled to these rewards. Formally, the distribution of staking rewards is as follows. Assume that dele- gators enter into contracts with their respective validators such that validators are entitled to a commissionδ∈ \[ 0, 1 \] for their services. 7 Delegators receive the 7 This is easily generalizable to a setting where each validator negotiates a separate commission with its delegators and where this commission changes over time. In such a case, we would index the commission paid to validatorv∈V e asδ e ( v ) . 12 following amount of staking rewards: DelegatorRewards e = ( 1−δ ) ×α e ×StakeRewards e . Meanwhile, validators receive the remaining rewards corresponding to dele- gated stake and a shareγ∈ \[ 0, 1 \] of the rewards corresponding to the stake from the storage fund: ValidatorRewards e = ( δ×α e +γ× ( 1−α e )) ×StakeRewards e .(3) Settingγ<1 and distributing less than the full amount of storage fund re- wards to validators is useful for preserving the storage fund’s long-term finan- cial health. In practice,γwill likely be close to 1 and updated infrequently through governance proposals depending on the storage fund’s health. The storage fund’s capital inflow from stake rewards is given by: Reinvestment e = ( 1−γ ) × ( 1−α e ) ×StakeRewards e . This scheme represents a full accounting schedule: StakeRewards e =DelegatorRewards e +ValidatorRewards e +Reinvestment e . In sum, the storage mechanism allows validators to obtain additional rewards beyond the share corresponding to their delegated stake in order to fund their storage overhead. The storage fund acts as a wedge between SUI delegators and validators permitting the latter to increase their share of overall staking rewards. To see this note that: ( δ×α e +γ× ( 1−α e )) ︸ ︷︷︸ validator rewards with storage pricing >δ ︸︷︷︸ validator rewards without storage pricing ⇔γ>δ. Effectively, it is as if the validators were able to borrow the SUI deposited in the storage fund at a lower interest rate than the SUI borrowed from delegators. This is true whenever γ>δand, in practice, will be the case since delegators only delegate if served with a low commission (lowδ)while the protocol is designed to reward for storage (highγ). 4 Gas Price Mechanism: Design and Incentives The Sui gas price mechanism is designed to achieve two overarching goals. First, gas prices should be low in $-terms and predictable both within and across epochs. This de- livers good user experience to Sui users, who can focus on using the Sui network without worrying about the level and volatility of transaction fees. Second, the gas price mech- anism is designed to encourage and reward good validator behavior throughout Sui’s regular operations. This arrangement aligns incentives between the SUI token holders, the network’s operators (i.e. validators), and its users. 13 4.1 Computation Gas Prices Remember from equation (1) that computation gas pricesP C e \[ τ \] are set at the transaction level and thus vary both within and across epochs. More specifically, the Sui network unbundles computation gas prices into separate fixed and tip components: P C e \[ τ \] = P C e ︸︷︷︸ fixed component +ζ \[ τ \] ︸︷︷︸ tip ,s.t.P C e \[ τ \] >P C e ︸︷︷︸ price floor . The fixed componentP C e is set at the network level for the duration of the epoch while the tipζ \[ τ \] is at the discretion of the user. Sinceζ \[ τ \] can be negative, but constrained to keep the overall gas price positive and above the price floorP C e , the user submittingτis simply stating how much they are willing to pay relative to the network-wide fixed component: ζ \[ τ \] =P C e \[ τ \] −P C e . The price floor exists to prevent the network being flooded from spam, and should not affect the processing of regular activity. In practice, the price floor can be set in proportion to the reference price, such asP C e =β P C e withβ<1. We will refer to the fixed componentP C e as the reference gas price. Sui’s gas mech- anism is designed to make the reference gas price a credible anchor for users to use when submitting transactions on the network. That is, users can be reasonably confi- dent that submitting transactions with gas prices at or close to the reference gas price, i.e. P C e \[ τ \] ≈ P C e orζ \[ τ \] ≈0, will be processed in a timely manner. The gas pricing mechanism has three elements: 1. Gas Price Survey: An validator-wide survey is used to set the reference gas price at the beginning of each epoch. This delivers a coordination price point P C e around which users can submit their gas price quotesP C e \[ τ \] . 2. Tallying Rule: A validator-wide survey is used as an input into the distribution of stake rewards at the end of each epoch. This delivers the incentives for validators to honor the reference gas price P C e determined during the gas price survey. 3. Incentivized Stake Reward Distribution Rule: The amount of stake rewards dis- tributed to each validator is adjusted using information from the gas survey and tallying rule. This delivers the incentives for validators to set low reference gas prices P C e in the long run and prevents validators from gaming the system. Jointly, these three elements create a gas price mechanism delivering a low, stable, and credible reference gas priceP C e for users while ensuring that validators honor such prices and process transactions in a timely fashion. We now describe each element in detail. 4.1.1 Gas Price Survey: What’s the Gas Price? The gas price survey occurs right before the epoch boundary, at the moment of committee formation. This occurs in two steps: 14 • First, when validators propose the next epoch’s validator set and stake distribution C e = ( V e ,S e ( · )) , they also include a gas price proposal p C e ( v ) for eachv∈V e . • Second, the | V e | bids are aggregated to deliver a reference price such that 2/3’s of the proposals by stake are at or below this threshold. Formally, without loss of generality, the validators are ordered such thatv≤v ′ implies thatp C e ( v ) ≤p C e ( v ′ ) . The reference gas price is set at: P C e =p C e ( v ∗ ) ,withv ∗ ∈V e s.t. v ∗ −1 ∑ v=1 σ e ( v ) < 2 3 and v ∗ ∑ v=1 σ e ( v ) ≥ 2 3 . Essentially, the gas price survey asks each validator: at what price are you willing to pro- cess transactions? Aggregating the responses delivers a reference gas price P C e around which users can reasonably assume that a 2/3’s quorum of validators by stake will pro- cess their transaction promptly. Two challenges remain. First, what incentivizes validators to truthfully reveal their reservation gas price during the gas survey and ensure a quorum will actually process transactions around the reference gas price? Second, even if validators honor their price quotes, what prevents validators from setting an arbitrarily high reference gas price? 4.1.2 Tallying Rule: How to Split the Pie? The tallying rule is applied at the close of epoche, once the current validator set reach full agreement on the transactions processed during the epoch and before stake rewards are paid out. The tallying rule is used by each validator to construct a subjective measure over how much staking rewards should be distributed to every other validator. The tallying rule’s goal is to have a community-enforced system for encouraging val- idators to honor the quotes p C e ( v ) submitted during the gas price survey and thus in- centivize validators to reveal their true reservation prices. In particular, by punishing validators who do not honor their quotes, these incentives discourage validators who attempt to game the system by submitting arbitrarily low gas price quotes. The tallying rule has three elements: • Executed Gas Price Distribution: LetT e be the set of transactions executed during epoche. Since each transactionτ∈T e includes a computation gas priceP C e \[ τ \] , validators can construct the executed gas price distribution: T e \[ p \] = { τ∈T e s.t.P C e \[ τ \] ≥p } . This distribution requires data known with certainty at the epoch boundary and is thus a common, objective metric known by all validators. • Reasonable Execution Metric: Each validatorvmakes a subjective evaluation re- garding the transactions that every other validatorv ′ processed during the epoch. 15 In particular, this estimate is relative to the quotep C e ( v ′ ) submitted during the gas price survey. Formally: ˆ T v e ( v ′ ) = { τ∈T e \[ p C e ( v ′ ) \] s.t.v ′ processedτin reasonable time } . The main intuition is if validatorv ′ submitted a gas price quote ofp C e ( v ′ ) , then it should have processed all transactionsτ∈T e such thatP C e \[ τ \] ≥ p C e ( v ′ ) promptly. The reasonable execution metric is a subjective measure since it depends on a com- bination of data collected throughout the epoch by each individual validatorvand objective data known to all validators at the epoch boundary. For example, val- idators can implement gossip between them, with each validator listening to a few others and receiving notifications on their processed transactions. Differences across validators can be used to estimate the relative performance of each validatorv ′ from the point of view of the listening validatorv. Additional information such as prov- able Byzantine behavior, known delays in providing information, observing which validators sign which transactions, and other strategies can be used as further in- formation sources. Ultimately, though, this metric is subjective since it depends on each validator’s ability to obtain informative signals on its peers. • Tallying rule: The executed gas price distribution and reasonable execution metric are used to construct an estimate of relative validator performance. Specifically, validatorvproposes the following multiplier for each other validatorv ′ : ˆ μ v e ( v ′ ) =φ v × ∑ τ∈ ˆ T v e ( v ′ ) ComputationUnits e \[ τ \] ×P c e \[ τ \] ∑ τ∈T e \[ p C e ( v ′ ) \] ComputationUnits e \[ τ \] ×P c e \[ τ \] , where eachφ v is a normalizing constant such that 1 | V e | −1 × ∑ v ′ ∈V e \\ { v } ˆ μ v e ( v ′ ) =1. The multiplier’s numerator sums computation gas fees across all transactions val- idatorv ′ executed within reasonable time, out of all the transactions with gas prices above the validator’s self-declared reservation gas price. The denominator sums computation gas fees across all transactions executed in the epoch in which the gas price was at least as high as the reservation price of validatorv ′ . In other words, the denominator includes transactions validatorv ′ should have processed promptly but did not. Both the numerator and denominator are weighted by the executed gas fees since the relevant metric is not the number of transactions an validator processed, but the amount of computation it processed, relative to what it should have. 8 Finally, the normalizationφ v is included so that each validatorvsubmits a set of multipliers ˆ μ v e ( v ′ ) for all other validatorsv ′ ∈V e \\ { v } that average out to 1 but 8 Note that all of the tallying rule variables, includingT e \[ p \] , ˆ T v e ( v ′ ) , and ˆ μ v e ( v ′ ) , can be approximated with sampling techniques to speed up calculation in epochs when the executed transaction setT e is large. 16 in which validators with relatively good performance get a boost ˆ μ v e ( v ′ ) >1 and validators with relatively bad performance get a discount ˆ μ v e ( v ′ ) <1. 9 In sum, the tallying rule delivers a multiplier whereby each validatorvsays: If valida- torv ′ operated well in the sense that it processed all transactions above its self-declared reservation gas price in reasonable time then its stake rewards should be boosted. If not, then its stake rewards should be discounted/punished. The tallying rule thus creates community-enforced incentives for validators to honor the gas price quotes submitted during the gas survey. These incentives trickle upstream and encourage validators to submit honest quotes to begin with since, by providing quotes they can honor, validators avoid getting their rewards slashed. 4.1.3 Incentivized Stake Reward Distribution Rule: A Healthy Competition for Fair Prices The tallying rule incentivizes validators to submit gas price quotes they can honor, but the gas mechanism is still missing incentives to keep gas prices low. The incentivized stake reward distribution rule encourages an equilibrium where the validator set collectively proposes a low reference gas price. This rule is implemented in three steps: • First, the protocol computes epoche’s total validator stake rewards as described in equation (3). • Second, the protocol computes a set of global multipliers using the set of validator- submitted multipliers from the tallying rule. Formally, the global multiplier for validatorvis given by: ˆ μ e ( v ) =Median { ˆ μ 1 e ( v ) , . . . , ˆ μ v−1 e ( v ) , ˆ μ v+1 e ( v ) , . . . , ˆ μ V e e ( v ) } , where the median is weighted by the distribution of validator stakeσ e ( v ′ ) . The median rule helps guard Sui’s economic model against Byzantine behavior, where a subset of Sui validators attempt to appropriate a disproportionate amount of re- wards by giving each other excessively high multipliers. Note that validatorvdoes not submit a quote over its own performance. • Third, the total amount of validator rewards in equation (3) is distributed to indi- vidual validators according to the following incentivized distribution rule: ValidatorRewards e ( v ) = ˆ σ e ( v ) ×ValidatorRewards e where the share of validatorvequals: ˆ σ e ( v ) = { ψ× ( 1+κ ) × ˆ μ e ( v ) ×σ e ( v ) ,ifv≤v ∗ , ψ× ( 1−κ ) × ˆ μ e ( v ) ×σ e ( v ) ,ifv>v ∗ . 9 The normalization is important since it focuses attention on the relative performance of other validators from the listening validator’s perspective instead of focusing on absolute performance (i.e. focuses on variance in multipliers instead of levels). Consequently, the multipliers contain useful information even in cases where validators differ vastly in their ability to obtain subjective information about each other. 17 if validator does processif validator does not process transactions promptlytransactions promptly ˆ μ e ( v ) ≥1 ˆ μ e ( v ) <1 if validator submits low quote: ˆ σ e ( v ) <ψ× ( 1+κ ) ×σ e ( v ) p e ( v ) ≤P e ˆ σ e ( v ) ≥ψ× ( 1+κ ) ×σ e ( v ) if validator submits high quote: ˆ σ e ( v ) ≥ψ× ( 1−κ ) ×σ e ( v ) ˆ σ e ( v ) <ψ× ( 1−κ ) ×σ e ( v ) p e ( v ) >P e Table 1: Incentivized Stake Reward Distribution Rule: The gas mechanism creates incen- tives for validators to submit low gas price quotes, but only to the point at which they can reasonably honor those gas fees. Remember thatv≤v ∗ indexes validators submitting quotes below the reference price, i.e.p C e ( v ) ≤ P C e , whilev>v ∗ corresponds to validators above:p C e ( v ) > P C e . The parameterψis a normalizing constant such that ∑ v∈V e ˆ σ e ( v ) =1. This nor- malization is important since it prevents gaming the system: the set of multipliers ˆ μ e ( v ) are zero-sum in the sense that if some validators get boosted rewards then other validators must necessarily face discounted rewards. The key innovation in the incentivized rule is thatκ>0 is included as an additional multiplier to boost the rewards obtained by validators who submit low gas price quotes – specifically, quotes below the 2/3’s percentile. Analogously, validators who submit high gas price quotes receive a reduction in their rewards. Table 1 summarizes validator incentives. Two key forces are present: the tallying rule incentivizes validators to honor the quotes submitted during the gas survey while the distribution rule incentivizes validators to submit low gas prices. The interaction of these two forces is critical. On net, the gas price mechanism encourages validators to submit low gas price quotes – but not too low since then they will be punished for not honoring those bids. Sui’s gas price mechanism thus encourages a healthy competition for fair prices. In the ideal equilibrium, all validators optimize their operations and behavior to deliver good performance. In such a symmetric equilibrium, validators receive a share of rewards proportional to their share of overall stake, i.e. ˆ σ e ( v ) =σ e ( v ) . SUI delegators are subject to the same forces since they inherit the proportional share of rewards accruing to their delegate validator. Specifically, the total amount of stake rewards distributed to the delegators of validatorvequals: DelegatorRewards e ( v ) = ˆ σ e ( v ) ×DelegatorRewards e . SUI delegators thus play an important monitoring role by optimizing their delegation decisions according to validator behavior. validators are doubly incentivized to good 18 behavior, otherwise they get punished directly through slashed rewards and indirectly through losing delegated stake in future epochs. 4.2 Storage Gas Prices In contrast to computation gas pricesP C e \[ τ \] , storage gas pricesP S e are constant for all transactions within an epoch and only (infrequently) vary across epoch boundaries. Setting storage gas prices requires a different mechanism from computation gas prices for two reasons. First, storage prices are charged on transactions executed by current val- idators but used to reward future validators. This creates a wedge between the incentives that current and future validators care about. Second, storage prices are solely intended to create a sustainable business model for future validators and not primarily intended to incentivize proper network operations in the way computation gas prices do. For these two reasons, Sui’s storage pricing framework is more straightforward than its computa- tion pricing mechanism. Sui’s storage prices are set through governance proposals for the duration of various epochs (e.g. for the period of a few months). Specifically, a storage pricing target is set exogenously by fixing the dollar value of one unit of storage. Call $xthe dollar cost of storing one unit of storage for one epoch. The storage gas price is then set to: P S = $x rP $ , whereris the average nominal return on stake rewards (non-annualized) andP $ is SUI’s average dollar price, both taken over a preceding window (e.g. over the last week). The storage price in each subsequent epochP S e = P S is set at this level until a new governance proposal is passed. This targeting ensures that storage fees are roughly fixed in dollar terms for as long as the target is applied, with the user submitting transactionτpaying for storage in $-terms equal to: StorageUnits e \[ τ \] ×P S e ×P $ e ≈StorageUnits e \[ τ \] × $x r . Since validators receive the returns on the storage fund’s SUI, they receive a multipler% of the above during each epoch. We expect storage prices to be updated through governance proposals when SUI’s dollar price exhibits a substantial level shift. In the long-run,P S will likely tend to fall as the dollar-cost of storage falls with technological improvements. 4.3 Gas Prices as a Coordination Mechanism Sui’s gas price mechanism provides end users with credible reference points for submit- ting their transactions. By incentivizing validators to elicit their true reservation prices 19 and to honor these quotes, Sui users can credibly assume transactions submitted at or close to the computation reference price will be processed in a timely manner. Likewise, since the protocol requires storage fees be deposited into the storage fund, validators have no incentive to charge users more or less than the reference storage gas price. 10 Overall, users submitting transactionsτwith gas pricesP C e \[ τ \] = P C e andP S e face good user experience and clients, such as wallets, should automatically feed these prices to users. Sui’s gas mechanism avoids the pitfalls of first-price, auction-based settings where users typically overpay for gas. Similarly, Sui’s gas mechanism is consistent with Sui’s ability to scale horizontally. When network activity increases, validators add more work- ers, increase their costs linearly, and are still able to process transactions at low gas prices. In cases of extreme network congestion where validators cannot scale fast enough, the tip’s presence provides a market-based regulating mechanism that discourages further demand spikes by increasing the cost of transacting on the Sui platform. In the long run, Sui’s gas mechanism creates incentives for validators to optimize their hardware and operations. validators who invest in becoming more efficient are able to honor lower gas prices and obtain a reward boost of 1+κ. Sui validators are thus encouraged to innovate and improve the experience of end users. 5 Storage Fund: Design and Incentives The Sui storage fund is designed to provide future validators with a viable business model: To compensate future validators for storing on-chain data they did not obtain computation gas fees from at the moment of write. We now describe the detailed work- ings of the storage fund and explain how its design covers storage costs in perpetuity. 5.1 The Storage Fund’s Long-Term Viability There are two key concerns regarding the storage fund’s long-term viability. First, it is critical that the fund’s assets are never depleted. An empty storage fund is useless. Sec- ond, the storage fund’s size should be correlated with the amount of data held in storage by validators. Otherwise, validators will not be able to align their storage cost structure with the rewards proceeding from the storage fund. Sui’s economic model was designed to preserve the storage fund’s capital, which is never used directly as a source of SUI tokens. Rather, the storage fund simply distributes the return on its capital (i.e the staking rewards) to validators. By never touching the fund’s principal, this design protects the fund’s ability to distribute rewards for storage indefinitely. This feature is further buttressed by the capital reinvested at the end of each epoch, equal to a 1−γshare of the fund’s returns. 10 Storage gas fees are reminiscent of the base fee in Ethereum’s post-EIP-1559 world. In Ethereum, val- idators must charge users with the base fees since the protocol burns these fees. In Sui, validators must charge users with the storage fees since the protocol deposits these fees into the storage fund. 20 Sui’s economic model was designed to ensure the storage fund’s size is commensurate with the amount of data held in storage. This goal is achieved by denominating data deletion rebates in terms of the storage fees originally paid when the data was written. Formally, deleting the data associated with a transactionτ∈T e executed in epoche, during epoche ′ ≥edelivers: Rebates e ′ \[ τ \] =θ×StorageUnits e \[ τ \] ×P S e (4) whereθ∈ \[ 0, 1 \] . In the extreme case whereθ=1, rebates fully return the storage fees. The rebate function is justified by the fact that storage fees exist to compensate for storage throughout the data’s lifecycle. There is no reason to keep charging for storage once data has been deleted, and so these fees are fully rebated. Users thus enjoy a “deletion option” whereby they pay for storage but are also able to obtain a rebate whenever that storage no longer makes financial sense to them. More generally,θ<1 is useful if some but not all the data associated with a transactionτcan be deleted and a share 1−θof the storage fees remain in the fund to compensate storage costs in perpetuity. 11 The key property of the rebate function is that it limits storage fund outflows to be always less than the original storage inflow, at the individual transaction level. In par- ticular, note that the storage gas priceP S e ′ at the time of deletion in epoche ′ is irrelevant since the storage rebate is proportional to the SUI deposited at the time of write. This mechanism guarantees that the storage fund’s size moves in line with the amount of data held in storage. A simple way to think of the storage fund is as if it were made out of a collection of individual accounts. Each account corresponds to the objects associated with a past transactionτand the amount of deposited funds equals the storage fees paid when τwas processed. The owner ofτ’s output objects is the owner of these accounts and can withdraw the funds as long as they delete the associated objects. This accounting is use- ful for proving the claim that the storage fund can never be depleted because it always contains at least the storage fees associated with the live objects held in storage. To conclude, the storage fund’s recursive formulation in equation (2) can be rewritten under the above interpretation of a series of individual accounts corresponding to the transactions executed on Sui. Specifically, the storage fund’s value at the end of epoch eequals the sum of the fund’s initial value at genesis, capitalization inflows from each epoch up toe, and the full amount of storage fee inflows net of deletion rebates: F e+1 =F 0 + e ∑ ε=0 Reinvestment ε ︸ ︷︷︸ capitalizations + e ∑ ε=0 ∑ τ∈T ε ( 1−θ×I \[ τ∈ e ⋃ ε ′ =ε R ε ′ \]) ×StorageUnits ε \[ τ \] ×P S ε ︸ ︷︷︸ . storage fees net of deletions Notation is such thatI \[ · \] represents the indicator function and ifτ∈T ε andτ∈ ⋃ e ε ′ =ε R ε ′ are both true, thenτis a transaction processed during epochεthat has been deleted at some moment between then and the current epoche≥ε. In such cases, only a share 1−θ of the originally paid storage fees remain in the storage fund. 11 In practice, it may occur that a larger share of data can be deleted for some transaction types than for others. In such cases,θ \[ τ \] can vary across transaction types to capture this heterogeneity. 21 6 The Sui Economy: Long-Term Dynamics 6.1 SUI Deflation The Sui economy does not include any mechanism to burn SUI tokens directly. 12 How- ever, since the long-run supply is capped at ten billion tokens, increased activity on the Sui platform effectively acts as a deflationary force. If Sui unlocks more uses cases and more users migrate to the platform, the dollar price of SUI will likely increase since the relative amount of economic activity on Sui versus the off-chain world increases. As a result, on-chain SUI prices – including gas prices – fall and the Sui economy becomes deflationary. Beyond the standard deflationary effects derived from SUI’s finite supply, the Sui storage fund introduces two additional deflationary forces. One temporary and the other quasi-permanent. The storage fund’s temporary effect arises from the storage fund’s to- kens being locked up and unusable for any other activities. Hence, while overall token supply during epocheequalsM e , the true amount of SUI tokens available for staking, paying gas fees, and other activities on Sui is given byM e −F e . This effect is only tem- porarily deflationary since, in principle, users can delete their on-chain data and release SUI tokens from the storage fund. That said, since storage is likely to increase with net- work activity, this deflationary force is likely to be important in the long run. The more interesting effect is the storage fund’s quasi-permanent effect on the SUI token supply. Let ̃ M e+1 be the maximum number of SUI tokens that can be in circulation at the epoch boundary betweeneande+1. This term can be computed recursively as: ̃ M e+1 = ̃ M e + ( M e+1 −M e ) ︸ ︷︷︸ SUI issuance −Reinvestment e ︸︷︷︸ storage fund capitalization − ∑ τ∈T e 1−θ θ ×Rebates e \[ τ \] ︸︷︷︸ rebate residual . The effective number of tokens in circulation ate+1 equals the effective number of tokens in circulation ate, plus the new issuance of SUI tokens, minus the tokens reinvested to capitalize the storage fund, minus the residual of new storage rebates. The capitalization term captures the fact that stake rewards reinvested in the storage fund are deposited there in perpetuity – that is, they are not indirectly owned by any write transaction and thus cannot be withdrawn by any party. Similarly, the rebate residual is given by the share of storage fees remaining in the storage fund in perpetuity to fund the storage of data that cannot be deleted. 13 Since these last two terms represent coins deposited in the 12 That said, tokens sent intentionally or accidentally to addresses without known private keys are effec- tively burnt. 13 Note that the rebate residual is summed overτ∈T e , the set of transactions processed duringe, and not overτ∈R e , the set of transactions rebated duringe. This is the correct accounting since the rules are such that a share 1−θof a transaction’s storage fees will remain in the storage fund when the associated data is deleted in the future. Whether that rebate has already occurred or not is immaterial; for all effective purposes those coins are already locked in perpetuity in the storage fund. 22 storage fund in perpetuity, ̃ M e+1 captures the maximum number of SUI tokens that can be in circulation even in the extreme case where all users delete their on-chain data. The storage fund’s quasi-permanent deflationary effect is not fully permanent be- cause the Sui economy has a safeguard to prevent the storage fund from growing too big. The risk is that network incentives may get out of sync if the share of delegated stake α e becomes too small. 14 To this end,α ∈ ( 0, 1 ) is such thatα e ≤αtriggers an outflow of the storage fund principal. This outflow will be limited to the portion of the fund’s principal endowed through storage fund capitalizations or rebate residuals – not storage fees. This preserves the fund’s long-term viability while keeping its size manageable. The lower boundα is likely to be updated over time through on-chain governance, and the outflow funds can be set aside as future stake reward subsidies. In sum, the storage fund introduces two important deflationary effects on the SUI token, each with different depth and lasting impact. The temporary deflation effect is stronger since it removes a larger share of SUI from circulation. But the temporary effect is potentially short-lived since it relies on the current amount of data in storage, which can change at any moment. The quasi-permanent deflation effect has a weaker impact, but potentially lasts forever and depends on the full history of storage on the Sui platform – regardless of whether that storage has been deleted or not. 6.2 Capital Efficiency The storage fund is a capital efficient way of paying for storage from the user’s perspec- tive. While this may seem counterintuitive – since this model requires locking SUI in the storage fund – achieving capital efficiency was a key goal in Sui’s economic design. Capital efficiency follows from the fact that, in equilibrium, the user’s opportunity cost of locking up SUI is exactly equal to the fees they would otherwise pay for storage. To see this, assume the Sui economy is in steady state such that all variables are constant across time, markets clear, and SUI’s supply has been fully issued. Assume also no stor- age fund reinvestments, and that deletions deliver full rebates, i.e.γ=θ=1. Define the return on staked SUI as: r= StakeRewards S+F . The market equilibrium and validator free entry conditions imply that the staking re- wards associated with storing the data of transactionτexactly cover its storage costs. In other words, for any transactionτit must be the case thatr×StorageUnits \[ τ \] ×P S ×P $ equals the dollar cost of storing the data associated withτ. 14 This concern arises mainly because the deletion option does not apply to funds endowed through cap- italizations and rebate residuals. Specifically, if network growth is such that SUI’s dollar value rises over time, the storage fund will have a large number of SUI tokens associated with early storage when SUI’s dollar value was low. If that occurs, this portion of the fund will become disproportionately big relative to the cost of storage but will not auto-regulate as storage fee funds do given the deletion option’s absence. 23 The storage fund is capital efficient in the sense that a user is perfectly indifferent between the following two options: • Paying for storage indirectly through the storage fund: A user storingτfor a finite number of epochs deposits StorageUnits \[ τ \] ×P S SUI tokens in the storage fund at write and receives that same amount of SUI at deletion. • Paying for storage directly through fees in every epoch (i.e. a rent structure): A user storingτfor a finite number of epochs will pay a fee ofr×StorageUnits \[ τ \] ×P S every epoch. This can be achieved by staking StorageUnits \[ τ \] ×P S units of SUI, obtaining ( 1+r ) ×StorageUnits \[ τ \] ×P S of SUI at the end of the epoch, and paying the fee. When the user deletes their data, no more storage fees are charged and the user is left with StorageUnits \[ τ \] ×P S of SUI. In sum, the Sui economy achieves the same outcome as a rent model in which users do not lock up SUI to store data. It is as if the storage fund invested the user’s SUI profitably to pay for storage, while in the rent model users do this themselves. While economically equivalent, Sui’s design is arguably more effective since it inte- grates the storage model directly into the Sui economy and needs not rely on millions of users having to individually figure out how to fund their storage costs. 6.3 Stake Distribution Dynamics A common critique of proof-of-stake systems is they promote “rich-get-richer” schemes by which the distribution of stake across validators is likely to converge to a degenerate distribution in the long run. This occurs in proof-of-stake systems where one or some of the validators obtain the full amount of stake rewards each period, and where the probability of winning is proxied by the validator’s share of total stake. The main intuition for this result is that traditional proof-of-stake enables compound- ing when validators reinvest their stake rewards. Consequently, a validator with high stake is more likely to start compounding earlier than validators with low stake. This effect is exacerbated over time, leading high-stake validators to end up with the majority of stake with high likelihood. Interestingly, the “rich-get-richer” effect is not driven by malicious or strategic behavior – it will arise even if all validators work honestly. The “rich-get-richer” effect is entirely driven by randomness. Sui’s proof-of-stake model does not deliver a “rich-get-richer” effect since all honest validators receive their share of the staking rewards at the end of each epoch with full certainty – that is, they are not at the mercy of randomness. This fact can be leveraged to prove that the stake distribution remains fixed over time. Formally, this can be shown in the special case where all validators submit the same price quote during the gas survey, process all their transactions in reasonable time, and that all SUI delegators and validators 24 reinvest their stake rewards in the same validators across time: σ e+1 ( v ) = S e ( v ) +σ e ( v ) × ( DelegatorRewards e +ValidatorRewards e ) S e + ( DelegatorRewards e +ValidatorRewards e ) , =σ e ( v ) . That is, each validatorv∈V e ,V e+1 will have the same share of delegated stake at the beginning of epoche+1 as the share they had at epoche. By induction, this proof applies to all epochseand implies the staking distribution is constant across time. This fact is an important result for Sui’s network security since the concern of some validators achieving a disproportionate amount of voting power is vastly diminished. While the above proof corresponds to a stylized setting, the result hints to a valuable force present in Sui’s proof-of-stake implementation. 7 Final Thoughts Sui’s design lies at the frontier of both engineering and economic blockchain research. We look forward to working with the community and receiving your feedback on Sui’s economic model at econ@mystenlabs.com. 25 Appendix The following table summarizes the free system parameters of Sui’s economic model. The frequency column categorizes parameters into those modified on an epoch-by-epoch basis, as described in the previous sections, and those changed infrequently through gov- ernance proposals. VariableFrequencyDescription P C e every epoch Computation reference gas price. Set collectively by validators through the gas survey. P C e every epoch Computation floor gas price. Can be set proportionally toP C e , e.g.P C e =β P C e withβ<1. P S infrequently Storage gas price. Fixed in order to target the dollar cost of storage. δinfrequently Validator commission share. Can be set at the system-level or negotiated by each validator. γinfrequently Share of storage fund stake rewards distributed to validators. System parameter set by governance. θinfrequently Share of storage deletion rebates. System parameter set by governance. αinfrequently Bound on the maximum storage fund size. System parameter set by governance. κinfrequently Stake rewards boost for low gas price submitters. System parameter set by governance. 26 --- # Unknown The Sui Smart Contracts Platform The MystenLabs Team hello@mystenlabs.com 1 INTRODUCTION Sui is a decentralized permissionless smart contract platform biased towards low-latency management of assets. It uses the Move pro- gramming language to define assets as objects that may be owned by an address. Move programs define operations on these typed objects including custom rules for their creation, the transfer of these assets to new owners, and operations that mutate assets. Sui is maintained by a permissionless set of authorities that play a role similar to validators or miners in other blockchain systems. It uses a Byzantine consistent broadcast protocol between authorities to ensure the safety of common operations on assets, ensuring lower latency and better scalability as compared to Byzantine agreement. It only relies on Byzantine agreement for the safety of shared objects. As well as governance operations and check-pointing, performed off the critical latency path. Execution of smart contracts is also naturally parallelized when possible. Sui supports light clients that can authenticate reads as well as full clients that may audit all transitions for integrity. These facilities allow for trust-minimized bridges to other blockchains. A native asset SUI is used to pay for gas for all operations. It is also used by its owners to delegate stake to authorities to operate Sui within epochs, and periodically, authorities are reconfigured according to the stake delegated to them. Used gas is distributed to authorities and their delegates according to their stake and their contribution to the operation of Sui. This whitepaper is organized in two parts, with Sect. 2 describing the Sui programming model using the Move language, and Sect. 4 describing the operations of the permissionless decentralized sys- tem that ensures safety, liveness and performance for Sui. 2 SUI SMART CONTRACT PROGRAMMING Sui smart contracts are written in the Move\[4\] language. Move is safe and expressive, and its type system and data model natu- rally support the parallel agreement/execution strategies that make Sui scalable. Move is an open-source programming language for building smart contracts originally developed at Facebook for the Diem blockchain. The language is platform-agnostic, and in ad- dition to being adopted by Sui, it has been gaining popularity on other platforms (e.g., 0L, StarCoin). In this section we will discuss the main features of the Move language and explain how it is used to create and manage assets on Sui. A more thorough explanation of Move’s features can be found in the Move Programming Language book 1 and more Sui-specific Move content can be found in the Sui Developer Portal 2 , and a more formal description of Move in the context of Sui can be found in Section 3. 1 https://diem.github.io/move/ 2 https://github.com/MystenLabs/fastnft/blob/main/doc/SUMMARY.md 2.1 Overview Sui’s global state includes a pool of programmable objects created and managed by Movepackagesthat are collections of Move mod- ules (see Section 2.1.1 for details) containing Move functions and types. Move packages themselves are also objects. Thus, Sui objects can be partitioned into two categories: •Struct data values: Typed data governed by Move modules. Each object is a struct value with fields that can contain primitive types (e.g. integers, addresses), other objects, and non-object structs. • Package code values: a set of related Move bytecode mod- ules published as an atomic unit. Each module in a package can depend both on other modules in that package and on modules in previously published packages. Objects can encode assets (e.g., fungible or non-fungible tokens), capabilitiesgranting the permission to call certain functions or create other objects, “smart contracts” that manage other assets, and so on–it’s up to the programmer to decide. The Move code to declare a custom Sui object type looks like this: structObjhas key{ id: VersionedID, // globally unique ID and version f:u64// objects can have primitive fields g: OtherObj // fields can also store other objects } All structs representing Sui objects (but not all Move struct values) must have theidfield and thekeyability 3 indicating that the value can be stored in Sui’s global object pool. 2.1.1 Modules.A Move program is organized as a set of modules, each consisting of a list of struct declarations and function declara- tions. A module can import struct types from other modules and invoke functions declared by other modules. Values declared in one Move module can flow into another– e.g., moduleOtherObjin the example above could be defined in a different module than the module definingObj. This is different from most smart contract languages, which allow only unstructured bytes to flow across contract boundaries. However, Move is able to support this because it provides encapsulation features to help programmers writerobustly safe\[14\] code. Specifically, Move’s type system ensures that a type likeObjabove can only be created, destroyed, copied, read, and written by functions inside the module that declares the type. This allows a module to enforce strong invariants on its declared types that continue to hold even when they flow across smart contract trust boundaries. 2.1.2 Transactions and Entrypoints.The global object pool is up- dated via transactions that can create, destroy, read, and write objects. A transaction must take each existing object it wishes to operate on as an input. In addition, a transaction must include the 3 https://diem.github.io/move/abilities.html and The MystenLabs Team versioned ID of a package object, the name of a module and func- tion inside that package, and arguments to the function (including input objects). For example, to call the function public funentrypoint( o1: Obj, o2: &mutObj, o3: &Obj, x:u64, ctx: &mutTxContext ) { ... } a transaction must supply ID’s for three distinct objects whose type isObjand an integer to bind tox. TheTxContextis a special parameter filled in by the runtime that contains the sender address and information required to create new objects. Inputs to an entrypoint (and more generally, to any Move func- tion) can be passed with different mutability permissions encoded in the type. AnObjinput can be read, written, transferred, or de- stroyed. A&mutObjinput can only be read or written, and a&Obj can only be read. The transaction sender must be authorized to use each of the input objects with the specified mutability permissions– see Section 4.4 for more detail. 2.1.3 Creating and Transferring Objects.Programmers can create objects by using theTxContextpassed into the entrypoint to gener- ate a fresh ID for the object: public funcreate\_then\_transfer( f:u64, g: OtherObj, o1: Obj, ctx: &mutTxContext ) { leto2 = Obj {id: TxContext::fresh\_id(ctx), f, g }; Transfer::transfer(o1, TxContext:sender()); Transfer::transfer(o2, TxContext:sender()); } This code takes two objects of typeOtherObjandObjas input, uses the first one and the generated ID to create a newObj, and then transfers bothObjobjects to the transaction sender. Once an object has been transferred, it flows into the global object pool and cannot be accessed by code in the remainder of the transaction. The Transfermodule is part of theSuistandard library, which includes functions for transferring objects to user addresses and to other objects. We note that if the programmer code neglected to include one of thetransfercalls, this code would be rejected by the Move type system. Move enforcesresource safety\[5\] protections to ensure that objects cannot be created without permission, copied, or acci- dentally destroyed. Another example of resource safety would be an attempt to transfer the same object twice, which would also be rejected by the Move type system. 3 THE SUI PROGRAMMING MODEL In this section, we expand on the informal description of the Sui programming model from Section 2 by presenting detailed seman- tic definitions. The previous section showed examples of Move source code; here we define the structure of Move bytecode. De- velopers write, test, and formally verify \[10,16\] Move source code locally, then compile it to Move bytecode before publishing it to the blockchain. Any Move bytecode be published on-chain must pass through abytecode verifier\[4,5\] to ensure that it satisfies key properties such as type, memory, and resource safety. As mentioned in Section 2, Move is a platform-agnostic language which can be adapted to fit specific needs of different systems without forking the core language. In the following description, we define both concepts from core Move language (denoted in black text) and Sui-specific features extending the core Move language (denoted with orange text). 3.1 Modules Module=ModuleName× (StructName⇀StructDecl)× (FunName⇀FunDecl)×FunDecl GenericParam=\[Ability\] StructDecl=(FieldName⇀StorableType)× \[Ability\]×\[GenericParam\] FunDecl=\[Type\]\[Type\]×\[Instr\]×\[GenericParam\] Instr=TransferToAddr|TransferToObj|ShareMut| ShareImmut|. . . Table 1: Module Move code is organized intomoduleswhose structure is defined in Table 1. A module consists of a collection of namedstructdeclara- tions and a collection of namedfunctiondeclarations (examples of these declaration are provided in Section 2.1). A module also con- tains a special function declaration serving as the moduleinitializer. This function is invoked exactly once at the time the module is published on-chain. A struct declaration is a collection of named fields, where a field name is mapped to a storeable type. Its declaration also includes an optional list of abilities (see Section 2 for a description of storeable types and abilities). A struct declaration may also include a list of generic parameterswith ability constraints, in which case we call it a generic structdeclaration, for examplestructWrapper{ t: T }. A generic parameter represents a type to be used when declaring struct fields – it is unknown at the time of struct declara- tion, with aconcretetype provided when the struct is instantiated (i.e., as struct value is created). A function declaration includes a list of parameter types, a list of return types, and a list of instructions forming the function’s body. A function declaration may also include a list of generic parameters with ability constraints, in which case we call it ageneric function declaration, for examplefununwrap(p: Wrapper){}. Similarly to struct declarations, a generic parameter represents a type unknown at function declaration time, but which is never- theless used when declaring function parameters, return values and a function body (concrete type is provided when a function is called). Instructions that can appear in a function body include all or- dinary Move instructions with the exception of global storage in- structions (e.g.,move\_to,move\_from,borrow\_global). See \[14\] for a complete list of core Move’s instructions and their semantics. In Sui persistent storage is supported via Sui’s global object pool rather than the account-based global storage of core Move. There are four Sui-specific object operations. Each of these oper- ations changes the ownership metadata of the object (see Section 3.3) and returns it to the global object pool. Most simply, a Sui object can be transferred to the address of a Sui end-user. An object can also be transferred to anotherparentobject–this operation requires the caller to supply a mutable reference to the parent object in The Sui Smart Contracts Platform addition to the child object. An object can be mutablysharedso it can be read/written by anyone in the Sui system. Finally, an object can be immutably shared so it can be read by anyone in the Sui system, but not written by anyone. The ability to distinguish between different kinds of ownership is a unique feature of Sui. In other blockchain platforms we are aware of, every contract and object is mutably shared. As we will explain in Section 4, Sui leverages this information for parallel transaction execution (for all transactions) and parallel agreement (for transactions involving objects without shared mutability). 3.2 Types and Abilities PrimType= { address,id,bool,u8,u64, . . . } StructType=ModuleName×StructName× \[StorableType\] StorableType=PrimType⊎StructType⊎ GenericType⊎VectorType VectorType=StorableType GenericType=N MutabilityQual= { mut,immut } ReferenceType=StorableType×MutabilityQual Type=ReferenceType⊎StorableType Ability= { key,store,copy,drop } Table 2: Types and Abilities A Move program manipulates both data stored in Sui global object pool and transient data created when the Move program executes. Both objects and transient data are Movevaluesat the language level. However, not all values are created equal – they may have different properties and different structure as prescribed by their types. The types used in Move are defined in Table 2. Move supports many of the sameprimitive typessupported in other programming languages, such as a boolean type or unsigned integer types of var- ious sizes. In addition, core Move has anaddresstype representing an end-user in the system that is also used to identify the sender of a transaction and (in Sui) the owner of an object. Finally, Sui defines anidtype representing an identity of a Sui object– see Section 3.3 for details. Astruct typedescribes an instance (i.e., a value) of a struct de- clared in a given module (see Section 3.1 for information on struct declarations). A struct type representing a generic struct declara- tion (i.e.,generic structtype) includes a list ofstoreable types– this list is the counterpart of the generic parameter list in the struct dec- laration. A storeable type can be either aconcrete type(a primitive or a struct) or ageneric type. We call such types storeable because they can appear as fields of structs and in objects stored persistently on-chain, whereas reference types cannot. For example, theWrapperstruct type is a generic struct type parameterized with a concrete (primitive) storeable typeu64– this kind of type can be used to create a struct instance (i.e.,value). On the other hand, the same generic struct type can be parameterized with a generic type (e.g.,structParent { w: Wrapper }) coming from a generic parameter of the enclosing struct or function dec- laration – this kind of type can be used to declare struct fields, function params, etc. Structurally, a generic type is an integer index (defined asNin Table 5) into the list of generic parameters in the enclosing struct or function declaration. Avector typein Move describes a variable length collection of homogenous values. A Move vector can only contain storeable types, and it is also a storeable type itself. A Move program can operate directly on values or access them indirectly via references. Areference typeincludes both the storeable type referenced and amutability qualifierused to determine (and enforce) whether a value of a given type can be read and written (mut) or only read (immut). Consequently, the most general form of a Move value type (Typein Table 2) can be either a storeable type or a reference type. Finally,abilitiesin Move control what actions are permissible for values of a given type, such as whether a value of a given type can be copied (duplicated). Abilities constraint struct declarations and generic type parameters. The Move bytecode verifier is respon- sible for ensuring that sensitive operations like copies can only be performed on types with the corresponding ability. 3.3 Objects and Ownership TxDigest=퐶표푚(Tx) ObjID=퐶표푚(TxDigest×N) SingleOwner=Addr⊎ObjID Shared= { shared\_mut,shared\_immut } Ownership=SingleOwner⊎Shared StructObj=StructType×Struct ObjContents=StructObj⊎Package Obj=ObjContents×ObjID×Ownership×Version Table 3: Objects and Ownership Each Sui object has a globally unique identifier (ObjIDin Table 3) that serves as the persistent identity of the object as it flows between owners and into and out of other objects. This ID is assigned to the object by the transaction that creates it. An object ID is created by applying a collision-resistant hash function to the contents of the current transaction and to a counter recording how many objects the transaction has created. A transaction (and thus its digest) is guaranteed to be unique due to constraints on the input objects of the transaction, as we will explain subsequently. In addition to an ID, each object carries metadata about its own- ership. An object is either uniquely owned by an address or another object, shared with write/read permissions, or shared with only read permissions. The ownership of an object determines whether and how a transaction can use it as an input. Broadly, a uniquely owned object can only be used in a transaction initiated by its owner or including its parent object as an input, whereas a shared object can be used by any transaction, but only with the specified mutability permissions. See Section 4.4 for a full explanation. There are two types of objects: package code objects, and struct data objects. A package object contains of a list of modules. A struct object contains a Move struct value and the Move type of that value. and The MystenLabs Team The contents of an object may change, but its ID, object type (pack- age vs struct) and Move struct type are immutable. This ensures that objects are strongly typed and have a persistent identity. Finally, an object contains a version. Freshly created objects have version 0, and an object’s version is incremented each time a transaction takes the object as an input. 3.4 Addresses and Authenticators Authenticator=Ed25519PubKey⊎ECDSAPubKey⊎. . . Addr=퐶표푚(Authenticator) Table 4: Addresses and Authenticators An address is the persistent identity of a Sui end-user (although note that a single user can have an arbitrary number of addresses). To transfer an object to another user, the sender must know the address of the recipient. As we will discuss shortly, a Sui transaction must contain the address of the user sending (i.e., initiating) the transaction and an authenticatorwhose digest matches the address. The separation between addresses and authenticators enablescryptographic agility. An authenticator can be a public key from any signature scheme, even if the schemes use different key lengths (e.g., to support post- quantum signatures). In addition, an authenticator need not be a single public key–it could also be (e.g.) a K-of-N multisig key. 3.5 Transactions ObjRef=ObjID×Version×퐶표푚(Obj) CallTarget=ObjRef×ModuleName×FunName CallArg=ObjRef⊎ObjID⊎PrimType Package=\[Module\] Publish=Package×\[ObjRef\] Call=CallTarget×\[StorableType\]×\[CallArg\] GasInfo=ObjRef×MaxGas×BaseFee×Tip Tx=(Call⊎Publish)×GasInfo×Addr×Authenticator Table 5: Transactions Sui has two different transaction types: publishing a new Move package, and calling a previously published Move package. A pub- lish transaction contains apackage–a set of modules that will be published together as a single object, as well as the dependencies of all the modules in this package (encoded as a list of object references that must refer to already-published package objects). To execute a publish transaction, the Sui runtime will run the Move bytecode verifier on each package, link the package against its dependencies, and run the module initializer of each module. Module initializ- ers are useful for bootstrapping the initial state of an application implemented by the package. A call transaction’s most important arguments are object inputs. Object arguments are either specified via an object reference (for single-owner and shared immutable objects) or an object ID (for shared mutable objects). An object reference consists of an object ID, an object version, and the hash of the object value. The Sui runtime will resolve both object ID’s and object references to object values stored in the global object pool. For object references, the runtime will check the version of the reference against the version of the object in the pool, as well as checking that the reference’s hash matches the pool object. This ensures that the runtime’s view of the object matches the transaction sender’s view of the object. In addition, a call transaction accepts type arguments and pure value arguments. Type arguments instantiate generic type parame- ters of the entrypoint function to be invoked (e.g., if the entrypoint function issend\_coin(c: Coin, ...), the generic type pa- rameterTcould be instantiated with the type argumentSUIto send the Sui native token). Pure values can include primitive types and vectors of primitive types, but not struct types. The function to be invoked by the call is specified via an object reference (which must refer to a package object), a name of a module in that package, and a name of a function in that package. To execute a call transaction, the Sui runtime will resolve the function, bind the type, object, and value arguments to the function parameters, and use the Move VM to execute the function. Both call and publish transactions are subject to gas metering and gas fees. The metering limit is expressed by a maximum gas budget. The runtime will execute the transaction until the budget is reached, and will abort with no effects (other than deducting fees and reporting the abort code) if the budget is exhausted. The fees are deducted from agas objectspecified as an object reference. This object must be a Sui native token (i.e., its type must beCoin). Sui uses EIP1559 4 -style fees: the protocol defines a base fee (denominated in gas units per Sui token) that is algorith- mically adjusted at epoch boundaries, and the transaction sender can also include an optional tip (denominated in Sui tokens). Under normal system load, transactions will be processed promptly even with no tip. However, if the system is congested, transactions with a larger tip will be prioritized. The total fee deduced from the gas object is(GasUsed∗BaseFee)+Tip. 3.6 Transaction Effects Event=StructType×Struct Create=Obj Update=Obj Wrap=ObjID×Version Delete=ObjID×Version ObjEffect=Create⊎Update⊎Wrap⊎Delete AbortCode=N×ModuleName SuccessEffects=\[ObjEffect\]×\[Event\] AbortEffects=AbortCode TxEffects=SuccessEffects⊎AbortEffects Table 6: Transaction Effects Transaction execution generates transaction effects which are dif- ferent in the case when execution of a transaction is successful (SuccessEffectsin Table 6) and when it is not (AbortEffectsin Table 6). 4 https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md The Sui Smart Contracts Platform Upon successful transaction execution, transaction effects in- clude information about changes made to Sui’s global object pool (including both updates to existing objects and freshly created ob- jects) andeventsgenerated during transaction execution. Another effect of successful transaction execution could be object removal (i.e., deletion) from the global pool and also wrapping (i.e., embed- ding) one object into another, which has a similar effect to removal – a wrapped object disappears from the global pool and exists only as a part of the object that wraps it. Since deleted and wrapped objects are no longer accessible in the global pool, these effects are represented by the ID and version of the object. Events encode side effects of successful transaction execution beyond updates to the global object pool. Structurally, an event consists of a Move struct and its type. Events are intended to be consumed by actors outside the blockchain, but cannot be read by Move programs. Transactions in Move have an all-or-nothing semantics – if ex- ecution of a transaction aborts at some point (e.g., due to an un- expected failure), even if some changes to objects had happened (or some events had been generated) prior to this point, none of these effects persist in an aborted transaction. Instead, an aborted transaction effect includes a numeric abort code and the name of a module where the transaction abort occurred. Gas fees are still charged for aborted transactions. 4 THE SUI SYSTEM In this section we describe Sui from a systems’ perspective, includ- ing the mechanisms to ensure safety and liveness across authorities despite Byzantine failures. We also explain the operation of clients, including light clients that need some assurance about the system state without validating its full state. Brief background.At a systems level Sui is an evolution of the FastPay \[3\] low-latency settlement system, extended to operate on arbitrary objects through user-defined smart contracts, and with a permissionless delegated proof of stake committee composition \[2\]. Basic asset management by object owners is based on a variant of Byzantine consistent broadcast \[6\] that has lower latency and is easier to scale across many machines as compared to traditional implementations of Byzantine consensus \[8,11,12\].When full agree- ment is required we use a high-throughput DAG-based consensus, e.g. \[9\] to manage locks, while execution on different shared objects is parallelized. Protocol outline.Figure 1 illustrates the high-level interactions between a client and Sui authorities to commit a transaction. We describe them here briefly: •A user with a private signing key creates and signs auser transactionto mutate objects they own, or shared objects, within Sui. Subsequently, user signature keys are not needed, and the remaining of the process may be performed by the user client, or a gateway on behalf of the user (denoted as keyless operationin the diagram). • The user transaction is sent to the Sui authorities, that each check it for validity, and upon success sign it and return the signed transactionto the client. The client collects the re- sponses from a quorum of authorities to form atransaction certificate. •The transaction certificate is then sent back to all author- ities, and if the transaction involves shared objects it is also sent to aByzantine agreement protocoloperated by the Sui authorities. Authorities check the certificate, and in case shared objects are involved also wait for the agree- ment protocol to sequence it in relation to other shared object transactions, and then execute the transaction and summarize its effects into asigned effectsresponse. •Once a quorum of authorities has executed the certificate its effects are final (denoted asfinalityin the diagram). Clients can collect a quorum of authority responses and create an effects certificateand use it as a proof of the finality of the transactions effects. This section describes each of these operations in detail, as well as operations to reconfigure and manage state across authorities. 4.1 System Model Sui operates in a sequence of epochs denoted by푒∈ {0, . . .}. Each epoch is managed by a committee퐶 푒 =(푉 푒 ,푆 푒 (·)), where푉 푒 is a set of authorities with known public verification keys and network end-points. The function푆 푒 (푣)maps each authority푣∈푉 푒 to a number of units of delegated stake. We assume that퐶 푒 for each epoch is signed by a quorum (see below) of authority stake at epoch 푒−1. (Sect. 4.7 discusses the formation and management of commit- tees). Within an epoch, some authorities are correct (they follow the protocol faithfully and are live), while others are Byzantine (they de- viate arbitrarily from the protocol). The security assumption is that the set of honest authorities퐻 푒 ⊆푉 푒 is assigned aquorumof stake within the epoch, i.e. Í ℎ∈퐻 푒 푆 푒 (ℎ)>2/3 Í 푣∈푉 푒 푆 푒 (푣)(and refer to any set of authorities with over two-thirds stake as a quorum). There exists at least one live and correct party that acts as arelay for each certificate (see Sect. 4.3) between honest authorities. This ensures liveness, and provides an eventual delivery property to the Byzantine broadcast (see totality of reliable broadcast in \[6\]). Each authority operates such a relay, either individually or through a col- lective dissemination protocol. External entities, including Sui light clients, replicas and services may also take on this role. The distinc- tion between the passive authority core, and an internal or external active relay component that is less reliable or trusted, ensures a clear demarcation and minimization of the Trusted Computing Base \[15\] on which Sui’s safety and liveness relies. 4.2 Authority & Replica Data Structures Sui authorities rely on a number of data structures to represent state. We define these structures based on the operations they support. They all have a deterministic byte representation. AnObject(Obj) stores user smart contracts and data within Sui. They are the Sui system-level encoding of the Move objects introduced in Sect. 2. They support the following set of operations: •ref(Obj)returns thereference(ObjRef) of the object, namely a triplet (ObjID,Version,ObjDigest).ObjIDis practically and The MystenLabs Team Key Interaction to Process Transaction Client User Transaction Collect Transaction Certificate Effects Certificate Finality Collect Keyless Operation Authorities Process Transaction Process Certificate Shared Objects only Consensus Byzantine Agreement Figure 1: Outline of interactions to commit a transaction. unique for all new objects created, andVersionis an in- creasing positive integer representing the object version as it is being mutated. •owner(Obj)returns the authenticatorAuthof the owner of the object. In the simplest case,Authis an address, repre- senting a public key that may use this object. More complex authenticators are also available (see Sect. 4.4). •read-only(Obj)returns true if the object is read-only. Read- only objects may never be mutated, wrapped or deleted. They may also be used by anyone, not just their owners. •parent(Obj)returns the transaction digest (TxDigest) that last mutated or created the object. •contents(Obj)returns the object typeTypeand dataData that can be used to check the validity of transactions and carry the application-specific information of the object. The object reference (ObjRef) is used to index objects. It is also used to authenticate objects sinceObjDigestis a commitment to their full contents. Atransaction(Tx) is a structure representing a state transition for one or more objects. They support the following set of operations: •digest(Tx)returns theTxDigest, which is a binding crypto- graphic commitment to the transaction. •epoch(Tx) returns theEpochIDduring which this transac- tion may be executed. •inputs(Tx) returns a sequence of object\[ObjRef\]the trans- action needs to execute. •payment(Tx) returns a reference to anObjRefto be used to pay for gas, as well as the maximum gas limit, and a conversion rate between a unit of gas and the unit of value in the gas payment object. •valid(Tx,\[Obj\])returns true if the transaction is valid, given the requested input objects provided. Validity is discussed in Sect. 4.4, and relates to the transactions being authorized to act on the input objects, as well as sufficient gas being available to cover the costs of its execution. •exec(Tx,\[Obj\])executes the transaction and returns a struc- tureEffectsrepresenting its effects. A valid transaction ex- ecution is infallible, and its output is deterministic. A transaction is indexed by itsTxDigest, which may also be used to authenticate its full contents. All valid transactions (except the special hard-coded genesis transaction) have at least one owned input, namely the objects used to pay for gas. Atransaction effects(Effects) structure summarizes the outcome of a transaction execution. It supports the following operations: •digest(Effects)is a commitmentEffDigestto theEffects structure, that may be used to index or authenticate it. •transaction(Effects)returns theTxDigestof the executed transaction yielding the effects. •dependencies(Effects)returns a sequence of dependencies \[TxDigest\]that should be executed before the transaction with these effects may execute. •contents(Effects)returns a summary of the execution.Status reports the outcome of the smart contract execution. The listsCreated,Mutated,Wrapped,UnwrappedandDeleted, list the object references that underwent the respective op- erations. AndEventslists the events emitted by the execu- tion. Atransaction certificateTxCerton a transaction contains the transaction itself as well as the identifiers and signatures from a quorum of authorities. Note that a certificate may not be unique, in that the same logical certificate may be represented by a different set of authorities forming a quorum. Additionally, a certificate might not strictly be signed by exactly a 2/3 quorum, but possibly more if more authorities are responsive. However, two different valid certificates on the same transaction should be treated as represent- ing semantically the same certificate. Apartial certificate(TxSign) contains the same information, but signatures from a set of author- ities representing stake lower than the required quorum, usually a single authority. The identifiers of signers are included in the certificate (i.e., accountable signatures \[?\]) to identify authorities The Sui Smart Contracts Platform ready to process the certificate, or that may be used to download past information required to process the certificate (see Sect. 4.8). Similarly, aneffects certificateEffCerton an effects structure contains the effects structure itself, and signatures from authorities 5 that represent a quorum for the epoch in which the transaction is valid. The same caveats, about non-uniqueness and identity apply as for transaction certificates. A partial effects certificate, usually containing a single authority signature and the effects structure is denoted asEffSign. Persistent Stores.Each authority and replica maintains a set of persistent stores. The stores implement persistent map seman- tics and can be represented as a set of key-value pairs (denoted 푚푎푝\[푘푒푦\] →푣푎푙푢푒), such that only one pair has a given key. Before a pair is inserted acontains(푘푒푦)call returns false, andget(푘푒푦) returns an error. After a pair is insertedcontains(푘푒푦)calls returns true, andget(푘푒푦)return the value. An authority maintains the following persistent stores: •Theorder lock mapLock 푣 \[ObjRef\] →TxSignOptionre- cords the first valid transactionTxseen and signed by the authority for an owned object versionObjRef, or None if the object version exists but no valid transaction using as an input it has been seen. It may also record the first certificate seen with this object as an input. This table, and its update rules, represents the state of the distributed locks on objects across Sui authorities, and ensures safety under concurrent processing of transactions. •Thecertificate mapCt 푣 \[TxDigest\] → (TxCert,EffSign) records all full certificatesTxCert, which also includesTx, processed by the authority within their validity epoch, along with their signed effectsEffSign. They are indexed by transaction digestTxDigest • Theobject mapObj 푣 \[ObjRef\] →Objrecords all objects Objcreated by transactions included in certificates within Ct 푣 indexed byObjRef. This store can be completely de- rived by re-executing all certificates inCt 푣 . A secondary in- dex is maintained that mapsObjIDto the latest object with this ID. This is the only information necessary to process new transactions, and older versions are only maintained to facilitate reads and audit. •Thesynchronization mapSync 푣 \[ObjRef\] →TxDigestin- dexes all certificates withinCt 푣 by the objects they create, mutate or delete as tuplesObjRef. This structure can be fully re-created by processing all certificates inCt 푣 , and is used to help client synchronize transactions affecting objects they care about. Authorities maintain all four structures, and also provide access to local checkpoints of their certificate map to allow other authori- ties and replicas to download their full set of processed certificates. A replica does not process transactions but only certificates, and re-executes them to update the other tables as authorities do. It also maintains an order lock map to audit non-equivocation. 5 Note that if the signature algorithm permits it, authority signatures can be compressed, but always using accountable signature aggregation, because tracking who signed is important for gas profit distribution and other network health measurements. An authority may be designed as a full replica maintaining all four stores (and checkpoints) to facilitate reads and synchroniza- tion, combined with a minimal authority core that only maintains object locks and objects for the latest version of objects used to pro- cess new transactions and certificates. This minimizes the Trusted Computing Base relied upon for safety. Only the order lock map requires strong key self-consistency, namely a read on a key should always return whether a value or None is present for a key that exists, and such a check should be atomic with an update that sets a lock to a non-None value. This is a weaker property than strong consistency across keys, and allows for efficient sharding of the store for scaling. The other stores may be eventually consistent without affecting safety. 4.3 Authority Base Operation Process Transaction.Upon receiving a transactionTxan authority performs a number of checks: (1) It ensuresepoch(Tx)is the current epoch. (2)It ensures all object referencesinputs(Tx)and the gas object reference inpayment(Tx)exist withinObj 푣 and loads them into\[Obj\]. For owned objects the exact reference should be available; for read-only or shared objects the object ID should exist. (3)Ensures sufficient gas can be made available in the gas object to cover the cost of executing the transaction. (4) It checksvalid(Tx,\[Obj\])is true. This step ensures the au- thentication information in the transaction allows access to the owned objects. (5)It checks thatLock 푣 \[ObjRef\]for all ownedinputs(Tx)ob- jects exist, and it is either None or set tothe sameTx, and atomically sets it toTxSign. (We call these the ‘locks checks’). If any of the checks fail processing ends, and an error is returned. However, it is safe for a partial update ofLock 푣 to persist (although our current implementation does not do partial updates, but atomic updates of all locks). If all checks are successful then the authority returns a signature on the transaction, ie. a partial certificateTxSign. Processing an order is idempotent upon success, and returns a partial certificate (TxSign), or a full certificate (TxCert) if one is available. Any party may collate a transaction and signatures (TxSign) for a set of authorities forming a quorum for epoch푒, to form a transaction certificateTxCert. Process Certificate.Upon receiving a certificate an authority checks all validity conditions for the transaction, except those re- lating to locks (the so-called ‘locks checks’). Instead it performs the following checks: for eachownedinput object ininputs(Tx)it checks that the lock exists, and that it is either None, set toany TxSign, or set to a certificate for the same transaction as the cur- rent certificate. If this modified locks check fails, the authority has detected an unrecoverable Byzantine failure, halts normal opera- tions, and starts a disaster recovery process. Forshared objects(see Sect. 4.4) authorities check that the locks have been set through the certificate being sequenced in a consensus, to determine the and The MystenLabs Team version of the share object to use. If so, the transaction may be executed; otherwise it needs to wait for such sequencing first. If the check succeeds, the authority adds the certificate to its certificate map, along with the effects resulting from its execution, ie.Ct 푣 \[TxDigest\] → (TxCert,EffSign); it updates the locks map to record the certificateLock 푣 \[ObjRef\] →TxCertfor all owned input objects that have locks not set to a certificate. As soon as all objects inInput(Tx)is inserted inObj 푣 , then all effects inEffSignare also materialized by adding theirObjRefand contents toObj 푣 . Finally for all created or mutated inEffSignthe synchronization map is updated to map them toTx. Remarks.The logic for handling transactions and certificates leads to a number of important properties: • Causality & parallelism.The processing conditions for both transactions and certificates ensure causal execution: an authority only ‘votes’ by signing a transaction if it has processed all certificates creating the objects the transaction depends upon, both owned, shared and read-only. Similarly, an authority only processes a certificate if all input objects upon which it depends exist in its local objects map. This imposes a causal execution order, but also enables transac- tions not causally dependent on each other to be executed in parallel on different cores or machines. • Sign once, and safety.All owned input objects locks in Lock 푣 \[·\]are set to the first transactionTxthat passes the checks using them, and then the first certificate that uses the object as an input. We call thislocking the object to this transaction, and there is no unlocking within an epoch. As a result an authority only signs a single transaction per lock, which is an essential component of consistent broadcast \[6\], and thus the safety of Sui. •Disaster recovery.An authority detecting two contradic- tory certificates for the same lock, has proof of irrecover- able Byzantine behaviour – namely proof that the quorum honest authority assumption does not hold. The two contra- dictory certificates are a fraud proof \[1\], that may be shared with all authorities and replicas to trigger disaster recovery processes. Authorities may also get other forms of proof of unrecoverable byzantine behaviour such as >1/3 signatures on effects (EffSign) that represent an incorrect execution of a certificate. Or a certificate with input objects that do not represent the correct outputs of previously processed certificates. These also can be packaged as a fraud proof and shared with all authorities and replicas. Note these are distinct from proofs that a tolerable minority of authorities (≤1/3by stake) or object owners (any number) is byzan- tine or equivocating, which can be tolerated without any service interruption. •Finality.Authorities return a certificate (TxCert) and the signed effects (EffSign) for any read requests for an index inLock 푣 ,Ct 푣 andObj 푣 ,Sync 푣 . A transaction is considered final if over a quorum of authorities reportsTxas included in theirCt 푣 store. This means that an effects certificate (EffCert) is a transferable proof of finality. However, a cer- tificate using an object is also proof that all dependent certificates in its causal path are also final. Providing a cer- tificate to any party, that may then submit it to a super majority of authorities for processing also ensures finality for the effects of the certificate. Note that finality is later than fastpay \[3\] to ensure safety under re-configuration. However, an authority can apply the effect of a transaction upon seeing a certificate rather than waiting for a commit. 4.4 Owners, Authorization, and Shared Objects Transaction validity (see Sect. 4.3) ensures a transaction is autho- rized to include all specified input objects in a transaction. This check depends on the nature of the object, as well as the owner field. Read-only objectscannot be mutated or deleted, and can be used in transactions concurrently and by all users. Move modules for example are read-only. Such objects do have an owner that might be used as part of the smart contract, but that does not affect au- thorization to use them. They can be included in any transaction. Owned objectshave an owner field. The owner can be set to an address representing a public key. In that case, a transaction is authorized to use the object, and mutate it, if it is signed by that address. A transaction is signed by a single address, and therefore can use one or more objects owned by that address. However, a single transaction cannot use objects owned by more than one address. The owner of an object, called a child object, can be set to theObjIDof another object, called the parent object. In that case the child object may only be used if the parent object is included in the transaction, and the transaction is authorized to use the object. This facility may be used by contracts to construct efficient collections and other complex data structures. Shared objectsare mutable, but do not have a specific owner. They can instead be included in transactions by different parties, and do not require any authorization. Instead they perform their own authorization logic. Such objects, by virtue of having to support multiple writers while ensuring safety and liveness, do require a full agreement protocol to be used safely. Therefore they require additional logic before execution. Authorities process transactions as specified in Sect. 4.3 for owned objects and read-only objects to manage their locks. However, authorities do not rely on con- sistent broadcast to manage the locks of shared objects. Instead, the creators of transactions that involve shared objects insert the certificate on the transaction into a high-throughput consensus system, e.g. \[9\]. All authorities observe a consistent sequence of such certificates, and assign the version of shared objects used by each transaction according to this sequence. Then execution can proceed and is guaranteed to be consistent across all authorities. Au- thorities include the version of shared objects used in a transaction execution within theEffectscertificate. The above rules ensure that execution for transactions involving read-only and owned objects requires only consistent broadcast and a single certificate to proceed; and Byzantine agreement is only required for transactions involving shared objects. Smart contract authors can therefore design their types and their operations to optimize transfers and other operations on objects of a single user to have lower latency, while enjoying the flexibility of using shared The Sui Smart Contracts Platform objects to implement logic that needs to be accessed by multiple users. 4.5 Clients Full Clients & Replicas.Replicas, also sometimes calledfull clients, do not validate new transactions, but maintain a consistent copy of the valid state of the system for the purposes of audit, as well as to construct transactions or operate services incl. read infrastructures for light client queries. Light Clients.Both object references and transactions contain information that allows the authentication of the full causal chain of transactions that leading up to their creation or execution. Specif- ically, an object reference (ObjRef) contains anObjDigestthat is an authenticator for the full state of the object, including the facility to getparent(Obj), namely theTxDigestthat created the object. Simi- larly, aTxDigestauthenticates a transaction, including the facility to extract throughinputs(Tx)the object references of the input objects. Therefore the set of objects and certificates form a bipartite graph that is self-authenticating. Furthermore, effects structures are also signed, and may be collated into effects certificates that directly certify the results of transaction executions. These facilities may be used to supportlight clientsthat can per- form high-integrity reads into the state of Sui, without maintaining a full replica node. Specifically an authority or full node may pro- vide a succinct bundle of evidence, comprising a certificateTxCert on a transactionTxand the input objects\[Obj\]corresponding to inputs(Tx)to convince a light client that a transition can take place within Sui. A light client may then submit this certificate, or check whether it has been seen by a quorum or sample of authorities to ensure finality. Or it may craft a transaction using the objects resulting from the execution, and observe whether it is successful. More directly, a service may provide an effects certificate to a client to convince them of the existence and finality of a transi- tion within Sui, with no further action or interaction within the system. If a checkpoint of finalized certificates is available, at an epoch boundary or otherwise, a bundle of evidence including the input objects and certificate, alongside a proof of inclusion of the certificate in the checkpoint is also a proof of finality. Authorities may use a periodic checkpointing mechanism to create collective checkpoints of finalized transactions, as well as the state of Sui over time. A certificate with a quorum of stake over a checkpoint can be used by light clients to efficiently validate the recent state of objects and emitted events. A check pointing mechanism is necessary for committee reconfiguration between epochs. More frequent checkpoints are useful to light clients, and may also be used by authorities to compress their internal data structures as well as synchronize their state with other authorities more efficiently. 4.6 Bridges Native support for light clients and shared objects managed by Byzantine agreement allows Sui to support two-way bridges to other blockchains \[13\]. The trust assumption of such bridges reflect the trust assumptions of Sui and the other blockchain, and do not have to rely on trusted oracles or hardware if the other blockchain also supports light clients \[7\]. Bridges are used to import an asset issued on another blockchain, to represent it and use it as a wrapped asset within the Sui system. Eventually, the wrapped asset can be unlocked and transferred back to a user on the native blockchain. Bridges can also allow assets issued on Sui to be locked, and used as wrapped assets on other blockchains. Eventually, the wrapped object on the other system can be destroyed, and the object on Sui updated to reflect any changes of state or ownership, and unlocked. The semantics of bridged assets are of some importance to en- sure wrapped assets are useful. Fungible assets bridged across blockchains can provide a richer wrapped representation that al- lows them to be divisible and transferable when wrapped. Non- fungible assets are not divisible, but only transferable. They may also support other operations that mutates their state in a con- trolled manner when wrapped, which may necessitate custom smart contract logic to be executed when they are bridged back and unwrapped. Sui is flexible and allows smart contract authors to define such experiences, since bridges are just smart contracts implemented in Move rather than native Sui concepts – and there- fore can be extended using the composability and safety guarantees Move provides. 4.7 Committee Reconfiguration Reconfiguration occurs between epochs when a committee퐶 푒 is replaced by a committee퐶 푒 ′ , where푒 ′ =푒+1. Reconfiguration safety ensures that if a transactionTxwas committed at푒or before, no conflicting transaction can be committed after푒. Liveness en- sures that ifTxwas committed at or before푒, then it must also be committed after푒. We leverage the Sui smart contract system to perform a lot of the work necessary for reconfiguration. Within Sui a system smart contract allows users to lock and delegate stake to candidate authorities. During an epoch, owners of coins are free to delegate by locking tokens, undelegate by unlocking tokens or change their delegation to one or more authorities. Once a quorum of stake for epoch푒vote to end the epoch, author- ities exchange information to commit to a checkpoint, determine the next committee, and change the epoch. First, authorities run a check pointing protocol, with the help of an agreement proto- col \[9\], to agree on a certified checkpoint for the end of epoch푒. The checkpoint contains the union of all transactions, and poten- tially resulting objects, that have been processed by a quorum of authorities. As a result if a transaction has been processed by a quorum of authorities, then at least one honest authorities that processed it will have its processed transactions included in the end-of-epoch checkpoint, ensuring the transaction and its effects are durable across epochs. Furthermore, such a certified checkpoint guarantees that all transactions are available to honest authorities of epoch푒. The stake delegation at the end-of-epoch checkpoint is then used to determine the new set of authorities for epoch푒+1. Both a quorum of the old authorities stake and a quorum of the new authority stake signs the new committee퐶 푒 ′ , and checkpoint at which the new epoch commences. Once both set of signatures are and The MystenLabs Team available the new set of authorities start processing transactions for the new epoch, and old authorities may delete their epoch signing keys. Recovery.It is possible due to client error or client equivocation for an owned object to become ‘locked’ within an epoch, preventing any transaction concerning it from being certified (or finalized). For example, a client signing two different transactions using the same owned object version, with half of authorities signing each, would be unable to form a certificate requiring a quorum of signatures on any of the two certificates. Recovery ensures that once epochs change such objects are again in a state that allows them to be used in transactions. Since, no certificate can be formed, the original object is available at the start of the next epoch to be operated on. Since transactions contain an epoch number, the old equivocating transactions will not lock the object again, giving its owner a chance to use it. Rewards & cryptoeconomics.Sui has a native token SUI, with a fixed supply. SUI is used to pay for gas, and is also be used as delegated stake on authorities within an epoch. The voting power of authorities within this epoch is a function of this delegated stake. At the end of the epoch fees collected through all transactions pro- cessed are distributed to authorities according to their contribution to the operation of Sui, and in turn they share some of the fees as rewards to addresses that delegated stake to them. We postpone a full description of the token economics of Sui to a dedicated paper. 4.8 Authority & Replica Updating Client-driven.Due to client failures or non-byzantine authority failures, some authorities may not have processed all certificates. As a result causally related transactions depending on missing objects generated by these certificates would be rejected. However, a client can always update an honest authority to the point where it is able to process a correct transaction. It may do this using its own store of past certificates, or using one or more other honest authorities as a source for past certificates. Given a certificate푐and a퐶푡 푣 store that includes푐and its causal history, a client can update an honest authority푣 ′ to the point where푐would also be applied. This involves finding the smallest set of certificates not in푣 ′ such that when applied the Objects in푣 ′ include all inputs of푐. Updating a lagging authority퐵using a store 퐶푡 푣 including the certificateTxCertinvolves: •The client maintains a list of certificates to sync, initially set to contain justTxCert. •The client considers the lastTxCertrequiring sync. It ex- tracts theTxwithin theTxCertand derives all its input objects (usingInput(Tx)). •For each input object it checks whether theTxthat gener- ated or mutated last (using theSync 푣 index on퐶푡 푣 ) has a certificate within퐵, otherwise its certificate is read from 퐶푡 푣 and added to the list of certificates to sync. •If no more certificates can be added to the list (because no more inputs are missing from퐵) the certificate list is sorted in a causal order and submitted to퐵. The algorithm above also applies to updating an object to a specific version to enable a new transaction. In this case the certificate for theTxthat generated the object version, found inSync 푣 \[ObjRef\], is submitted to the lagging authority. Once it is executed on퐵the object at the correct version will become available to use. A client performing this operation is called arelayer. There can be multiple relayers operating independently and concurrently. They are untrusted in terms of integrity, and their operation is keyless. Besides clients, authorities can run the relayer logic to update each other, and replicas operating services can also act as relayers to update lagging authorities. Bulk.Authorities provide facilities for a follower to receive updates when they process a certificate. This allows replicas to maintain an up-to-date view of an authorty’s state. Furthermore, authori- ties may use a push-pull gossip network to update each other of the latest processed transaction in the short term and to reduce the need for relayers to perform this function. In the longer term lagging authorities may use periodic state commitments, at epoch boundaries or more frequently, to ensure they have processed a complete set of certificates up to certain check points. 5 SCALING AND LATENCY The Sui system allows scaling though authorities devoting more resources, namely CPUs, memory, network and storage within a ma- chine or over multiple machines, to the processing of transactions. More resources lead to an increased ability to process transactions, leading to increased fees income to fund these resources. More resources also results in lower latency, as operations are performed without waiting for necessary resources to become available. Throughput.To ensure that more resources result in increased capacity quasi-linearly, the Sui design aggressively reduces bottle- necks and points of synchronization requiring global locks within authorities. Processing transactions is cleanly separated into two phases, namely (1) ensuring the transaction has exclusive access to the owned or shared objects at a specific version, and (2) then subsequently executing the transaction and committing its effects. Phase (1) requires a transaction acquiring distributed locks at the granularity of objects. For owned objects this is performed trough a reliable broadcast primitive, that requires no global synchronization within the authority, and therefore can be scaled through sharding the management of locks across multiple machines byObjID. For transactions involving shared objects sequencing is required using a consensus protocol, which does impose a global order on these transactions and has the potential to be a bottleneck. However, recent advances on engineering high-throughput consensus pro- tocols \[9\] demonstrate that sequential execution is the bottleneck in state machine replication, not sequencing. In Sui, sequencing is only used to determine a version for the input shared object, namely incrementing an object version number and associating it with the transaction digest, rather than performing sequential execution. Phase (2) takes place when the version of all input objects is known to an authority (and safely agreed across authorities) and involves execution of the Move transaction and commitment of its effects. Once the version of input objects is known, execution can The Sui Smart Contracts Platform take place completely in parallel. Move virtual machines on mul- tiple cores or physical machines read the versioned input objects, execute, and write the resulting objects from and to stores. The consistency requirements on stores for objects and transactions (besides the order lock map) are very loose, allowing scalable dis- tributed key-value stores to be used internally by each authority. Execution is idempotent, making even crashes or hardware failures on components handling execution easy to recover from. As a result, execution for transactions that are not causally re- lated to each other can proceed in parallel. Smart contract design- ers may therefore design the data model of objects and operations within their contracts to take advantage of this parallelism. Check-pointing and state commitments are computed off the critical transaction processing path to not block the handling of fresh transactions. These involve read operations on committed data rather than requiring computation and agreement before a transaction reaches finality. Therefore they do not affect the latency or throughput of processing new transactions, and can themselves be distributed across available resources. Reads can benefit from very aggressive, and scalable caching. Authorities sign and make available all data that light clients require for reads, which may be served by distributed stores as static data. Certificates act as roots of trust for their full causal history of transactions and objects. State commitments further allow for the whole system to have regular global roots of trust for all state and transactions processed, at least every epoch or more frequently. Latency.Smart contract designers are given the flexibility to con- trol the latency of operations they define, depending on whether they involve owned or shared objects. Owned objects rely on a reli- able broadcast before execution and commit, which requires two round trips to a quorum of authorities to reach finality. Operations involving shared objects, on the other hand, require a a consistent broadcast to create a certificate, and then be processed within a consensus protocol, leading to increased latency (4 to 8 round trips to quorums as of \[9\]). REFERENCES \[1\] Mustafa Al-Bassam, Alberto Sonnino, Vitalik Buterin, and Ismail Khoffi. 2021. Fraud and Data Availability Proofs: Detecting Invalid Blocks in Light Clients. InFinancial Cryptography and Data Security - 25th International Conference, FC 2021, Virtual Event, March 1-5, 2021, Revised Selected Papers, Part II (Lecture Notes in Computer Science, Vol. 12675), Nikita Borisov and Claudia Diaz (Eds.). Springer, 279–298. \[2\]Shehar Bano, Alberto Sonnino, Mustafa Al-Bassam, Sarah Azouvi, Patrick Mc- Corry, Sarah Meiklejohn, and George Danezis. 2019. SoK: Consensus in the Age of Blockchains. InProceedings of the 1st ACM Conference on Advances in Financial Technologies, AFT 2019, Zurich, Switzerland, October 21-23, 2019. ACM, 183–198. \[3\]Mathieu Baudet, George Danezis, and Alberto Sonnino. 2020. FastPay: High- Performance Byzantine Fault Tolerant Settlement. InAFT ’20: 2nd ACM Confer- ence on Advances in Financial Technologies, New York, NY, USA, October 21-23, 2020. ACM, 163–177. \[4\]Sam Blackshear, Evan Cheng, David L. Dill, Victor Gao, Ben Maurer, Todd Nowacki, Alistair Pott, Shaz Qadeer, Ra in, Dario Russi, Stephane Sezer, Tim Za- kian, and Runtian Zhou. 2019. Move: A Language With Programmable Resources. https://developers.libra.org/docs/move-paper. \[5\]Sam Blackshear, David L. Dill, Shaz Qadeer, Clark W. Barrett, John C. Mitchell, Oded Padon, and Yoni Zohar. 2020. Resources: A Safe Language Abstraction for Money.CoRRabs/2004.05106 (2020). arXiv:2004.05106 https://arxiv.org/abs/ 2004.05106 \[6\]Christian Cachin, Rachid Guerraoui, and Luís Rodrigues. 2011.Introduction to reliable and secure distributed programming. Springer Science & Business Media. \[7\]Panagiotis Chatzigiannis, Foteini Baldimtsi, and Konstantinos Chalkias. 2021. SoK: Blockchain Light Clients.IACR Cryptol. ePrint Arch.(2021), 1657. \[8\]Daniel Collins, Rachid Guerraoui, Jovan Komatovic, Petr Kuznetsov, Matteo Monti, Matej Pavlovic, Yvonne-Anne Pignolet, Dragos-Adrian Seredinschi, An- drei Tonkikh, and Athanasios Xygkis. 2020. Online Payments by Merely Broad- casting Messages. In50th Annual IEEE/IFIP International Conference on Dependable Systems and Networks, DSN 2020, Valencia, Spain, June 29 - July 2, 2020. IEEE, 26–38. \[9\] George Danezis, Eleftherios Kokoris-Kogias, Alberto Sonnino, and Alexander Spiegelman. 2021. Narwhal and Tusk: A DAG-based Mempool and Efficient BFT Consensus.CoRRabs/2105.11827 (2021). \[10\]David L. Dill, Wolfgang Grieskamp, Junkil Park, Shaz Qadeer, Meng Xu, and Jingyi Emma Zhong. 2021. Fast and Reliable Formal Verification of Smart Con- tracts with the Move Prover.CoRRabs/2110.08362 (2021). arXiv:2110.08362 https://arxiv.org/abs/2110.08362 \[11\]Rachid Guerraoui, Petr Kuznetsov, Matteo Monti, Matej Pavlovic, and Dragos- Adrian Seredinschi. 2018. AT2: Asynchronous Trustworthy Transfers.CoRR abs/1812.10844 (2018). \[12\]Rachid Guerraoui, Petr Kuznetsov, Matteo Monti, Matej Pavlovic, and Dragos- Adrian Seredinschi. 2019. The Consensus Number of a Cryptocurrency. In Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing, PODC 2019, Toronto, ON, Canada, July 29 - August 2, 2019, Peter Robinson and Faith Ellen (Eds.). ACM, 307–316. \[13\] Patrick McCorry, Chris Buckland, Bennet Yee, and Dawn Song. 2021. SoK: Validating Bridges as a Scaling Solution for Blockchains.IACR Cryptol. ePrint Arch.(2021), 1589. \[14\]Marco Patrignani and Sam Blackshear. 2021. Robust Safety for Move.CoRR abs/2110.05043 (2021). arXiv:2110.05043 https://arxiv.org/abs/2110.05043 \[15\]Jerome H Saltzer and Michael D Schroeder. 1975. The protection of information in computer systems.Proc. IEEE63, 9 (1975), 1278–1308. \[16\]Jingyi Emma Zhong, Kevin Cheang, Shaz Qadeer, Wolfgang Grieskamp, Sam Blackshear, Junkil Park, Yoni Zohar, Clark W. Barrett, and David L. Dill. 2020. The Move Prover. InComputer Aided Verification - 32nd International Conference, CAV 2020, Los Angeles, CA, USA, July 21-24, 2020, Proceedings, Part I (Lecture Notes in Computer Science, Vol. 12224), Shuvendu K. Lahiri and Chao Wang (Eds.). Springer, 137–150. https://doi.org/10.1007/978-3-030-53288-8\_7 --- # Getting Started | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started#__docusaurus_skipToContent_fallback) Install Sui ----------- Install the Sui framework and its required prerequisites on your system. Configure a Sui Client ---------------------- The Sui client configuration specifies which network to connect to and which address to send transactions. Create a Sui Address -------------------- You need an address on the Sui network before you can build packages and own objects. Get SUI from Faucet ------------------- Use the Sui faucet to obtain free SUI tokens for use on the Sui Devnet and Testnet networks. Hello, World! ------------- Create and publish your first Move package using a basic 'Hello, World!' example. Next Steps ---------- To continue your journey building on Sui, you can review other documentation, join the community of other Sui builders, or check out the Awesome Sui repo. --- # Configure a Sui Client | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/configure-sui-client#__docusaurus_skipToContent_fallback) On this page The Sui client configuration specifies which network to connect to and which address to send transactions. * Prerequisites First, confirm that Sui has been installed successfully: $ sui --version If this command returns `sui not found`, then Sui is not installed and you must [follow the installation instructions](https://docs.sui.io/guides/developer/getting-started/sui-install) . `sui client`[​](https://docs.sui.io/guides/developer/getting-started/configure-sui-client#sui-client "Direct link to sui-client") ---------------------------------------------------------------------------------------------------------------------------------- Run the Sui CLI with the command: $ sui client info If a previous Sui installation stored a `client.yaml` file locally, you will receive the `sui client --help` output in the console. You can delete the existing `~/.sui/sui_config/client.yaml` file if you'd like to start fresh, or you can continue using the existing configuration. The prompt asks if you want to create the `client.yaml` file, select `Y` or press enter. You can skip the prompt with `sui client -y`. No sui config found in `~/.sui/sui_config/client.yaml`, create one [Y/n]? You will see the following output: Generated new keypair ... secret recovery phrase : [recovery phrase words are here]Created "~/.sui/sui_config/client.yaml"Set active environment to testnet caution Store recovery phrases securely and do not share them with anyone, as they provide access to any objects and tokens that an address owns. It will not be visible again once the CLI history disappears. [Learn more](https://docs.sui.io/guides/developer/getting-started/get-address) about Sui addresses, key generation, and recovery phrases. `client.yaml`[​](https://docs.sui.io/guides/developer/getting-started/configure-sui-client#clientyaml "Direct link to clientyaml") ----------------------------------------------------------------------------------------------------------------------------------- Your Sui client is now configured. By default, Sui stores this information in either the `~/.sui/sui_config/client.yaml` file (macOS/Linux) or `%USERPROFILE%\.sui\sui_config\client.yaml` file (Windows). You can store a `client.yaml` file in a different location, if preferred, and specify its location with the `--client.config` flag. The `client.yaml` contains the configuration for connecting to different Sui networks (Testnet, Mainnet, Devnet, and Localnet), as well as your current active environment, which tells the CLI which network to use when you don't explicitly specify one. You can modify your configuration using the `sui client` subcommands. See the output of `sui client --help` for more information. Sui stores the key for the Sui address in a separate file, `~/.sui/sui_config/sui.keystore` (macOS/Linux) or `%USERPROFILE/.sui/sui_config/sui.keystore` (Windows). Learn more about Sui addresses in [Create a Sui Address](https://docs.sui.io/guides/developer/getting-started/get-address) . ### Next steps Learn More About Sui Addresses ------------------------------ Now that you have created a Sui address, learn about address management, key pairs, and recovery phrase best practices. Get SUI from Faucet ------------------- Obtain SUI from a faucet to deploy packages on Testnet. Hello, World! ------------- Clone the "Hello, World!" project. * [`sui client`](https://docs.sui.io/guides/developer/getting-started/configure-sui-client#sui-client) * [`client.yaml`](https://docs.sui.io/guides/developer/getting-started/configure-sui-client#clientyaml) --- # Install from Binaries | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/install-binaries#__docusaurus_skipToContent_fallback) On this page tip These instructions are for special use cases. For most users, [Quick Install](https://docs.sui.io/guides/developer/getting-started/sui-install) shows the best way to install Sui. Each Sui release provides a set of binaries for several operating systems. You can download these binaries from GitHub and use them to install Sui. * Linux * macOS * Windows 1. Go to [https://github.com/MystenLabs/sui](https://github.com/MystenLabs/sui) . 2. In the right pane, find the **Releases** section. ![Sui releases in GitHub](https://docs.sui.io/assets/images/releases-508571c4e1b0f73222ac83d4bb30a4c2.png) 3. Click the release tagged **Latest** to open the release's page. 4. In the **Assets** section of the release, select the .tgz compressed file that corresponds to your operating system. 5. Extract all files from the .tgz file into the preferred location on your system. These instructions assume you extract the files into a `sui` folder at the user root of your system for demonstration purposes. Replace references to this location in subsequent steps if you choose a different directory. 6. Navigate to the expanded folder. You should have the following extracted files: | Name | Description | | --- | --- | | `move-analyzer` | Language Server Protocol implementation. | | `sui` | Main Sui binary. | | `sui-bridge` | Sui native bridge. | | `sui-data-ingestion` | Capture full node data for indexer to store in a database. | | `sui-faucet` | Local faucet to mint coins on local network. | | `sui-node` | Run a local node. | | `sui-test-validator` | Run test validators on a local network for development. | | `sui-tool` | Provides utilities for Sui. | 7. Add the folder containing the extracted files to your `PATH` variable. To do so, you can update your `~/.bashrc` to include the location of the Sui binaries. If using the suggested location, you type `export PATH=$PATH:~/sui` and press Enter. 8. Start a new terminal session or type `source ~/.bashrc` to load the new `PATH` value. 1. Go to [https://github.com/MystenLabs/sui](https://github.com/MystenLabs/sui) . 2. In the right pane, find the **Releases** section. ![Sui releases in GitHub](https://docs.sui.io/assets/images/releases-508571c4e1b0f73222ac83d4bb30a4c2.png) 3. Click the release tagged **Latest** to open the release's page. 4. In the **Assets** section of the release, select the .tgz compressed file that corresponds to your operating system. 5. Extract all files from the .tgz file into the preferred location on your system. These instructions assume you extract the files into a `sui` folder at the user root of your system. Replace references to this location in subsequent steps if you choose a different directory. 6. Navigate to the expanded folder. You should have the following extracted files: | Name | Description | | --- | --- | | `move-analyzer` | Language Server Protocol implementation. | | `sui` | Main Sui binary. | | `sui-bridge` | Sui native bridge. | | `sui-data-ingestion` | Capture full node data for indexer to store in a database. | | `sui-faucet` | Local faucet to mint coins on local network. | | `sui-node` | Run a local node. | | `sui-test-validator` | Run test validators on a local network for development. | | `sui-tool` | Provides utilities for Sui. | 7. Add the folder containing the extracted files to your `PATH` variable. To do so, you can update your `~/.zshrc` or `~/.bashrc` to include the location of the Sui binaries. If using the suggested location, you type `export PATH=$PATH:~/sui` and press Enter. 8. Start a new console session or type `source ~/.zshrc` (or `.bashrc`) to load the new `PATH` value. 9. If running the binaries for the first time, you might receive an error from MacOS that prevents the binaries from running. If you receive this error, close the dialog and type `xattr -d com.apple.quarantine ~/sui/*` in your console and press Enter (be sure to adjust the path if different). 1. Go to [https://github.com/MystenLabs/sui](https://github.com/MystenLabs/sui) . 2. In the right pane, find the **Releases** section. ![Sui releases in GitHub](https://docs.sui.io/assets/images/releases-508571c4e1b0f73222ac83d4bb30a4c2.png) 3. Click the release tagged **Latest** to open the release's page. 4. In the **Assets** section of the release, select the .tgz compressed file that corresponds to your operating system. 5. Extract all files from the .tgz file into the preferred location on your system. These instructions assume you extract the files into a `sui` folder at the root of your C drive. Replace references to this location in subsequent steps if you choose a different directory. info Windows does not natively support .tgz files, but you can use a free compressed file app like [7Zip](https://7-zip.org/) to extract. 6. Navigate to the expanded folder. You should have the following extracted files: | Name | Description | | --- | --- | | `move-analyzer` | Language Server Protocol implementation. | | `sui` | Main Sui binary. | | `sui-bridge` | Sui native bridge. | | `sui-data-ingestion` | Capture full node data for indexer to store in a database. | | `sui-faucet` | Local faucet to mint coins on local network. | | `sui-node` | Run a local node. | | `sui-test-validator` | Run test validators on a local network for development. | | `sui-tool` | Provides utilities for Sui. | 7. Add the folder containing the extracted files to your `PATH` variable. There are several ways to get to the setting depending on your version of Windows. One way that works on all versions of Windows is to type `sysdm.cpl` in a console to open the System Properties window. Under the **Advanced** tab, click the **Environment Variables...** button. 8. In the Environment Variables window, select the `Path` variable and click the **Edit...** button. 9. In the Edit environment variable window, click **New** and add the path to your expanded folder. Using the example path, this would be `C:\sui`. 10. Click **OK**. Build binaries locally[​](https://docs.sui.io/guides/developer/getting-started/install-binaries#build-binaries-locally "Direct link to Build binaries locally") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- You can download the Sui repo and build the binaries locally. The binaries are exported to the `target/release` directory. $ cargo build --profile release --bin sui Include other packages as needed. | Name | Description | | --- | --- | | `move-analyzer` | Language Server Protocol implementation. | | `sui` | Main Sui binary. | | `sui-bridge` | Sui native bridge. | | `sui-data-ingestion` | Capture full node data for indexer to store in a database. | | `sui-faucet` | Local faucet to mint coins on local network. | | `sui-node` | Run a local node. | | `sui-test-validator` | Run test validators on a local network for development. | | `sui-tool` | Provides utilities for Sui. | Upgrade from Cargo[​](https://docs.sui.io/guides/developer/getting-started/install-binaries#upgrade-from-cargo "Direct link to Upgrade from Cargo") ---------------------------------------------------------------------------------------------------------------------------------------------------- If you previously installed the Sui binaries, you can update them to the most recent release with the same command you used to install them (changing `testnet` to the desired branch): $ cargo install --locked --git https://github.com/MystenLabs/sui.git --branch testnet sui --features tracing info The `tracing` feature enables Move test coverage and debugger support in the Sui CLI. These features are not available unless you enable tracing. Install `sui-node` for Ubuntu from AWS[​](https://docs.sui.io/guides/developer/getting-started/install-binaries#aws-sui-node "Direct link to aws-sui-node") ------------------------------------------------------------------------------------------------------------------------------------------------------------ info The [`sui-node` binary from AWS](https://docs.sui.io/guides/developer/getting-started/install-binaries#aws-sui-node) only supports Ubuntu version 22.04. The `sui-node` binaries for Ubuntu 22.04 are available for download from AWS. You can use either the commit SHA or version tag in the URL to retrieve the specific version of Sui you want. Use one of these values to construct the AWS download URL. The URL is in the form: https://sui-releases.s3-accelerate.amazonaws.com//sui-node Replace `` with the proper value. For example, the URL is `https://sui-releases.s3-accelerate.amazonaws.com/00544a588bb71c395d49d91f756e8bfe96067eca/sui-node` to download the release with the relevant commit SHA. If you visit the URL using a browser, the binary downloads automatically. After downloading, open a console to the file's location and change its permission to `755`. $ chmod 755 sui-node Add the file's location to your `$PATH` variable if its directory is not already included. Follow the steps in [Configure a Sui full node](https://docs.sui.io/guides/operator/sui-full-node) to complete the setup. Related links[​](https://docs.sui.io/guides/developer/getting-started/install-binaries#related-links "Direct link to Related links") ------------------------------------------------------------------------------------------------------------------------------------- • [Install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) Install the Sui framework and its required prerequisites on your system. • [Install from Source](https://docs.sui.io/guides/developer/getting-started/install-source) Install the Sui framework from source, either locally or directly from GitHub. * [Build binaries locally](https://docs.sui.io/guides/developer/getting-started/install-binaries#build-binaries-locally) * [Upgrade from Cargo](https://docs.sui.io/guides/developer/getting-started/install-binaries#upgrade-from-cargo) * [Install `sui-node` for Ubuntu from AWS](https://docs.sui.io/guides/developer/getting-started/install-binaries#aws-sui-node) * [Related links](https://docs.sui.io/guides/developer/getting-started/install-binaries#related-links) --- # Connecting to a Local Network | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/local-network#__docusaurus_skipToContent_fallback) On this page The Sui CLI provides the `sui start` command to create and start a local instance of the Sui network. You can start services such as an indexer, a faucet, or a local instance of the GraphQL service (including the web-based GraphiQL IDE). `sui start` also includes a local faucet to get test SUI to use in the local network you create. * Prerequisites * [x] [Install the latest version of the Sui CLI](https://docs.sui.io/guides/developer/getting-started/sui-install) . Starting the local network[​](https://docs.sui.io/guides/developer/getting-started/local-network#starting-the-local-network "Direct link to Starting the local network") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- To start the local network, run the following command: $ RUST_LOG="off,sui_node=info" sui start --with-faucet --force-regenesis This command: * Calls the Sui CLI binary with 2 flags: * `--with-faucet` to start a faucet service. * `--force-regenesis` to generate a new genesis and not persist the local network state. * Instructs Rust to set specific logging through the `RUST_LOG`\=`off,sui_node=info` flags, which turns off logging for all components except `sui-node`. If you want to see more detailed logs, you can remove `RUST_LOG` from the command. caution Each time you start the network by passing `--force-regenesis`, the local network starts from a random genesis with no previous data and the local network is not persisted. If you want to persist data, do not pass the `--force-regenesis` flag. A temporary directory is created in `/tmp`, which might not work if the `/tmp` folder is mounted to `/tmpfs`. If this is the case, set `TMPDIR=./some_folder`. Customization[​](https://docs.sui.io/guides/developer/getting-started/local-network#customization "Direct link to Customization") ---------------------------------------------------------------------------------------------------------------------------------- To customize your local Sui network, such as starting other services or changing default ports and hosts, include additional flags or options in the `sui start` command. Options and flags like `with-indexer` and `with-graphql` require you to have PostgreSQL/libpq installed. Check out the list of possible options below to find which is the default database or how to pass a different database. The following is a list of possible options and flags to pass to `sui start`. Use `sui start --help` to see these options in your console. --network.config Config directory that will be used to store network config, node db, keystore. sui genesis -f --with-faucet generates a genesis config that can be used to start this process. Use with caution as the `-f` flag will overwrite the existing config directory. We can use any config dir that is generated by the `sui genesis` --force-regenesis A new genesis is created each time this flag is set, and state is not persisted between runs. Only use this flag when you want to start the network from scratch every time you run this command. To run with persisted state, do not pass this flag and use the `sui genesis` command to generate a genesis that can be used to start the network with. --with-faucet[=] Start a faucet with default host and port: 0.0.0.0:9123. This flag accepts also a port, a host, or both (e.g., 0.0.0.0:9123). When providing a specific value, please use the = sign between the flag and value: `--with-faucet=6124` or `--with-faucet=0.0.0.0`, or `--with-faucet=0.0.0.0:9123` --with-indexer[=] Start an indexer with a PostgreSQL database. Three modes of operation: - Not specified: No indexer is started (unless --with-graphql is set) - `--with-indexer`: Create/use a temporary database in the network's configuration directory - `--with-indexer=`: Use the provided PostgreSQL database URL When providing a database URL, use the = sign: `--with-indexer=postgres://user:pass@host:5432/db` --with-consistent-store[=] Start a Consistent Store with default host and port: 0.0.0.0:9124. This flag accepts also a port, a host, or both (e.g., 0.0.0.0:9124). When providing a specific value, please use the = sign between the flag and value: `--with-consistent-store=9124` or `--with-consistent-store=0.0.0.0`, or `--with-consistent-store=0.0.0.0:9124` The Consistent Store will be automatically enabled when `--with-graphql` is set. --with-graphql[=] Start a GraphQL server with default host and port: 0.0.0.0:9125. This flag accepts also a port, a host, or both (e.g., 0.0.0.0:9125). When providing a specific value, please use the = sign between the flag and value: `--with-graphql=9125` or `--with-graphql=0.0.0.0`, or `--with-graphql=0.0.0.0:9125` Note that GraphQL requires a running indexer and consistent store, which will be enabled by default even if those flags are not set. --fullnode-rpc-port Port to start the Fullnode RPC server on. Default port is 9000 [default: 9000] --epoch-duration-ms Set the epoch duration. Can only be used when `--force-regenesis` flag is passed or if there's no genesis config and one will be auto-generated. When this flag is not set but `--force-regenesis` is set, the epoch duration will be set to 60 seconds --data-ingestion-dir Make the fullnode dump executed checkpoints as files to this directory. This is incompatible with --no-full-node. If --with-indexer is set, this defaults to a temporary directory. --no-full-node Start the network without a fullnode --committee-size Set the number of validators in the network. If a genesis was already generated with a specific number of validators, this will not override it; the user should recreate the genesis with the desired number of validators Persisting local network state[​](https://docs.sui.io/guides/developer/getting-started/local-network#persisting-local-network-state "Direct link to Persisting local network state") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- If you stop and start the network without passing the `--force-regenesis` flag, all history is preserved and accessible. By default, `sui start` uses an existing genesis and network configuration if the `~/.sui/sui_config` folder exists and includes a `genesis.blob` file. If the folder does not exist, it creates the folder and generates a new genesis configuration. If you pass `--network.config`, the command checks for the network configuration file and tries to load the genesis blob as per the network configuration file. To generate a custom genesis, use the `sui genesis` command and pass the desired custom values. For more information about possible flags and options, run `sui genesis --help`. To view the transaction history for your local network, use the following command to retrieve the local total transaction count: $ curl --location --request POST 'http://127.0.0.1:9000' \--header 'Content-Type: application/json' \--data-raw '{ "jsonrpc": "2.0", "id": 1, "method": "sui_getTotalTransactionBlocks", "params": []}' If successful, the response resembles the following: { "jsonrpc": "2.0", "result": 168, "id": 1} Connecting the Sui CLI to your local network[​](https://docs.sui.io/guides/developer/getting-started/local-network#connecting-the-sui-cli-to-your-local-network "Direct link to Connecting the Sui CLI to your local network") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- You can use the Sui CLI with any Sui network. To connect it to your local network, create a new environment alias named `local` that sets the CLI's RPC URL configuration to the local network's URL. $ sui client new-env --alias local --rpc http://127.0.0.1:9000 Next, set the active environment to the new `local` environment you created. sui client switch --env local The command returns: `Active environment switched to [local]`. You can check the current active environment with the following command: $ sui client active-env The command returns: `local`. Show the current active address[​](https://docs.sui.io/guides/developer/getting-started/local-network#show-the-current-active-address "Direct link to show-the-current-active-address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The Sui CLI uses the active address for each command if you do not explicitly specify one as a flag in the command. To see the current active address on your local network, use the command: sui client active-address The command returns an address, for example, `0xbc33e6e4818f9f2ef77d020b35c24be738213e64d9e58839ee7b4222029610de`. Use the local faucet[​](https://docs.sui.io/guides/developer/getting-started/local-network#use-the-local-faucet "Direct link to use-the-local-faucet") ------------------------------------------------------------------------------------------------------------------------------------------------------- Transactions on your local network require SUI coins to pay for gas fees just like on Mainnet, Testnet, and Devnet. The Sui CLI provides the `sui client faucet` command to get SUI from the local faucet. The `faucet` command uses the active address and the active network environment by default. Run `sui client faucet` and wait approximately 60 seconds for the coins to reach your address. After you get coins from the faucet, use the following command to view the coin objects for the address: $ sui client gas The response resembles the following: ╭────────────────────────────────────────────────────────────────────┬────────────╮│ gasCoinId │ gasBalance │├────────────────────────────────────────────────────────────────────┼────────────┤│ 0x1d790713c1c3441a307782597c088f11230c47e609af2cec97f393123ea4de45 │ 200000000 ││ 0x20c1d5ad2e8693953fca09fd2fec0fbc52a787e0a0f77725220d36a09a5b312d │ 200000000 ││ 0x236714566110f5624516faa0da215ad29f8daa611e8b651d1e972168207567b2 │ 200000000 ││ 0xc81f30256bb04ad84bc4a92017cffd7c1f98286e028fa504d8515ad72ddd1088 │ 200000000 ││ 0xf61c8b21b305cc8e062b3a37de8c3a37583e17f437a449a2ab42321d019aeeb4 │ 200000000 │╰────────────────────────────────────────────────────────────────────┴────────────╯ Generate example data[​](https://docs.sui.io/guides/developer/getting-started/local-network#generate-example-data "Direct link to Generate example data") ---------------------------------------------------------------------------------------------------------------------------------------------------------- Use the TypeScript SDK to add example data to your network. This requires that you start a local network with an indexer and GraphQL. To do so, use the following command: sui start --force-regenesis --with-faucet --with-indexer --with-graphql Then run the following command from the `sui` root folder: $ pnpm --filter @mysten/sui test:e2e For additional information about example data for testing, see the [TypeScript example on GitHub](https://github.com/MystenLabs/ts-sdks/tree/main/packages/typescript#testing) . Monitor activity[​](https://docs.sui.io/guides/developer/getting-started/local-network#monitor-activity "Direct link to Monitor activity") ------------------------------------------------------------------------------------------------------------------------------------------- Use a Sui network explorer to monitor your local network activity. You can build and run one locally or use the **Custom RPC URL** setting available on many online explorers to provide your local network's RPC URL (`http://127.0.0.1:9000` by default). * [Polymedia Explorer](https://github.com/juzybits/polymedia-explorer) : Community fork of the discontinued Sui Explorer from Mysten Labs that you can build locally or use online at [https://explorer.polymedia.app/](https://explorer.polymedia.app/) . * [Sui Explorer](https://github.com/suiware/sui-explorer) : Community fork of the discontinued Sui Explorer from Mysten Labs that you can build locally. * [suiscan](https://suiscan.xyz/) : Popular Sui network scanner available online. * [SuiVision](https://suivision.xyz/) : Popular Sui network scanner available online. Testing with the Sui TypeScript SDK[​](https://docs.sui.io/guides/developer/getting-started/local-network#testing-with-the-sui-typescript-sdk "Direct link to Testing with the Sui TypeScript SDK") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The published version of the Sui TypeScript SDK might be an earlier version than the version of Sui you installed for your local network. To make sure you're using the latest version of the SDK, use the `experimental`\-tagged version (for example, `0.0.0-experimental-20230317184920`) in the [Current Tags](https://www.npmjs.com/package/@mysten/sui?activeTab=versions) section of the Sui NPM registry. Troubleshooting[​](https://docs.sui.io/guides/developer/getting-started/local-network#troubleshooting "Direct link to Troubleshooting") ---------------------------------------------------------------------------------------------------------------------------------------- If you do not use [Node.js 18](https://nodejs.org/en/announcements/v18-release-announce) , you might see the following message: Retrying requesting from faucet: Retry failed: fetch is not defined To resolve this, switch or update to Node.js 18, then try again. * [Starting the local network](https://docs.sui.io/guides/developer/getting-started/local-network#starting-the-local-network) * [Customization](https://docs.sui.io/guides/developer/getting-started/local-network#customization) * [Persisting local network state](https://docs.sui.io/guides/developer/getting-started/local-network#persisting-local-network-state) * [Connecting the Sui CLI to your local network](https://docs.sui.io/guides/developer/getting-started/local-network#connecting-the-sui-cli-to-your-local-network) * [Show the current active address](https://docs.sui.io/guides/developer/getting-started/local-network#show-the-current-active-address) * [Use the local faucet](https://docs.sui.io/guides/developer/getting-started/local-network#use-the-local-faucet) * [Generate example data](https://docs.sui.io/guides/developer/getting-started/local-network#generate-example-data) * [Monitor activity](https://docs.sui.io/guides/developer/getting-started/local-network#monitor-activity) * [Testing with the Sui TypeScript SDK](https://docs.sui.io/guides/developer/getting-started/local-network#testing-with-the-sui-typescript-sdk) * [Troubleshooting](https://docs.sui.io/guides/developer/getting-started/local-network#troubleshooting) --- # Connect a Frontend to a Move Package | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/app-frontends#__docusaurus_skipToContent_fallback) On this page In the previous guide, ["Hello, World!"](https://docs.sui.io/guides/developer/getting-started/hello-world) , you deployed a Move package and interacted with it to create an object that stored the text "Hello world!". This guide demonstrates how to connect a React interface to that "Hello, World!" package, giving any user a way to interact with the Move package from their browser and set a custom greeting. * Prerequisites * [Install the latest version of Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) . * [Configure the Sui client](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) . * [Create a Sui address](https://docs.sui.io/guides/developer/getting-started/get-address) . * [Get SUI Testnet tokens](https://docs.sui.io/guides/developer/getting-started/get-coins) . * Complete the ["Hello, World!"](https://docs.sui.io/guides/developer/getting-started/hello-world) guide and have your published Move package's ID. * Install [`pnpm`](https://pnpm.io/installation) to use as the package manager. * Create a [Slush](https://slush.app/) wallet. Call the Move package[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#call-the-move-package "Direct link to call-the-move-package") ---------------------------------------------------------------------------------------------------------------------------------------------------------- First, confirm that you have [followed the "Hello, World!"](https://github.com/MystenLabs/sui-stack-hello-world.git) example guide and are within the `sui-stack-hello-world/move/hello-world` directory in your CLI. Then, verify your Move package is still available on Testnet by obtaining its object information: $ sui client object Replace `` with your Move package's ID. danger If your package no longer exists, or if you need to obtain the package ID again, follow the steps in the ["Hello, World!"](https://github.com/MystenLabs/sui-stack-hello-world.git) guide. View the frontend source code[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#view-the-frontend-source-code "Direct link to View the frontend source code") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In the "Hello, World!" example project, the subdirectory `sui-stack-hello-world/ui` contains the frontend interface source code files: .├── index.html├── package.json├── pnpm-lock.yaml├── prettier.config.cjs├── src│ ├── App.tsx│ ├── constants.ts│ ├── CreateGreeting.tsx│ ├── Greeting.tsx│ ├── main.tsx│ ├── networkConfig.ts│ └── vite-env.d.ts├── tsconfig.json├── tsconfig.node.json└── vite.config.mts ### `App.tsx`[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#apptsx "Direct link to apptsx") The `App.tsx` file contains code that creates a basic starter template for your React app. It includes a button to connect a Slush wallet to the app and a button to open the Sui Faucet to obtain Testnet SUI. File not found in manifest: `ui/src/App.tsx`. You probably need to run \`pnpm prebuild\` and restart the site. ### `CreateGreeting.tsx`[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#creategreetingtsx "Direct link to creategreetingtsx") The `CreateGreeting.tsx` file contains logic that creates and sends a transaction to your Move package. The transaction calls the `new` function of the package, which creates a Move object with the value `Hello world!`. In the ["Hello, World!"](https://docs.sui.io/guides/developer/getting-started/hello-world) guide, you called this function manually through the CLI with the command `sui client call --package --module greeting --function new`. File not found in manifest: `ui/src/CreateGreeting.tsx`. You probably need to run \`pnpm prebuild\` and restart the site. ### `Greeting.tsx`[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#greetingtsx "Direct link to greetingtsx") The `Greeting.tsx` file also contains logic that creates and sends a transaction to your Move package. However, this transaction calls the `update_text` function of the package, which modifies the text to replace "Hello world!" with the text of your choosing. File not found in manifest: `ui/src/Greeting.tsx`. You probably need to run \`pnpm prebuild\` and restart the site. Connect the React interface to your Move package[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#connect-the-react-interface-to-your-move-package "Direct link to connect-the-react-interface-to-your-move-package") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `constants.ts` file is where you connect the React app to your Move package. This file contains a single line that sets your Move package ID as a constant `TESTNET_HELLO_WORLD_PACKAGE_ID`. By default, this file contains a sample package ID. Modify this file to include your Move package ID instead. File not found in manifest: `ui/src/constants.ts`. You probably need to run \`pnpm prebuild\` and restart the site. This constant is used in the `networkConfig.ts` file: File not found in manifest: `ui/src/networkConfig.ts`. You probably need to run \`pnpm prebuild\` and restart the site. Install frontend dependencies[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#install-frontend-dependencies "Direct link to Install frontend dependencies") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Now, navigate into the `sui-stack-hello-world/ui` directory if you are not already there and install the necessary frontend dependencies: $ pnpm install Run the React application[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#run-the-react-application "Direct link to Run the React application") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Start the React application in your local development environment: $ pnpm dev Then, open `http://localhost:5173/` in your browser. The app prompts you to connect your Slush wallet. Click **Connect Wallet**, authenticate when prompted, then approve the connection. Send SUI tokens to your Slush wallet[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#send-sui-tokens-to-your-slush-wallet "Direct link to Send SUI tokens to your Slush wallet") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- If you sent SUI tokens to an address used in the CLI in previous guides, then created a new Slush wallet in your browser, you likely need to send SUI tokens to the Slush wallet. The Slush wallet address is different and separate from the address created and used in the CLI. Follow the [Testnet SUI](https://docs.sui.io/guides/developer/getting-started/get-coins) instructions to send Testnet tokens to your Slush address. Use the frontend interface[​](https://docs.sui.io/guides/developer/getting-started/app-frontends#use-the-frontend-interface "Direct link to Use the frontend interface") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Next, click the **Create Greeting** button. In the code, this button activates the logic stored in `CreateGreeting.ts` to send a transaction to the Move package that calls the `new` function and creates the `Greeting` object. The Slush wallet prompts you to approve this transaction. danger If there is a problem, the prompt to approve the transaction displays the error message. Common errors include "Unable to Process Transaction" due to either insufficient gas coins or an incorrect Move package ID. [Obtain Testnet SUI](https://docs.sui.io/guides/developer/getting-started/get-coins) or [confirm you have the correct Move package ID](https://docs.sui.io/guides/developer/getting-started/hello-world) to resolve these errors. After you approve the transaction, the browser window displays the `Greeting` object's ID and its content, which by default is "Hello world!" To change this text, enter a different greeting in the text box below the default value and click **Update**. The Slush wallet prompts you to approve the transaction. !["Hello, World!" default greeting](https://docs.sui.io/assets/images/hello-world-default-d910758ce8899ec84991f5280b135e15.png) After you approve the transaction, the new greeting is displayed: !["Hello, World!" modified greeting](https://docs.sui.io/assets/images/hello-world-modified-076ed0da80921538df92c8f637e28426.png) ### Next steps Access Sui Data --------------- Learn more about accessing data on Sui. Join the Community ------------------ Join the Sui developer community, try out other example projects, or read more documentation. * [Call the Move package](https://docs.sui.io/guides/developer/getting-started/app-frontends#call-the-move-package) * [View the frontend source code](https://docs.sui.io/guides/developer/getting-started/app-frontends#view-the-frontend-source-code) * [`App.tsx`](https://docs.sui.io/guides/developer/getting-started/app-frontends#apptsx) * [`CreateGreeting.tsx`](https://docs.sui.io/guides/developer/getting-started/app-frontends#creategreetingtsx) * [`Greeting.tsx`](https://docs.sui.io/guides/developer/getting-started/app-frontends#greetingtsx) * [Connect the React interface to your Move package](https://docs.sui.io/guides/developer/getting-started/app-frontends#connect-the-react-interface-to-your-move-package) * [Install frontend dependencies](https://docs.sui.io/guides/developer/getting-started/app-frontends#install-frontend-dependencies) * [Run the React application](https://docs.sui.io/guides/developer/getting-started/app-frontends#run-the-react-application) * [Send SUI tokens to your Slush wallet](https://docs.sui.io/guides/developer/getting-started/app-frontends#send-sui-tokens-to-your-slush-wallet) * [Use the frontend interface](https://docs.sui.io/guides/developer/getting-started/app-frontends#use-the-frontend-interface) --- # Get SUI from Faucet | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/get-coins#__docusaurus_skipToContent_fallback) On this page To perform transactions on a Sui network, you need SUI tokens to pay for gas and storage. For applications on Mainnet, you must buy real SUI on exchanges like Coinbase, OKX, or Robinhood. Its value is determined by market factors such as supply and demand, network utility, and perceived value. Because Mainnet tokens cost real money, development can be expensive. That's why Sui provides Devnet and Testnet networks, which mirror Mainnet features and enable you to build and test safely for an affordable cost. important SUI tokens on Devnet and Testnet are free and hold no monetary value. You can get free SUI tokens from the Sui faucet, which lets you deploy and interact with smart contracts and objects on Devnet, Testnet, or a local network. There is no faucet for Mainnet. * Prerequisites * [Install the latest version of Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) . * Set up your Sui account and CLI environment. Click to open Create Sui account and setup CLI environment. $ sui client If this is the first time running the `sui client` CLI tool, it asks you to provide a Sui full node server URL (or press enter for the default Testnet), select an encryption scheme to generate an address, and stores the configuration in a `client.yaml` file. For more information, refer to the [Sui client CLI tutorial](https://docs.sui.io/references/cli/client) . If this is not your first time running `sui client`, then you already have a `client.yaml` file in your local environment. If you'd like to create a new address for this tutorial, use the command: $ sui client new-address ed25519 Request SUI tokens from faucet[​](https://docs.sui.io/guides/developer/getting-started/get-coins#online-faucet "Direct link to online-faucet") ----------------------------------------------------------------------------------------------------------------------------------------------- Visit the online faucet to request SUI tokens: [https://faucet.sui.io/](https://faucet.sui.io/) Then, follow these steps: 1. Connect your wallet or paste your wallet address in the address field. Get your wallet address in the CLI with the command `sui client active-address`. 2. Use the network dropdown to select the correct network: Testnet, Devnet, or Localnet. It is recommended to use the Testnet for most use cases before deploying to Mainnet for production. [Learn more](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) about the available networks and their differences. 3. Click the **Request SUI** button. To request more SUI, refresh your browser and click the **Request SUI** button again. The requests are rate limited, however, so too many requests results in a waiting period before you are able to request more tokens. ### Community faucets[​](https://docs.sui.io/guides/developer/getting-started/get-coins#community-faucets "Direct link to Community faucets") You can also use the following community-provided faucets to obtain SUI tokens: * [http://faucet.n1stake.com/](http://faucet.n1stake.com/) * [http://faucet.suilearn.io/](http://faucet.suilearn.io/) These faucets have their own separate limits, such as one request per day or one request every few hours. ### Verify token balance[​](https://docs.sui.io/guides/developer/getting-started/get-coins#verify-token-balance "Direct link to Verify token balance") To check your balance of SUI tokens and confirm you received some from the faucet, use the command: $ sui client balance Alternatively, use a Sui Explorer such as [SuiVision](https://suivision.xyz/) or [SuiScan](https://suiscan.xyz/mainnet/accounts) to check the SUI token balance of an address. You should have a balance of SUI tokens: ╭────────────────────────────────────────────╮│ Balance of coins owned by this address │├────────────────────────────────────────────┤│ ╭────────────────────────────────────────╮ ││ │ coin balance (raw) balance │ ││ ├────────────────────────────────────────┤ ││ │ Sui 56804696124 0.50 SUI │ ││ ╰────────────────────────────────────────╯ │╰────────────────────────────────────────────╯ If you do not have a balance, repeat the [request SUI tokens from faucet](https://docs.sui.io/guides/developer/getting-started/get-coins#online-faucet) steps, or use an [alternative faucet method](https://docs.sui.io/guides/developer/getting-started/get-coins#alternative-faucets) . ### Return unused Testnet SUI[​](https://docs.sui.io/guides/developer/getting-started/get-coins#return-unused-testnet-sui "Direct link to return-unused-testnet-sui") The faucet drains from a finite pool of SUI. If the pool empties, it disrupts faucet service for the rest of the community. To help ensure this doesn't happen, you can use the online faucet to return your unused SUI to the Testnet pool. You cannot return SUI to the Devnet or Localnet pools. There are two ways to return unused Testnet SUI tokens: * Connect your wallet to the online faucet, and click the **Return tokens to faucet** button. Approve the transaction using your wallet and your SUI tokens are returned to the pool. * If you prefer not to connect your wallet, send the tokens to the address `0x7a9d19d4c210663926eb549da59a54e25777fef63161bfccda08277b58b4212e` via a [separate transaction](https://docs.sui.io/guides/developer/transactions/sign-and-send-txn) . Alternative methods for getting SUI tokens[​](https://docs.sui.io/guides/developer/getting-started/get-coins#alternative-faucets "Direct link to Alternative methods for getting SUI tokens") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- If you need an alternative method to get SUI tokens for deployment on Testnet or Devnet, you have several options. tip Every method to obtain SUI tokens for Testnet and Devnet is rate limited. If you need a large amount of SUI tokens, use a local network. * Discord * cURL * TypeScript SDK 1. Join [Discord](https://discord.gg/sui) . If you try to join the Sui Discord channel using a newly created Discord account, you might need to wait a few days for validation. 2. Request SUI tokens in the Sui [#devnet-faucet](https://discord.com/channels/916379725201563759/971488439931392130) or [#testnet-faucet](https://discord.com/channels/916379725201563759/1037811694564560966) Discord channels. Send the following message to the channel, replacing `` with your client address: !faucet Use the following cURL commands to set console variables and request tokens directly from the faucet server. Set `NETWORK` to either `testnet` or `devnet`. $ ADDRESS=$(sui client active-address)$ NETWORK=testnet$ curl --location --request POST "https://faucet.${NETWORK}.sui.io/v2/gas" \--header "Content-Type: application/json" \--data-raw "{ \"FixedAmountRequest\": { \"recipient\": \"${ADDRESS}\" }}" If you're working with a local network, replace `"https://faucet.${NETWORK}.sui.io/v2/gas"` with the appropriate value based on which package runs your network: * `sui-faucet`: `http://127.0.0.1:5003/gas` * `sui`: `http://127.0.0.1:9123/gas` You can access the faucet using the [Sui TypeScript SDK](https://sdk.mystenlabs.com/typescript) . import { getFaucetHost, requestSuiFromFaucetV2 } from '@mysten/sui/faucet';// get tokens from the Devnet faucet serverawait requestSuiFromFaucetV2({ // connect to Devnet host: getFaucetHost('devnet'), recipient: '',}); SUI tokens on a local network[​](https://docs.sui.io/guides/developer/getting-started/get-coins#sui-tokens-on-a-local-network "Direct link to SUI tokens on a local network") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ If you are running a local Sui network, you can get SUI tokens from your local faucet. See the [Connect to a Local Network](https://docs.sui.io/guides/developer/getting-started/local-network#use-the-local-faucet) topic for details. ### Next steps Hello, World! ------------- Clone and build the "Hello, World!" project. View More Example Apps ---------------------- Clone and build the "Hello, World!" project. * [Request SUI tokens from faucet](https://docs.sui.io/guides/developer/getting-started/get-coins#online-faucet) * [Community faucets](https://docs.sui.io/guides/developer/getting-started/get-coins#community-faucets) * [Verify token balance](https://docs.sui.io/guides/developer/getting-started/get-coins#verify-token-balance) * [Return unused Testnet SUI](https://docs.sui.io/guides/developer/getting-started/get-coins#return-unused-testnet-sui) * [Alternative methods for getting SUI tokens](https://docs.sui.io/guides/developer/getting-started/get-coins#alternative-faucets) * [SUI tokens on a local network](https://docs.sui.io/guides/developer/getting-started/get-coins#sui-tokens-on-a-local-network) --- # Install from Source | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/install-source#__docusaurus_skipToContent_fallback) tip These instructions are for special use cases. For most users, [Quick Install](https://docs.sui.io/guides/developer/getting-started/sui-install) shows the best way to install Sui. You can install Sui from source, either locally or directly from GitHub. At minimum, you will need Rust and Cargo installed for the Sui framework: * Download and install Rust: $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh If you have Rust installed, update to the latest version: $ rustup update stable * Download and install Cargo: $ curl https://sh.rustup.rs -sSf | sh Depending on your operating system, you may require additional prerequisites. Click to open Additional prerequisites * macOS * Linux * Windows Most modern MacOS systems have Homebrew and cURL preinstalled. * Download and install [Homebrew](https://brew.sh/) : $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" * Download and install CMake: $ brew install cmake Verify installation with $ cmake --version * Download and install **libpq**: $ brew install libpq Verify installation with $ libpq --version * Download and install [PostgreSQL](https://wiki.postgresql.org/wiki/Main_Page) . These prerequisites use the `apt` package manager for Linux. Adjust the commands accordingly per your package manager. tip You can install all of the prerequisites for Linux at once using the following command: $ sudo apt-get install curl git-all cmake gcc libssl-dev pkg-config libclang-dev libpq-dev build-essential * Download and install Rust: $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh If you have Rust installed, update to the latest version: $ rustup update stable * Download and install Cargo $ curl https://sh.rustup.rs -sSf | sh * Download and install cURL: $ sudo apt-get install curl Verify installation with $ curl --version * Download and install Git CLI: $ sudo apt-get install git-all Verify installation with $ git --version * Download and install CMake: $ sudo apt-get install cmake Verify installation with $ cmake --version * Download and install GCC: $ sudo apt-get install gcc Verify installation with $ gcc --version * Download and install **libssl-dev**: $ sudo apt-get install libssl-dev If the version of Linux you use doesn't support **libssl-dev**, find an equivalent package for it on the [ROS Index](https://index.ros.org/d/libssl-dev/) . If you have OpenSSL you might also need to also install **pkg-config**: $ sudo apt-get install pkg-config * Download and install **libclang-dev**: $ sudo apt-get install libclang-dev If the version of Linux you use doesn't support **libclang-dev**, find an equivalent package for it on the [ROS Index](https://index.ros.org/d/libclang-dev/) . * If you plan to use the `--with-indexer` and `--with-graphql` options with `sui start`, download and install **libpq-dev**: $ sudo apt-get install libpq-dev See [Local Network](https://docs.sui.io/guides/developer/getting-started/local-network) for more information. If the version of Linux you use doesn't support **libpq-dev**, find an equivalent package for it on the [ROS Index](https://index.ros.org/d/libpq-dev/) . * Download and install **build-essential**: $ sudo apt-get install build-essential * Windows 11 ships with a Microsoft version of [cURL](https://curl.se/windows/microsoft.html) already installed; however, if you are using Windows 10 or want to use the cURL project version instead, download and install it from [https://curl.se/windows/](https://curl.se/windows/) . * Download and install the [Git command line interface](https://git-scm.com/download/) . * Download and install [CMake](https://cmake.org/download/) . * Download and install the [LLVM Compiler Infrastructure](https://releases.llvm.org/) . Look for a file with a name similar to `LLVM-15.0.7-win64.exe` for 64-bit Windows, or `LLVM-15.0.7-win32.exe` for 32-bit Windows. * Download and install [C++ build tools](https://visualstudio.microsoft.com/downloads/) before downloading Rust. * Download and install Rust. If you use Windows 11, see information about using the [Rust installer](https://www.rust-lang.org/tools/install) on the Rust website. The installer checks for C++ build tools and prompts you to install them if necessary. Select the option that best defines your environment and follow the instructions in the install wizard. If you have Rust installed, update to the latest version: $ rustup update stable * Download and install Cargo: Download and install [`rustup-init.exe`](https://win.rustup.rs/) * Download [Protocol Buffers](https://github.com/protocolbuffers/protobuf/releases) (`protoc-xx.x-win32.zip` or `protoc-xx.x-win64.zip`) and add the `\bin` directory to your Windows `PATH` environment variable. * For Windows on ARM64 only: Download and install [Visual Studio 2022 Preview](https://visualstudio.microsoft.com/vs/preview/) . You can install from source either directly from GitHub or from your local drive. Regardless of which install from source method you use, the Sui components are found in the `~/.cargo/bin` folder. You can also download the [source code](https://docs.sui.io/references/contribute/sui-environment) to locally access files. * GitHub source * Local source Use Cargo to install Sui directly from the GitHub repo: $ cargo install --locked --git https://github.com/MystenLabs/sui.git --branch testnet sui --features tracing info The tracing feature enables Move test coverage and debugger support in the Sui CLI. These features are not available unless you enable tracing. Replace the `testnet` branch in the previous command if necessary. Available options are: * `main`: Latest updates. Least stable. * `devnet`: Includes experimental features. * `testnet`: Includes beta features. * `mainnet`: Stable release. You can build and install additional packages as needed. Replace `sui` in the previous command with the package name in the following table. | Name | Description | | --- | --- | | `move-analyzer` | Language Server Protocol implementation. | | `sui` | Main Sui binary. | | `sui-bridge` | Sui native bridge. | | `sui-data-ingestion` | Capture full node data for indexer to store in a database. | | `sui-faucet` | Local faucet to mint coins on local network. | | `sui-node` | Run a local node. | | `sui-test-validator` | Run test validators on a local network for development. | | `sui-tool` | Provides utilities for Sui. | You can clone the public Sui repo and install from source on your local machine. 1. Fork the [Sui repo](https://github.com/MystenLabs/sui) . 2. Use a console to clone the fork to the desired directory. $ git clone https://github.com/YourOrg/sui.git 3. Navigate to the repo directory and switch to the branch you want to build against. * `main`: Latest updates. Least stable. * `devnet`: Includes experimental features. * `testnet`: Includes beta features. * `mainnet`: Stable release. $ git switch testnet 4. Run the `cargo install` command from the repo root. $ cargo install --locked --path crates/sui --features tracing info The tracing feature enables Move test coverage and debugger support in the Sui CLI. These features are not available unless you enable tracing. Related links[​](https://docs.sui.io/guides/developer/getting-started/install-source#related-links "Direct link to Related links") ----------------------------------------------------------------------------------------------------------------------------------- • [Install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) Install the Sui framework and its required prerequisites on your system. • [Install from Binaries](https://docs.sui.io/guides/developer/getting-started/install-binaries) Each Sui release provides a set of binaries for several operating systems. You can download these binaries from GitHub and use them to install Sui. --- # Next Steps | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/next-steps#__docusaurus_skipToContent_fallback) On this page If you have followed the Getting Started path, you should be ready to continue your journey on Sui. This page details how to continue learning, additional resources, and ways to join the developer community. Click to openVerify "Getting Started" essentials To make sure you have everything you need, paste the following commands into a console in your local environment: $ sui --version$ sui client active-address$ sui client active-env$ sui client gas If all commands are successful, your console displays output similar to the following: sui [version_number]-[commit_hash]0x6543...7241testnet╭───────────────┬────────────────────┬──────────────────╮│ gasCoinId │ mistBalance (MIST) │ suiBalance (SUI) │├───────────────┼────────────────────┼──────────────────┤│ 0x1e86...63b2 │ 5041161576 │ 5.04 │╰───────────────┴────────────────────┴──────────────────╯ If you receive an error, revisit the content relevant to the command that caused the error or lacked output. | Command | Successful if | | --- | --- | | `sui --version` | You [installed Sui](https://docs.sui.io/guides/developer/getting-started/sui-install)
correctly. | | `sui client active-address` | You have a [Sui address](https://docs.sui.io/guides/developer/getting-started/get-address)
that is currently active. | | `sui client active-env` | You have set up a [connection to Testnet](https://docs.sui.io/guides/developer/getting-started/configure-sui-client)
that is currently active. | | `sui client objects` | You address owns [SUI for testing](https://docs.sui.io/guides/developer/getting-started/get-coins)
. | Continue learning[​](https://docs.sui.io/guides/developer/getting-started/next-steps#continue-learning "Direct link to Continue learning") ------------------------------------------------------------------------------------------------------------------------------------------- Check out the [Counter example app](https://docs.sui.io/guides/developer/app-examples/e2e-counter) to continue your learning and build a full-stack Sui app. Additional documentation[​](https://docs.sui.io/guides/developer/getting-started/next-steps#additional-documentation "Direct link to Additional documentation") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- The rest of the documentation on this site contains important concepts, guides, and examples for you to continue your Sui journey. There are also resources beyond this documentation that you can reference, as well as a large and growing community whose experience and knowledge you can leverage to get the most out of Sui. ### SDK documentation[​](https://docs.sui.io/guides/developer/getting-started/next-steps#sdk-documentation "Direct link to SDK documentation") Mysten Labs, the company that initiated the creation of Sui, provides SDKs to interact with the network and associated assets. Visit the [SDK docs](https://sdk.mystenlabs.com/typescript) to learn more. ### The Move Book[​](https://docs.sui.io/guides/developer/getting-started/next-steps#the-move-book "Direct link to the-move-book") Move is the language of smart contracts on Sui. [The Move Book](https://move-book.com/) details the language. Connect with the Sui community[​](https://docs.sui.io/guides/developer/getting-started/next-steps#connect-with-the-sui-community "Direct link to Connect with the Sui community") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Join the [Sui Discord](https://discord.gg/sui) * Join **Suinami Riders** on [Telegram](https://web.telegram.org/z/?ref=blog.sui.io#-1742460518) * Checkout the [Sui Developer Forum](https://forums.sui.io/) * Follow [@SuiFoundation](https://twitter.com/@SuiFoundation) on X ### Schedule office hours[​](https://docs.sui.io/guides/developer/getting-started/next-steps#schedule-office-hours "Direct link to Schedule office hours") [Sign up](https://cal.com/forms/08983b87-8001-4df6-896a-0d7b60acfd79) for 1:1 sessions to get developer support or advice from the Sui team. ### Awesome Sui[​](https://docs.sui.io/guides/developer/getting-started/next-steps#awesome-sui "Direct link to Awesome Sui") The [Awesome Sui](https://docs.sui.io/references/awesome-sui) repo is a curated list of developer tools and infrastructure projects within the Sui ecosystem. ### Upcoming hackathons[​](https://docs.sui.io/guides/developer/getting-started/next-steps#upcoming-hackathons "Direct link to Upcoming hackathons") Check out [upcoming hackathon events](https://sui.io/ecosystem-hub) to build applications alongside other developers. ### Developer newsletter[​](https://docs.sui.io/guides/developer/getting-started/next-steps#developer-newsletter "Direct link to Developer newsletter") Sign up for the [Sui Developer Newsletter](https://developers.sui.io/) to receive hyperfocused content to help you build on Sui. ### Developer portal[​](https://docs.sui.io/guides/developer/getting-started/next-steps#developer-portal "Direct link to Developer portal") Visit the [Sui Developer Portal](https://sui.io/developers) to find links to courses, videos, and other learning resources. * [Continue learning](https://docs.sui.io/guides/developer/getting-started/next-steps#continue-learning) * [Additional documentation](https://docs.sui.io/guides/developer/getting-started/next-steps#additional-documentation) * [SDK documentation](https://docs.sui.io/guides/developer/getting-started/next-steps#sdk-documentation) * [The Move Book](https://docs.sui.io/guides/developer/getting-started/next-steps#the-move-book) * [Connect with the Sui community](https://docs.sui.io/guides/developer/getting-started/next-steps#connect-with-the-sui-community) * [Schedule office hours](https://docs.sui.io/guides/developer/getting-started/next-steps#schedule-office-hours) * [Awesome Sui](https://docs.sui.io/guides/developer/getting-started/next-steps#awesome-sui) * [Upcoming hackathons](https://docs.sui.io/guides/developer/getting-started/next-steps#upcoming-hackathons) * [Developer newsletter](https://docs.sui.io/guides/developer/getting-started/next-steps#developer-newsletter) * [Developer portal](https://docs.sui.io/guides/developer/getting-started/next-steps#developer-portal) --- # Create a Sui Address | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/getting-started/get-address#__docusaurus_skipToContent_fallback) On this page An _address_ is a unique, anonymous identity on a blockchain network. On Sui, an address specifically represents a location on-chain that can: * Hold and send tokens * Own objects like NFTs and Move packages * Submit transactions and interact with smart contracts You do not need to provide any personally identifying information to create an address. A single individual can create and own multiple addresses. Every Sui address is a unique 32-byte identifier and appears in hexadecimal encoding with a `0x` prefix, unless referred to by an [alias](https://docs.sui.io/guides/developer/getting-started/get-address#address-aliases) . For example: 0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331 A cryptographic hash function generates a public key from which every address derives. Each public key has a corresponding private key that accesses the address and the objects that it owns. An address and its associated key pair together is an _account_. [Learn more](https://docs.sui.io/concepts/transactions/transaction-auth) about how a Sui address is derived and other cryptography related topics. Obtain a Sui address[​](https://docs.sui.io/guides/developer/getting-started/get-address#obtain-a-sui-address "Direct link to obtain-a-sui-address") ----------------------------------------------------------------------------------------------------------------------------------------------------- caution If you already have an address or created a new address in [Configure a Sui Client](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) , you can skip to [Get SUI from Faucet](https://docs.sui.io/guides/developer/getting-started/get-coins) to continue the onboarding steps. * Prerequisites * [Download and install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) . * [Configure your Sui client](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) . By default, when the Sui client runs for the first time, it prompts you to [configure the client](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) . This initial configuration generates a new Sui address, its key pair, and its associated secret recovery phrase. To create a new Sui address outside of the initial client configuration, run: $ sui client new-address ed25519 This command specifies the key pair scheme to be of type `ed25519`. The options are: * `ed25519`: Small key size and compact signatures. * `secp256k1`: Provides security through generating and verifying keys using ECDSA. * `secp256r1`: Uses randomly generated curves to generate keys. The client will return your new address and 12-word recovery phrase: Generated new key pair for address with scheme "ed25519" [0xb9c83a8b40d3263c9ba40d551514fbac1f8c12e98a4005a0dac072d3549c2442]Secret Recovery Phrase : [cap wheat many line human lazy few solid bored proud speed grocery] ### Recovery phrases[​](https://docs.sui.io/guides/developer/getting-started/get-address#recovery-phrases "Direct link to Recovery phrases") Every Sui address has a _recovery phrase_. Recovery phrases are a series of 12 randomly generated words that you use to recover the address if you lose access to the address's key pair. danger Recovery phrases are only shown once. They are not stored anywhere automatically and cannot be retrieved if you do not save them yourself. Store recovery phrases securely and do not share them with anyone, as they provide access to any objects and tokens that an address owns. To recover an address using the recovery phrase, use the command: $ sui keytool import '' Replace '``' with your 12-word recovery phrase. The entire recovery phrase must be enclosed in single quotation marks `'`. You must enter the words in the correct order. Replace `` with the type of encryption used to originally create the address, such as `ed25519`. If successful, the CLI restores your address and prints it in the CLI output. `sui.keystore`[​](https://docs.sui.io/guides/developer/getting-started/get-address#suikeystore "Direct link to suikeystore") ----------------------------------------------------------------------------------------------------------------------------- Sui stores a private key for every address in either the `~/.sui/sui_config/sui.keystore` or `%USERPROFILE/.sui/sui_config/sui.keystore` file on macOS/Linux or Windows systems, respectively. This file contains content similar to the following: [ "AK6q1/Yzz5qmTfHGLot4wkbRP5lP5NUQVDlf3FggLrKZ", "ADAWAFS+J9KcDjFmAiVI/e9ZluG0id9AnI6a7Bk5tH+G", "AJ42rQfCrPIfrQvzCgeHVDCcQZ4R1qAzKtob61VTw5k5", "AHoKrY7DDnUOq2RgP7gXLPa86bFfzqEMvmOs7TmHtST+"] When you create a new address on your system, a new line is added to this file that consists of the address's private key. Make sure you do not expose this to anyone, as they can use it to get access to your account. danger The `sui.keystore` file is **not** the same as your machine's local keystore that contains passwords for websites, biometric data like fingerprints, or other authentication credentials. Your machine's local keystore cannot sign and submit transactions on Sui. Only addresses with their associated keys included in the `sui.keystore` file can sign and submit transactions. Address aliases[​](https://docs.sui.io/guides/developer/getting-started/get-address#address-aliases "Direct link to address-aliases") -------------------------------------------------------------------------------------------------------------------------------------- An _alias_ is a human-readable name that can be used in place of a Sui address's full 32-byte hexadecimal string. They can be used anywhere an address would be used to make referencing the address easier in scripts and CLI commands. When an address is created, it is given a random alias by default. You can view an address's current alias with the command: $ sui client addresses The output will include the address, its alias, and an indication of which address is active if there are multiple local addresses available: ╭───────────────────────┬────────────────────────────────────────────────────────────────────┬────────────────╮│ alias │ address │ active address │├───────────────────────┼────────────────────────────────────────────────────────────────────┼────────────────┤│ vigorous-spinel │ 0x6ebb36a3c1ab2124c082d93f60f518f70494b82d8d13c5aabb3abad6ec8cd82d │ * │╰───────────────────────┴────────────────────────────────────────────────────────────────────┴────────────────╯ Then, to update the alias to something else, use the command: $ sui keytool update-alias You can now use the alias in place of the address in commands, such as: $ sui client objects View all local Sui addresses[​](https://docs.sui.io/guides/developer/getting-started/get-address#view-all-local-sui-addresses "Direct link to view-all-local-sui-addresses") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The _active address_ is the address that the Sui client is currently using. This address owns any objects you create and transactions you submit, unless you specify otherwise with the `--address` flag in a command. To view the current active address, use the command: $ sui client active-address To view all addresses on your local machine, run: $ sui keytool list This returns all addresses, along with their alias, public key, key scheme, and peer ID. ╭────────────────────────────────────────────────────────────────────────────────────────────╮│ ╭─────────────────┬──────────────────────────────────────────────────────────────────────╮ ││ │ alias │ vigorous-spinel │ ││ │ suiAddress │ 0x6ebb36a3c1ab2124c082d93f60f518f70494b82d8d13c5aabb3abad6ec8cd82d │ ││ │ publicBase64Key │ AKDCajKN877Uc7o8NP2cQVJkSewhq1ZbWgw5LgpWVqbj │ ││ │ keyScheme │ ed25519 │ ││ │ flag │ 0 │ ││ │ peerId │ a0c26a328df3bed473ba3c34fd9c41526449ec21ab565b5a0c392e0a5656a6e3 │ ││ ╰─────────────────┴──────────────────────────────────────────────────────────────────────╯ │╰────────────────────────────────────────────────────────────────────────────────────────────╯ For more information about the `keytool` command, see the [Sui Keytool CLI](https://docs.sui.io/references/cli/keytool) documentation. ### Change the active address[​](https://docs.sui.io/guides/developer/getting-started/get-address#change-the-active-address "Direct link to change-the-active-address") If you want to switch to another address, first confirm which address is the active address and which addresses are available for you to switch to: $ sui client addresses Then, to switch to another address, use the command: $ sui client switch --address
Query information about an address[​](https://docs.sui.io/guides/developer/getting-started/get-address#query-information-about-an-address "Direct link to query-information-about-an-address") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- You can use a Sui network explorer to find more information about an address, its token balances, and the objects it owns. Popular Sui explorers include: * [SuiVision](https://suivision.xyz/) * [SuiScan](https://suiscan.xyz/mainnet/accounts) danger Data displayed on an explorer differs depending on which network you created your address on. If you've followed the [Configure a Sui Client](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) page previously, you are most likely using Testnet. Be sure to select Testnet on the Sui explorer or use the dedicated URL, such as https://**testnet**.suivision.xyz/. From the CLI, you can view all objects an address owns with the command: $ sui client objects
If an address is not provided, this command returns all objects owned by the active address. ### Next steps Get SUI from Faucet ------------------- Obtain SUI from a faucet to deploy packages on Testnet. Hello, World! ------------- Clone and build the "Hello, World!" project. * [Obtain a Sui address](https://docs.sui.io/guides/developer/getting-started/get-address#obtain-a-sui-address) * [Recovery phrases](https://docs.sui.io/guides/developer/getting-started/get-address#recovery-phrases) * [`sui.keystore`](https://docs.sui.io/guides/developer/getting-started/get-address#suikeystore) * [Address aliases](https://docs.sui.io/guides/developer/getting-started/get-address#address-aliases) * [View all local Sui addresses](https://docs.sui.io/guides/developer/getting-started/get-address#view-all-local-sui-addresses) * [Change the active address](https://docs.sui.io/guides/developer/getting-started/get-address#change-the-active-address) * [Query information about an address](https://docs.sui.io/guides/developer/getting-started/get-address#query-information-about-an-address) --- # Operator Guides | Sui Documentation [Skip to main content](https://docs.sui.io/guides/operator#__docusaurus_skipToContent_fallback) On this page Operator guides demonstrate how to run Full nodes on Sui, whether as a validator or operator of a full node to support your app, as well as how to integrate SUI into an exchange. Sui Full Node Operators[​](https://docs.sui.io/guides/operator#sui-full-node-operators "Direct link to sui-full-node-operators") --------------------------------------------------------------------------------------------------------------------------------- Sui Full Node Configuration --------------------------- Operate a Sui full node to validate blockchain activities, like transactions, checkpoints, and epoch changes. Sui Validators[​](https://docs.sui.io/guides/operator#sui-validators "Direct link to Sui Validators") ------------------------------------------------------------------------------------------------------ Validator Configuration & Deployment ------------------------------------ Learn how to set up, configure, and manage a Sui validator node. Validator Rewards ----------------- Learn how validator user and staker rewards are calculated and distributed. Validator Management -------------------- As a validator on Sui, there are some processes you need to perform to ensure your nodes are always optimized. Validator Tools --------------- Learn how to set up, configure, and manage a Sui validator node. Sui Full Node Operators and Validators[​](https://docs.sui.io/guides/operator#sui-full-node-operators-and-validators "Direct link to sui-full-node-operators-and-validators") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Data Management --------------- A high-level description of data management on the Sui network that you can use to optimize your Sui full node configuration. Genesis ------- Genesis refers to the state of the Sui blockchain when it was initially launched. Monitoring ---------- Monitor Sui node metrics to ensure the health and performance of your node. Snapshots --------- Database snapshots of the Sui network enable full node operators a way to bootstrap a full node without having to execute all the transactions that occurred after genesis. Archives -------- The archive is a historical record of all transactions on Sui. Enable archiving on your Full nodes as a best practice. Exchange Integration Guide[​](https://docs.sui.io/guides/operator#exchange-integration-guide "Direct link to Exchange Integration Guide") ------------------------------------------------------------------------------------------------------------------------------------------ Exchange Integration Guide -------------------------- Learn the primary tasks necessary to integrate SUI, the token native to the Sui network, into a cryptocurrency exchange. Sui Bridge Node Validators[​](https://docs.sui.io/guides/operator#sui-bridge-node-validators "Direct link to Sui Bridge Node Validators") ------------------------------------------------------------------------------------------------------------------------------------------ Sui Bridge Validator Node Configuration --------------------------------------- Correct configuration of your node ensures optimal performance and valid metrics data. * [Sui Full Node Operators](https://docs.sui.io/guides/operator#sui-full-node-operators) * [Sui Validators](https://docs.sui.io/guides/operator#sui-validators) * [Sui Full Node Operators and Validators](https://docs.sui.io/guides/operator#sui-full-node-operators-and-validators) * [Exchange Integration Guide](https://docs.sui.io/guides/operator#exchange-integration-guide) * [Sui Bridge Node Validators](https://docs.sui.io/guides/operator#sui-bridge-node-validators) --- # Troubleshooting Common Errors | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/common-errors#__docusaurus_skipToContent_fallback) On this page This page provides troubleshooting solutions to common errors. Address errors[​](https://docs.sui.io/guides/developer/common-errors#address-errors "Direct link to address-errors") --------------------------------------------------------------------------------------------------------------------- Errors in this section relate to Sui addresses. #### `Failed to build Move modules: Unresolved addresses found.`[​](https://docs.sui.io/guides/developer/common-errors#failed-to-build-move-modules-unresolved-addresses-found "Direct link to failed-to-build-move-modules-unresolved-addresses-found") Indicates that you are trying to use a named address, such as `std` or similar, within your code or a dependency, but you have not assigned that address a value in the `Move.toml` file. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution "Direct link to Solution") Add an entry for each unresolved address to the `[addresses]` section of your `Move.toml` file. [addresses]std = "0x1" **Resources** * [The Move Book: Manifests](https://move-book.com/concepts/manifest) * * * #### `Invalid Sui Address`[​](https://docs.sui.io/guides/developer/common-errors#invalid-sui-address "Direct link to invalid-sui-address") Indicates that the address you provided does not conform to a valid Sui address format. Sui addresses must: * Be a 32-byte hex-encoded string. * Start with `0x` and only contain hexadecimal characters (0-9, a-f, A-F). ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-1 "Direct link to Solution") Verify the address you provide starts with `0x`, is 64 hex digits long, and does not contain invalid characters. **Resources** * [Create a Sui Address](https://docs.sui.io/guides/developer/getting-started/get-address) * * * Move package errors[​](https://docs.sui.io/guides/developer/common-errors#move-package-errors "Direct link to move-package-errors") ------------------------------------------------------------------------------------------------------------------------------------ Errors in this section relate to Move packages. #### `Invalid URL: Invalid URL: relative URL without a base`[​](https://docs.sui.io/guides/developer/common-errors#invalid-url-invalid-url-relative-url-without-a-base "Direct link to invalid-url-invalid-url-relative-url-without-a-base") This error occurs when the system interprets a URL string as a relative URL (`/path/to/file`), but your code expects an absolute URL (`https://example.com/path/to/file`). This error originates from the `sui::url` module that provides a `Url` struct and functions to interact with URLs. Move does not validate the format of a URL itself. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-2 "Direct link to Solution") Specify the full URL path, including `http://` or `https://`. **Resources** * [`sui::url`](https://docs.sui.io/references/framework/sui_sui/url) * [`sui::url` source code](https://github.com/MystenLabs/sui/blob/c5f8b33b8090d75b1922f1497916b4010d9140d7/crates/sui-framework/sources/url.move) . * * * #### `Failed to build Move modules: Failed to resolve dependencies for package`[​](https://docs.sui.io/guides/developer/common-errors#failed-to-build-move-modules-failed-to-resolve-dependencies-for-package "Direct link to failed-to-build-move-modules-failed-to-resolve-dependencies-for-package") Indicates that the system cannot find one or more of the dependencies you list in your Move package's `Move.toml` file. The system cannot find a dependency if: * Your path is incorrect, contains a typo, or does not exist. * Your manifest file does not exist. * You have not initialized it properly. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-3 "Direct link to Solution") Check your `Move.toml` and verify each dependency you list has the correct path, and each path contains a valid `Move.toml` file. Ensure there are no typos and that you have initialized all dependencies. **Resources** * [The Move Book: Manifests](https://move-book.com/concepts/manifest) * * * #### `Duplicate module found: 0x0000000000000000000000000000000000000000000000000000000000000002::groth16`[​](https://docs.sui.io/guides/developer/common-errors#duplicate-module-found-0x0000000000000000000000000000000000000000000000000000000000000002groth16 "Direct link to duplicate-module-found-0x0000000000000000000000000000000000000000000000000000000000000002groth16") Indicates that you have defined two or more modules with the same name or address in your project or its dependencies. You must give each module a unique name and address combination. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-4 "Direct link to Solution") Verify that your source files do not use the same module name or address twice. Check your package's dependencies to see if there is a duplicate name defined. Check if you have a conflicting address assignment in the `Move.toml` file. **Resources** * [The Move Book: Modules](https://move-book.com/move-basics/module) * * * #### `Internal error occurred while processing request: Error resolving Move location: Linkage not found for package`[​](https://docs.sui.io/guides/developer/common-errors#internal-error-occurred-while-processing-request-error-resolving-move-location-linkage-not-found-for-package "Direct link to internal-error-occurred-while-processing-request-error-resolving-move-location-linkage-not-found-for-package") Indicates that your environment or tooling cannot find a Move package at the specified address. Possible causes include: * You have not published the package to the network. * Your address is incorrect. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-5 "Direct link to Solution") Verify the package exists on the network at the specified address. * * * #### `Failed to build Move modules: Compilation error.`[​](https://docs.sui.io/guides/developer/common-errors#failed-to-build-move-modules-compilation-error "Direct link to failed-to-build-move-modules-compilation-error") This is a generic error that indicates that something in your Move code violates the compiler's rules and therefore the compiler cannot compile your package into bytecode. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-6 "Direct link to Solution") Some common reasons for this error include: * Unbound variable or module: Make sure you declare all modules and variables you reference in your package and they are in scope. * Duplicate declaration, item, or annotation: Ensure all functions, structs, and module names are unique within the namespace. * Invalid declaration: Always specify an address for a module to properly declare it. * Unbound type or member: You must define and import all types and members correctly. * Edition not specified: You must define an edition field in all `Move.toml` files: `edition = "2024"`. **Resources** * [Move Concepts](https://docs.sui.io/concepts/sui-move-concepts) * [The Move Book](https://move-book.com/) * * * #### `Failed to publish the Move module(s), reason: Modules must all have 0x0 as their addresses.`[​](https://docs.sui.io/guides/developer/common-errors#failed-to-publish-the-move-modules-reason-modules-must-all-have-0x0-as-their-addresses "Direct link to failed-to-publish-the-move-modules-reason-modules-must-all-have-0x0-as-their-addresses") Indicates that a module in your package does not have the address `0x0`. In Move, you must set all modules to have their self\-address as `0x0` in the source code. When you publish the package, Sui automatically assigns it the correct address. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-7 "Direct link to Solution") Remove any explicit address blocks from your Move source files. Do not wrap your modules in `address ... { ... }` blocks. **Resources** * [Error definition](https://github.com/MystenLabs/sui/blob/63cbf0dc26d0f2329d3e0a03639e31ded9f93561/crates/sui-adapter-transactional-tests/tests/sui/publish_module_non_zero_address.snap) * * * #### `The signer only expects one signature, not two`[​](https://docs.sui.io/guides/developer/common-errors#the-signer-only-expects-one-signature-not-two "Direct link to the-signer-only-expects-one-signature-not-two") Indicates that a function you are calling in your Move module expects 1 signer argument, yet you provided 2. On Sui, the number of signer arguments in your function's signature must match the number of signers you provide. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-8 "Direct link to Solution") Verify if you define your function as `fun main(s: signer)`, then you must provide only 1 signer. If you want to use 2 signers, define your function as `fun main(s1: signer, s2: signer) { ... }`. **Resources** * [Error definition](https://github.com/MystenLabs/sui/blob/63cbf0dc26d0f2329d3e0a03639e31ded9f93561/external-crates/move/crates/bytecode-verifier-transactional-tests/tests/script_signature/signer_double_signer.snap) * * * #### `destroy_zero`[​](https://docs.sui.io/guides/developer/common-errors#destroy_zero "Direct link to destroy_zero") Indicates that you are trying to destroy a resource that has a non-zero value. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-9 "Direct link to Solution") Ensure the resource's value is zero. For coins or tokens, split or burn the value until it is zero. **Resources** * Learn more about [resource safety](https://docs.sui.io/guides/developer/getting-started/hello-world#resource-safety) . * * * System errors[​](https://docs.sui.io/guides/developer/common-errors#system-errors "Direct link to System errors") ------------------------------------------------------------------------------------------------------------------ Errors in this section relate to the system. ##### `"Segmentation fault (core dumped)"`[​](https://docs.sui.io/guides/developer/common-errors#segmentation-fault-core-dumped "Direct link to segmentation-fault-core-dumped") Indicates a low-level memory crash. This is not a Move error, but rather an error with a portion of the toolchain such as the Move compiler or a dependency. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-10 "Direct link to Solution") In some situations, old or corrupted build files can cause this crash. Clean your build: $ sui move clean In other scenarios, outdated or mismatched tooling versions might cause this error. Upgrade your tooling and verify that versions match. **Resources** * [Install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) * * * #### `Failed to build Move modules: Permission denied (os error 13).`[​](https://docs.sui.io/guides/developer/common-errors#failed-to-build-move-modules-permission-denied-os-error-13 "Direct link to failed-to-build-move-modules-permission-denied-os-error-13") This error means that Move cannot access the file or directory due to insufficient permissions. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-11 "Direct link to Solution") Ensure your user account has the necessary read, write, or execute permissions for the target file or directory. On Unix and macOS systems, you can edit permissions with the `chmod` command: $ chmod -R u+rw /path/to/project/files This gives you read and write permissions to all files and subdirectories at the specified file path. **Resources** * [chmod](https://linux.die.net/man/1/chmod) * * * #### `sui move build` command hangs[​](https://docs.sui.io/guides/developer/common-errors#sui-move-build-command-hangs "Direct link to sui-move-build-command-hangs") This behavior often occurs when you run commands on Windows 11 machines. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-12 "Direct link to Solution") Try using [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/install) on your Windows machine instead of running commands in a Windows-native terminal. **Resources** * [Install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) * [Install Linux on Windows](https://learn.microsoft.com/en-us/windows/wsl/install) * * * #### `Fetch failed error (cause: Header Timeout)`[​](https://docs.sui.io/guides/developer/common-errors#fetch-failed-error-cause-header-timeout "Direct link to fetch-failed-error-cause-header-timeout") Indicates the network does not receive a response within a certain time period. This error is not specific to Sui. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-13 "Direct link to Solution") Retry the request or increase the timeout duration if you control the client. * * * Transaction errors[​](https://docs.sui.io/guides/developer/common-errors#transaction-errors "Direct link to transaction-errors") --------------------------------------------------------------------------------------------------------------------------------- Errors in this section relate to transactions. #### `Requires a connection to the network. Current active network is [testnet/mainnet/devnet] but failed to connect to it.`[​](https://docs.sui.io/guides/developer/common-errors#requires-a-connection-to-the-network-current-active-network-is-testnetmainnetdevnet-but-failed-to-connect-to-it "Direct link to requires-a-connection-to-the-network-current-active-network-is-testnetmainnetdevnet-but-failed-to-connect-to-it") This error occurs when the network is down, unreachable due to an unstable internet connection, or there is a misconfiguration in your Sui client configuration. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-14 "Direct link to Solution") First determine your client's configured environments: $ sui client envs You see something similar to: localnet => http://0.0.0.0:9000testnet => https://fullnode.testnet.sui.io:443 devnet => https://fullnode.devnet.sui.io:443 (active) Then, try switching to another network: $ sui client switch --env testnet If this does not resolve the error, check your internet connection or restart your CLI client. **Resources** * [Configure a Sui Client](https://docs.sui.io/guides/developer/getting-started/configure-sui-client) * * * #### `Unable to process transaction. Dry run failed, could not automatically determine a budget: UnusedValueWithoutDrop { result_idx: 0, secondary_idx: 0 }`[​](https://docs.sui.io/guides/developer/common-errors#unable-to-process-transaction-dry-run-failed-could-not-automatically-determine-a-budget-unusedvaluewithoutdrop--result_idx-0-secondary_idx-0- "Direct link to unable-to-process-transaction-dry-run-failed-could-not-automatically-determine-a-budget-unusedvaluewithoutdrop--result_idx-0-secondary_idx-0-") This error occurs when a Move transaction does not have a `drop` ability, or you do not explicitly drop it. The Sui runtime system enforces resource safety that throws this error when you leave values unused at the end of a transaction. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-15 "Direct link to Solution") In Sui Move packages, you must either transfer every value that does not have the `drop` ability to another address, explicitly destroy it, or use it as input for another function to consume. **Resources** * Learn more about [resource safety](https://docs.sui.io/guides/developer/getting-started/hello-world#resource-safety) . * * * #### `Error executing transaction: VMVerificationOrDeserializationError in command 0`[​](https://docs.sui.io/guides/developer/common-errors#error-executing-transaction-vmverificationordeserializationerror-in-command-0 "Direct link to error-executing-transaction-vmverificationordeserializationerror-in-command-0") This is a generic error that indicates that your Move code fails either during bytecode verification or during deserialization. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-16 "Direct link to Solution") Some common reasons for this error include: * `ZERO_SIZED_STRUCT`: You define a struct that has no fields. Add at least one field to the struct. * `FIELD_MISSING_TYPE_ABILITY`: Your struct is missing a required ability such as `key` or `store`. Ensure all fields have the necessary abilities. * `UNKNOWN_VERSION`: Your module or enum uses a version or feature the system does not recognize. Ensure you are using supported features and the correct Sui toolchain version. * `CONSTRAINT_NOT_SATISFIED`: Your struct or type parameter does not satisfy the required abilities. Add the required abilities to the struct or type. * `WRITEREF_WITHOUT_DROP_ABILITY`: Your code tries to write a reference to a type that does not have a drop ability. Add the drop ability to the type. **Resources** * [Error: `ZERO_SIZED_STRUCT`](https://github.com/MystenLabs/sui/blob/63cbf0dc26d0f2329d3e0a03639e31ded9f93561/crates/sui-verifier-transactional-tests/tests/one_time_witness/no_field.snap) * [Error: `FIELD_MISSING_TYPE_ABILITY`](https://github.com/MystenLabs/sui/blob/63cbf0dc26d0f2329d3e0a03639e31ded9f93561/crates/sui-verifier-transactional-tests/tests/struct_with_key/key_struct_with_drop.snap) * [Error: `CONSTRAINT_NOT_SATISFIED`](https://github.com/MystenLabs/sui/blob/63cbf0dc26d0f2329d3e0a03639e31ded9f93561/crates/sui-verifier-transactional-tests/tests/private_generics/receive_without_key.snap) * * * #### `Failed to sign transaction by a quorum of validators because one or more of its objects is reserved for another transaction. Other transactions locking these objects`[​](https://docs.sui.io/guides/developer/common-errors#failed-to-sign-transaction-by-a-quorum-of-validators-because-one-or-more-of-its-objects-is-reserved-for-another-transaction-other-transactions-locking-these-objects "Direct link to failed-to-sign-transaction-by-a-quorum-of-validators-because-one-or-more-of-its-objects-is-reserved-for-another-transaction-other-transactions-locking-these-objects") Indicates that your transaction is trying to use one or more Sui objects that another transaction already uses. When you use an object in a transaction, the system locks that object to prevent multiple, possibly conflicting modifications to an object. For DeFi objects, this prevents double-spending. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-17 "Direct link to Solution") Wait for other transactions to complete, then retry your transaction. If transactions are stuck or fail, you might need to wait for the next epoch before you can retry the transaction. Make sure your code does not use multiple objects simultaneously. **Resources** * [Signing and Sending Transactions](https://docs.sui.io/guides/developer/transactions/sign-and-send-txn) * * * #### `Failed to sign transaction by a quorum of validators because one or more of its objects is equivocated until the next epoch.`[​](https://docs.sui.io/guides/developer/common-errors#failed-to-sign-transaction-by-a-quorum-of-validators-because-one-or-more-of-its-objects-is-equivocated-until-the-next-epoch "Direct link to failed-to-sign-transaction-by-a-quorum-of-validators-because-one-or-more-of-its-objects-is-equivocated-until-the-next-epoch") Indicates that an object you are trying to use is in an equivocated state, meaning the network cannot reach consensus about its state due to conflicting transactions. The system subsequently freezes the object and you cannot use it until the next epoch. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-18 "Direct link to Solution") Wait for the next epoch. **Resources** * [Avoiding Equivocation](https://docs.sui.io/concepts/sui-architecture/epochs) * * * #### `Unable to process transaction. Unexpected status code: 403`[​](https://docs.sui.io/guides/developer/common-errors#unable-to-process-transaction-unexpected-status-code-403 "Direct link to unable-to-process-transaction-unexpected-status-code-403") Indicates the Sui network responds to an RPC or API request with `HTTP 403: Forbidden` status. This might happen if an RPC provider: * Requires authentication and you do not provide any. * Has restricted your region or IP address. * Has rate limited you by sending too many requests in a given time period. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-19 "Direct link to Solution") Check for required API authentication and verify you are using a valid authentication method. Review the documentation to ensure you are following all requirements. Check for rate limiting and try sending requests over a long period of time. * * * #### `Failed to submit transaction: ErrorObject { code: ServerError(-32002), message: "Transaction validator signing failed due to issues with transaction inputs, please review the errors and try again`[​](https://docs.sui.io/guides/developer/common-errors#failed-to-submit-transaction-errorobject--code-servererror-32002-message-transaction-validator-signing-failed-due-to-issues-with-transaction-inputs-please-review-the-errors-and-try-again "Direct link to failed-to-submit-transaction-errorobject--code-servererror-32002-message-transaction-validator-signing-failed-due-to-issues-with-transaction-inputs-please-review-the-errors-and-try-again") Indicates the Sui network rejects a transaction due to invalid transaction inputs. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-20 "Direct link to Solution") Ensure all objects you reference in your transaction: * Exist * Use the current version * Are not referenced twice * Do not exceed a protocol limit of maximum objects. Verify you have a sufficient gas balance and that your transaction signature is valid. * * * #### `Unable to process transaction. No valid gas coins found for the transaction.`[​](https://docs.sui.io/guides/developer/common-errors#unable-to-process-transaction-no-valid-gas-coins-found-for-the-transaction "Direct link to unable-to-process-transaction-no-valid-gas-coins-found-for-the-transaction") Indicates you do not have enough tokens to pay the transaction gas fee. ##### Solution[​](https://docs.sui.io/guides/developer/common-errors#solution-21 "Direct link to Solution") Obtain tokens. **Resources** * [Get SUI from Faucet](https://docs.sui.io/guides/developer/getting-started/get-coins) * [Address errors](https://docs.sui.io/guides/developer/common-errors#address-errors) * [Move package errors](https://docs.sui.io/guides/developer/common-errors#move-package-errors) * [System errors](https://docs.sui.io/guides/developer/common-errors#system-errors) * [Transaction errors](https://docs.sui.io/guides/developer/common-errors#transaction-errors) --- # Nautilus | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/nautilus/#__docusaurus_skipToContent_fallback) On this page Nautilus is a verifiable off-chain compute layer on Sui. It enables builders to delegate sensitive or resource-intensive tasks to a self-managed [trusted execution environment (TEE)](https://en.wikipedia.org/wiki/Trusted_execution_environment) while preserving trust on-chain through smart contract-based verification. Nautilus supports hybrid decentralized applications that require private data handling, complex computations, or integration with external (Web2) systems. The framework ensures computations are tamper-resistant, isolated, and cryptographically verifiable. It currently supports self-managed [AWS Nitro Enclave TEEs](https://aws.amazon.com/ec2/nitro/nitro-enclaves/) . You can verify AWS-signed enclave attestations on-chain using Sui smart contracts written in Move. Refer to the [Github repo](https://github.com/MystenLabs/nautilus) for the reproducible build template. Features[​](https://docs.sui.io/guides/developer/nautilus/#features "Direct link to Features") ----------------------------------------------------------------------------------------------- important Nautilus is NOT just about running code in privacy-preserving manner in a TEE. Part of the overall value proposition is **on-chain verification** of computation integrity: 1. PCRs (enclave measurements) must be registered and verified on-chain 2. Every computation result could optionally be verified on-chain A Nautilus application consists of 2 components: * **Off-chain server:** Runs inside a TEE and handles computations like user input processing or scheduled tasks. * **On-chain smart contract**: Written in Move, verifies TEE attestations before executing transactions. How it works[​](https://docs.sui.io/guides/developer/nautilus/#how-it-works "Direct link to How it works") ----------------------------------------------------------------------------------------------------------- * Deploy the off-chain server to a self-managed TEE, such as AWS Nitro Enclaves. You can use the [available reproducible build template](https://github.com/MystenLabs/nautilus) . danger The [provided reproducible build template](https://github.com/MystenLabs/nautilus) is intended as a starting point for building your own enclave. It is not feature complete, has not undergone a security audit, and is offered as a modification-friendly reference licensed under the Apache 2.0 license. **The template and its related documentation are provided as is without warranty of any kind for evaluation purposes only.**\* You can adapt and extend it to fit your specific use case. * The TEE generates a cryptographic attestation that proves the integrity of the execution environment. * Sui smart contracts verify the attestation on-chain before accepting the TEE output. * The integrity of the TEE is auditable and anchored by the provider's root of trust. Refer to [Nautilus design](https://docs.sui.io/concepts/cryptography/nautilus/nautilus-design) and [using Nautilus](https://docs.sui.io/guides/developer/nautilus/using-nautilus) for details. Use cases[​](https://docs.sui.io/guides/developer/nautilus/#use-cases "Direct link to Use cases") -------------------------------------------------------------------------------------------------- Nautilus supports several Web3 use cases for trustworthy and verifiable off-chain computation. Some examples include: * **Trusted oracles**: Process off-chain data from Web2 services (weather, sports, financial data) or decentralized storage platforms like [Walrus](https://walrus.xyz/) in a tamper-resistant way. * **AI agents:** Nautilus is ideal for securely running AI models for inference or to execute agentic workflows to produce actionable outcomes, while providing data and model provenance on-chain. * **DePIN solutions:** DePIN (Decentralized Physical Infrastructure) can leverage Nautilus for private data computation in IoT and supply chain networks. * **Fraud prevention in multi-party systems:** Decentralized exchanges (DEXs) could use Nautilus for order matching and settlement, or layer 2 solutions could prevent collision and fraud by securely running computations between untrusted parties. * **Identity management:** Nautilus can provide solutions in the identity management space that require on-chain verifiability for decentralized governance and proof of tamper resistance. When used together, Nautilus and [Seal](https://github.com/MystenLabs/seal) enable powerful privacy-preserving use cases by combining secure and verifiable computation with secure key access. A common challenge with TEEs is persisting secret keys across restarts and different machines. Seal can address this by securely storing long-term keys and granting access only to properly attested TEEs. In this model, Nautilus handles computation over the encrypted data, while Seal controls key access. Applications that require a shared encrypted state can use both tools to privately process user requests and update encrypted data on public networks. Future plans and non-goals[​](https://docs.sui.io/guides/developer/nautilus/#future-plans-and-non-goals "Direct link to Future plans and non-goals") ----------------------------------------------------------------------------------------------------------------------------------------------------- Nautilus will support additional TEE providers in the future. Your suggestions on which platforms to prioritize or support is greatly appreciated. Contact the Nautilus team on [Sui Discord](https://discord.com/channels/916379725201563759/1361500579603546223) . For questions about Nautilus, use case discussions, or integration support, contact the Nautilus team on [Sui Discord](https://discord.com/channels/916379725201563759/1361500579603546223) . Nautilus does not have a native, readily usable TEE network. Nautilus partners might provide such TEE networks, however. Apart from such networks, you are encouraged to deploy and manage your own TEEs for running off-chain Nautilus servers. * [Features](https://docs.sui.io/guides/developer/nautilus/#features) * [How it works](https://docs.sui.io/guides/developer/nautilus/#how-it-works) * [Use cases](https://docs.sui.io/guides/developer/nautilus/#use-cases) * [Future plans and non-goals](https://docs.sui.io/guides/developer/nautilus/#future-plans-and-non-goals) --- # NFTs | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/nft-index#__docusaurus_skipToContent_fallback) Learn how to create and extend non-fungible tokens on Sui. Create a Non-Fungible Token --------------------------- On Sui, everything is an object. Moreover, everything is a non-fungible token (NFT) as its objects are unique, non-fungible, and owned. Soulbound NFT Example --------------------- An example using Sui Move struct abilities and the Sui Framework's \`transfer\` module to make a NFT soulbound (non-transferable). NFT Rental Example ------------------ An example using the Kiosk Apps standard that provides the ability for users to rent NFTs according to the rules of a provided policy instead of outright owning them. This approach closely aligns with the ERC-4907 renting standard, making it a suitable choice for Solidity-based use cases intended for implementation on Sui. Asset Tokenization with NFTs ---------------------------- Learn how to tokenize assets on the Sui blockchain. Asset tokenization refers to the process of representing real-world assets, such as real estate, art, commodities, stocks, or other valuable assets, as digital tokens on the blockchain network. --- # Transaction Overview | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/transactions/txn-overview#__docusaurus_skipToContent_fallback) On this page Every update on Sui, whether to the network itself or to objects on the network, happens through a transaction. Transactions handle everything from creating objects and minting assets to managing network operations. Sui has two types of transactions: * **[Programmable transaction blocks (PTBs)](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) :** Enable everyday network activities like deploying smart contracts and sending tokens. Anyone can create and submit PTBs. * **System transactions:** Manage network events such as epoch changes and checkpoint creation. Only validators can submit system transactions. Transaction metadata[​](https://docs.sui.io/guides/developer/transactions/txn-overview#transaction-metadata "Direct link to transaction-metadata") --------------------------------------------------------------------------------------------------------------------------------------------------- Programmable transaction blocks have the following metadata fields: * **Sender address:** The [address](https://docs.sui.io/guides/developer/getting-started/get-address) of the user sending the transaction. * **Gas input:** A reference pointing to the object used to pay for the transaction's execution and storage. The sender address must own the object and it must be of type `sui::coin::Coin`. * **Gas price:** An unsigned integer specifying the number of native tokens per gas unit that the transaction pays. The gas price must be greater than zero. * **Maximum gas budget:** The maximum number of gas units the transaction can use. If execution exceeds this budget, the transaction aborts without any effects except charging the gas input object. The gas input object must have a balance greater than or equal to the gas price multiplied by the maximum gas budget. This product represents the maximum amount the transaction can charge. * **Epoch:** The epoch the transaction is intended for. * **Type:** Identifies whether the transaction is a call, publish, or native transaction and its type-specific data. * **Authenticator:** A cryptographic signature paired with a public key. The public key must verify the signature and match the sender address. * **Expiration:** Optional. An epoch number that acts as a deadline. Validators only accept the transaction if the current epoch is less than or equal to the expiration epoch. If the deadline passes, the transaction never executes. By default, transactions do not expire. System transactions do not have gas input, price, or budget, and do not have an expiration. The sender address of a system transaction is always `0x0`. Example of a transaction flow[​](https://docs.sui.io/guides/developer/transactions/txn-overview#example-of-a-transaction-flow "Direct link to example-of-a-transaction-flow") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The relationship between objects and transactions is written in a [directed acyclic graph](https://en.wikipedia.org/wiki/Directed_acyclic_graph) (DAG). The following example shows how objects and transactions connect to each other on Sui. Consider two objects: * Object A contains 5 SUI coins and belongs to Tom. * Object B contains 2 SUI coins and belongs to John. Tom decides to send 1 SUI coin to Alice. In this case, Object A is the input to this transaction and 1 SUI coin is debited from this object. The output of the transaction is: * Object A with 4 SUI coins that still belongs to Tom. * New Object C that contains 1 SUI coin and belongs to Alice. At the same time, John decides to send 2 SUI coins to Alice. The output of this transaction is: * Object B that contains 2 SUI coins and now belongs to Alice. Because both transactions interact with different objects, the second transaction executes in parallel with the first transaction that sends coins from Tom to Alice. After receiving 2 SUI coins, Alice sends them to Tom. Now Tom has 6 SUI coins, 4 from Object A and 2 from Object B. Finally, Tom sends all of his SUI coins to John. For this transaction, the input is both Object A and Object B. Object B is destroyed, and its value is added to Object A. As a result, the transaction's output is only Object A with a value of 6 SUI. Limits on transactions, objects, and data[​](https://docs.sui.io/guides/developer/transactions/txn-overview#limits-on-transactions-objects-and-data "Direct link to Limits on transactions, objects, and data") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sui has some limits on transactions and the data used in them, such as a maximum size and number of objects used. You can find these limits in the [`sui-protocol-config` crate](https://github.com/MystenLabs/sui/blob/main/crates/sui-protocol-config/src/lib.rs) of the Sui repo. The limits are defined in the `ProtocolConfig` struct and values set in the `get_for_version_impl` function. * [Transaction metadata](https://docs.sui.io/guides/developer/transactions/txn-overview#transaction-metadata) * [Example of a transaction flow](https://docs.sui.io/guides/developer/transactions/txn-overview#example-of-a-transaction-flow) * [Limits on transactions, objects, and data](https://docs.sui.io/guides/developer/transactions/txn-overview#limits-on-transactions-objects-and-data) --- # SuiPlay0X1 Development Guide for Game Developers | Sui Documentation [Skip to main content](https://docs.sui.io/guides/suiplay0x1#__docusaurus_skipToContent_fallback) This guide provides an overview and recommendations for game developers building for the [SuiPlay0X1](https://www.suiplay0x1.com/) handheld gaming device. The SuiPlay0X1 is a first-of-its-kind handheld gaming console for Web3. It supports a wide range of PC games, as well as new AAA titles developed using Sui technology. Unlike traditional gaming where assets are locked within individual games, Web3 gaming enables true digital ownership through blockchain wallets. Players can own, trade, and transfer their in-game assets across different games and platforms. On the SuiPlay0X1, wallet integration is central to delivering this enhanced gaming experience. tip This guide will be updated as the Playtron SDK and additional tooling become available. Check back regularly for the latest recommendations and implementation details. Integration ----------- Integrate with SuiPlay0X1 using the Playtron GameOS SDK. Migration Strategies -------------------- SuiPlay0X1 is part of the Sui gaming ecosystem. Users can migrate accounts between on-device and off-device versions of a game. Wallet Integration ------------------ SuiPlay0X1 supports integration with several wallet solutions, including self-custodial wallets, zkLogin wallets, Playtron wallets, and custodial wallets. Best Practices -------------- Adhere to best practices when developing for SuiPlay0X1. --- # Currencies and Tokens | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/coin-index#__docusaurus_skipToContent_fallback) Learn how to design and implement currencies and tokens on Sui. Create Currencies and Tokens ---------------------------- Learn how to create currencies using the Coin Registry. Regulated Currency and Deny List -------------------------------- Create regulated currencies with deny list capabilities. In-Game Currency ---------------- Use Closed-Loop Tokens for in-game currencies and restricted-use tokens. Loyalty Tokens -------------- Implement loyalty programs using the Closed-Loop Token standard. --- # Cryptography | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/cryptography#__docusaurus_skipToContent_fallback) Effective use of cryptography keeps your smart contract transactions secure on the Sui blockchain. Signature Verification ---------------------- Sui supports verification within Move smart contracts through several signature schemes. Signature schemes include Ed25519, Secp256k1 recoverable, Secp256k1 non-recoverable, Secp256r1 non-recoverable, Secp256r1 recoverable, BLS G1, and BLS G2. Groth16 ------- Zero-knowledge proofs are used to validate statements without revealing information about the proof's inputs. Hashing ------- Sui supports SHA2-256, SHA3-256, Keccak256, and Blake2b-256 cryptographic hash functions. Elliptic Curve Verifiable Random Function (ECVRF) ------------------------------------------------- Elliptic curve verifiable random function is a cryptographic algorithm that enables you to generate a random number and provide proof that the number used a secret key for generation. Multisig -------- Guide on how to create a multisig transaction and then submit it against a local network using the Sui CLI. zkLogin Integration Guide ------------------------- zkLogin can be integrated into applications deployed on Sui. --- # App Examples | Sui Documentation [Skip to main content](https://docs.sui.io/guides/developer/app-examples#__docusaurus_skipToContent_fallback) On this page The ever-growing number of examples in this section showcase packages for the Sui blockchain. Extract techniques used in these examples to apply to your own Sui projects as they are written by Sui and Move experts. caution Use dedicated nodes/shared services rather than public endpoints for production apps. The public endpoints maintained by Mysten Labs (`fullnode..sui.io:443`) are rate-limited, and support only 100 requests per 30 seconds. Do not use public endpoints in production applications with high traffic volume. You can either run your own Full nodes, or outsource this to a professional infrastructure provider (preferred for apps that have high traffic). You can find a list of reliable RPC endpoint providers for Sui on the [Sui Dev Portal](https://sui.io/developers#dev-tools) using the **Node Service** tag. Examples[​](https://docs.sui.io/guides/developer/app-examples#examples "Direct link to Examples") -------------------------------------------------------------------------------------------------- Sui is dedicated to providing a wide range of examples to guide you in proper programming techniques for the Sui blockchain. This list will continue to grow, so check back often. tip The projects are grouped by stack type and are sorted by complexity. ### Full-stack apps[​](https://docs.sui.io/guides/developer/app-examples#full-stack-apps "Direct link to Full-stack apps") * [Distributed Counter](https://docs.sui.io/guides/developer/app-examples/e2e-counter) : An end-to-end example that creates a basic decentralized counter that anyone can increment, but only the object owner can reset it. The example includes Move code to create the package and leverages the Sui TypeScript SDK to provide a basic frontend. * [Trustless Swap](https://docs.sui.io/guides/developer/app-examples/trustless-swap) : This example demonstrates trustless swaps on the Sui blockchain using a shared object as an escrow account. * [Coin Flip](https://docs.sui.io/guides/developer/app-examples/coin-flip) : The Coin Flip app demonstrates on-chain randomness. * [Reviews Rating](https://docs.sui.io/guides/developer/app-examples/reviews-rating) : This example demonstrates implementing a reviews-rating platform for the food service industry on Sui. * [Blackjack](https://docs.sui.io/guides/developer/app-examples/blackjack) : This example demonstrates the logic behind an on-chain version of the popular casino card game, Blackjack. * [Plinko](https://docs.sui.io/guides/developer/app-examples/plinko) : This example puts the classic Plinko game on chain, demonstrating use of cryptography-based strategies to create a fair and transparent game of chance. ### Smart contracts[​](https://docs.sui.io/guides/developer/app-examples#smart-contracts "Direct link to Smart contracts") * [Tic-tac-toe](https://docs.sui.io/guides/developer/app-examples/tic-tac-toe) : Three implementations of the classic tic-tac-toe game on the Sui network to demonstrate different approaches to user interaction. ### Smart contracts & Backend[​](https://docs.sui.io/guides/developer/app-examples#smart-contracts--backend "Direct link to Smart contracts & Backend") * [Weather Oracle](https://docs.sui.io/guides/developer/app-examples/weather-oracle) : The Sui Weather Oracle demonstrates how to create a basic weather oracle that provides real-time weather data. * [Examples](https://docs.sui.io/guides/developer/app-examples#examples) * [Full-stack apps](https://docs.sui.io/guides/developer/app-examples#full-stack-apps) * [Smart contracts](https://docs.sui.io/guides/developer/app-examples#smart-contracts) * [Smart contracts & Backend](https://docs.sui.io/guides/developer/app-examples#smart-contracts--backend) --- # Ethereum -> Sui | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/sui-for-ethereum#__docusaurus_skipToContent_fallback) On this page If you have worked with Ethereum Virtual Machine (EVM) before, the biggest difference when developing on Sui is the programming language. Sui uses **Move** and EVM uses **Solidity**. | Topic | Solidity | Move | | --- | --- | --- | | Account vs object\-centric models | Custom ownership logic written within contracts typically using _mappings_. Only Ethereum coins are first class citizens with global APIs. All ownership APIs are contract specific. | Object ownership inherent to Sui, objects are first class citizens and encompass everything _owned_ on Sui. | | Data storage | Data is stored in the smart contract. | Data is stored in Move objects. | | Inheritance | Supports multiple inheritance, including polymorphism. | No interfaces, no polymorphism. However, Move has generics, like `Type`. | | Dynamic dispatch | Allowed | Not allowed | | Asset/Token accessibility | Bound to smart contract. | Anyone can access shared objects. Owned objects can only be accessed by object owner. | | Access control | Identity/role-based access control through `Ownable` and `AccessControl` contract. | Mostly [capability based access control](https://move-book.com/programmability/capability.html)
through owned objects. Identity/role-based access control is possible. | | Contract upgrades | Proxy contract forwards user transactions. | New contracts must be [layout-compatible](https://docs.sui.io/guides/developer/packages/upgrade#upgrade-requirements)
with the old one. Need to consider versioning shared objects. | | Development environment | Hardhat, Foundry | [Move VSCode extension](https://marketplace.visualstudio.com/items?itemName=mysten.move)
. | | Mutate contract state | Sending transactions through compile time ABI interface. | Sending transaction through runtime [programmable transaction block](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks)
(PTB) construction. | Object model[​](https://docs.sui.io/concepts/sui-for-ethereum#object-model "Direct link to object-model") ---------------------------------------------------------------------------------------------------------- Objects store data in Move and everything in Move is an object. This includes the smart contracts (Move packages), on-chain addresses, coins, and NFTs. For simplicity, you can think of objects as _assets_ or NFTs. Objects have ownerships. Ownership[​](https://docs.sui.io/concepts/sui-for-ethereum#ownership "Direct link to Ownership") ------------------------------------------------------------------------------------------------- There are some nuances to object ownership, but key types include: * **Address\-owned objects:** These objects are owned by a single address. You can transfer or receive these objects without interacting with a smart contract. For example, currency, NFTs, or tokens gating access to certain functions. * **Shared objects:** Publicly accessible objects that anyone can use. Mutating the data stored in these objects typically involves defining rules in the smart contract. For all types of ownership on Sui, see [Object Ownership](https://docs.sui.io/guides/developer/objects/object-ownership) . Access control[​](https://docs.sui.io/concepts/sui-for-ethereum#access-control "Direct link to Access control") ---------------------------------------------------------------------------------------------------------------- Identity or role-based access control is widely used through OpenZeppelin's `Ownable` and `AccessControl` contracts in Solidity. Because object ownership is inherent in Sui, access to contract functions are typically gated through [capability object](https://move-book.com/programmability/capability/) . These objects are issued to users and thus grant them the rights to call certain functions. Function calls fail if a user does not own the object a function expects. You can still implement address\-based checks. However, the recommendation is to use capability objects as much as possible for better security. You can read more in [The Move Book](https://move-book.com/programmability/capability/#address-check-vs-capability) . In this example, a new user can only be created by presenting an `AdminCap` object during the function call. /// Grants the owner the right to create new users in the system.public struct AdminCap {}/// Creates a new user in the system. Requires the `AdminCap` capability to be/// passed as the first argument.public fun new(_: &AdminCap, ctx: &mut TxContext): User { User { id: object::new(ctx) }} Mutating objects[​](https://docs.sui.io/concepts/sui-for-ethereum#mutating-objects "Direct link to Mutating objects") ---------------------------------------------------------------------------------------------------------------------- In Solidity, data structures such as `Mapping` are defined and stored in a contract. Mutating the data involves signing a transaction regardless of whether the signer owns the data or not. In Move, the logic that mutates the data is defined in the contract, but the data is stored in Move objects. To mutate the data, the owner of the objects needs to call the contract functions using a PTB. The ownership check is done at a protocol level so transactions fail if the signer does not have access to the referenced objects. Programmable transaction blocks[​](https://docs.sui.io/concepts/sui-for-ethereum#programmable-transaction-blocks "Direct link to Programmable transaction blocks") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- In Solidity, if you want to do something that chains together the results of multiple contract calls or across different contracts, you need to have a function in the smart contract that composes other function calls. Chaining function calls with atomicity guarantees is not available on the client side. In Move, PTBs solve this problem. PTBs give builders the ability to chain contract calls together with atomicity guarantees during runtime. A Sui PTB can have up to 1,024 different contract calls in it, or other actions. PTBs effectively provide a limited scripting language that is straightforward yet expressive, powerful, and secure. Builders on Sui leverage PTBs to provide experiences that would otherwise be intractable. A good example is a DeFi aggregator that routes token swaps across multiple DeFi protocols with the best price. On Sui, the aggregator would use a single PTB with the guarantee that the transaction would execute at the displayed price or it would revert completely. The PTB is one of the most powerful Sui features. Experience shows builders who are most successful on Sui are the ones who learn to leverage this feature early and often, leaning into it rather than treating it just as a way to batch transactions. See [Programmable Transaction Blocks](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) for details on PTBs. More comparison[​](https://docs.sui.io/concepts/sui-for-ethereum#more-comparison "Direct link to More comparison") ------------------------------------------------------------------------------------------------------------------- | Topic | Sui | Ethereum | | --- | --- | --- | | Digital signature algorithm | `Ed25519`, `secp256k1`, `secp256r1` | `secp256k1` | | Consensus mechanism | DPoS | PoS | | VM and its languages | MoveVM, Move Lang | EVM, Solidity, Vyper | | Chain data structure | DAG | Blocks | | Common standards (coin, token, NFT, and so on) | Currency Standard, Closed-Loop Token | ERC-20, ERC-721, ERC-1155 | | Coin names, name of the smallest unit | SUI, MIST | ETH, Wei | | Available frameworks for development | Sui CLI | Foundry, Hardhat | | L1/L2 | No L2, relies on fast L1 | Many L2s | | Governance | On-chain governance | EIP + Node Operator consensus | | Bridges | Supported | Supported | | Network security (stake required for control) | 66% of total stake | 51% of total stake | | Smart contract auditing | Less auditing required, language does some of the lifting (object model). | Solidity provides less protection requiring greater auditing. | | Private transactions | Public by design. | Public by design, L2 and third party supports private transactions. | | TVL | ~1 billion | ~46 billion | | Implementation languages for clients | Rust, TypeScript | Many | | Eventing | Indexed by sender, object ID, type, timestamp. | Indexed by topic. | | Indexing | High level transaction data + objects, coins, and so on. | High level transaction data. | | Oracles | Third party | Third party | | Network upgrade strategy | Protocol flags and framework upgrades are voted on by validators then enabled. | EIPs + Hardforking, no on-chain mechanism. | | IDE | VSCode | Many | | Transaction lifecycle | Two round trips from client to validators to generate a transaction certificate (guaranteeing execution) another round trip for shared objects to ensure ordering. Very low latency. | Transaction gossiped to network, verified added to mempool, validators select transactions from mempool. Random validator proposes a block, other validators vote yes or no on block. After a sufficient number of blocks have passed a transaction is considered final. High latency due to block height requirement for finality. | | Parallel execution vs Ethereum serial execution, fast path | Transactions that can be parallel are run in parallel. | Every transaction is sequentially run. | | Storage fees, storage rebates, storage accounts to pay for fees over time | Low, rebates on destroying objects. | High, no rebates. | | Contract immutability | Native mutable and immutable support using upgrade capabilities. | Not native, requires auditing the Solidity code deployed. Can be discerned by some operation codes. | | Contract upgrading | Native, upgrade capability mediated. | Achieved using proxy pattern to delegate calls. Upgrades change where calls are directed to. | | Composability | Call any number of functions within a single transaction using PTBs. Compose by taking the output of one contract call and passing it into another. Ensures atomic execution. | Each call is its own transaction that must be processed individually and serialized by the chain. Requires careful publishing to ensure execution. Not atomic. | | Token royalties | Enforced by the chain. | Only enforceable by marketplaces. | Related links[​](https://docs.sui.io/concepts/sui-for-ethereum#related-links "Direct link to Related links") ------------------------------------------------------------------------------------------------------------- • [Move Concepts](https://docs.sui.io/concepts/sui-move-concepts) Move is an open source language for writing safe packages to manipulate on-chain objects. • [Object Ownership](https://docs.sui.io/guides/developer/objects/object-ownership) On Sui, object ownership can be represented in different ways. Weigh the benefits of each to decide the best approach for your project. • [Programmable Transaction Blocks (PTBs)](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) Programmable transaction blocks are a group of commands that complete a transaction on Sui. • [Dynamic Object Fields](https://move-book.com/programmability/dynamic-object-fields.html)) Learn more about Dynamic Object Fields in The Move Book. * [Object model](https://docs.sui.io/concepts/sui-for-ethereum#object-model) * [Ownership](https://docs.sui.io/concepts/sui-for-ethereum#ownership) * [Access control](https://docs.sui.io/concepts/sui-for-ethereum#access-control) * [Mutating objects](https://docs.sui.io/concepts/sui-for-ethereum#mutating-objects) * [Programmable transaction blocks](https://docs.sui.io/concepts/sui-for-ethereum#programmable-transaction-blocks) * [More comparison](https://docs.sui.io/concepts/sui-for-ethereum#more-comparison) * [Related links](https://docs.sui.io/concepts/sui-for-ethereum#related-links) --- # Sui-Related Research Papers | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/research-papers#__docusaurus_skipToContent_fallback) On this page This document contains a list of research papers that are relevant to Sui and that one or more Sui team members have co-authored. Some of the ideas of these papers are currently being integrated into Sui, others are in our roadmap, and others are not in our roadmap but could be integrated in the future. Start with the [Sui Smart Contract Platform](https://docs.sui.io/assets/files/sui-6251a5c5b9d2fab6b1df0e24ba7c6322.pdf) white paper, which contains our latest design inspired by previous works below. Latest Mysticeti: Reaching the Limits of Latency with Uncertified DAGs[​](https://docs.sui.io/concepts/research-papers#mysticeti "Direct link to mysticeti") ------------------------------------------------------------------------------------------------------------------------------------------------------ * **Link:** [https://arxiv.org/pdf/2310.14821](https://arxiv.org/pdf/2310.14821) * **Publication:** Network and Distributed System Security Symposium (NDSS), accepted for 2025 * **Relevance:** We introduce Mysticeti\-C, the first DAG-based Byzantine consensus protocol to achieve the lower bounds of latency of 3 message rounds. Since Mysticeti\-C is built over DAGs it also achieves high resource efficiency and censorship resistance. Mysticeti\-C achieves this latency improvement by avoiding explicit certification of the DAG blocks and by proposing a novel commit rule such that every block can be committed without delays, resulting in optimal latency in the steady state and under crash failures. We further extend Mysticeti\-C to Mysticeti\-FPC, which incorporates a fast commit path that achieves even lower latency for transferring assets. Unlike prior fast commit path protocols, Mysticeti\-FPC minimizes the number of signatures and messages by weaving the fast path transactions into the DAG. This frees up resources, which subsequently result in better performance. We prove the safety and liveness in a Byzantine context. We evaluate both Mysticeti protocols and compare them with state-of-the-art consensus and fast path protocols to demonstrate their low latency and resource efficiency, as well as their more graceful degradation under crash failures. Mysticeti\-C is the first Byzantine consensus protocol to achieve WAN latency of 0.5s for consensus commit while simultaneously maintaining state-of-the-art throughput of over 200k TPS. Finally, we report on integrating Mysticeti\-C as the consensus protocol into the Sui blockchain, resulting in over 4x latency reduction. Sui Lutris: A Blockchain Combining Broadcast and Consensus[​](https://docs.sui.io/concepts/research-papers#sui-lutris-a-blockchain-combining-broadcast-and-consensus "Direct link to sui-lutris-a-blockchain-combining-broadcast-and-consensus") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Link:** [https://arxiv.org/pdf/2310.18042](https://arxiv.org/pdf/2310.18042) * **Publication:** Conference on Computer and Communications Security (CCS), 2024 * **Relevance:** Sui Lutris is the first smart-contract platform to sustainably achieve sub-second finality. It achieves this significant decrease by employing consensusless agreement not only for simple payments but for a large variety of transactions. Unlike prior work, Sui Lutris neither compromises expressiveness nor throughput and can run perpetually without restarts. Sui Lutris achieves this by safely integrating consensuless agreement with a high-throughput consensus protocol that is invoked out of the critical finality path but ensures that when a transaction is at risk of inconsistent concurrent accesses, its settlement is delayed until the total ordering is resolved. Building such a hybrid architecture is especially delicate during reconfiguration events, where the system needs to preserve the safety of the consensusless path without compromising the long-term liveness of potentially misconfigured clients. We thus develop a novel reconfiguration protocol, the first to provably show the safe and efficient reconfiguration of a consensusless blockchain. Sui Lutris is currently running in production and underpins the Sui smart-contract platform. Combined with the use of Objects instead of accounts it enables the safe execution of smart contracts that expose objects as a first-class resource. In our experiments Sui Lutris achieves latency lower than 0.5 seconds for throughput up to 5,000 certificates per second (150k ops/s with transaction blocks), compared to the state-of-the-art real-world consensus latencies of 3 seconds. Furthermore, it gracefully handles validators crash-recovery and does not suffer visible performance degradation during reconfiguration. zkLogin: Privacy-Preserving Blockchain Authentication with Existing Credentials[​](https://docs.sui.io/concepts/research-papers#zklogin-privacy-preserving-blockchain-authentication-with-existing-credentials "Direct link to zklogin-privacy-preserving-blockchain-authentication-with-existing-credentials") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Link:** [https://arxiv.org/pdf/2401.11735](https://arxiv.org/pdf/2401.11735) * **Publication:** Not published * **Relevance:** For many users, a private key based wallet serves as the primary entry point to blockchains. Commonly recommended wallet authentication methods, such as mnemonics or hardware wallets, can be cumbersome. This difficulty in user onboarding has significantly hindered the adoption of blockchain-based applications. We develop zkLogin, a novel technique that leverages identity tokens issued by popular platforms (any OpenID Connect enabled platform e.g. Google, Facebook, etc.) to authenticate transactions. At the heart of zkLogin lies a signature scheme allowing the signer to sign using their existing OpenID accounts and nothing else. This improves the user experience significantly as users do not need to remember a new secret and can reuse their existing accounts. zkLogin provides strong security and privacy guarantees. By design, zkLogin builds on top of the underlying platform's authentication mechanisms, and derives its security from there. Unlike prior related works however, zkLogin avoids the use of additional trusted parties (e.g., trusted hardware or oracles) for its security guarantees. zkLogin leverages zero-knowledge proofs (ZKP) to ensure that the link between a user's off-chain and on-chain identities is hidden, even from the platform itself. zkLogin is implemented and deployed on the Sui blockchain as an alternative to traditional digital signature-based addresses. Due to the ease of Web3 on-boarding just with social login, without requiring mnemonics, many hundreds of thousands zkLogin accounts have already been generated in various industries such as gaming, DeFi, direct payments, NFT collections, ride sharing, sports racing and many more. Be Aware of Your Leaders[​](https://docs.sui.io/concepts/research-papers#awareness "Direct link to Be Aware of Your Leaders") ------------------------------------------------------------------------------------------------------------------------------ * **Link:** [https://arxiv.org/abs/2110.00960](https://arxiv.org/abs/2110.00960) * **Publication:** Financial Cryptography and Data Security (FC), 2022 * **Relevance:** Provides a performant leader election algorithm for partially-synchronous consensus protocol (such as Bullshark). Sui may want to use it alongside Bullshark to support shared objects. * **Summary:** Advances in blockchains have influenced the State-Machine-Replication (SMR) world and many state-of-the-art blockchain-SMR solutions are based on two pillars: Chaining and Leader-rotation. A predetermined round-robin mechanism used for Leader-rotation, however, has an undesirable behavior: crashed parties become designated leaders infinitely often, slowing down overall system performance. In this paper, we provide a new Leader-Aware SMR framework that, among other desirable properties, formalizes a Leader-utilization requirement that bounds the number of rounds whose leaders are faulty in crash-only executions. We introduce Carousel, a novel, reputation-based Leader-rotation solution to achieve Leader-Aware SMR. The challenge in adaptive Leader-rotation is that it cannot rely on consensus to determine a leader, since consensus itself needs a leader. Carousel uses the available on-chain information to determine a leader locally and achieves Liveness despite this difficulty. A HotStuff implementation fitted with Carousel demonstrates drastic performance improvements: it increases throughput over 2x in faultless settings and provides a 20x throughput increase and 5x latency reduction in the presence of faults. Bullshark: DAG BFT Protocols Made Practical[​](https://docs.sui.io/concepts/research-papers#bullshark "Direct link to Bullshark: DAG BFT Protocols Made Practical") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Link:** [https://arxiv.org/abs/2201.05677](https://arxiv.org/abs/2201.05677) * **Publication:** Not published yet (under submission) * **Relevance:** Provides a partially-synchronous consensus protocol running over Narwhal. Sui may want to use it instead of Tusk. * **Summary:** We present Bullshark, the first directed acyclic graph (DAG) based Byzantine Fault Tolerant (BFT) protocol that is optimized for partial synchrony. Bullshark inherits all the desired properties of its predecessor (DAG-Rider) such as optimal amortized complexity, asynchronous liveness, zero-overhead, and post-quantum safety; but at the same time Bullshark provides a practical low-latency fast-path that exploits synchronous periods. In addition, we introduce a standalone partially synchronous version of Bullshark and evaluate it against the state of the art. The resulting protocol is embarrassingly simple 20 LOC on top of a DAG-based mempool implementation) and highly efficient, achieving for example, 125k transactions per second and 2 seconds latency with 50 nodes. FastPay: High-Performance Byzantine Fault Tolerant Settlement[​](https://docs.sui.io/concepts/research-papers#fastpay "Direct link to FastPay: High-Performance Byzantine Fault Tolerant Settlement") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ * **Link:** [https://arxiv.org/abs/2003.11506](https://arxiv.org/abs/2003.11506) * **Publication:** ACM Conference on Advances in Financial Technologies (AFT), 2020 * **Relevance:** FastPay describes the core protocol at the heart of Sui. * **Summary:** FastPay allows a set of distributed validators, some of which are Byzantine, to maintain a high-integrity and availability settlement system for pre-funded payments. It can be used to settle payments in a native unit of value (crypto-currency), or as a financial side-infrastructure to support retail payments in fiat currencies. This is not the protocol Sui uses, yet it proposes the basic safety mechanism that Sui extends. FastPay is based on Byzantine Consistent Broadcast as its core primitive, foregoing the expenses of full atomic commit channels (consensus). The resulting system has low-latency for both confirmation and payment finality. Remarkably, each validator can be sharded across many machines to allow unbounded horizontal scalability. HammerHead: Score-based Dynamic Leader Selection[​](https://docs.sui.io/concepts/research-papers#hammerhead-score-based-dynamic-leader-selection "Direct link to HammerHead: Score-based Dynamic Leader Selection") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Link:** [https://arxiv.org/pdf/2309.12713](https://arxiv.org/pdf/2309.12713) * **Publication:** IEEE International Conference on Distributed Computing Systems (ICDCS), 2024 * **Relevance:** The need for high throughput and censorship resistance in blockchain technology has led to research on DAG-based consensus. The Sui blockchain protocol uses a variant of the Bullshark consensus algorithm due to its lower latency, but this leader-based protocol causes performance issues when candidate leaders crash. In this paper, we explore the ideas pioneered by Carousel on providing Leader-Utilization and present HammerHead. Unlike Carousel, which is built with a chained and pipelined consensus protocol in mind, HammerHead does not need to worry about chain quality as it is directly provided by the DAG, but needs to make sure that even though validators might commit blocks in different views the safety and liveness is preserved. Our implementation of HammerHead shows a slight performance increase in a faultless setting, and a drastic 2x latency reduction and up to 40% throughput increase when suffering faults (100 validators, 33 faults). Narwhal and Tusk: A DAG-based Mempool and Efficient BFT Consensus[​](https://docs.sui.io/concepts/research-papers#narwhal-and-tusk "Direct link to narwhal-and-tusk") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Link:** [https://arxiv.org/abs/2105.11827](https://arxiv.org/abs/2105.11827) * **Publication:** EuroSys, 2022 * **Relevance:** The consensus system that we will likely use to support shared-objects in Sui. * **Summary:** We propose separating the task of reliable transaction dissemination from transaction ordering to enable high-performance Byzantine fault-tolerant quorum\-based consensus. We design and evaluate a mempool protocol, Narwhal, specializing in high-throughput reliable dissemination and storage of causal histories of transactions. Narwhal tolerates an asynchronous network and maintains high performance despite failures. Narwhal is designed to easily scale-out using multiple workers at each validator, and we demonstrate that there is no foreseeable limit to the throughput we can achieve. Composing Narwhal with a partially synchronous consensus protocol (Narwhal-HotStuff) yields significantly better throughput even in the presence of faults or intermittent loss of liveness due to asynchrony. However, loss of liveness can result in higher latency. To achieve overall good performance when faults occur we design Tusk, a zero-message overhead asynchronous consensus protocol, to work with Narwhal. We demonstrate its high performance under a variety of configurations and faults. As a summary of results, on a WAN, Narwhal-Hotstuff achieves more than 130,000 tx/sec at less than 2-sec latency compared with 1,800 tx/sec at 1-sec latency for Hotstuff. Additional workers increase throughput linearly to 600,000 tx/sec without any latency increase. Tusk achieves 160,000 tx/sec with about 3 seconds latency. Under faults, both protocols maintain high throughput, but Narwhal-HotStuff suffers from increased latency. SybilQuorum: Open Distributed Ledgers Through Trust Networks[​](https://docs.sui.io/concepts/research-papers#sybilquorum "Direct link to SybilQuorum: Open Distributed Ledgers Through Trust Networks") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Link:** [https://arxiv.org/abs/1906.12237](https://arxiv.org/abs/1906.12237) * **Publication:** Not published * **Relevance:** Less related to Sui than the other papers, and the paper is in its early stages. It presents an algorithm to strengthen proof-of-Stake systems (like Sui). The paper is, however, theoretical and not on our roadmap. * **Summary:** The Sybil attack plagues all peer-to-peer systems, and modern open distributed ledgers employ a number of tactics to prevent it from proof of work, or other resources such as space, stake or memory, to traditional admission control in permissioned settings. With SybilQuorum we propose an alternative approach to securing an open distributed ledger against Sybil attacks, and ensuring consensus amongst honest participants, leveraging social network based Sybil defenses. We show how nodes expressing their trust relationships through the ledger can bootstrap and operate a value system, and general transaction system, and how Sybil attacks are thwarted. We empirically evaluate our system as a secure Federated Byzantine Agreement System, and extend the theory of those systems to do so. Twins: BFT Systems Made Robust[​](https://docs.sui.io/concepts/research-papers#twins "Direct link to Twins: BFT Systems Made Robust") -------------------------------------------------------------------------------------------------------------------------------------- * **Link:** [https://arxiv.org/abs/2004.10617](https://arxiv.org/abs/2004.10617) * **Publication:** International Conference on Principles of Distributed Systems (OPODIS), 2021 * **Relevance:** Less related to Sui than the other papers, this provides a way to test implementations of consensus systems, such as Tusk and Bullshark. The paper is, however, theoretical and not on our roadmap. * **Summary:** This paper presents Twins, an automated unit test generator of Byzantine attacks. Twins implements three types of Byzantine behaviors: (i) leader equivocation, (ii) double voting, and (iii) losing internal state such as forgetting 'locks' guarding voted values. To emulate interesting attacks by a Byzantine node, it instantiates twin copies of the node instead of one, giving both twins the same identities and network credentials. To the rest of the system, the twins appear indistinguishable from a single node behaving in a 'questionable' manner. Twins can systematically generate Byzantine attack scenarios at scale, execute them in a controlled manner, and examine their behavior. Twins scenarios iterate over protocol rounds and vary the communication patterns among nodes. Twins runs in a production setting within DiemBFT where it can execute 44M Twins-generated scenarios daily. Whereas the system at hand did not manifest errors, subtle safety bugs that were deliberately injected for the purpose of validating the implementation of Twins itself were exposed within minutes. Twins can prevent developers from regressing correctness when updating the codebase, introducing new features, or performing routine maintenance tasks. Twins requires only a thin wrapper over DiemBFT; we thus envision other systems using it. Building on this idea, one new attack and several known attacks against other BFT protocols were materialized as Twins scenarios. In all cases, the target protocols break within fewer than a dozen protocol rounds. Hence it is realistic for the Twins approach to expose the problems. Zef: Low-latency, Scalable, Private Payments[​](https://docs.sui.io/concepts/research-papers#zef "Direct link to Zef: Low-latency, Scalable, Private Payments") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Link:** [https://arxiv.org/abs/2201.05671](https://arxiv.org/abs/2201.05671) * **Publication:** Not published yet (under submission) * **Relevance:** Extends the FastPay design to support objects (rather than accounts), what Sui actually uses. An additional contribution of this paper is to add strong privacy to FastPay transactions (but Sui does not plan to do this). * **Summary:** We introduce Zef, the first Byzantine-Fault Tolerant (BFT) protocol to support payments in anonymous digital coins at arbitrary scale. Zef follows the communication and security model of FastPay: both protocols are asynchronous, low-latency, linearly-scalable, and powered by partially-trusted sharded validators. Zef further introduces opaque coins represented as off-chain certificates that are bound to user accounts. In order to hide the face values of coins when a payment operation consumes or creates them, Zef uses random commitments and NIZK proofs. Created coins are made unlinkable using the blind and randomizable threshold anonymous credentials of [Coconut](https://arxiv.org/pdf/1802.07344.pdf) . To control storage costs associated with coin replay prevention, Zef accounts are designed so that data can be safely removed once an account is deactivated. Besides the specifications and a detailed analysis of the protocol, we are making available an open source implementation of Zef in Rust. Our extensive benchmarks on AWS confirm textbook linear scalability and demonstrate a confirmation time under one second at nominal capacity. Compared to existing anonymous payment systems based on a blockchain, this represents a latency speedup of three orders of magnitude, with no theoretical limit on throughput. * [Mysticeti: Reaching the Limits of Latency with Uncertified DAGs](https://docs.sui.io/concepts/research-papers#mysticeti) * [Sui Lutris: A Blockchain Combining Broadcast and Consensus](https://docs.sui.io/concepts/research-papers#sui-lutris-a-blockchain-combining-broadcast-and-consensus) * [zkLogin: Privacy-Preserving Blockchain Authentication with Existing Credentials](https://docs.sui.io/concepts/research-papers#zklogin-privacy-preserving-blockchain-authentication-with-existing-credentials) * [Be Aware of Your Leaders](https://docs.sui.io/concepts/research-papers#awareness) * [Bullshark: DAG BFT Protocols Made Practical](https://docs.sui.io/concepts/research-papers#bullshark) * [FastPay: High-Performance Byzantine Fault Tolerant Settlement](https://docs.sui.io/concepts/research-papers#fastpay) * [HammerHead: Score-based Dynamic Leader Selection](https://docs.sui.io/concepts/research-papers#hammerhead-score-based-dynamic-leader-selection) * [Narwhal and Tusk: A DAG-based Mempool and Efficient BFT Consensus](https://docs.sui.io/concepts/research-papers#narwhal-and-tusk) * [SybilQuorum: Open Distributed Ledgers Through Trust Networks](https://docs.sui.io/concepts/research-papers#sybilquorum) * [Twins: BFT Systems Made Robust](https://docs.sui.io/concepts/research-papers#twins) * [Zef: Low-latency, Scalable, Private Payments](https://docs.sui.io/concepts/research-papers#zef) --- # Solana -> Sui | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/sui-for-solana#__docusaurus_skipToContent_fallback) On this page The biggest difference between Sui and Solana development lies in the programming language. Sui uses [**Move**](https://docs.sui.io/concepts/sui-move-concepts) , while Solana relies on **Rust**, typically paired with a development framework that simplifies app development and management. **Anchor** is the most popular Solana framework. | **Topic** | **Rust (Solana)** | **Move (Sui)** | | --- | --- | --- | | Model | Account-based model where all data is stored in accounts. Programs declare read/write accounts upfront. Everything is an account (programs, data, wallets). | Object ownership inherent to Sui, objects are first class citizens and encompass everything _owned_ on Sui. | | Data storage | Data is stored in programs, stateless accounts that contain instructions. | Data is stored in Move objects. | | Inheritance | No inheritance. Rust uses traits for shared behavior and composition over inheritance. | No interfaces, no polymorphism. However, Move has generics, like `Type`. | | Dynamic dispatch | Allowed through trait objects, but not commonly used in Solana programs due to performance overhead. | Not allowed | | Asset and token accessibility | Tokens stored in Program Derived Addresses (PDAs). Access controlled through program logic and signer verification. | Anyone can access shared objects. Owned objects can only be accessed by the object owner. | | Access control | Signer-based access control. Programs verify transaction signers and account ownership. PDAs enable program-controlled accounts. | Mostly [capability based access control](https://move-book.com/programmability/capability.html)
through owned objects. Identity and role-based access control is possible. | | Contract upgrades | Programs can be marked as upgradeable or immutable at deployment. Upgrades replace the program binary but maintain the same program ID. | New contracts must be [layout-compatible](https://docs.sui.io/guides/developer/packages/upgrade#upgrade-requirements)
with the old one. You need to consider versioning shared objects. | | Mutate contract state | Sending transactions with instruction data. Programs process instructions and modify account data. Can use Anchor's IDL (Interface Definition Language) for type-safe client interaction. | Sending transaction through runtime [programmable transaction block](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks)
(PTB) construction. | | Type safety | Strongly typed at compile time with Rust's type system. Memory safety enforced by borrow checker. | Resource-oriented with linear types. Assets cannot be copied or dropped unless explicitly allowed. Strong type safety with Move Prover for formal verification. | Object model[​](https://docs.sui.io/concepts/sui-for-solana#object-model "Direct link to object-model") -------------------------------------------------------------------------------------------------------- In Move, everything is an object. Objects serve as the fundamental data storage unit on Sui, containing Move packages (smart contracts), addresses, coins, NFTs, and all other on-chain data. You can think of objects as assets with inherent ownership properties like NFTs, but generalized across all blockchain data. Every object has ownership. Ownership[​](https://docs.sui.io/concepts/sui-for-solana#ownership "Direct link to Ownership") ----------------------------------------------------------------------------------------------- There are some nuances to object ownership, but key types include: * **Address\-owned objects:** These objects are owned by a single address. You can transfer or receive these objects without interacting with a smart contract. For example, currency, NFTs, or tokens gating access to certain functions. * **Shared objects:** Publicly accessible objects that anyone can use. Mutating the data stored in these objects typically involves defining rules in the smart contract. For all types of ownership on Sui, see [Object Ownership](https://docs.sui.io/guides/developer/objects/object-ownership) . Access control[​](https://docs.sui.io/concepts/sui-for-solana#access-control "Direct link to Access control") -------------------------------------------------------------------------------------------------------------- Identity or role-based access control is widely used through OpenZeppelin's `Ownable` and `AccessControl` contracts in Solidity. Because object ownership is inherent in Sui, access to contract functions is typically gated through [capability objects](https://move-book.com/programmability/capability/) . These objects are issued to users and thus grant them the rights to call certain functions. Function calls fail if a user does not own the object a function expects. You can still implement address\-based checks. However, the recommendation is to use capability objects as much as possible for better security. You can read more in [The Move Book](https://move-book.com/programmability/capability/#address-check-vs-capability) . In this example, a new user can only be created by presenting an `AdminCap` object during the function call. /// Grants the owner the right to create new users in the system.public struct AdminCap {}/// Creates a new user in the system. Requires the `AdminCap` capability to be/// passed as the first argument.public fun new(_: &AdminCap, ctx: &mut TxContext): User { User { id: object::new(ctx) }} Mutating objects[​](https://docs.sui.io/concepts/sui-for-solana#mutating-objects "Direct link to Mutating objects") -------------------------------------------------------------------------------------------------------------------- In Rust, data structures are stored in separate account structures that programs read from and write to. Programs are stateless and declare which accounts they'll access upfront. Mutating data involves signing a transaction with the appropriate account references, and the program verifies signer permissions through explicit checks. In Move, the logic that mutates the data is defined in the contract, but the data is stored in Move objects. To mutate the data, the owner of the objects needs to call the contract functions using a PTB. The ownership check is done at a protocol level so transactions fail if the signer does not have access to the referenced objects. Programmable transaction blocks[​](https://docs.sui.io/concepts/sui-for-solana#programmable-transaction-blocks "Direct link to Programmable transaction blocks") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- In Rust, if you want to chain together results of multiple program calls, you typically need to create multiple sequential transactions or use Cross-Program Invocations (CPIs) within a program. CPIs allow programs to call other programs atomically within a single transaction, but they're limited to 4 levels deep and require careful account management. Client-side transaction chaining lacks atomicity guarantees because each transaction must complete before the next can be submitted. In Move, PTBs solve this problem. PTBs give builders the ability to chain contract calls together with atomicity guarantees during runtime. A Sui PTB can have up to 1,024 different contract calls in it, or other actions. PTBs effectively provide a limited scripting language that is straightforward yet expressive, powerful, and secure. Builders on Sui leverage PTBs to provide experiences that would otherwise be intractable. A good example is a DeFi aggregator that routes token swaps across multiple DeFi protocols with the best price. On Sui, the aggregator would use a single PTB with the guarantee that the transaction would execute at the displayed price or it would revert completely. The PTB is one of the most powerful Sui features. Experience shows builders who are most successful on Sui are the ones who learn to leverage this feature early and often, leaning into it rather than treating it just as a way to batch transactions. See [Programmable Transaction Blocks](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) for details on PTBs. More comparison[​](https://docs.sui.io/concepts/sui-for-solana#more-comparison "Direct link to More comparison") ----------------------------------------------------------------------------------------------------------------- | Topic | Solana | Sui | | --- | --- | --- | | Digital signature algorithm | `Ed25519` | `Ed25519`, `secp256k1`, `secp256r1` | | Consensus mechanism | Tower BFT (PoS variant) with Proof of History (PoH) | DPoS | | VM and its languages | Solana VM, Rust, C, C++ | MoveVM, Move Lang | | Chain data structure | Blocks with PoH ordering | DAG | | Common standards (coin, token, NFT, and so on) | SPL Token, MPL Core, Token22 | Coin Standard, Closed-Loop Token | | Coin names, name of the smallest unit | SOL, Lamport | SUI, MIST | | Available frameworks for development | Anchor framework, Solana CLI, native Rust tooling | Sui CLI | | L1 and L2 | Emerging but not widespread, mostly relies on fast L1 with parallel execution | No L2, relies on fast L1 with horizontal scaling | | Governance | Off-chain governance through SIMD (Solana Improvement Documents) | On-chain governance | | Bridges | Supported | Supported | | Network security (stake required for control) | 66% of total stake (BFT requirement) | 66% of total stake | | Smart contract auditing | Requires comprehensive auditing due to account model complexity, PDA patterns, and CPI vulnerabilities | Less auditing required, language does some of the lifting (object model) | | Private transactions | Public by design | Public by design | | TVL (as of late 2025) | ~10 billion | ~2.6 billion | | Implementation languages for clients | Rust, TypeScript (web3.js, @solana/kit), Python, Go | Rust, TypeScript, Python | | Eventing | Indexed by program logs, requires custom parsing or indexer | Indexed by sender, object ID, type, timestamp | | Indexing | High level transaction data, requires custom indexers (Helius, Triton, Shyft) | High level transaction data + objects, coins, GraphQL RPC support | | Oracles | Third party | Third party | | Network upgrade strategy | Feature gates voted on by validators, activated when supermajority is reached | Protocol flags and framework upgrades voted on by validators then enabled | | IDE | VSCode (Rust Analyzer) | VSCode (Move extension) | | Transaction lifecycle | Transaction submitted to RPC, gossipped to leaders, included in block, voted on by validators using Tower BFT. | Two round trips from client to validators to generate transaction certificate (guaranteeing execution), another round trip for shared objects to ensure ordering. | | Parallel execution | Sealevel runtime enables parallel execution when transactions don't overlap in account access. Accounts must be declared upfront for scheduling. | Transactions that can be parallel are run in parallel. | | Storage fees, storage rebates | Rent-exempt accounts require minimum balance. No rent collection since 2021, no rebates. | Low storage fees paid upfront, rebates on destroying objects to incentivize cleanup. | | Contract immutability | Programs can be marked upgradeable or immutable at deployment time. | Native mutable and immutable support using upgrade capabilities as objects. | | Contract upgrading | Native, programs marked as upgradeable can be upgraded by the upgrade authority. | Native, upgrade capability mediated. | | Composability | Cross-Program Invocations (CPIs) allow programs to call other programs within a transaction. Limited to 4 levels deep. Atomic within transaction boundaries. | Call any number of functions within a single transaction using PTBs. Compose by taking output of one call and passing into another. Ensures atomic execution with up to 1,024 commands per PTB. | | Token royalties | Not directly. Enforced through protocols like MPL Core, or extensions like Token22. | Enforced by the chain through Kiosk and transfer policies. | | Block time and finality | ~400ms block time, ~12-13 seconds for economic finality (before Alpenglow upgrade). | Sub-second finality for independent transactions, ~390ms with Mysticeti for shared objects. | Related links[​](https://docs.sui.io/concepts/sui-for-solana#related-links "Direct link to Related links") ----------------------------------------------------------------------------------------------------------- • [Move Concepts](https://docs.sui.io/concepts/sui-move-concepts) Move is an open source language for writing safe packages to manipulate on-chain objects. • [Object Ownership](https://docs.sui.io/guides/developer/objects/object-ownership) On Sui, object ownership can be represented in different ways. Weigh the benefits of each to decide the best approach for your project. • [Programmable Transaction Blocks (PTBs)](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) Programmable transaction blocks are a group of commands that complete a transaction on Sui. • [Dynamic Object Fields](https://move-book.com/programmability/dynamic-object-fields.html) Learn more about Dynamic Object Fields in The Move Book. * [Object model](https://docs.sui.io/concepts/sui-for-solana#object-model) * [Ownership](https://docs.sui.io/concepts/sui-for-solana#ownership) * [Access control](https://docs.sui.io/concepts/sui-for-solana#access-control) * [Mutating objects](https://docs.sui.io/concepts/sui-for-solana#mutating-objects) * [Programmable transaction blocks](https://docs.sui.io/concepts/sui-for-solana#programmable-transaction-blocks) * [More comparison](https://docs.sui.io/concepts/sui-for-solana#more-comparison) * [Related links](https://docs.sui.io/concepts/sui-for-solana#related-links) --- # Coin Management | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/coin-mgt#__docusaurus_skipToContent_fallback) On this page A key concept when programming on Sui is that of owned objects. Address\-owned objects are important in that they allow for highly parallelizable transactions. They also logically map to assets or resources that someone exclusively owns. Coins are a typical case of owned object usage, with cash being a real-life reference. The owned objects paradigm, however, and particularly as related to coins, is somewhat of a divergence from other blockchains that have a concept of balance. In other words, in other systems, especially account-based systems, coins are held in a single location (field) that can be thought of as a balance in a bank account. Because Sui uses owned objects instead of a balance, it is common to own a number of coins, at times even a significant number of them. Some scenarios necessitate merging some or all of those coins into a single object. At times, merging coins together might even be required because the amount necessary to execute a transaction is more than any single coin the sender owns, thus making merging an inevitable step. SDK usage[​](https://docs.sui.io/concepts/coin-mgt#sdk-usage "Direct link to SDK usage") ----------------------------------------------------------------------------------------- The Sui SDKs ([TypeScript](https://sdk.mystenlabs.com/typescript) and [Rust](https://docs.sui.io/references/rust-sdk) ) manage coins on your behalf, removing the overhead of having to deal with coin management manually. The SDKs attempt to merge coins whenever possible and assume that transactions are executed in sequence. That's a reasonable assumption with wallet-based transactions and for common scenarios in general. Sui recommends relying on this feature if you do not have a need for heavy parallel or concurrent execution. Gas smashing[​](https://docs.sui.io/concepts/coin-mgt#gas-smashing "Direct link to gas-smashing") -------------------------------------------------------------------------------------------------- When executing a transaction, Sui allows you to provide a number of coins as payment. In other words, the payment can be a vector of coins rather than a single coin. That feature, known as gas smashing, performs merging of coins automatically and presents the PTBs you write with a single gas coin that can be used for other purposes besides just gas. Basically, you can provide as many coins as you want (with a max limit defined in the protocol configuration) and have all of them merged (smashed) into the first coin provided as payment. That coin, minus the gas budget, is then available inside the transaction and can be used in any command. If the coin is unused, it is returned to the user. Gas smashing is an important feature and key concept to understand for the optimal management of coins. See [Gas Smashing](https://docs.sui.io/concepts/transactions/gas-smashing) for more details. Generic coins[​](https://docs.sui.io/concepts/coin-mgt#generic-coins "Direct link to Generic coins") ----------------------------------------------------------------------------------------------------- Gas smashing works well for `Coin` objects, which is the only coin type that can be used for gas payment. Any other coin type requires explicit management from users. PTBs offer a `mergeCoins` command that you can use to combine multiple coins into a single one and a `splitCoins` as the complementary operation to break them up. From a cost perspective, those are very cheap transactions, however they require a user to be aware of their coin distribution and their own needs. Concurrency[​](https://docs.sui.io/concepts/coin-mgt#concurrency "Direct link to Concurrency") ----------------------------------------------------------------------------------------------- Merging coins, and particularly `Coin`, into a single coin or a very small number of coins might prove problematic in scenarios where heavy or high concurrency is required. If you merge all `Coin` into a single one, you need to sequentially submit every transaction. The coin (being an owned object) needs to be provided with a version, and it is locked by the system when signing a transaction, effectively making it impossible to use it in any other transaction until the one that locked it is executed. Moreover, an attempt to sign multiple transactions with the same coin might result in equivocation and the coin being unusable and locked until the end of the epoch. So when you require heavy concurrency, you should first split a coin into as many coins as the number of transactions to execute concurrently. Alternatively, you could provide multiple and different coins (gas smashing) to the different transactions. It is critically important that the set of coins you use in the different transactions has no intersection at all. The possible pitfalls in dealing with heavy concurrency are many. Concurrency in transaction execution is not the only performance bottleneck. In creating and submitting a transaction, several round trips with a full node might be required to discover and fetch the right objects and to dry run a transaction. Those round trips might affect performance significantly. Concurrency is a difficult subject and is beyond the scope of this documentation. You must take maximum care when dealing with coin management in the face of concurrency, and the right strategy is often tied to the specific scenario, rather than universally available. * [SDK usage](https://docs.sui.io/concepts/coin-mgt#sdk-usage) * [Gas smashing](https://docs.sui.io/concepts/coin-mgt#gas-smashing) * [Generic coins](https://docs.sui.io/concepts/coin-mgt#generic-coins) * [Concurrency](https://docs.sui.io/concepts/coin-mgt#concurrency) --- # Sui Architecture | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/architecture#__docusaurus_skipToContent_fallback) On this page Sui is a layer 1 blockchain. Layer 1 networks consist of the following primary components: 1. [**Nodes**](https://docs.sui.io/guides/operator) that run the network's binaries and participate in network activity such as consensus. Nodes provide compute and [storage](https://docs.sui.io/concepts/sui-architecture/sui-storage) resources to the network. 2. The [**consensus mechanism**](https://docs.sui.io/concepts/sui-architecture/consensus) used to validate transactions. 3. [**Transactions**](https://docs.sui.io/guides/developer/transactions/txn-overview) themselves, which on Sui reflect on-chain operations such as creating objects or sending assets. 4. [**Tokens**](https://docs.sui.io/concepts/tokenomics) used to pay for resources and transactions on the network. On Sui specifically, other core components include: 1. [**Objects**](https://docs.sui.io/guides/developer/objects/object-model) , the most basic unit of storage on Sui that are addressable on-chain by unique IDs. 2. [**Move**](https://docs.sui.io/concepts/sui-move-concepts) , the programming language used to create smart contracts on Sui. Networks[​](https://docs.sui.io/concepts/architecture#networks "Direct link to Networks") ------------------------------------------------------------------------------------------ Sui operates multiple networks that are comprised of these essential components. Each network serves a different purpose: * **Mainnet:** Production network for live transactions and real-value assets. * **Testnet:** Staging network for testing changes before production deployment. * **Devnet:** For developing and testing new features. * **Localnet:** Local network you can run on your own machine for optimized development. Learn more about the [Sui networks](https://docs.sui.io/concepts/sui-architecture/networks) . ### Nodes[​](https://docs.sui.io/concepts/architecture#nodes "Direct link to Nodes") On Sui, nodes on the network participate directly in the chain's consensus mechanism to validate all on-chain activity. Activity comes in the form of transaction blocks that must be validated before being finalized and permanently committed to the network's history. There are 2 types of nodes on Sui: 1. **Full node:** Responsible for validating blockchain activity such as transactions, checkpoints, and [epoch](https://docs.sui.io/concepts/sui-architecture/epochs) changes. Each full node stores the blockchain's state and history to serve queries. 2. **Validator node:** Responsible for executing more tasks than full nodes, such as staking, gas price references, and tallying rules. Learn more about [nodes on Sui](https://docs.sui.io/guides/operator) . Delegated proof-of-stake consensus[​](https://docs.sui.io/concepts/architecture#delegated-proof-of-stake-consensus "Direct link to delegated-proof-of-stake-consensus") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Sui uses a delegated proof-of-stake (DPoS) consensus mechanism to validate transactions. Validators must stake SUI tokens on the network, either their own or delegated by other token holders, to participate in consensus. This approach aligns validator incentives with network security and efficiency without the high energy costs of proof-of-work systems. To learn more about consensus on Sui, see: * [Sui Consensus](https://docs.sui.io/concepts/sui-architecture/consensus) * [Validator Committee](https://docs.sui.io/concepts/sui-architecture/consensus) Transactions[​](https://docs.sui.io/concepts/architecture#transactions "Direct link to Transactions") ------------------------------------------------------------------------------------------------------ Transactions on Sui consist of several commands that execute on inputs. These inputs define the result of the transaction. All updates to the Sui network happen through transactions. There are only 2 types of transactions on Sui: 1. **Programmable transaction blocks:** Define all user transactions on Sui, as they can be submitted by anyone. They are used for activities such as sending tokens, creating objects, and interacting with smart contracts. 2. **System transactions:** Only submittable by validator nodes. These transactions are for network functions such as changing epochs or starting checkpoints. Learn more about both types of [transactions](https://docs.sui.io/guides/developer/transactions/txn-overview) , or learn more about [programmable transaction blocks](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) . Tokens[​](https://docs.sui.io/concepts/architecture#tokens "Direct link to Tokens") ------------------------------------------------------------------------------------ The native token for Sui is **SUI**. Transactions on Sui often deal with small fractions of the value of 1 SUI. To make it easier to work with transactions, Sui also provides the token **MIST**. 1 billion MIST equals 1 SUI. On the network, everything has a cost. It costs money to provide computational power, process transactions, and store transaction data. This cost is referred to as _gas_. You pay gas fees with a blockchain's native token, in this case, SUI or MIST. To learn more about the tokenomics of Sui, see the following topics: * [Sui Tokenomics](https://docs.sui.io/concepts/tokenomics) * [Gas Fees](https://docs.sui.io/concepts/tokenomics/gas-in-sui) * [Staking and Unstaking](https://docs.sui.io/concepts/tokenomics/staking-unstaking) * [Sui Bridging](https://docs.sui.io/concepts/tokenomics/sui-bridging) Objects[​](https://docs.sui.io/concepts/architecture#objects "Direct link to Objects") --------------------------------------------------------------------------------------- The basic unit of storage in Sui is the object. Blocks on the chain are actually objects that define assets rather than simple key-value stores that define addresses. Sui's storage is centered around objects that are addressable on-chain by unique IDs. A smart contract is an object (called a Sui Move package), and these smart contracts manipulate objects on the Sui network. Every object has an owner field that dictates how you can use it in transactions. Objects can be owned by an address or party, or they can be immutable, shared, or wrapped. Learn more about the [Sui Object Model](https://docs.sui.io/guides/developer/objects/object-model) or [Object Ownership](https://docs.sui.io/guides/developer/objects/object-ownership) . Move[​](https://docs.sui.io/concepts/architecture#move "Direct link to Move") ------------------------------------------------------------------------------ Move is an open source programming language that is used for all activity on Sui, such as creating or trading NFTs, using apps, and all other transaction\-based events. It is used for writing safe packages that can create and manipulate objects on-chain. Move is platform-agnostic to enable common libraries, tooling, and developer communities across blockchains with vastly different data and execution models. To learn more about Move, see [Move Concepts](https://docs.sui.io/concepts/sui-move-concepts) . * [Networks](https://docs.sui.io/concepts/architecture#networks) * [Nodes](https://docs.sui.io/concepts/architecture#nodes) * [Delegated proof-of-stake consensus](https://docs.sui.io/concepts/architecture#delegated-proof-of-stake-consensus) * [Transactions](https://docs.sui.io/concepts/architecture#transactions) * [Tokens](https://docs.sui.io/concepts/architecture#tokens) * [Objects](https://docs.sui.io/concepts/architecture#objects) * [Move](https://docs.sui.io/concepts/architecture#move) --- # Gaming on Sui | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/gaming#__docusaurus_skipToContent_fallback) On this page Gaming on Sui leverages blockchain technology to enhance in-game economies, ownership, and interactions. With features like dynamic NFTs, Kiosk, soulbound assets, and on-chain randomness, Sui provides builders with the tools to create immersive, transparent, and fair gaming experiences. Players benefit from true asset ownership, decentralized marketplaces, and seamless Web3 integration without compromising usability. This topic explores the key features of Sui for gaming, real-world use cases, and essential tools for builders. Whether you're building an RPG, a racing game, or a digital card game, Sui provides the Web3 infrastructure to power your next-generation gaming projects. Player onboarding[​](https://docs.sui.io/concepts/gaming#player-onboarding "Direct link to Player onboarding") --------------------------------------------------------------------------------------------------------------- Sui provides various tools that help streamline player account and profile creation. ### zkLogin[​](https://docs.sui.io/concepts/gaming#zklogin "Direct link to zklogin") Many players use single sign-on (SSO) or social login to create game accounts. \[zkLogin\], a Sui primitive, ([https://www.sui.io/zklogin](https://www.sui.io/zklogin) ) enables blockchain account creation through familiar authentication flows, reducing the complexity of traditional wallet setup processes. ### Sponsored transactions[​](https://docs.sui.io/concepts/gaming#sponsored-transactions "Direct link to sponsored-transactions") Modern players often opt for free-to-play (F2P) games that do not require an upfront cost. Sponsored transactions allow you, or a designated entity, to cover the required gas fees for a player, removing the initial need to purchase SUI tokens. Representing in-game objects on-chain[​](https://docs.sui.io/concepts/gaming#representing-in-game-objects-on-chain "Direct link to Representing in-game objects on-chain") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Blockchain games typically represent in-game assets as on-chain objects. Whether managing currency, items, character attributes, or other game elements, understanding how to create and integrate these objects is fundamental to building blockchain-based game experiences. ### On-chain randomness and verification[​](https://docs.sui.io/concepts/gaming#on-chain-randomness-and-verification "Direct link to On-chain randomness and verification") Sui provides [native randomness](https://docs.sui.io/guides/developer/on-chain-primitives/randomness-onchain) , allowing games to operate without requiring players to trust a centralized operator. Additionally, all transactions on the Sui network are viewable and verifiable. Sui leverages threshold cryptography and Distributed Key Generation (DKG), which generates secret shares of a distributed key at the beginning of each epoch, and continuously uses them to produce randomness. Off-chain computation can also be verified on-chain by using [Nautilus](https://docs.sui.io/concepts/cryptography/nautilus/nautilus-design) . ### In-game currencies[​](https://docs.sui.io/concepts/gaming#in-game-currencies "Direct link to In-game currencies") In-game currencies allow users to purchase game features like items, upgrades, and premium content. In Web2 games, these currencies are exclusively in-game, with values set by the developers. Using Sui, players can now have [true ownership of their in-game currency](https://docs.sui.io/guides/developer/coin/in-game-token) . The currency exists as a [token on the Sui blockchain](https://docs.sui.io/standards/currency) , where players can conceivably buy, sell, or swap that currency for anything else that also lives on-chain. If you create an ecosystem of games, players can purchase currency in one of your games but spend it in another one that also uses that same currency. The possibilities are vast, but you must first learn how to create the currency. ### Closed-Loop Tokens[​](https://docs.sui.io/concepts/gaming#closed-loop-tokens "Direct link to Closed-Loop Tokens") Similar to in-game currencies, [Closed-Loop Tokens](https://docs.sui.io/standards/closed-loop-token) provide a level of engagement and control integrated into the game experience that isn't possible without Web3. For example, you can create tokens associated with your game that [reward loyalty](https://docs.sui.io/guides/developer/coin/loyalty) amongst your user base. You can also produce [regulated tokens](https://docs.sui.io/guides/developer/coin/regulated) that allow the bearer of a specific capability to control the addresses that have access to the token, facilitating gated access to special events, leagues, or other game features. Game features[​](https://docs.sui.io/concepts/gaming#game-features "Direct link to Game features") --------------------------------------------------------------------------------------------------- [Non-fungible tokens (NFTs)](https://docs.sui.io/guides/developer/nft) are able to represent many traditional game features such as in-game objects, battle passes, rewards, skins, game cards or keys, and loot boxes. You can think of these NFTs as game assets that are generally categorized as either [dynamic assets](https://docs.sui.io/concepts/gaming#dynamic-assets) or [soulbound assets](https://docs.sui.io/concepts/gaming#soulbound-assets) . ### Dynamic assets[​](https://docs.sui.io/concepts/gaming#dynamic-assets "Direct link to Dynamic assets") You can view an object on Sui as a key-value pair data structure. In Move, the smart contract language of Sui, objects are defined as a `struct`. As an example, consider the game board of a tic-tac-toe game: [examples/tic-tac-toe/move/sources/owned.move](https://github.com/MystenLabs/sui/blob/main/examples/tic-tac-toe/move/sources/owned.move) public struct Game has key, store { id: UID, board: vector, turn: u8, x: address, o: address, admin: vector,} The first key-value pair for any object is `id: address`, which is a unique value of type `UID`. Every object has a different address, which is why every object is an NFT because this mandatory key-value pair sets each object apart and makes it unique. #### Creating assets[​](https://docs.sui.io/concepts/gaming#creating-assets "Direct link to Creating assets") Smart contracts contain the functions that create objects. Using the previous example, the function (`new`) that creates the object represented (a digital tic-tac-toe gameboard) provides the values for each attribute. The Sui framework creates the UID that uniquely identifies this particular game. [examples/tic-tac-toe/move/sources/owned.move](https://github.com/MystenLabs/sui/blob/main/examples/tic-tac-toe/move/sources/owned.move) public fun new(x: address, o: address, admin: vector, ctx: &mut TxContext): Game { let game = Game { id: object::new(ctx), board: vector[MARK__, MARK__, MARK__, MARK__, MARK__, MARK__, MARK__, MARK__, MARK__], turn: 0, x, o, admin, }; let turn = TurnCap { id: object::new(ctx), game: object::id(&game), }; transfer::transfer(turn, x); game} This is an on-chain action, or transaction. In this case, the transaction is a request to the chain to create an object. You provide the necessary data to the function and pay the gas fee for the computation effort of the network validators. The result is the creation of a new NFT that exists on the Sui blockchain at the address (`id`). #### Updating assets[​](https://docs.sui.io/concepts/gaming#updating-assets "Direct link to Updating assets") On Sui, you can update an NFT asset using a separate transaction, provided the smart contract that defines the NFT allows it. Similar to creation, you provide data to the relevant update function and [pay the gas fee](https://docs.sui.io/concepts/tokenomics/gas-in-sui) , and the smart contract updates the object at the correct address with the new information. Using the tic-tac-toe example, you might instruct the smart contract to update the gameboard object to place an `x` on an available square. Because the computation effort required for most updates is less than the effort to create the original object, the resulting gas fees are typically less, as well. #### Composing assets[​](https://docs.sui.io/concepts/gaming#composing-assets "Direct link to Composing assets") On Sui, you can include one object inside of another (dynamic fields). For example, an object named `Parent` might contain objects of type `Child`. The smart contract can provide the necessary functions to add and remove the child objects from their parents. [examples/move/dynamic\_fields/sources/example.move](https://github.com/MystenLabs/sui/blob/main/examples/move/dynamic_fields/sources/example.move) public struct Parent has key { id: UID,} [examples/move/dynamic\_fields/sources/example.move](https://github.com/MystenLabs/sui/blob/main/examples/move/dynamic_fields/sources/example.move) public struct Child has key, store { id: UID, count: u64,} The function to add child objects to a parent might resemble the following. In this case, `ofield` is an alias for the `sui::dynamic_object_field` package. [examples/move/dynamic\_fields/sources/example.move](https://github.com/MystenLabs/sui/blob/main/examples/move/dynamic_fields/sources/example.move) public fun add_child(parent: &mut Parent, child: Child) { ofield::add(&mut parent.id, b"child", child);} You can apply dynamic fields to many use cases. An object named `TicketBooth`, for example, could contain objects of type `ConcertTicket`. An object of type `Car` might have a field named `is_functioning` that is `false` until all necessary objects (`Engine`, `Tires`, `Body`, `Wheel`) are present, at which point it can automatically update its `is_functioning` field to `true`. Composability is a really important feature of Sui. While it provides many options when developing an idea on Sui, it also allows building on top of existing projects, using third-party assets in your project. This can range from "_Only users who own a particular NFT are eligible for a discount_" to full collaboration between two distinct projects and everything in between on the smart contract level. #### Transfer to object[​](https://docs.sui.io/concepts/gaming#transfer-to-object "Direct link to transfer-to-object") Sui enables more use cases with the [transfer to object feature](https://docs.sui.io/guides/developer/objects/transfers/transfer-to-object) , which allows an owned object to be sent to another object (shared or owned). In this case, the sent object appears as owned by the parent object. In the above examples, the objects are wrapped inside other objects and this can be seen in the parent object's metadata when inspecting the parent object. When an object is sent to another object, the metadata of the parent object remain the same, but its `id` has a new object. This feature can enable use cases such as on-chain wallets where a `Wallet` object is used to deposit other objects. Combining this with transfer to object can lead to complex and exciting use cases. #### Deleting assets[​](https://docs.sui.io/concepts/gaming#deleting-assets "Direct link to Deleting assets") On Sui, you can delete an object if the smart contract allows the operation. If the correct smart contract function is present, then you can delete the object in a single transaction. This results in a gas\-fee rebate, which happens whenever bytes are freed on-chain. The transaction's gas payer [receives a rebate](https://docs.sui.io/concepts/tokenomics#storage-fund/) to account for the future storage of the object no longer being necessary but having already been paid for. ### Soulbound assets[​](https://docs.sui.io/concepts/gaming#soulbound-assets "Direct link to soulbound-assets") A soulbound asset is an NFT that belongs to an address and cannot be transferred or deleted. On Sui, assets are usually freely transferable between addresses, but this is undesirable behavior in some cases. Assets such as game season passes, loyalty accrual assets, avatars, identification assets for a product, and assets that grant certain privileges at the smart contract level are well-suited to be bound to an address without the option of transfer or deletion. On Sui, it is straightforward to implement such an asset, and the infrastructure guarantees that the desired behavior always holds. You define an NFT asset as soulbound at the contract level. After designated as soulbound, it cannot be converted to a normal transferable asset. Changing it would require creating a new asset with the same name and a migration strategy, such as deleting the soulbound asset and creating a normal one to take its place. Soulbound assets are created by omitting the `store` ability. Without this ability, you cannot store soulbound assets inside other objects. Keep this behavior in mind when deciding the asset type. This means that Soulbound assets are not fully composable; they can store other assets but cannot be stored inside other assets. The same pattern can be used to implement NFT assets that are transferable or burnable only under certain circumstances. You can define these circumstances at the smart contract level by making the asset soulbound and defining custom transfer and burn functions. ### Sui Object Display[​](https://docs.sui.io/concepts/gaming#sui-object-display "Direct link to sui-object-display") The [Sui Object Display](https://docs.sui.io/standards/display) standard is a tool that helps define how objects appear in apps and interfaces. It works like a template where you can insert data from an object to control how it's displayed. Use it to manage how different types of data are shown, even if the data itself is stored on-chain while the display happens off-chain (in apps or websites). The Sui Object Display standard provides several key benefits and components: * Controlled representation: Manages how assets are displayed online without directly interacting with the underlying asset. You can make updates to the display independent of the assets and affect how all assets of type `` are displayed. * Flexibility: No limits on the fields you can customize. * Enhancing asset information: Similar to enhancing ERC721 or ERC1155 NFTs with extra details, the Sui Object Display allows you to add specific details to your digital items, such as names, descriptions, images, and more. * Stored data and off-chain representation: Manages stored data based on metadata standards and controls how it's represented off-chain. * Dynamic display: Ensures a uniform presentation of shared attributes across all NFTs of type ``, maintaining a consistent representation of common fields (such as image URLs derived from unique IDs) and a cohesive display format across the asset collection. There are a few limitations to be aware of. First, the current structure of Sui Object Display is per type, limiting its scope. Secondly, its structure does not allow for nested attributes or enums. #### Implementation overview[​](https://docs.sui.io/concepts/gaming#implementation-overview "Direct link to Implementation overview") At a high level, you implement this feature using the following steps: 1. Use a `Publisher` object you own to set `sui::display` for a specific type. 2. Sui Move's `Display` defines how different types look. For example, `Display<0x2::capy::Capy>` shapes the appearance of a type. 3. Sui Full nodes use Display definitions to organize data when requested with `{ showDisplay: true }` in queries. A display is a map of keys and values, both strings. Values allow for string interpolation, meaning the value changes dynamically depending on the NFT being viewed. A basic example is to create a `Display` for `Asset` objects: public struct Asset has key, store { id: "0x3301", expiration: 123456789}public struct Display has store { "random_field": "The ID is {id} and it expires at {expiration}"} The above `Display` as is defined, for the example `Asset` will become: Display{ "random_field": "The ID is 0x3301 and it expires at 123456789"} For another Asset, the `id` and `expiration` values change according to the new `Asset`'s values. An app can use the `Display` object, where any custom keys can be understood. By default, most third-party apps like explorers or wallets recognize the attributes described below. * `name`: A name for the object, displayed when viewing the object. * `description`: A description for the object, displayed when viewing the object. * `link`: A link to the object for use in an application. * `image_url`: A URL or a blob with the image for the object. * `thumbnail_url`: A URL to a smaller image for use in wallets, explorers, and other products as a preview. * `project_url`: A link to a website associated with the object or creator. * `creator`: A string indicating the object creator. Game economies[​](https://docs.sui.io/concepts/gaming#game-economies "Direct link to Game economies") ------------------------------------------------------------------------------------------------------ Designing and managing tokens and coins on the Sui blockchain is crucial to creating a viable game economy. ### GameFi[​](https://docs.sui.io/concepts/gaming#gamefi "Direct link to GameFi") GameFi (Gaming Finance) combines gaming with blockchain-based financial incentives. It provides players with economic benefits through token rewards for in-game achievements. The recent rise of GameFi has led to significant growth in token launches to support gaming ecosystems. The terms that follow are frequently used when discussing GameFi, so it's important to make sure your definition of the terms match the documentation. * Token generation event (TGE): The first creation and distribution of tokens. * Initial coin offering (ICO): An early fundraising model using token sales. * Vesting: The gradual release of tokens over time. * Staking: Locking tokens to participate in network operations and earn rewards. * Cliff: An initial waiting period before token vesting begins. * Annual percentage yield (APY): The effective return on a staked asset over a year. * Decentralized autonomous organization (DAO): A governance model where decisions are made using smart contracts and tokens. * Governance token: A token granting voting power in decentralized networks. ### Token economics (Tokenomics)[​](https://docs.sui.io/concepts/gaming#token-economics-tokenomics "Direct link to Token economics (Tokenomics)") Tokenomics refers to the model and design of the rules that govern tokens for a Web3 ecosystem. In the case of GameFi, it defines how a token is created, distributed, utilized, and maintained within your gaming platform. Some of the features that comprise a token's economics include supply details, distribution mechanisms, staking and vesting. There are several types of token supply that are considered when discussing tokenomics for an on-chain ecosystem. | Supply type | Description | | --- | --- | | Total supply | Maximum number of tokens that will ever exist. | | Circulating supply | Tokens currently in use and available for trading. | | Adjusted supply | Tokens adjusted after burning or minting events. | | Fixed supply | A predetermined number of tokens with no future changes. | There is more than one type of distribution mechanics, but they are not necessarily all used. | Distribution mechanisms | Description | | --- | --- | | Initial distribution | Through ICO, TGE, airdrops, or private sales. | | Ongoing distribution | Through staking, liquidity mining, or incentive programs. | Ongoing distribution refers to [staking and vesting of GameFi tokens](https://docs.sui.io/guides/developer/coin/vesting-strategies) . Not all game economies include staking or vesting models. When deciding whether yours should, consider the benefits: * Encourages long-term participation. * Reduces circulating supply, potentially stabilizing token prices. * Rewards active participants in the ecosystem. * Rewards team members over the course of their involvement. When deciding how best to launch your tokens, it's important to consider some key points: * Should you go with a fixed or adjusted supply of coins? A fixed supply means all tokens mint at the TGE. Adjusted supply requires careful control over minting and burning functions. * Does your token need to be regulated? A [regulated coin](https://docs.sui.io/guides/developer/coin/regulated) provides greater control over who has access to your token but comes at the cost of additional maintenance of a deny list. * Consider your metadata requirements, as well. * Decimal places: Predefine precision of the token. * Metadata management: Determine if metadata should be immutable. * Burning mechanisms: Define rules for token burning. ### Kiosk[​](https://docs.sui.io/concepts/gaming#kiosk "Direct link to Kiosk") On Sui, owned objects are either freely transferable or non-transferable. To ensure royalties, Sui provides a standard called [Kiosk](https://docs.sui.io/standards/kiosk) . A kiosk is a shared object that restricts access to a single address or user. The kiosk owner (although a shared object has no owner from the perspective of Sui, the smart contract ensures that only one address is permitted to access it) can: * Place assets from your address inside the kiosk. * Take assets from the kiosk back to your address. * Lock assets from your address or already placed inside the kiosk, making the "take" operation impossible. * Destroy a kiosk that has no assets inside. * List an asset for sale with a price denoted in SUI. * List an asset for sale only to a specific address, with the price denoted in SUI. Any other address can: * Buy an item that has undergone the "list" operation. * Buy an item meant for a specific address if the asset was "listed" in such a way. The adoption of kiosks implies that marketplaces become aggregators of "listed" items inside different kiosks. An asset that has undergone the "lock" operation cannot undergo the "take" operation anymore; it can only undergo the "list" operation. ### Transfer policy[​](https://docs.sui.io/concepts/gaming#transfer-policy "Direct link to transfer-policy") The "buy" operation requires the use of another object called transfer policy. This is usually a shared object and contains rules that govern the "buy" operation, the most common rule being "Royalties." A "buy" operation cannot be completed for an asset without a defined transfer policy. An empty transfer policy, one that does not have rules, means that the asset is freely tradable. Because Kiosk only allows the "list" and "buy" pair of operations, a transfer is possible by setting the price to 0 SUI. Rules can be anything programmable with Move. To use marketplaces, an asset creator should use rules defined in [https://github.com/MystenLabs/apps/tree/main/kiosk/sources/rules](https://github.com/MystenLabs/apps/tree/main/kiosk/sources/rules) Common rules include: * **Royalty rule:** A percentage of the price that goes to the asset creator (practically it goes inside the transfer policy and the creator can transfer it at any point in time). * **Floor price rule:** A minimum price that an asset can be "listed" for. * **Lock rule:** Enforce the asset to be locked inside a kiosk after a "buy" operation. The combination of the lock rule and the royalty rule enforces royalties to be paid to the creator. The lock rule ensures an asset cannot be "taken" out of a kiosk (to be freely traded), while the royalty rule ensures that any asset traded through Kiosk has royalties deducted from the transaction. Adding the lock rule is recommended when royalties are a strict requirement. As long as marketplaces support only Kiosk on Sui, even without the lock rule, users might not have other options. It is safe to assume that peer-to-peer trading is unsafe, and most users avoid it because there is no way to ensure the transaction takes place smoothly. In peer-to-peer transactions, someone has to initiate either the asset transfer or the payment transfer, and there are no guarantees that the follow-up takes place. The most important thing is during the initial airdrop or minting of the asset to ensure the asset is put inside a kiosk and not sent to an address directly. Tools[​](https://docs.sui.io/concepts/gaming#tools "Direct link to Tools") --------------------------------------------------------------------------- There are a number of tools available in the Sui ecosystem to help you realize your Sui game vision. * Playtron GameOS * E4C: Ludus * Sui Coins * Beamable * Forge.gg * Snag Solutions * Venly [Playtron GameOS](https://www.playtron.one/playtron-os) is a Linux-based operating system that seeks to turn PCs, handhelds, and desktops into dedicated gaming consoles. It supports multiple game stores like Steam and Epic Games, offering a seamless gaming experience across devices such as Steam Deck, ROG Ally, and Lenovo Legion Go. [E4C: Ludus](https://ludus.ambrus.studio/) is a cross-platform gaming layer designed to unify Web2 and Web3 gaming experiences on a single platform. Leveraging the Sui blockchain, it offers developers access to dynamic NFTs and zkLogin, facilitating integration of blockchain features into games across various platforms. The native E4C token is its primary currency, enabling in-game purchases and transactions. E4C: Ludus also provides a unified frontend for players to access a range of games, with the aim to enhance player engagement and simplify the gaming experience. [Sui Coins](https://www.suicoins.com/) is the utility layer for tokens and NFTs on the Sui network, offering asset management tools that include token swaps, automated dollar-cost averaging, airdrops, an incinerator for deleting assets, zkSend for private transfers, and a merger tool to consolidate small balances. Sui Coins also features an open source [SuiCoins Terminal](https://terminal.suicoins.com/) for integrating crypto swaps across platforms. [Beamable](https://beamable.com/) is a development platform that helps you integrate live services and backend features into your games. It offers SDKs for both Unity and Unreal Engine, facilitating development and deployment of online game functionalities. You can incorporate features such as player authentication, inventory management, and microservices within the environments of your chosen game engines. Beamable provides support for the Sui blockchain, allowing for the integration of Web3 elements like NFTs and on-chain assets into games. The Beamable SDKs offer tools and sample projects to help you build on the Sui network. [Forge](https://forge.gg/) is a platform that enables game developers to create custom loyalty programs, rewarding players for engaging in community activities and in-game challenges. Players earn loyalty points by completing actions you define, which can be redeemed for in-game items and digital content. Forge also offers analytics tools to help developers understand their audience and improve monetization strategies. [Snag Solutions](https://www.snagsolutions.io/) provides white-label loyalty and marketplace platforms to enhance community engagement and control your digital ecosystems. Their solutions enable you to track and reward user contributions, create customizable marketplaces, and integrate social features like peer-to-peer trading and user profiles. Snag Solutions offers customization options, APIs, and SDKs to align with your brand's identity. [Venly](https://www.venly.io/) is a developer platform that aids blockchain integration for businesses through secure digital wallets, tokenization services, and payment solutions. It offers APIs and SDKs for management of digital assets. Venly enables you to create, trade, and manage NFTs, tokens, and payments securely while maintaining full ownership of your assets. Example integrations[​](https://docs.sui.io/concepts/gaming#example-integrations "Direct link to Example integrations") ------------------------------------------------------------------------------------------------------------------------ There aren't real-world implementations for the integrations described in this section. These examples are meant to be a thought exercise to showcase the possibilities for viable game integration on the Sui network. * ShadowQuest * Sui for Speed * ArcaneBattles ShadowQuest is a multiplayer game that combines fantasy with RPG battle mechanics. To enhance the gaming experience with Web3 technologies, ShadowQuest is integrating with Sui offering seamless blockchain interactions to players without compromising the overall gaming experience. **Seamless player onboarding and wallet integration** ShadowQuest wants to onboard players without adding complexity, especially those unfamiliar with Web3. By using zkLogin, players can sign in using social platforms like Google, Facebook, Twitch, and Apple. This automatically creates a Sui wallet linked to their ShadowQuest account, making blockchain interactions seamless. **Simplified transaction handling** Players in ShadowQuest earn or use in-game assets such as NFTs or $SHADOW tokens. To attract players unfamiliar with Web3, ShadowQuest manages game transactions to avoid Web3 friction, like wallets popping up for signing transactions. By sponsoring player transactions, the friction is minimized because ShadowQuest players do not directly pay for transaction costs and gas fees. Enoki transactions can be signed without requiring confirmation from the player to approve the transaction. ShadowQuest uses Enoki Gas Pool to sponsor transactions, covering gas fees for players. This ensures all in-game transactions are seamless and cost-free for players, providing a better user experience. **NFT marketplace and royalty enforcement** ShadowQuest allows players to buy, sell, or trade in-game items, such as weapons, armor, and cosmetics. The items should respect royalties to ensure that creators benefit from each transaction. Kiosk provides a decentralized marketplace solution, ensuring royalties are enforced on all NFT trades. This helps both the game developers and creators maintain control over secondary sales, ensuring revenue generation throughout the asset's lifecycle. **NFT usage for game access** ShadowQuest uses NFTs as entry tickets for different game modes and events. Players can acquire or earn various Runes, which grant access to specific game challenges or seasonal competitions. These NFTs cannot be traded or transferred to other players. Soulbound NFTs represent different Runes that are either earned through gameplay or purchased. These NFTs grant exclusive access to matches and seasonal challenges but cannot be traded after bound to a player. Sui for Speed is a racing game set in the Sui ecosystem. Players pilot customizable vehicles through fantastical terrains, competing in races, time trials, and exploration challenges. By integrating with the Sui network's blockchain technology—including features such as Walrus, dynamic NFTs, SuiNS, and asset tokenization—the game offers players true ownership of their vehicles and in-game assets, along with a vibrant, player-driven economy. **Customizable vehicles with dynamic NFTs** In Sui for Speed, players own racing vehicles represented by dynamic NFTs that you can upgrade and customize with new parts, skins, and abilities. As players progress and win races, their vehicles evolve, reflecting their achievements and style. Dynamic NFTs on the Sui network allow vehicles to securely update attributes and metadata over time. Every upgrade and customization is recorded on-chain, ensuring each vehicle's uniqueness and authenticity. **SuiNS: Personalized racer profiles and teams** Players can register unique names for their racer profiles and teams using SuiNS, like [speedster@suiforspeed.sui](mailto:speedster@suiforspeed.sui) or [dragonracer@suiforspeed.sui](mailto:dragonracer@suiforspeed.sui) . This simplifies social interactions, team coordination, and improves the community aspect of the game. SuiNS provides a decentralized domain naming system, allowing memorable and personalized names on the blockchain. **Tokenized circuits and earnings from circuit usage** Race circuits are tokenized as unique NFTs allowing players to own, design, and vote to enable track customization and drive better changes. When other players race on these circuits, the owners earn $RALLY tokens as usage fees or royalties. This system incentivizes creativity and allows players to monetize their track designs. Asset tokenization on the Sui network enables minting of circuits as unique assets with secure ownership. Smart contracts automatically distribute earnings to circuit owners when their tracks are used, enhancing the game's economy through player-driven content. **Decentralized storage for game data** The game world includes extensive data such as track designs and leaderboards. Leveraging decentralized and efficient storage, combined with asset tokenization, enables true decentralization of these terrains and models. Walrus offers scalable off-chain storage for large amounts of game data. This ensures high availability and security, protecting against data loss and enhancing player trust. **Competitive events and betting mechanisms** The game hosts regular competitive events and tournaments where players can participate individually or as teams. Additionally, players can place bets on race outcomes using $RALLY tokens, adding an extra layer of excitement and engagement. On-chain logic enables secure and transparent management of events and betting systems. The Sui network ensures fairness, with immutable records of bets and outcomes. ArcaneBattles is a strategic, multiplayer card game inspired by classics like Hearthstone. Players collect, trade, and battle with a variety of magical cards representing spells, creatures, and heroes. By integrating with the Sui blockchain, ArcaneBattles aims to enrich the gameplay experience through decentralized features that promote true ownership, fairness, and a dynamic in-game economy. **Dynamic in-game economy with two Closed-Loop Tokens** ArcaneBattles implemented two stable in-game currencies to facilitate various transactions, enhancing player engagement and economic depth. **Closed-Loop Token (CLT)** ArcaneBattles utilizes two Closed-Loop Tokens within its ecosystem: 1. Arcane Gems: The primary in-game currency used to purchase card packs and enter tournaments. Players earn Arcane Gems through gameplay achievements, daily quests, and participating in events. This token ensures that all players have access to essential game features without exposure to external market volatility. 2. Mystic Dust: A secondary token obtained by discarding unwanted cards. Mystic Dust is used to craft new cards and upgrade existing ones to gold versions, which have enhanced visuals and possibly minor gameplay benefits. This mirrors the crafting system in games like Hearthstone, allowing players to strategically manage their collections and customize their decks. The dual-token system adds depth to the in-game economy, encouraging players to engage in various activities and make strategic decisions about resource allocation. **True ownership and NFT card rental** ArcaneBattles allows players to own their cards as NFTs and provide a rental marketplace for rare or powerful cards. Each card in ArcaneBattles is represented as an NFT on the Sui blockchain, granting players true ownership of their digital assets. The NFT Rental feature allows players to rent out their rare or high-level cards to others for a fee. This creates a community-driven economy where new or casual players can access powerful cards temporarily, while owners earn passive income from their collections. **Fair and unpredictable gameplay** ArcaneBattles ensures randomness in card draws and in-game events to prevent manipulation and enhance fairness. By leveraging Sui's on-chain randomness, ArcaneBattles introduces unpredictable elements such as random card draws, critical hit chances, and random effects from certain cards. This randomness is verifiable and secure, preventing manipulation by any party and maintaining fairness across all gameplay aspects. **Enhanced card visualization and dynamic wear mechanism** ArcaneBattles provides rich, dynamic displays of card information and introduces a wear-and-tear mechanic to simulate card degradation over time. ArcaneBattles uses Sui's Display Standard to offer detailed metadata for each card NFT, including stats, abilities, and artwork. Beyond static information, the game introduces a dynamic display mechanism where cards visually show signs of wear as they are used in battles. Over time, frequently used cards might appear scratched, faded, or have other visual cues indicating wear. After extensive use, cards have a chance to be destroyed entirely. This wear-and-tear mechanic simulates the experience of physical card games, where rare cards are often kept in pristine condition and used sparingly. It encourages players to strategically decide when to use their valuable cards and adds a layer of depth to the game's economy and strategy. Players can mitigate or repair wear on their cards by using **Mystic Dust** to restore them or upgrade them to gold versions, which are more durable and feature enhanced visuals. This system adds a strategic resource management element, as players must balance the benefits of using powerful cards against the potential cost of their degradation. By integrating these Sui blockchain features, ArcaneBattles not only enhances the gaming experience but also pioneers the next generation of digital card games. The dual-token economy adds complexity and depth to in-game transactions, encouraging strategic decision-making. The wear-and-tear mechanic introduces a novel layer of strategy and realism, as players must consider the longevity of their cards. Together, these features create a rich, engaging, and immersive experience that leverages the full potential of blockchain technology within a gaming context. Related links[​](https://docs.sui.io/concepts/gaming#related-links "Direct link to Related links") --------------------------------------------------------------------------------------------------- • [Currency Standard](https://docs.sui.io/standards/currency) The Sui Currency Standard enables you to create a broad range of fungible tokens on the Sui network using either the legacy coin creation or the centralized coin registry system. • [Create Currencies and Tokens](https://docs.sui.io/guides/developer/currency) Learn how to create currencies and mint coins and tokens on the Sui network using the Coin Registry system. • [Create a Non-Fungible Token](https://docs.sui.io/guides/developer/nft) On Sui, everything is an object. Moreover, everything is a non-fungible token (NFT) as its objects are unique, non-fungible, and owned. • [Asset Tokenization](https://docs.sui.io/guides/developer/nft/asset-tokenization) Learn how to tokenize assets on the Sui blockchain. Asset tokenization refers to the process of representing real-world assets, such as real estate, art, commodities, stocks, or other valuable assets, as digital tokens on the blockchain network. • [NFT Rental Example](https://docs.sui.io/guides/developer/nft/nft-rental) An example using the Kiosk Apps standard that provides the ability for users to rent NFTs according to the rules of a provided policy instead of outright owning them. This approach closely aligns with the ERC-4907 renting standard, making it a suitable choice for Solidity-based use cases intended for implementation on Sui. • [Sui Kiosk](https://docs.sui.io/standards/kiosk) Kiosk is a decentralized system for commerce applications on Sui. Kiosk is a part of the Sui framework, native to the system, and available to everyone. • [Kiosk Apps](https://docs.sui.io/standards/kiosk-apps) Kiosk apps are a way to extend the functionality of Sui Kiosk while keeping the core functionality intact. You can develop apps to add new features to a kiosk without having to modify the core code or move the assets elsewhere. • [zkLogin](https://docs.sui.io/concepts/cryptography/zklogin) zkLogin is a Sui primitive that enables you to send transactions from a Sui address using an OAuth credential without publicly linking the two. • [Sui Foundation blog](https://blog.sui.io/tag/gaming/) Blog posts from the Sui Foundation with the `gaming` tag. • [Coin Flip](https://docs.sui.io/guides/developer/app-examples/coin-flip) Learn Sui through a coin flip app that covers the full end-to-end flow of building a Sui Move module and connecting it to a React Sui app. • [Blackjack](https://docs.sui.io/guides/developer/app-examples/blackjack) Learn Sui using an example implementation of the popular casino game Blackjack. • [Plinko](https://docs.sui.io/guides/developer/app-examples/plinko) Learn Sui through an example implementation of the popular casino game, Plinko. • [Mysticon Legends](https://github.com/MystenLabs/mysticon-legends) GitHub repo for a blockchain-based game where players collect, train, and battle with mythical creatures called Mysticons. • [Web3 Mini Games built on Sui](https://mini-games.sui.io/) A collection of mini games, to inspire the community of Sui. * [Player onboarding](https://docs.sui.io/concepts/gaming#player-onboarding) * [zkLogin](https://docs.sui.io/concepts/gaming#zklogin) * [Sponsored transactions](https://docs.sui.io/concepts/gaming#sponsored-transactions) * [Representing in-game objects on-chain](https://docs.sui.io/concepts/gaming#representing-in-game-objects-on-chain) * [On-chain randomness and verification](https://docs.sui.io/concepts/gaming#on-chain-randomness-and-verification) * [In-game currencies](https://docs.sui.io/concepts/gaming#in-game-currencies) * [Closed-Loop Tokens](https://docs.sui.io/concepts/gaming#closed-loop-tokens) * [Game features](https://docs.sui.io/concepts/gaming#game-features) * [Dynamic assets](https://docs.sui.io/concepts/gaming#dynamic-assets) * [Soulbound assets](https://docs.sui.io/concepts/gaming#soulbound-assets) * [Sui Object Display](https://docs.sui.io/concepts/gaming#sui-object-display) * [Game economies](https://docs.sui.io/concepts/gaming#game-economies) * [GameFi](https://docs.sui.io/concepts/gaming#gamefi) * [Token economics (Tokenomics)](https://docs.sui.io/concepts/gaming#token-economics-tokenomics) * [Kiosk](https://docs.sui.io/concepts/gaming#kiosk) * [Transfer policy](https://docs.sui.io/concepts/gaming#transfer-policy) * [Tools](https://docs.sui.io/concepts/gaming#tools) * [Example integrations](https://docs.sui.io/concepts/gaming#example-integrations) * [Related links](https://docs.sui.io/concepts/gaming#related-links) --- # Accessing Data | Sui Documentation [Skip to main content](https://docs.sui.io/concepts/data-access/data-serving#__docusaurus_skipToContent_fallback) On this page Access Sui network data, like [transactions](https://docs.sui.io/guides/developer/transactions/txn-overview) , [checkpoints](https://docs.sui.io/concepts/cryptography/system/checkpoint-verification) , [objects](https://docs.sui.io/guides/developer/objects/object-model) , and [events](https://docs.sui.io/guides/developer/accessing-data/using-events) , through different interfaces to build applications, analyze network behavior, or audit network activity. This document outlines the interfaces that are currently available to access the Sui network data, along with an overview of how that is gradually evolving. Refer to the following definitions for release stages mentioned in this document: * **Alpha**: Experimental release that is subject to change and is not recommended for production use. You can use it for exploration in non-production environments. * **Beta**: Near-stable that remains subject to change based on user feedback. You can use it for testing and production readiness in non-production environments. Production use is not recommended. Do so at your own risk. Use in production only after verifying the desired functional, performance, and other relevant characteristics in a non-production environment and ensuring your application can accommodate regular updates for any changes. * **Generally available (GA)**: Fully stable release that you can use in production. Notifications for any breaking changes are made in advance. Latest data access interfaces[​](https://docs.sui.io/concepts/data-access/data-serving#latest-data-access-interfaces "Direct link to Latest data access interfaces") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![Future state data serving stack](https://docs.sui.io/assets/images/dataservingstack-029ae3a34dcb380f1aed51d240a60cae.png) Primary interfaces to access Sui data include: * [gRPC API](https://docs.sui.io/concepts/data-access/data-serving#grpc-api) replaces JSON-RPC on full nodes. If you already use JSON-RPC or are starting to utilize it as a dependency for your use case, JSON-RPC is **deprecated** and you need to migrate to gRPC or GraphQL RPC. * [General-purpose Indexer](https://docs.sui.io/concepts/data-access/data-serving#general-purpose-indexer) is a performant and scalable implementation of the [custom indexing framework](https://docs.sui.io/guides/developer/accessing-data/custom-indexing-framework) . It is currently available in beta. Use it to load network data at scale into a Postgres relational database. * [GraphQL RPC](https://docs.sui.io/concepts/data-access/data-serving#graphql-rpc) includes a lightweight GraphQL RPC service that you can use to read data from the General-purpose Indexer's relational database. It is currently available in beta. You can use it as an alternative to gRPC, including for migration from JSON-RPC for an existing application. Refer to the [high-level timeline for GraphQL and General-purpose Indexer availability](https://docs.sui.io/concepts/data-access/data-serving#graphql-rpc) . * [Archival Store and Service](https://docs.sui.io/concepts/data-access/data-serving#archival-store-and-service) provides long-term storage and access to historical network data that might no longer be available on full nodes because of pruning. If using gRPC as your primary data access mechanism, you can query it using the gRPC `LedgerService` APIs by changing the endpoint from a full node to the Archival Service. If using GraphQL RPC, it is abstracted and you do not need to directly interact with it. info View the video below for a comparison of the latest and legacy Sui data stacks. ### gRPC API[​](https://docs.sui.io/concepts/data-access/data-serving#grpc-api "Direct link to gRPC API") [gRPC API](https://docs.sui.io/concepts/data-access/grpc) replaces the JSON-RPC on full nodes. JSON-RPC is **deprecated** and gRPC API is generally available. Apart from the message and request format changes between the two, the gRPC API comes with a couple of key functional differences: * Use streaming or subscription API endpoints to consume real-time streaming data in your application without having to poll for those records. This support replaces the deprecated WebSocket support in JSON-RPC. * There is no implicit fallback on the [Sui Foundation-managed archival store for historical data](https://docs.sui.io/concepts/data-access/data-serving#archival-store-and-service) . Full node operators, RPC providers, and data indexer operators are encouraged to run their own instance of a similar archival store that can be an explicit dependency to fetch historical data. **High-level timeline** The target times indicated below are tentative and subject to updates based on project progress and your feedback. | Tentative time | Milestone | Description | | --- | --- | --- | | ✔️ April 2025 | Beta release of initial set of polling-based APIs. | You can start validating the initial gRPC integration from your application and share feedback on the improvements you want to see. | | ✔️ July 2025 | Beta release of streaming APIs and the remaining set of polling-based APIs. | If your use case requires streaming low-latency data, this is an apt time to start validating that integration. Also, the functionality of the API coverage is complete at this point, so you can start migrating your application in non-production environments. | | ✔️ September-October 2025 | GA release of polling-based and streaming APIs. | Begin migration and cutover of your application in the production environment. **JSON-RPC is deprecated at this point and migration notice period starts.** | | July 2026 | End of migration timeline. | **JSON-RPC is fully deactivated at this point.** | warning The gRPC and GraphQL RPC APIs have replaced JSON-RPC. View the video below to learn more about the migration timeline and which API to use. ### General-purpose Indexer[​](https://docs.sui.io/concepts/data-access/data-serving#general-purpose-indexer "Direct link to General-purpose Indexer") The [General-purpose Indexer](https://docs.sui.io/concepts/data-access/graphql-indexer) includes a performant and scalable implementation of the [custom indexing framework](https://docs.sui.io/guides/developer/accessing-data/custom-indexing-framework) . The underlying framework uses the remote checkpoint store and full node RPCs to ingest data. General-purpose Indexer is declarative in the sense that you can seamlessly configure it to load different kinds of Sui network data into Postgres relational tables in parallel. This improves the performance of the data ingestion into the Postgres-compatible database. In addition, you can configure pruning for different tables in the Postgres-compatible database, allowing you to tune it for the desired combination of performance and cost characteristics. info General-purpose Indexer is in beta, which is a near-stable release that is subject to change based on user feedback. You can use it for testing and production readiness in non-production environments. ### GraphQL RPC[​](https://docs.sui.io/concepts/data-access/data-serving#graphql-rpc "Direct link to GraphQL RPC") The [GraphQL RPC Service](https://docs.sui.io/concepts/data-access/graphql-indexer) is a performant GraphQL RPC layer that reads data from the General-purpose Indexer's Postgres-compatible database, [Archival Store and Service](https://docs.sui.io/concepts/data-access/data-serving#archival-store-and-service) , and a full node. GraphQL RPC is an alternative to gRPC API. If you are already using the **deprecated** JSON-RPC in your application today, you have an option to migrate to GraphQL RPC by either self-operating the combined stack of General-purpose Indexer, Postgres-compatible database, and GraphQL RPC server, or by utilizing it as a service from an RPC provider or indexer operator. GraphQL RPC Service is a lightweight server component that allows you to combine data from multiple tables in the Postgres-compatible database using GraphQL's expressive querying system, which is appealing to frontend developers. info GraphQL RPC Server is in beta, which is a near-stable release that is subject to change based on user feedback. You can use it for testing and production readiness in non-production environments. **High-level timeline** The target times indicated are tentative and subject to updates based on project progress and your feedback. | Tentative time | Milestone | Description | | --- | --- | --- | | ✔️ September 2025 | Beta release of GraphQL RPC Server and General-purpose Indexer. | You can start validating the setup of General-purpose Indexer, along with testing the GraphQL RPC Server to access the indexed Sui data. You can also start migrating your application in the non-production environments, and share feedback on the improvements you want to see. | | ✔️ September-October 2025 | Deprecation of JSON-RPC. | **JSON-RPC is deprecated at this point and migration notice period starts.** | | December-January 2025 | GA release of GraphQL RPC Server and General-purpose Indexer. | Begin migration and cutover of your application in the production environment. | | April 2026 | End of migration timeline. | **JSON-RPC is fully deactivated at this point.** This timeline assumes about 7 months of migration notice period. | ### Archival Store and Service[​](https://docs.sui.io/concepts/data-access/data-serving#archival-store-and-service "Direct link to archival-store-and-service") Long-term access to historical on-chain data is essential for developers, although full nodes enforce limited retention for scalability and performance. Use the [Archival Store and Service](https://docs.sui.io/guides/developer/accessing-data/archival-store) to access historical on-chain data through a pluggable storage backend (like [Bigtable](https://cloud.google.com/bigtable) ) and a [gRPC interface compatible with the `LedgerService` endpoint](https://docs.sui.io/concepts/data-access/grpc) . This infrastructure serves as the historical backbone for GraphQL RPC, gRPC\-based apps, and data platforms, providing efficient point-lookups for old transactions, checkpoints, and object states, even after full nodes have pruned them. You can query the archival store through gRPC\-based archival service for missing data when using a full node and power GraphQL RPC queries that span unretained data. You can host the service yourself, use a provider, or rely on the public-good version (with rate limits). Learn more about [Archival Store and Service](https://docs.sui.io/guides/developer/accessing-data/archival-store) . Supported SDKs[​](https://docs.sui.io/concepts/data-access/data-serving#supported-sdks "Direct link to Supported SDKs") ------------------------------------------------------------------------------------------------------------------------ The following SDKs can be used to interact with gRPC and GraphQL: * [TypeScript SDK](https://sdk.mystenlabs.com/sui/migrations/sui-2.0/json-rpc-migration) * [Rust SDK](https://github.com/MystenLabs/sui-rust-sdk) * Community maintained [Python SDK](https://github.com/FrankC01/pysui) Custom indexer[​](https://docs.sui.io/concepts/data-access/data-serving#custom-indexer "Direct link to Custom indexer") ------------------------------------------------------------------------------------------------------------------------ If you need more control over the types, granularity, and retention period of the data that you need in your application, or if you have specific query patterns that are not served with gRPC or GraphQL RPC, then you can set up your own [custom indexer](https://docs.sui.io/guides/developer/accessing-data/custom-indexer/build) or reach out to a [data indexer operator](https://docs.sui.io/references/awesome-sui#indexers--data-services) that might already have set one up. If you set up your own indexer, you are responsible for its ongoing maintenance and the related infrastructure and operational costs. You can reduce your costs by implementing a pruning strategy for the relational database by taking into account the retention needs of your application. Custom indexers are a good choice for app or protocol-specific logic and data layout. When to use gRPC or GraphQL with General-purpose Indexer[​](https://docs.sui.io/concepts/data-access/data-serving#when-to-use-grpc-or-graphql-with-general-purpose-indexer "Direct link to when-to-use-grpc-or-graphql-with-general-purpose-indexer") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ You can use the high-level criteria mentioned in the following table to determine whether gRPC API or GraphQL RPC with General-purpose Indexer would better serve your use case. This is not an exhaustive list and either of the options could work suitably for some of the use cases. | Dimension | gRPC API | GraphQL RPC with General-purpose Indexer | | --- | --- | --- | | Type of application or data consumer. | Ideal for Web3 exchanges, DeFi market maker apps, other DeFi protocols or apps with ultra low-latency needs. | Ideal for web application builders or builders with slightly relaxed latency needs. | | Query patterns. | Okay to read data from different endpoints separately and combine on the client-side; faster serialization, parsing, and validation because of binary format. | Allows easier decoupling of the client with the ability to combine data from different tables in a single request; returns consistent data from different tables across similar checkpoints, including for paginated results. | | Retention period requirements. | Default retention period is 2 weeks with actual configuration dependent on the full node operator and their needs and goals; see history-related information after the table. | Default retention period in Postgres database is 4 weeks with actual configuration depending on your needs or an RPC provider or data indexer operator's setup; see history-related information after the table. | | Streaming needs. | Includes a streaming or subscription API before beta release. | Subscription API is planned but is available after GA. | | Incremental costs. | Little to no incremental costs if already using full node JSON-RPC. | Somewhat significant incremental costs if already using full node JSON-RPC and if retention period and query patterns differences are insignificant. | This table only mentions the default retention period for both options. The expectation is that a full node operator, RPC provider, or data indexer operator can reasonably configure that to a few times higher without significantly impacting the performance. Also, by default, the GraphQL RPC service can directly connect to the Archival Store and Service for historical data beyond the retention period configured for the underlying Postgres database. In comparison, gRPC API does not have such direct connectivity to the Archival Store and Service and you must directly connect to one from your application. Refer to the following articles outlining general differences between gRPC and GraphQL. Validate the accuracy and authenticity of the differences using your own experiments. * [https://stackoverflow.blog/2022/11/28/when-to-use-grpc-vs-graphql/](https://stackoverflow.blog/2022/11/28/when-to-use-grpc-vs-graphql/) * [https://blog.postman.com/grpc-vs-graphql/](https://blog.postman.com/grpc-vs-graphql/) Legacy data access interfaces[​](https://docs.sui.io/concepts/data-access/data-serving#legacy-data-access-interfaces "Direct link to Legacy data access interfaces") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- info **JSON-RPC is deprecated**. Migrate to either [gRPC](https://docs.sui.io/concepts/data-access/grpc) or [GraphQL RPC](https://docs.sui.io/concepts/data-access/graphql-indexer) by April 2026. Refer to the [list of RPC or data providers](https://www.notion.so/mystenlabs/RPC-providers-offering-future-Sui-data-primitives-2466d9dcb4e980a99a36e9aafd8c17e0?source=copy_link) that have enabled gRPC on their full nodes or offer GraphQL RPC. Contact a provider directly to request access. If your RPC or data provider doesn’t yet support these data access methods, ask them to enable support or contact the Sui Foundation team on Discord, Telegram, or Slack for help. Directly connect to [JSON-RPC](https://docs.sui.io/references/sui-api) hosted on Sui [full nodes](https://docs.sui.io/guides/operator/sui-full-node) that are operated by [RPC providers](https://sui.io/developers#dev-tools) (filter by `RPC`) or [data indexer operators](https://github.com/sui-foundation/awesome-sui?tab=readme-ov-file#indexers--data-services) . The [Mainnet](https://fullnode.mainnet.sui.io/) , [Testnet](https://fullnode.testnet.sui.io/) , or [Devnet](https://fullnode.devnet.sui.io/) load balancer URLs abstract the Sui Foundation-managed full nodes. Those are not recommended for production use. You can get real-time or historical data using JSON-RPC. Retention period for historical data depends on the [pruning strategy](https://docs.sui.io/guides/operator/data-management#sui-full-node-pruning-policies) that node operators implement, though the default configuration for all full nodes is to implicitly fall back on the [Archival Store](https://docs.sui.io/concepts/data-access/data-serving#archival-store-and-service) managed by the Sui Foundation. Related links[​](https://docs.sui.io/concepts/data-access/data-serving#related-links "Direct link to Related links") --------------------------------------------------------------------------------------------------------------------- • [gRPC](https://docs.sui.io/concepts/data-access/grpc) Learn about gRPC and how it provides fast, type-safe access to Sui network data. • [Custom Indexing Framework](https://docs.sui.io/guides/developer/accessing-data/custom-indexing-framework) The `sui-indexer-alt-framework` is a powerful Rust framework for building high-performance, custom blockchain indexers on Sui. It provides customizable, production-ready components for data ingestion, processing, and storage. • [Indexer Pipeline Architecture](https://docs.sui.io/guides/developer/accessing-data/pipeline-architecture) The `sui-indexer-alt-framework` provides two distinct pipeline architectures. Understand the differences between the sequential and concurrent pipelines that the `sui-indexer-alt-framework` provides to decide which best suits your project needs. • [Archival Store and Service (Beta)](https://docs.sui.io/guides/developer/accessing-data/archival-store) Overview of the Archival Store and Service to access historical Sui network data. • [Custom Indexing Framework](https://docs.sui.io/guides/developer/accessing-data/custom-indexing-framework) The `sui-indexer-alt-framework` is a powerful Rust framework for building high-performance, custom blockchain indexers on Sui. It provides customizable, production-ready components for data ingestion, processing, and storage. • [GraphQL and General-Purpose Indexer (Beta)](https://docs.sui.io/concepts/data-access/graphql-indexer) The GraphQL RPC Beta service offers a structured way for your clients to interact with data on the Sui blockchain. It accesses data processed by a general-purpose indexer and can connect to an archival store for historical network state. • [Sui Full Node gRPC](https://docs.sui.io/references/fullnode-protocol) Generated documentation from the Sui gRPC schema. • [GraphQL Beta schema](https://docs.sui.io/references/sui-api/sui-graphql/beta/reference) Schema documentation for GraphQL Beta. * [Latest data access interfaces](https://docs.sui.io/concepts/data-access/data-serving#latest-data-access-interfaces) * [gRPC API](https://docs.sui.io/concepts/data-access/data-serving#grpc-api) * [General-purpose Indexer](https://docs.sui.io/concepts/data-access/data-serving#general-purpose-indexer) * [GraphQL RPC](https://docs.sui.io/concepts/data-access/data-serving#graphql-rpc) * [Archival Store and Service](https://docs.sui.io/concepts/data-access/data-serving#archival-store-and-service) * [Supported SDKs](https://docs.sui.io/concepts/data-access/data-serving#supported-sdks) * [Custom indexer](https://docs.sui.io/concepts/data-access/data-serving#custom-indexer) * [When to use gRPC or GraphQL with General-purpose Indexer](https://docs.sui.io/concepts/data-access/data-serving#when-to-use-grpc-or-graphql-with-general-purpose-indexer) * [Legacy data access interfaces](https://docs.sui.io/concepts/data-access/data-serving#legacy-data-access-interfaces) * [Related links](https://docs.sui.io/concepts/data-access/data-serving#related-links) --- # GraphQL for Sui RPC (Beta) | Sui Documentation [Skip to main content](https://docs.sui.io/references/sui-graphql#__docusaurus_skipToContent_fallback) On this page ⚙️Early-Stage Feature This content describes an alpha/beta feature or service. These early stage features and services are in active development, so details are likely to change. This feature or service is currently available in * Devnet * Testnet * Mainnet info The GraphQL RPC release stage is currently in beta. Refer to the high-level timeline for releases in [Access Sui Data](https://docs.sui.io/concepts/data-access/data-serving) . GraphQL for the Sui RPC is a public service that enables interacting with the Sui [network](https://sui.io/networkinfo) . To get started with GraphQL for the Sui RPC, check out the [Getting Started](https://docs.sui.io/concepts/data-access/graphql-rpc) guide. If you'd like to learn more about the concepts used in the GraphQL service, check out the [GraphQL](https://docs.sui.io/concepts/data-access/graphql-rpc) for Sui RPC concepts page. If you'd like to view the reference documentation, check out the [schema](https://docs.sui.io/references/sui-api/sui-graphql/beta/reference) . info Refer to [Access Sui Data](https://docs.sui.io/concepts/data-access/data-serving) for an overview of options to access Sui network data. The GraphQL RPC release stage is currently in beta. Refer to the high-level timeline for releases. Key types[​](https://docs.sui.io/references/sui-graphql#key-types "Direct link to Key types") ---------------------------------------------------------------------------------------------- All GraphQL API elements are accessible via the left sidebar, the following are good starting points to explore from. * "Queries" lists all top-level queries for reading the chain state, from reading details about addresses and objects to [dryRunTransactionBlock](https://docs.sui.io/references/sui-api/sui-graphql/beta/reference/operations/queries/simulate-transaction.mdx) , which has an execution-like interface but does not modify the chain. * [Object](https://docs.sui.io/references/sui-api/sui-graphql/alpha/reference/types/objects/object) is the type representing all on-chain objects (Move values and packages). * [Address](https://docs.sui.io/references/sui-api/sui-graphql/alpha/reference/types/objects/address) corresponds to account addresses (derived from the public keys of signatures that sign transactions) and can be used to query the objects owned by these accounts and the transactions they have signed or been affected by. [Owner](https://docs.sui.io/references/sui-api/sui-graphql/beta/reference/types/objects/owned-or-immutable) represents any entity that can own a [MoveObject](https://docs.sui.io/references/sui-api/sui-graphql/beta/reference/types/objects/move-object) to handle cases where it is not known whether the owner is an [Object](https://docs.sui.io/references/sui-api/sui-graphql/beta/reference/types/objects/object) or an [Address](https://docs.sui.io/references/sui-api/sui-graphql/beta/reference/types/objects/address) (for example, from the perspective of a Move object looking at its owner). Related links[​](https://docs.sui.io/references/sui-graphql#related-links "Direct link to Related links") ---------------------------------------------------------------------------------------------------------- • [Querying Sui RPC with GraphQL](https://docs.sui.io/guides/developer/accessing-data/query-with-graphql) Practical guide to making queries of the Sui RPC using the GraphQL service, with examples for common tasks. • [GraphQL for Sui RPC (Beta)](https://docs.sui.io/concepts/data-access/graphql-rpc) Use GraphQL to make Sui RPC calls. This feature is currently in Beta. • [GraphQL and General-Purpose Indexer (Beta)](https://docs.sui.io/concepts/data-access/graphql-indexer) The GraphQL RPC Beta service offers a structured way for your clients to interact with data on the Sui blockchain. It accesses data processed by a general-purpose indexer and can connect to an archival store for historical network state. * [Key types](https://docs.sui.io/references/sui-graphql#key-types) * [Related links](https://docs.sui.io/references/sui-graphql#related-links) --- # Sui API Reference | Sui Documentation | Sui Documentation [Skip to main content](https://docs.sui.io/sui-api-ref#__docusaurus_skipToContent_fallback) Loading OpenRPC… --- # RPC Best Practices | Sui Documentation [Skip to main content](https://docs.sui.io/references/sui-api/rpc-best-practices#__docusaurus_skipToContent_fallback) On this page This topic provides some best practices for configuring your RPC settings to ensure a reliable infrastructure for your projects and services built on Sui. caution Use dedicated nodes/shared services rather than public endpoints for production apps. The public endpoints maintained by Mysten Labs (`fullnode..sui.io:443`) are rate-limited, and support only 100 requests per 30 seconds. Do not use public endpoints in production applications with high traffic volume. You can either run your own Full nodes, or outsource this to a professional infrastructure provider (preferred for apps that have high traffic). You can find a list of reliable RPC endpoint providers for Sui on the [Sui Dev Portal](https://sui.io/developers#dev-tools) using the **Node Service** tag. RPC provisioning guidance[​](https://docs.sui.io/references/sui-api/rpc-best-practices#rpc-provisioning-guidance "Direct link to RPC provisioning guidance") ------------------------------------------------------------------------------------------------------------------------------------------------------------- Consider the following when working with a provider: * **SLA and 24-hour support:** Choose a provider that offers a SLA that meets your needs and 24-hour support. * **Onboarding call:** Always do an onboarding call with the provider you select to ensure they can provide service that meets your needs. If you have a high-traffic event, such as an NFT mint coming up, notify your RPC provider with the expected traffic increase at least 48 hours in advance. * **Redundancy:** It is important for high-traffic and time-sensitive apps, like NFT marketplaces and DeFi protocols, to ensure they don't rely on just one provider for RPCs. Many projects default to just using a single provider, but that's extremely risky and you should use other providers to provide redundancy. * **Traffic estimate:** You should have a good idea about the amount and type of traffic you expect, and you should communicate that information in advance with your RPC provider. During high-traffic events (such as NFT mints), request increased capacity from your RPC provider in advance. Bot mitigation - As Sui matures, a lot of bots will emerge on the network. Sui app builders should think about bot mitigation at the infrastructure level. This depends heavily on use cases. For NFT minting, bots are undesirable. However, for certain DeFi use cases, bots are necessary. Think about the implications and prepare your infrastructure accordingly. * **Provisioning notice:** Make RPC provisioning requests at least one week in advance. This gives operators and providers advance notice so they can arrange for the configure hardware/servers as necessary. If there’s a sudden, unexpected demand, please reach out to us so we can help set you up with providers that have capacity for urgent situations. * [RPC provisioning guidance](https://docs.sui.io/references/sui-api/rpc-best-practices#rpc-provisioning-guidance) --- # Sui Full Node gRPC | Sui Documentation [Skip to main content](https://docs.sui.io/references/fullnode-protocol#__docusaurus_skipToContent_fallback) On this page Sui full node gRPC API replaces JSON-RPC on full nodes. JSON-RPC is `deprecated`. Proto filessui/rpc/v2/argument.protosui/rpc/v2/signature\_verification\_service.protosui/rpc/v2/move\_package\_service.protosui/rpc/v2/checkpoint\_summary.protosui/rpc/v2/transaction\_execution\_service.protosui/rpc/v2/ledger\_service.protosui/rpc/v2/event.protosui/rpc/v2/owner.protosui/rpc/v2/object.protosui/rpc/v2/jwk.protosui/rpc/v2/effects.protosui/rpc/v2/executed\_transaction.protosui/rpc/v2/name\_service.protosui/rpc/v2/signature.protosui/rpc/v2/gas\_cost\_summary.protosui/rpc/v2/error\_reason.protosui/rpc/v2/protocol\_config.protosui/rpc/v2/system\_state.protosui/rpc/v2/execution\_status.protosui/rpc/v2/object\_reference.protosui/rpc/v2/input.protosui/rpc/v2/move\_package.protosui/rpc/v2/epoch.protosui/rpc/v2/subscription\_service.protosui/rpc/v2/bcs.protosui/rpc/v2/state\_service.protosui/rpc/v2/signature\_scheme.protosui/rpc/v2/checkpoint.protosui/rpc/v2/transaction.protosui/rpc/v2/balance\_change.protosui/rpc/v2/checkpoint\_contents.protogoogle/protobuf/timestamp.protogoogle/protobuf/empty.protogoogle/protobuf/struct.protogoogle/protobuf/any.protogoogle/protobuf/field\_mask.protogoogle/protobuf/duration.protogoogle/rpc/error\_details.protogoogle/rpc/status.protoScalar Value TypesMessagesJump to...ArgumentEnumsJump to...ArgumentKind sui/rpc/v2/argument.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_argument-proto "Direct link to sui/rpc/v2/argument.proto") ---------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Argument[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument "Direct link to Argument") An argument to a programmable transaction command. Fields input [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Index of an input when `kind` is `INPUT`. kind [ArgumentKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument-ArgumentKind) Proto3 optional result [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Index of a result when `kind` is `RESULT`. subresult [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Used to access a nested result when `kind` is `RESULT`. #### Enums #### ArgumentKind Enums `ARGUMENT_KIND_UNKNOWN` `GAS` The gas coin. `INPUT` One of the input objects or primitive values (from `ProgrammableTransaction` inputs). `RESULT` The result of another command (from `ProgrammableTransaction` commands). sui/rpc/v2/signature\_verification\_service.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_signature-verification-service-proto "Direct link to sui/rpc/v2/signature_verification_service.proto") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ #### Messages ### VerifySignatureRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VerifySignatureRequest "Direct link to VerifySignatureRequest") Fields address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Optional. Address to validate against the provided signature. If provided, this address will be compared against the the address derived from the provide signature and a successful response will only be returned if they match. jwks [ActiveJwk](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ActiveJwk) Repeated \[\] The set of JWKs to use when verifying Zklogin signatures. If this is empty the current set of valid JWKs stored onchain will be used message [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional The message to verify against. Today the only supported message types are `PersonalMessage` and `TransactionData` and the `Bcs.name` must be set to indicate which type of message is being verified. signature [UserSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UserSignature) Proto3 optional The signature to verify. ### VerifySignatureResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VerifySignatureResponse "Direct link to VerifySignatureResponse") Fields is\_valid [bool](https://docs.sui.io/references/fullnode-protocol#bool) Proto3 optional Indicates if the provided signature was valid given the requested parameters. reason [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional If `is_valid` is `false`, this is the reason for why the signature verification failed. ### Services (signature\_verification\_service.proto)[​](https://docs.sui.io/references/fullnode-protocol#services-signature_verification_serviceproto "Direct link to Services (signature_verification_service.proto)") #### SignatureVerificationService Methods [VerifySignatureRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VerifySignatureRequest) -> VerifySignatureResponse Perform signature verification of a UserSignature against the provided message. sui/rpc/v2/move\_package\_service.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_move-package-service-proto "Direct link to sui/rpc/v2/move_package_service.proto") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ #### Messages ### GetDatatypeRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetDatatypeRequest "Direct link to GetDatatypeRequest") Fields module\_name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The name of the requested module. name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The name of the requested datatype. package\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The `storage_id` of the requested package. ### GetDatatypeResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetDatatypeResponse "Direct link to GetDatatypeResponse") Fields datatype [DatatypeDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-DatatypeDescriptor) Proto3 optional The datatype. ### GetFunctionRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetFunctionRequest "Direct link to GetFunctionRequest") Fields module\_name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The name of the requested module. name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The name of the requested function. package\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The `storage_id` of the requested package. ### GetFunctionResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetFunctionResponse "Direct link to GetFunctionResponse") Fields function [FunctionDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FunctionDescriptor) Proto3 optional The function. ### GetPackageRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetPackageRequest "Direct link to GetPackageRequest") Fields package\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The `storage_id` of the requested package. ### GetPackageResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetPackageResponse "Direct link to GetPackageResponse") Fields package [Package](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Package) Proto3 optional The package. ### ListPackageVersionsRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListPackageVersionsRequest "Direct link to ListPackageVersionsRequest") Fields package\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The `storage_id` of any version of the package. page\_size [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most `1000` entries will be returned. The maximum value is `10000`; values above `10000` will be coerced to `10000`. page\_token [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional A page token, received from a previous `ListPackageVersions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPackageVersions` must match the call that provided the page token. ### ListPackageVersionsResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListPackageVersionsResponse "Direct link to ListPackageVersionsResponse") Fields next\_page\_token [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. versions [PackageVersion](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PackageVersion) Repeated \[\] List of all package versions, ordered by version. ### PackageVersion[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PackageVersion "Direct link to PackageVersion") A simplified representation of a package version Fields package\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The storage ID of this package version version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The version number ### Services (move\_package\_service.proto)[​](https://docs.sui.io/references/fullnode-protocol#services-move_package_serviceproto "Direct link to Services (move_package_service.proto)") #### MovePackageService Methods [GetPackageRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetPackageRequest) -> GetPackageResponse [GetDatatypeRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetDatatypeRequest) -> GetDatatypeResponse [GetFunctionRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetFunctionRequest) -> GetFunctionResponse [ListPackageVersionsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListPackageVersionsRequest) -> ListPackageVersionsResponse sui/rpc/v2/checkpoint\_summary.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_checkpoint-summary-proto "Direct link to sui/rpc/v2/checkpoint_summary.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### CheckpointCommitment[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointCommitment "Direct link to CheckpointCommitment") A commitment made by a checkpoint. Fields digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional kind [CheckpointCommitmentKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointCommitment-CheckpointCommitmentKind) Proto3 optional ### CheckpointSummary[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointSummary "Direct link to CheckpointSummary") A header for a checkpoint on the Sui blockchain. On the Sui network, checkpoints define the history of the blockchain. They are quite similar to the concept of blocks used by other blockchains like Bitcoin or Ethereum. The Sui blockchain, however, forms checkpoints after transaction execution has already happened to provide a certified history of the chain, instead of being formed before execution. Checkpoints commit to a variety of state, including but not limited to: * The hash of the previous checkpoint. * The set of transaction digests, their corresponding effects digests, as well as the set of user signatures that authorized its execution. * The objects produced by a transaction. * The set of live objects that make up the current state of the chain. * On epoch transitions, the next validator committee. `CheckpointSummary`s themselves don't directly include all of the previous information but they are the top-level type by which all the information is committed to transitively via cryptographic hashes included in the summary. `CheckpointSummary`s are signed and certified by a quorum of the validator committee in a given epoch to allow verification of the chain's state. Fields bcs [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional This CheckpointSummary serialized as BCS. commitments [CheckpointCommitment](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointCommitment) Repeated \[\] Commitments to checkpoint\-specific state. content\_digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The hash of the `CheckpointContents` for this checkpoint. digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this CheckpointSummary. end\_of\_epoch\_data [EndOfEpochData](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochData) Proto3 optional Extra data only present in the final checkpoint of an epoch. epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Epoch that this checkpoint belongs to. epoch\_rolling\_gas\_cost\_summary [GasCostSummary](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GasCostSummary) Proto3 optional The running total gas costs of all transactions included in the current epoch so far until this checkpoint. previous\_digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The hash of the previous `CheckpointSummary`. This will be `None` only for the first, or genesis, checkpoint. sequence\_number [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The height of this checkpoint. timestamp [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional Timestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are monotonic, but not strongly monotonic - subsequent checkpoints can have the same timestamp if they originate from the same underlining consensus commit. total\_network\_transactions [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Total number of transactions committed since genesis, including those in this checkpoint. version\_specific\_data [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional `CheckpointSummary` is not an evolvable structure - it must be readable by any version of the code. Therefore, to allow extensions to be added to `CheckpointSummary`, opaque data can be added to checkpoints, which can be deserialized based on the current protocol version. ### EndOfEpochData[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochData "Direct link to EndOfEpochData") Data, which when included in a `CheckpointSummary`, signals the end of an `Epoch`. Fields epoch\_commitments [CheckpointCommitment](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointCommitment) Repeated \[\] Commitments to epoch specific state (live object set) next\_epoch\_committee [ValidatorCommitteeMember](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorCommitteeMember) Repeated \[\] The set of validators that will be in the `ValidatorCommittee` for the next epoch. next\_epoch\_protocol\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The protocol version that is in effect during the next epoch. #### Enums #### CheckpointCommitmentKind Enums `CHECKPOINT_COMMITMENT_KIND_UNKNOWN` `ECMH_LIVE_OBJECT_SET` An elliptic curve multiset hash attesting to the set of objects that comprise the live state of the Sui blockchain. `CHECKPOINT_ARTIFACTS` Digest of the checkpoint artifacts. sui/rpc/v2/transaction\_execution\_service.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_transaction-execution-service-proto "Direct link to sui/rpc/v2/transaction_execution_service.proto") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### CommandOutput[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandOutput "Direct link to CommandOutput") Fields argument [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Proto3 optional json [Value](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Value) Proto3 optional JSON rendering of the output. value [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional ### CommandResult[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandResult "Direct link to CommandResult") An intermediate result/output from the execution of a single command Fields mutated\_by\_ref [CommandOutput](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandOutput) Repeated \[\] return\_values [CommandOutput](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandOutput) Repeated \[\] ### ExecuteTransactionRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecuteTransactionRequest "Direct link to ExecuteTransactionRequest") Fields read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. If no mask is specified, defaults to `effects.status,checkpoint`. signatures [UserSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UserSignature) Repeated \[\] Set of `UserSignature`s authorizing the execution of the provided transaction. transaction [Transaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Transaction) Proto3 optional The transaction to execute. ### ExecuteTransactionResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecuteTransactionResponse "Direct link to ExecuteTransactionResponse") Response message for `NodeService.ExecuteTransaction`. Fields transaction [ExecutedTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutedTransaction) Proto3 optional ### SimulateTransactionRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimulateTransactionRequest "Direct link to SimulateTransactionRequest") Fields checks [TransactionChecks](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimulateTransactionRequest-TransactionChecks) Proto3 optional Specify whether checks should be ENABLED (default) or DISABLED while executing the transaction do\_gas\_selection [bool](https://docs.sui.io/references/fullnode-protocol#bool) Proto3 optional Perform gas selection based on a budget estimation and include the selected gas payment and budget in the response. This option will be ignored if `checks` is `DISABLED`. read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. transaction [Transaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Transaction) Proto3 optional ### SimulateTransactionResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimulateTransactionResponse "Direct link to SimulateTransactionResponse") Fields command\_outputs [CommandResult](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandResult) Repeated \[\] transaction [ExecutedTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutedTransaction) Proto3 optional ### Services (transaction\_execution\_service.proto)[​](https://docs.sui.io/references/fullnode-protocol#services-transaction_execution_serviceproto "Direct link to Services (transaction_execution_service.proto)") #### TransactionExecutionService Methods [ExecuteTransactionRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecuteTransactionRequest) -> ExecuteTransactionResponse [SimulateTransactionRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimulateTransactionRequest) -> SimulateTransactionResponse #### Enums #### TransactionChecks buf:lint:ignore ENUM\_ZERO\_VALUE\_SUFFIX Enums `ENABLED` `DISABLED` sui/rpc/v2/ledger\_service.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_ledger-service-proto "Direct link to sui/rpc/v2/ledger_service.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### BatchGetObjectsRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetObjectsRequest "Direct link to BatchGetObjectsRequest") Fields read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. If no mask is specified, defaults to `object_id,version,digest`. requests [GetObjectRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetObjectRequest) Repeated \[\] ### BatchGetObjectsResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetObjectsResponse "Direct link to BatchGetObjectsResponse") Fields objects [GetObjectResult](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetObjectResult) Repeated \[\] ### BatchGetTransactionsRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetTransactionsRequest "Direct link to BatchGetTransactionsRequest") Fields digests [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] Required. The digests of the requested transactions. read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. If no mask is specified, defaults to `digest`. ### BatchGetTransactionsResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetTransactionsResponse "Direct link to BatchGetTransactionsResponse") Fields transactions [GetTransactionResult](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetTransactionResult) Repeated \[\] ### GetCheckpointRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCheckpointRequest "Direct link to GetCheckpointRequest") Fields read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. If no mask is specified, defaults to `sequence_number,digest`. Union field **checkpoint\_id** can be only one of the following. digest [string](https://docs.sui.io/references/fullnode-protocol#string) The digest of the requested checkpoint. sequence\_number [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) The sequence number of the requested checkpoint. ### GetCheckpointResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCheckpointResponse "Direct link to GetCheckpointResponse") Fields checkpoint [Checkpoint](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Checkpoint) Proto3 optional ### GetEpochRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetEpochRequest "Direct link to GetEpochRequest") Fields epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The requested epoch. If no epoch is provided the current epoch will be returned. read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. If no mask is specified, defaults to `epoch`. ### GetEpochResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetEpochResponse "Direct link to GetEpochResponse") Fields epoch [Epoch](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Epoch) Proto3 optional ### GetObjectRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetObjectRequest "Direct link to GetObjectRequest") Fields object\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The `ObjectId` of the requested object. read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. If no mask is specified, defaults to `object_id,version,digest`. version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Request a specific version of the object. If no version is specified, and the object is live, then the latest version of the object is returned. ### GetObjectResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetObjectResponse "Direct link to GetObjectResponse") Fields object [Object](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Object) Proto3 optional ### GetObjectResult[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetObjectResult "Direct link to GetObjectResult") Fields Union field **result** can be only one of the following. error [Status](https://docs.sui.io/references/fullnode-protocol#google-rpc-Status) object [Object](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Object) ### GetServiceInfoRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetServiceInfoRequest "Direct link to GetServiceInfoRequest") ### GetServiceInfoResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetServiceInfoResponse "Direct link to GetServiceInfoResponse") Fields chain [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Human-readable name of the chain that this node is on. This is intended to be a human-readable name like `mainnet`, `testnet`, and so on. chain\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The chain identifier of the chain that this node is on. The chain identifier is the digest of the genesis checkpoint, the checkpoint with sequence number 0. checkpoint\_height [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Checkpoint height of the most recently executed checkpoint. epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Current epoch of the node based on its highest executed checkpoint. lowest\_available\_checkpoint [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The lowest checkpoint for which checkpoints and transaction data are available. lowest\_available\_checkpoint\_objects [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The lowest checkpoint for which object data is available. server [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Software version of the service. Similar to the `server` http header. timestamp [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional Unix timestamp of the most recently executed checkpoint. ### GetTransactionRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetTransactionRequest "Direct link to GetTransactionRequest") Fields digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The digest of the requested transaction. read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. If no mask is specified, defaults to `digest`. ### GetTransactionResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetTransactionResponse "Direct link to GetTransactionResponse") Fields transaction [ExecutedTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutedTransaction) Proto3 optional ### GetTransactionResult[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetTransactionResult "Direct link to GetTransactionResult") Fields Union field **result** can be only one of the following. error [Status](https://docs.sui.io/references/fullnode-protocol#google-rpc-Status) transaction [ExecutedTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutedTransaction) ### Services (ledger\_service.proto)[​](https://docs.sui.io/references/fullnode-protocol#services-ledger_serviceproto "Direct link to Services (ledger_service.proto)") #### LedgerService Methods [GetServiceInfoRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetServiceInfoRequest) -> GetServiceInfoResponse Query the service for general information about its current state. [GetObjectRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetObjectRequest) -> GetObjectResponse [BatchGetObjectsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetObjectsRequest) -> BatchGetObjectsResponse [GetTransactionRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetTransactionRequest) -> GetTransactionResponse [BatchGetTransactionsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetTransactionsRequest) -> BatchGetTransactionsResponse [GetCheckpointRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCheckpointRequest) -> GetCheckpointResponse [GetEpochRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetEpochRequest) -> GetEpochResponse sui/rpc/v2/event.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_event-proto "Direct link to sui/rpc/v2/event.proto") ------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Event[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Event "Direct link to Event") An event. Fields contents [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional BCS serialized bytes of the event. event\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The type of the event emitted. json [Value](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Value) Proto3 optional JSON rendering of the event. module [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Module name of the top-level function invoked by a `MoveCall` command that triggered this event to be emitted. package\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Package ID of the top-level function invoked by a `MoveCall` command that triggered this event to be emitted. sender [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Address of the account that sent the transaction where this event was emitted. ### TransactionEvents[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionEvents "Direct link to TransactionEvents") Events emitted during the successful execution of a transaction. Fields bcs [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional This TransactionEvents serialized as BCS. digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this TransactionEvents. events [Event](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Event) Repeated \[\] Set of events emitted by a transaction. sui/rpc/v2/owner.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_owner-proto "Direct link to sui/rpc/v2/owner.proto") ------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Owner[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Owner "Direct link to Owner") Enum of different types of ownership for an object. Fields address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Address or ObjectId of the owner kind [OwnerKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Owner-OwnerKind) Proto3 optional version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The `initial_shared_version` if kind is `SHARED` or `start_version` if kind `CONSENSUS_ADDRESS`. #### Enums #### OwnerKind Enums `OWNER_KIND_UNKNOWN` `ADDRESS` `OBJECT` `SHARED` `IMMUTABLE` `CONSENSUS_ADDRESS` sui/rpc/v2/object.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_object-proto "Direct link to sui_rpc_v2_object-proto") ---------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Object[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Object "Direct link to Object") An object on the Sui blockchain. Fields balance [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Current balance if this object is a `0x2::coin::Coin` bcs [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional This Object serialized as BCS. contents [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional BCS bytes of a Move struct value. Only set for Move structs digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this Object. has\_public\_transfer [bool](https://docs.sui.io/references/fullnode-protocol#bool) Proto3 optional DEPRECATED this field is no longer used to determine whether a tx can transfer this object. Instead, it is always calculated from the objects type when loaded in execution. Only set for Move structs json [Value](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Value) Proto3 optional JSON rendering of the object. object\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional `ObjectId` for this object. object\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The type of this object. This will be 'package' for packages and a StructTag for move structs. owner [Owner](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Owner) Proto3 optional Owner of the object. package [Package](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Package) Proto3 optional Package information for Move Packages previous\_transaction [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of the transaction that created or last mutated this object storage\_rebate [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The amount of SUI to rebate if this object gets deleted. This number is re-calculated each time the object is mutated based on the present storage gas price. version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Version of the object. ### ObjectSet[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ObjectSet "Direct link to ObjectSet") Set of Objects Fields objects [Object](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Object) Repeated \[\] Objects are sorted by the key `(object_id, version)`. sui/rpc/v2/jwk.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_jwk-proto "Direct link to sui/rpc/v2/jwk.proto") ------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Jwk[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Jwk "Direct link to Jwk") A JSON web key. Struct that contains info for a JWK. A list of them for different kinds can be retrieved from the JWK endpoint (for example, &#lt;[https://www.googleapis.com/oauth2/v3/certs>](https://www.googleapis.com/oauth2/v3/certs%3E) ). The JWK is used to verify the JWT token. Fields alg [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Algorithm parameter, [https://datatracker.ietf.org/doc/html/rfc7517#section-4.4](https://datatracker.ietf.org/doc/html/rfc7517#section-4.4) . e [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional RSA public exponent, [https://datatracker.ietf.org/doc/html/rfc7517#section-9.3](https://datatracker.ietf.org/doc/html/rfc7517#section-9.3) . kty [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Key type parameter, [https://datatracker.ietf.org/doc/html/rfc7517#section-4.1](https://datatracker.ietf.org/doc/html/rfc7517#section-4.1) . n [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional RSA modulus, [https://datatracker.ietf.org/doc/html/rfc7517#section-9.3](https://datatracker.ietf.org/doc/html/rfc7517#section-9.3) . ### JwkId[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-JwkId "Direct link to JwkId") Key to uniquely identify a JWK. Fields iss [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The issuer or identity of the OIDC provider. kid [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional A key ID used to uniquely identify a key from an OIDC provider. sui/rpc/v2/effects.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_effects-proto "Direct link to sui/rpc/v2/effects.proto") ------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### AccumulatorWrite[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AccumulatorWrite "Direct link to AccumulatorWrite") Fields accumulator\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional operation [AccumulatorOperation](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AccumulatorWrite-AccumulatorOperation) Proto3 optional value [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional ### ChangedObject[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangedObject "Direct link to ChangedObject") Input/output state of an object that was changed during execution. Fields accumulator\_write [AccumulatorWrite](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AccumulatorWrite) Proto3 optional The contents of the accumulator write when `output_state` is `OUTPUT_OBJECT_STATE_ACCUMULATOR_WRITE` id\_operation [IdOperation](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangedObject-IdOperation) Proto3 optional What happened to an `ObjectId` during execution. input\_digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Digest of the object before this transaction executed. input\_owner [Owner](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Owner) Proto3 optional Owner of the object before this transaction executed. input\_state [InputObjectState](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangedObject-InputObjectState) Proto3 optional input\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Version of the object before this transaction executed. object\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ID of the object. object\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Type information is not provided by the effects structure but is instead provided by an indexing layer output\_digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Digest of the object after this transaction executed. output\_owner [Owner](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Owner) Proto3 optional Owner of the object after this transaction executed. output\_state [OutputObjectState](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangedObject-OutputObjectState) Proto3 optional output\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Version of the object after this transaction executed. ### TransactionEffects[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionEffects "Direct link to TransactionEffects") The effects of executing a transaction. Fields auxiliary\_data\_digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Auxiliary data that are not protocol-critical, generated as part of the effects but are stored separately. Storing it separately allows us to avoid bloating the effects with data that are not critical. It also provides more flexibility on the format and type of the data. bcs [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional This TransactionEffects serialized as BCS. changed\_objects [ChangedObject](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangedObject) Repeated \[\] Objects whose state are changed by this transaction. dependencies [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] The set of transaction digests this transaction depends on. digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this TransactionEffects. epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The epoch when this transaction was executed. events\_digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of the events emitted during execution, can be `None` if the transaction does not emit any event. gas\_object [ChangedObject](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangedObject) Proto3 optional Information about the gas object. Also present in the `changed_objects` vector. System transactions that don't require gas will leave this as `None`. gas\_used [GasCostSummary](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GasCostSummary) Proto3 optional The gas used by this transaction. lamport\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The version number of all the written objects (excluding packages) by this transaction. status [ExecutionStatus](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionStatus) Proto3 optional The status of the execution. transaction\_digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The transaction digest. unchanged\_consensus\_objects [UnchangedConsensusObject](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UnchangedConsensusObject) Repeated \[\] Consensus objects that are not mutated in this transaction. Unlike owned objects, read-only consensus objects' version are not committed in the transaction, and in order for a node to catch up and execute it without consensus sequencing, the version needs to be committed in the effects. unchanged\_loaded\_runtime\_objects [ObjectReference](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ObjectReference) Repeated \[\] version [int32](https://docs.sui.io/references/fullnode-protocol#int32) Proto3 optional Version of this TransactionEffects. ### UnchangedConsensusObject[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UnchangedConsensusObject "Direct link to UnchangedConsensusObject") A consensus object that wasn't changed during execution. Fields digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Digest of the consensus object. kind [UnchangedConsensusObjectKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UnchangedConsensusObject-UnchangedConsensusObjectKind) Proto3 optional object\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ObjectId of the consensus object. object\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Type information is not provided by the effects structure but is instead provided by an indexing layer version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Version of the consensus object. #### Enums #### AccumulatorOperation Enums `ACCUMULATOR_OPERATION_UNKNOWN` `MERGE` `SPLIT` #### IdOperation Enums `ID_OPERATION_UNKNOWN` `NONE` `CREATED` `DELETED` #### InputObjectState Enums `INPUT_OBJECT_STATE_UNKNOWN` `INPUT_OBJECT_STATE_DOES_NOT_EXIST` `INPUT_OBJECT_STATE_EXISTS` #### OutputObjectState Enums `OUTPUT_OBJECT_STATE_UNKNOWN` `OUTPUT_OBJECT_STATE_DOES_NOT_EXIST` `OUTPUT_OBJECT_STATE_OBJECT_WRITE` `OUTPUT_OBJECT_STATE_PACKAGE_WRITE` `OUTPUT_OBJECT_STATE_ACCUMULATOR_WRITE` #### UnchangedConsensusObjectKind Enums `UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN` `READ_ONLY_ROOT` Read-only consensus object from the input. `MUTATE_CONSENSUS_STREAM_ENDED` Objects with ended consensus streams that appear mutably/owned in the input. `READ_CONSENSUS_STREAM_ENDED` Objects with ended consensus streams objects that appear as read-only in the input. `CANCELED` Consensus objects that were congested and resulted in this transaction being canceled. `PER_EPOCH_CONFIG` Read of a per\-epoch config object that should remain the same during an epoch. This optionally will indicate the sequence number of the config object at the start of the epoch. sui/rpc/v2/executed\_transaction.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_executed-transaction-proto "Direct link to sui/rpc/v2/executed_transaction.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### ExecutedTransaction[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutedTransaction "Direct link to ExecutedTransaction") Fields balance\_changes [BalanceChange](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BalanceChange) Repeated \[\] checkpoint [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The sequence number for the checkpoint that includes this transaction. digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this Transaction. effects [TransactionEffects](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionEffects) Proto3 optional The `TransactionEffects` for this transaction. events [TransactionEvents](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionEvents) Proto3 optional The `TransactionEvents` for this transaction. This field might be empty, even if it was explicitly requested, if the transaction didn't produce any events. `sui.types.TransactionEffects.events_digest` is populated if the transaction produced any events. objects [ObjectSet](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ObjectSet) Proto3 optional Set of objects either referenced as inputs or produced as outputs from this Transaction. signatures [UserSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UserSignature) Repeated \[\] List of user signatures that are used to authorize the execution of this transaction. timestamp [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional The Unix timestamp of the checkpoint that includes this transaction. transaction [Transaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Transaction) Proto3 optional The transaction itself. sui/rpc/v2/name\_service.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_name-service-proto "Direct link to sui/rpc/v2/name_service.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### LookupNameRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-LookupNameRequest "Direct link to LookupNameRequest") Fields name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The SuiNS name to lookup. Supports both `@name` as well as `name.sui` formats. ### LookupNameResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-LookupNameResponse "Direct link to LookupNameResponse") Fields record [NameRecord](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-NameRecord) Proto3 optional The record for the requested name ### NameRecord[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-NameRecord "Direct link to NameRecord") Fields data [DataEntry](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-NameRecord-DataEntry) Repeated \[\] Additional data which may be stored in a record expiration\_timestamp [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional Timestamp when the record expires. This is either the expiration of the record itself or the expiration of this record's parent if this is a leaf record. id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Id of this record. Note that records are stored on chain as dynamic fields of the type `Field`. name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The SuiNS name of this record registration\_nft\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The ID of the `RegistrationNFT` assigned to this record. The owner of the corresponding `RegistrationNFT` has the rights to be able to change and adjust the `target_address` of this domain. It is possible that the ID changes if the record expires and is purchased by someone else. target\_address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The target address that this name points to ### DataEntry[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-NameRecord-DataEntry "Direct link to DataEntry") Fields key [string](https://docs.sui.io/references/fullnode-protocol#string) value [string](https://docs.sui.io/references/fullnode-protocol#string) ### ReverseLookupNameRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ReverseLookupNameRequest "Direct link to ReverseLookupNameRequest") Fields address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The address to perform a reverse lookup for. ### ReverseLookupNameResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ReverseLookupNameResponse "Direct link to ReverseLookupNameResponse") Fields record [NameRecord](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-NameRecord) Proto3 optional The record for the SuiNS name linked to the requested address ### Services (name\_service.proto)[​](https://docs.sui.io/references/fullnode-protocol#services-name_serviceproto "Direct link to Services (name_service.proto)") #### NameService Methods [LookupNameRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-LookupNameRequest) -> LookupNameResponse [ReverseLookupNameRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ReverseLookupNameRequest) -> ReverseLookupNameResponse sui/rpc/v2/signature.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_signature-proto "Direct link to sui/rpc/v2/signature.proto") ------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### CircomG1[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CircomG1 "Direct link to CircomG1") A G1 point. Fields e0 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement e1 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement e2 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement ### CircomG2[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CircomG2 "Direct link to CircomG2") A G2 point. Fields e00 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement e01 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement e10 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement e11 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement e20 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement e21 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement ### MultisigAggregatedSignature[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigAggregatedSignature "Direct link to MultisigAggregatedSignature") Aggregated signature from members of a multisig committee. Fields bitmap [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Bitmap indicating which committee members contributed to the signature. committee [MultisigCommittee](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigCommittee) Proto3 optional The committee to use to validate this signature. legacy\_bitmap [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional If present, means this signature's on-chain format uses the old legacy multisig format. signatures [MultisigMemberSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigMemberSignature) Repeated \[\] The plain signatures encoded with signature scheme. The signatures must be in the same order as they are listed in the committee. ### MultisigCommittee[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigCommittee "Direct link to MultisigCommittee") A multisig committee. Fields members [MultisigMember](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigMember) Repeated \[\] A list of committee members and their corresponding weight. threshold [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional The threshold of signatures needed to validate a signature from this committee. ### MultisigMember[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigMember "Direct link to MultisigMember") A member in a multisig committee. Fields public\_key [MultisigMemberPublicKey](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigMemberPublicKey) Proto3 optional The public key of the committee member. weight [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional The weight of this member's signature. ### MultisigMemberPublicKey[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigMemberPublicKey "Direct link to MultisigMemberPublicKey") Set of valid public keys for multisig committee members. Fields public\_key [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Public key bytes if scheme is ed25519 | secp256k1 | secp256r1 | passkey. scheme [SignatureScheme](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SignatureScheme) Proto3 optional The signature scheme of this public key. zklogin [ZkLoginPublicIdentifier](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginPublicIdentifier) Proto3 optional A zklogin public identifier if scheme is zklogin. ### MultisigMemberSignature[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigMemberSignature "Direct link to MultisigMemberSignature") A signature from a member of a multisig committee. Fields passkey [PasskeyAuthenticator](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PasskeyAuthenticator) Proto3 optional The passkey authenticator if scheme is `PASSKEY`. scheme [SignatureScheme](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SignatureScheme) Proto3 optional The signature scheme of this signature. signature [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Signature bytes if scheme is ed25519 | secp256k1 | secp256r1. zklogin [ZkLoginAuthenticator](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginAuthenticator) Proto3 optional The zklogin authenticator if scheme is `ZKLOGIN`. ### PasskeyAuthenticator[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PasskeyAuthenticator "Direct link to PasskeyAuthenticator") A passkey authenticator. See [struct.PasskeyAuthenticator](https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/struct.PasskeyAuthenticator.html#bcs) for more information on the requirements on the shape of the `client_data_json` field. Fields authenticator\_data [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Opaque authenticator data for this passkey signature. See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for more information on this field. client\_data\_json [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Structured, unparsed, JSON for this passkey signature. See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) for more information on this field. signature [SimpleSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimpleSignature) Proto3 optional A secp256r1 signature. ### SimpleSignature[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimpleSignature "Direct link to SimpleSignature") Either an ed25519, secp256k1 or secp256r1 signature Fields public\_key [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Public key bytes scheme [SignatureScheme](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SignatureScheme) Proto3 optional The signature scheme of this signature. signature [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Signature bytes ### UserSignature[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UserSignature "Direct link to UserSignature") A signature from a user. Fields bcs [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional This signature serialized as as BCS. When provided as input this will support both the form that is length prefixed as well as not length prefixed. scheme [SignatureScheme](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SignatureScheme) Proto3 optional The signature scheme of this signature. Union field **signature** can be only one of the following. multisig [MultisigAggregatedSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigAggregatedSignature) The multisig aggregated signature if scheme is `MULTISIG`. passkey [PasskeyAuthenticator](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PasskeyAuthenticator) The passkey authenticator if scheme is `PASSKEY`. simple [SimpleSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimpleSignature) Simple signature if scheme is ed25519 | secp256k1 | secp256r1. zklogin [ZkLoginAuthenticator](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginAuthenticator) The zklogin authenticator if scheme is `ZKLOGIN`. ### ValidatorAggregatedSignature[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorAggregatedSignature "Direct link to ValidatorAggregatedSignature") An aggregated signature from multiple validators. Fields bitmap [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Bitmap indicating which members of the committee contributed to this signature. epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The epoch when this signature was produced. This can be used to lookup the `ValidatorCommittee` from this epoch to verify this signature. signature [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional The 48-byte Bls12381 aggregated signature. ### ValidatorCommittee[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorCommittee "Direct link to ValidatorCommittee") The validator set for a particular epoch. Fields epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The epoch where this committee governs. members [ValidatorCommitteeMember](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorCommitteeMember) Repeated \[\] The committee members. ### ValidatorCommitteeMember[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorCommitteeMember "Direct link to ValidatorCommitteeMember") A member of a validator committee. Fields public\_key [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional The 96-byte Bls12381 public key for this validator. weight [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional voting weight this validator possesses. ### ZkLoginAuthenticator[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginAuthenticator "Direct link to ZkLoginAuthenticator") A zklogin authenticator. Fields inputs [ZkLoginInputs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginInputs) Proto3 optional Zklogin proof and inputs required to perform proof verification. jwk\_id [JwkId](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-JwkId) Proto3 optional The id of the JWK used to authorize this zklogin authenticator max\_epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Maximum epoch for which the proof is valid. public\_identifier [ZkLoginPublicIdentifier](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginPublicIdentifier) Proto3 optional The public identifier (similar to a public key) for this zklogin authenticator signature [SimpleSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimpleSignature) Proto3 optional User signature with the public key attested to by the provided proof. ### ZkLoginClaim[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginClaim "Direct link to ZkLoginClaim") A claim of the iss in a zklogin proof. Fields index\_mod\_4 [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional value [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ### ZkLoginInputs[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginInputs "Direct link to ZkLoginInputs") A zklogin groth16 proof and the required inputs to perform proof verification. Fields address\_seed [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement header\_base64 [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional iss\_base64\_details [ZkLoginClaim](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginClaim) Proto3 optional proof\_points [ZkLoginProof](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginProof) Proto3 optional ### ZkLoginProof[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginProof "Direct link to ZkLoginProof") A zklogin groth16 proof. Fields a [CircomG1](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CircomG1) Proto3 optional b [CircomG2](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CircomG2) Proto3 optional c [CircomG1](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CircomG1) Proto3 optional ### ZkLoginPublicIdentifier[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginPublicIdentifier "Direct link to ZkLoginPublicIdentifier") Public key equivalent for zklogin authenticators. Fields address\_seed [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional base10 encoded Bn254FieldElement iss [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional sui/rpc/v2/gas\_cost\_summary.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_gas-cost-summary-proto "Direct link to sui/rpc/v2/gas_cost_summary.proto") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ #### Messages ### GasCostSummary[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GasCostSummary "Direct link to GasCostSummary") Summary of gas charges. Fields computation\_cost [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Cost of computation/execution. non\_refundable\_storage\_fee [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The fee for the rebate. The portion of the storage rebate kept by the system. storage\_cost [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Storage cost, it's the sum of all storage cost for all objects created or mutated. storage\_rebate [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The amount of storage cost refunded to the user for all objects deleted or mutated in the transaction. sui/rpc/v2/error\_reason.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_error-reason-proto "Direct link to sui/rpc/v2/error_reason.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Enums #### ErrorReason Enums `ERROR_REASON_UNKNOWN` `FIELD_INVALID` `FIELD_MISSING` sui/rpc/v2/protocol\_config.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_protocol-config-proto "Direct link to sui/rpc/v2/protocol_config.proto") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### ProtocolConfig[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProtocolConfig "Direct link to ProtocolConfig") Fields attributes [AttributesEntry](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProtocolConfig-AttributesEntry) Repeated \[\] feature\_flags [FeatureFlagsEntry](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProtocolConfig-FeatureFlagsEntry) Repeated \[\] protocol\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional ### AttributesEntry[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProtocolConfig-AttributesEntry "Direct link to AttributesEntry") Fields key [string](https://docs.sui.io/references/fullnode-protocol#string) value [string](https://docs.sui.io/references/fullnode-protocol#string) ### FeatureFlagsEntry[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProtocolConfig-FeatureFlagsEntry "Direct link to FeatureFlagsEntry") Fields key [string](https://docs.sui.io/references/fullnode-protocol#string) value [bool](https://docs.sui.io/references/fullnode-protocol#bool) sui/rpc/v2/system\_state.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_system-state-proto "Direct link to sui/rpc/v2/system_state.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### MoveTable[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable "Direct link to MoveTable") A message that represents a Move `0x2::table::Table` or `0x2::bag::Bag` Fields id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The UID of the table or bag size [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The size or number of key-value pairs in the table or bag ### StakeSubsidy[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-StakeSubsidy "Direct link to StakeSubsidy") Fields balance [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Balance of SUI set aside for stake subsidies that will be drawn down over time. current\_distribution\_amount [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The amount of stake subsidy to be drawn down per distribution. This amount decays and decreases over time. distribution\_counter [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Count of the number of times stake subsidies have been distributed. extra\_fields [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Any extra fields that's not defined statically. stake\_subsidy\_decrease\_rate [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional The rate at which the distribution amount decays at the end of each period. Expressed in basis points. stake\_subsidy\_period\_length [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Number of distributions to occur before the distribution amount decays. ### StakingPool[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-StakingPool "Direct link to StakingPool") A staking pool embedded in each validator struct in the system state object. Fields activation\_epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The epoch at which this pool became active. The value is `None` if the pool is pre-active and `Some()` if active or inactive. deactivation\_epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The epoch at which this staking pool ceased to be active. `None` = {pre-active, active}, `Some()` if in-active, and it was de-activated at epoch ``. exchange\_rates [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Exchange rate history of previous epochs. The entries start from the `activation_epoch` of this pool and contains exchange rates at the beginning of each epoch, i.e., right after the rewards for the previous epoch have been deposited into the pool. key: u64 (epoch number), value: PoolTokenExchangeRate extra\_fields [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Any extra fields that's not defined statically. id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional UID of the StakingPool object pending\_pool\_token\_withdraw [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Pending pool token withdrawn during the current epoch, emptied at epoch boundaries. pending\_stake [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Pending stake amount for this epoch, emptied at epoch boundaries. pending\_total\_sui\_withdraw [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Pending stake withdrawn during the current epoch, emptied at epoch boundaries. This includes both the principal and rewards SUI withdrawn. pool\_token\_balance [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Total number of pool tokens issued by the pool. rewards\_pool [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The epoch stake rewards will be added here at the end of each epoch. sui\_balance [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The total number of SUI tokens in this pool, including the SUI in the rewards\_pool, as well as in all the principal in the `StakedSui` object, updated at epoch boundaries. ### StorageFund[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-StorageFund "Direct link to StorageFund") Struct representing the onchain storage fund. Fields non\_refundable\_balance [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Represents any remaining inflow of the storage fund that should not be taken out of the fund. total\_object\_storage\_rebates [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional This is the sum of `storage_rebate` of all objects currently stored on-chain. To maintain this invariant, the only inflow of this balance is storage charges collected from transactions, and the only outflow is storage rebates of transactions, including both the portion refunded to the transaction senders as well as the non-refundable portion taken out and put into `non_refundable_balance`. ### SystemParameters[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SystemParameters "Direct link to SystemParameters") Fields epoch\_duration\_ms [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The duration of an epoch, in milliseconds. extra\_fields [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Any extra fields that are not defined statically. max\_validator\_count [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Maximum number of active validators at any moment. We do not allow the number of validators in any epoch to go above this. min\_validator\_count [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Minimum number of active validators at any moment. min\_validator\_joining\_stake [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Deprecated. Lower-bound on the amount of stake required to become a validator. stake\_subsidy\_start\_epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The starting epoch in which stake subsidies start being paid out validator\_low\_stake\_grace\_period [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional A validator can have stake below `validator_low_stake_threshold` for this many epochs before being kicked out. validator\_low\_stake\_threshold [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Deprecated. Validators with stake amount below `validator_low_stake_threshold` are considered to have low stake and will be escorted out of the validator set after being below this threshold for more than `validator_low_stake_grace_period` number of epochs. validator\_very\_low\_stake\_threshold [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Deprecated. Validators with stake below `validator_very_low_stake_threshold` will be removed immediately at epoch change, no grace period. ### SystemState[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SystemState "Direct link to SystemState") Fields epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The epoch id epoch\_start\_timestamp\_ms [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Unix timestamp of when this this epoch started extra\_fields [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Any extra fields that's not defined statically. parameters [SystemParameters](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SystemParameters) Proto3 optional Set of system config parameters protocol\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The protocol version reference\_gas\_price [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The reference gas price for this epoch safe\_mode [bool](https://docs.sui.io/references/fullnode-protocol#bool) Proto3 optional Whether the system is running in a downgraded safe mode due to a non-recoverable bug. This is set whenever we failed to execute advance\_epoch, and ended up executing advance\_epoch\_safe\_mode. It can be reset once we are able to successfully execute advance\_epoch. The rest of the fields starting with `safe_mode_` are accumulated during safe mode when advance\_epoch\_safe\_mode is executed. They will eventually be processed once we are out of safe mode. safe\_mode\_computation\_rewards [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Computation rewards accumulated during safe\_mode safe\_mode\_non\_refundable\_storage\_fee [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Nonrefundable storage fees accumulated during safe\_mode safe\_mode\_storage\_rebates [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Storage rebates paid out during safe\_mode safe\_mode\_storage\_rewards [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Storage rewards accumulated during safe\_mode stake\_subsidy [StakeSubsidy](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-StakeSubsidy) Proto3 optional Schedule of stake subsidies given out each epoch. storage\_fund [StorageFund](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-StorageFund) Proto3 optional Storage Fund info validator\_report\_records [ValidatorReportRecord](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorReportRecord) Repeated \[\] A list of the records of validator reporting each other. There is an entry in this list for each validator that has been reported at least once. Each record contains all the validators that reported them. If a validator has never been reported they don't have a record in this list. This lists persists across epoch: a peer continues being in a reported state until the reporter doesn't explicitly remove their report. validators [ValidatorSet](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorSet) Proto3 optional Information about the validators version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The version of the system state data structure type. ### Validator[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Validator "Direct link to Validator") Definition of a Validator in the system contracts Note: fields of ValidatorMetadata are flattened into this type Fields address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The Sui Address of the validator. This is the sender that created the Validator object, and also the address to send validator/coins to during withdraws. commission\_rate [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Commission rate of the validator, in basis point. description [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional extra\_fields [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Any extra fields that's not defined statically. gas\_price [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Gas price quote, updated only at end of epoch. image\_url [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional metadata\_extra\_fields [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Any extra fields that's not defined statically in the `ValidatorMetadata` struct name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional A unique human-readable name of this validator. network\_address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The network address of the validator (could also contain extra info such as port, DNS and etc.). network\_public\_key [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional The public key bytes corresponding to the private key that the validator uses to establish TLS connections next\_epoch\_commission\_rate [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The commission rate of the validator starting the next epoch, in basis point. next\_epoch\_gas\_price [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional This validator's gas price quote for the next epoch. next\_epoch\_network\_address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional next\_epoch\_network\_public\_key [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional next\_epoch\_p2p\_address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional next\_epoch\_primary\_address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional next\_epoch\_proof\_of\_possession [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional next\_epoch\_protocol\_public\_key [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional next\_epoch\_stake [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Total amount of stake that would be active in the next epoch. next\_epoch\_worker\_address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional next\_epoch\_worker\_public\_key [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional operation\_cap\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The ID of this validator's current valid `UnverifiedValidatorOperationCap` p2p\_address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The address of the validator used for p2p activities such as state sync (could also contain extra info such as port, DNS and etc.). primary\_address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The address of the narwhal primary project\_url [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional proof\_of\_possession [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional This is a proof that the validator has ownership of the protocol private key protocol\_public\_key [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional The public key bytes corresponding to the private key that the validator holds to sign transactions. For now, this is the same as AuthorityName. staking\_pool [StakingPool](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-StakingPool) Proto3 optional Staking pool for this validator. voting\_power [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The voting power of this validator, which might be different from its stake amount. worker\_address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The address of the narwhal worker worker\_public\_key [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional The public key bytes corresponding to the Narwhal Worker ### ValidatorReportRecord[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorReportRecord "Direct link to ValidatorReportRecord") Fields reported [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The address of the validator being reported reporters [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] The list of validator (addresses) that are reporting on the validator specified by `reported` ### ValidatorSet[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorSet "Direct link to ValidatorSet") Fields active\_validators [Validator](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Validator) Repeated \[\] The current list of active validators. at\_risk\_validators [AtRiskValidatorsEntry](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorSet-AtRiskValidatorsEntry) Repeated \[\] Table storing the number of epochs during which a validator's stake has been below the low stake threshold. extra\_fields [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Any extra fields that's not defined statically. inactive\_validators [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Mapping from a staking pool ID to the inactive validator that has that pool as its staking pool. When a validator is deactivated the validator is removed from `active_validators` it is added to this table so that stakers can continue to withdraw their stake from it. key: address (staking pool Id), value: 0x3::validator\_wrapper::ValidatorWrapper pending\_active\_validators [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional List of new validator candidates added during the current epoch. They will be processed at the end of the epoch. key: u64 (index), value: 0x3::validator::Validator pending\_removals [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Repeated \[\] Removal requests from the validators. Each element is an index pointing to `active_validators`. staking\_pool\_mappings [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Mappings from staking pool's ID to the sui address of a validator. key: address (staking pool Id), value: address (sui address of the validator) total\_stake [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Total amount of stake from all active validators at the beginning of the epoch. Written only once per epoch, in `advance_epoch` function. validator\_candidates [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) Proto3 optional Table storing preactive/candidate validators, mapping their addresses to their `Validator` structs. When an address calls `request_add_validator_candidate`, they get added to this table and become a preactive validator. When the candidate has met the min stake requirement, they can call `request_add_validator` to officially add them to the active validator set `active_validators` next epoch. key: address (sui address of the validator), value: 0x3::validator\_wrapper::ValidatorWrapper ### AtRiskValidatorsEntry[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorSet-AtRiskValidatorsEntry "Direct link to AtRiskValidatorsEntry") Fields key [string](https://docs.sui.io/references/fullnode-protocol#string) value [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) sui/rpc/v2/execution\_status.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_execution-status-proto "Direct link to sui/rpc/v2/execution_status.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### CleverError[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CleverError "Direct link to CleverError") Fields constant\_name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional constant\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional error\_code [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional line\_number [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Union field **value** can be only one of the following. raw [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) rendered [string](https://docs.sui.io/references/fullnode-protocol#string) ### CoinDenyListError[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinDenyListError "Direct link to CoinDenyListError") Fields address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Denied address. coin\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Coin type. ### CommandArgumentError[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandArgumentError "Direct link to CommandArgumentError") An error with an argument to a command. Fields argument [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Position of the problematic argument. index\_error [IndexError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-IndexError) Proto3 optional kind [CommandArgumentErrorKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandArgumentError-CommandArgumentErrorKind) Proto3 optional ### CongestedObjects[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CongestedObjects "Direct link to CongestedObjects") Set of objects that were congested, leading to the transaction's cancellation. Fields objects [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] ### ExecutionError[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionError "Direct link to ExecutionError") An error that can occur during the execution of a transaction. Fields command [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The command, if any, during which the error occurred. description [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional A human readable description of the error kind [ExecutionErrorKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionError-ExecutionErrorKind) Proto3 optional Union field **error\_details** can be only one of the following. abort [MoveAbort](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveAbort) coin\_deny\_list\_error [CoinDenyListError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinDenyListError) command\_argument\_error [CommandArgumentError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandArgumentError) congested\_objects [CongestedObjects](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CongestedObjects) Set of objects that were congested, leading to the transaction's cancellation. index\_error [IndexError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-IndexError) object\_id [string](https://docs.sui.io/references/fullnode-protocol#string) package\_upgrade\_error [PackageUpgradeError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PackageUpgradeError) size\_error [SizeError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SizeError) type\_argument\_error [TypeArgumentError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeArgumentError) ### ExecutionStatus[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionStatus "Direct link to ExecutionStatus") The status of an executed transaction. Fields error [ExecutionError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionError) Proto3 optional The error if `success` is false. success [bool](https://docs.sui.io/references/fullnode-protocol#bool) Proto3 optional Indicates if the transaction was successful or not. ### IndexError[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-IndexError "Direct link to IndexError") Fields index [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Index of an input or result. subresult [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Index of a subresult. ### MoveAbort[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveAbort "Direct link to MoveAbort") Fields abort\_code [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional clever\_error [CleverError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CleverError) Proto3 optional Extra error information if abort code is a "Clever Error" location [MoveLocation](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveLocation) Proto3 optional Location in Move where the error occurred. ### MoveLocation[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveLocation "Direct link to MoveLocation") Location in Move bytecode where an error occurred. Fields function [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional The function index. function\_name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The name of the function, if available. instruction [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Offset of the instruction where the error occurred. module [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The module name. package [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The package ID. ### PackageUpgradeError[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PackageUpgradeError "Direct link to PackageUpgradeError") An error with upgrading a package. Fields digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional A digest. kind [PackageUpgradeErrorKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PackageUpgradeError-PackageUpgradeErrorKind) Proto3 optional package\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The Package Id. policy [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional The policy. ticket\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The ticket Id. ### SizeError[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SizeError "Direct link to SizeError") A size error. Fields max\_size [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The maximum allowable size. size [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The offending size. ### TypeArgumentError[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeArgumentError "Direct link to TypeArgumentError") Type argument error. Fields kind [TypeArgumentErrorKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeArgumentError-TypeArgumentErrorKind) Proto3 optional type\_argument [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Index of the problematic type argument. #### Enums #### CommandArgumentErrorKind Enums `COMMAND_ARGUMENT_ERROR_KIND_UNKNOWN` `TYPE_MISMATCH` The type of the value does not match the expected type. `INVALID_BCS_BYTES` The argument cannot be deserialized into a value of the specified type. `INVALID_USAGE_OF_PURE_ARGUMENT` The argument cannot be instantiated from raw bytes. `INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION` Invalid argument to private entry function. Private entry functions cannot take arguments from other Move functions. `INDEX_OUT_OF_BOUNDS` Out of bounds access to input or results. `index` field will be set indicating the invalid index value. `SECONDARY_INDEX_OUT_OF_BOUNDS` Out of bounds access to subresult. `index` and `subresult` fields will be set indicating the invalid index value. `INVALID_RESULT_ARITY` Invalid usage of result. Expected a single result but found either no return value or multiple. `index` field will be set indicating the invalid index value. `INVALID_GAS_COIN_USAGE` Invalid usage of gas coin. The gas coin can only be used by-value with a `TransferObject` command. `INVALID_VALUE_USAGE` Invalid usage of Move value. - Mutably borrowed values require unique usage. - Immutably borrowed values cannot be taken or borrowed mutably. - Taken values cannot be used again. `INVALID_OBJECT_BY_VALUE` Immutable objects cannot be passed by-value. `INVALID_OBJECT_BY_MUT_REF` Immutable objects cannot be passed by mutable reference, `&mut`. `CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED` Consensus object operations such as wrapping, freezing, or converting to owned are not allowed. `INVALID_ARGUMENT_ARITY` Invalid argument arity. Expected a single argument but found a result that expanded to multiple arguments. `INVALID_TRANSFER_OBJECT` Object passed to TransferObject does not have public transfer, i.e. the `store` ability `INVALID_MAKE_MOVE_VEC_NON_OBJECT_ARGUMENT` First argument to MakeMoveVec is not an object. If no type is specified for MakeMoveVec, all arguments must be the same object type. `ARGUMENT_WITHOUT_VALUE` Specified argument location does not have a value and cannot be used `CANNOT_MOVE_BORROWED_VALUE` Cannot move a borrowed value. The value's type does resulted in this argument usage being inferred as a move. This is likely due to the type not having the `copy` ability; although in rare cases, it could also be this is the last usage of a value without the `drop` ability. `CANNOT_WRITE_TO_EXTENDED_REFERENCE` Cannot write to an argument location that is still borrowed, and where that borrow is an extension of that reference. This is likely due to this argument being used in a Move call that returns a reference, and that reference is used in a later command. `INVALID_REFERENCE_ARGUMENT` The argument specified cannot be used as a reference argument in the Move call. Either the argument is a mutable reference and it conflicts with another argument to the call, or the argument is mutable and another reference extends it and will be used in a later command. #### ExecutionErrorKind Enums `EXECUTION_ERROR_KIND_UNKNOWN` `INSUFFICIENT_GAS` Insufficient gas. `INVALID_GAS_OBJECT` Invalid `Gas` object. `INVARIANT_VIOLATION` Invariant violation. `FEATURE_NOT_YET_SUPPORTED` Attempted to use feature that is not supported yet. `OBJECT_TOO_BIG` Move object is larger than the maximum allowed size. `PACKAGE_TOO_BIG` Package is larger than the maximum allowed size. `CIRCULAR_OBJECT_OWNERSHIP` Circular object ownership. `INSUFFICIENT_COIN_BALANCE` Insufficient coin balance for requested operation. `COIN_BALANCE_OVERFLOW` Coin balance overflowed an u64. `PUBLISH_ERROR_NON_ZERO_ADDRESS` Publish error, non-zero address. The modules in the package must have their self\-addresses set to zero. `SUI_MOVE_VERIFICATION_ERROR` Sui Move bytecode verification error. `MOVE_PRIMITIVE_RUNTIME_ERROR` Error from a non-abort instruction. Possible causes: Arithmetic error, stack overflow, max value depth, or similar. `MOVE_ABORT` Move runtime abort. `VM_VERIFICATION_OR_DESERIALIZATION_ERROR` Bytecode verification error. `VM_INVARIANT_VIOLATION` MoveVm invariant violation. `FUNCTION_NOT_FOUND` Function not found. `ARITY_MISMATCH` Parity mismatch for Move function. The number of arguments does not match the number of parameters. `TYPE_ARITY_MISMATCH` Type parity mismatch for Move function. Mismatch between the number of actual versus expected type arguments. `NON_ENTRY_FUNCTION_INVOKED` Non-entry function invoked. Move Call must start with an entry function. `COMMAND_ARGUMENT_ERROR` Invalid command argument. `TYPE_ARGUMENT_ERROR` Type argument error. `UNUSED_VALUE_WITHOUT_DROP` Unused result without the drop ability. `INVALID_PUBLIC_FUNCTION_RETURN_TYPE` Invalid public Move function signature. Unsupported return type for return value. `INVALID_TRANSFER_OBJECT` Invalid transfer object, object does not have public transfer. `EFFECTS_TOO_LARGE` Effects from the transaction are too large. `PUBLISH_UPGRADE_MISSING_DEPENDENCY` Publish or Upgrade is missing dependency. `PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE` Publish or upgrade dependency downgrade. Indirect (transitive) dependency of published or upgraded package has been assigned an on-chain version that is less than the version required by one of the package's transitive dependencies. `PACKAGE_UPGRADE_ERROR` Invalid package upgrade. `WRITTEN_OBJECTS_TOO_LARGE` Indicates the transaction tried to write objects too large to storage. `CERTIFICATE_DENIED` Certificate is on the deny list. `SUI_MOVE_VERIFICATION_TIMEDOUT` Sui Move bytecode verification timed out. `CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED` The requested consensus object operation is not allowed. `INPUT_OBJECT_DELETED` Requested consensus object has been deleted. `EXECUTION_CANCELED_DUE_TO_CONSENSUS_OBJECT_CONGESTION` Certificate is canceled due to congestion on consensus objects. `ADDRESS_DENIED_FOR_COIN` Address is denied for this coin type. `COIN_TYPE_GLOBAL_PAUSE` Coin type is globally paused for use. `EXECUTION_CANCELED_DUE_TO_RANDOMNESS_UNAVAILABLE` Certificate is canceled because randomness could not be generated this epoch. `MOVE_VECTOR_ELEM_TOO_BIG` Move vector element (passed to MakeMoveVec) with size {value\_size} is larger \\ than the maximum size {max\_scaled\_size}. Note that this maximum is scaled based on the \\ type of the vector element. `MOVE_RAW_VALUE_TOO_BIG` Move value (possibly an upgrade ticket or a dev-inspect value) with size {value\_size} \\ is larger than the maximum size {max\_scaled\_size}. Note that this maximum is scaled based \\ on the type of the value. `INVALID_LINKAGE` A valid linkage was unable to be determined for the transaction or one of its commands. `INSUFFICIENT_FUNDS_FOR_WITHDRAW` Insufficient funds for transaction withdrawal `NON_EXCLUSIVE_WRITE_INPUT_OBJECT_MODIFIED` An input object with non-exclusive write mutability was modified #### PackageUpgradeErrorKind Enums `PACKAGE_UPGRADE_ERROR_KIND_UNKNOWN` `UNABLE_TO_FETCH_PACKAGE` Unable to fetch package. `NOT_A_PACKAGE` Object is not a package. `INCOMPATIBLE_UPGRADE` Package upgrade is incompatible with previous version. `DIGEST_DOES_NOT_MATCH` Digest in upgrade ticket and computed digest differ. `UNKNOWN_UPGRADE_POLICY` Upgrade policy is not valid. `PACKAGE_ID_DOES_NOT_MATCH` Package ID does not match `PackageId` in upgrade ticket. #### TypeArgumentErrorKind Enums `TYPE_ARGUMENT_ERROR_KIND_UNKNOWN` `TYPE_NOT_FOUND` A type was not found in the module specified. `CONSTRAINT_NOT_SATISFIED` A type provided did not match the specified constraint. sui/rpc/v2/object\_reference.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_object-reference-proto "Direct link to sui/rpc/v2/object_reference.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### ObjectReference[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ObjectReference "Direct link to ObjectReference") Reference to an object. Fields digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this object. object\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The object id of this object. version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The version of this object. sui/rpc/v2/input.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_input-proto "Direct link to sui/rpc/v2/input.proto") ------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### FundsWithdrawal[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FundsWithdrawal "Direct link to FundsWithdrawal") Fields amount [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional coin\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional source [Source](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FundsWithdrawal-Source) Proto3 optional ### Input[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Input "Direct link to Input") An input to a user transaction. Fields digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this object. funds\_withdrawal [FundsWithdrawal](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FundsWithdrawal) Proto3 optional Fund Reservation information if `kind` is `FUNDS_WITHDRAWAL`. kind [InputKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Input-InputKind) Proto3 optional literal [Value](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Value) Proto3 optional A literal value INPUT ONLY mutability [Mutability](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Input-Mutability) Proto3 optional NOTE: For backwards compatibility purposes the addition of the new `NON_EXCLUSIVE_WRITE` mutability variant requires providing a new field. The old `mutable` field will continue to be populated and respected as an input for the time being. mutable [bool](https://docs.sui.io/references/fullnode-protocol#bool) Proto3 optional Controls whether the caller asks for a mutable reference to the shared object. object\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional `ObjectId` of the object input. pure [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional A move value serialized as BCS. For normal operations this is required to be a move primitive type and not contain structs or objects. version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Requested version of the input object when `kind` is `IMMUTABLE_OR_OWNED` or `RECEIVING` or if `kind` is `SHARED` this is the initial version of the object when it was shared #### Enums #### Source Enums `SOURCE_UNKNOWN` `SENDER` `SPONSOR` #### InputKind Enums `INPUT_KIND_UNKNOWN` `PURE` A move value serialized as BCS. `IMMUTABLE_OR_OWNED` A Move object that is either immutable or address owned. `SHARED` A Move object whose owner is "Shared". `RECEIVING` A Move object that is attempted to be received in this transaction. `FUNDS_WITHDRAWAL` Reservation to withdraw balance from a funds accumulator #### Mutability Enums `MUTABILITY_UNKNOWN` `IMMUTABLE` `MUTABLE` `NON_EXCLUSIVE_WRITE` Non-exclusive write is used to allow multiple transactions to simultaneously add disjoint dynamic fields to an object. (Currently only used by settlement transactions). sui/rpc/v2/move\_package.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_move-package-proto "Direct link to sui/rpc/v2/move_package.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### DatatypeDescriptor[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-DatatypeDescriptor "Direct link to DatatypeDescriptor") Describes a Move Datatype. Fields abilities [Ability](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Ability) Repeated \[\] This type's abilities defining\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional PackageId of the package where this Datatype is defined. A type's `defining_id` is the `storage_id` of the package version that first introduced or added that type. fields [FieldDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FieldDescriptor) Repeated \[\] Set of fields if this Datatype is a struct. The order of the entries is the order of how the fields are defined. kind [DatatypeKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-DatatypeDescriptor-DatatypeKind) Proto3 optional Indicates whether this datatype is a 'STRUCT' or an 'ENUM' module [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Name of the module where this Datatype is defined name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Name of this Datatype type\_name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Fully qualified name of this Datatype. This is `::::` type\_parameters [TypeParameter](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeParameter) Repeated \[\] Ability constraints and phantom status for this type's generic type parameters variants [VariantDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VariantDescriptor) Repeated \[\] Set of variants if this Datatype is an enum. The order of the entries is the order of how the variants are defined. ### FieldDescriptor[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FieldDescriptor "Direct link to FieldDescriptor") Descriptor of a field that belongs to a struct or enum variant Fields name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Name of the field position [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Order or position of the field in the struct or enum variant definition. type [OpenSignatureBody](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignatureBody) Proto3 optional The type of the field ### FunctionDescriptor[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FunctionDescriptor "Direct link to FunctionDescriptor") Descriptor of a Move function Fields is\_entry [bool](https://docs.sui.io/references/fullnode-protocol#bool) Proto3 optional Whether the function is marked `entry` or not. name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Name of the function parameters [OpenSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignature) Repeated \[\] Formal parameter types. returns [OpenSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignature) Repeated \[\] Return types. type\_parameters [TypeParameter](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeParameter) Repeated \[\] Ability constraints for type parameters visibility [Visibility](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FunctionDescriptor-Visibility) Proto3 optional Whether the function is `public`, `private` or `public(friend)` ### Linkage[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Linkage "Direct link to Linkage") Upgraded package info for the linkage table. Fields original\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Id of the original package. upgraded\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Id of the upgraded package. upgraded\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Version of the upgraded package. ### Module[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Module "Direct link to Module") A Move Module. Fields contents [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Serialized bytecode of the module. datatypes [DatatypeDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-DatatypeDescriptor) Repeated \[\] List of DataTypes defined by this module. functions [FunctionDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FunctionDescriptor) Repeated \[\] List of Functions defined by this module. name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Name of this module. ### OpenSignature[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignature "Direct link to OpenSignature") Representation of a type signature that could appear as a function parameter or return value. Fields body [OpenSignatureBody](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignatureBody) Proto3 optional reference [Reference](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignature-Reference) Proto3 optional ### OpenSignatureBody[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignatureBody "Direct link to OpenSignatureBody") Representation of a type signature that could appear as a field type for a struct or enum Fields type [Type](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignatureBody-Type) Proto3 optional Type of this signature type\_name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Fully qualified name of the datatype when `type` is `DATATYPE` type\_parameter [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Position of the type parameter as defined in the containing data type descriptor when `type` is `TYPE_PARAMETER` type\_parameter\_instantiation [OpenSignatureBody](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignatureBody) Repeated \[\] Set when `type` is `VECTOR` or `DATATYPE` ### Package[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Package "Direct link to Package") A Move Package Fields linkage [Linkage](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Linkage) Repeated \[\] The package's transitive dependencies as a mapping from the package's runtime Id (the Id it is referred to by in other packages) to its storage Id (the Id it is loaded from on chain). modules [Module](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Module) Repeated \[\] The modules defined by this package original\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The PackageId of the first published version of this package. A package's `original_id` (sometimes also called its `runtime_id`) is the `storage_id` of the first version of this package that has been published. The `original_id`/`runtime_id` is stable across all versions of the package and does not ever change. storage\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The PackageId of this package A package's `storage_id` is the Sui ObjectId of the package on-chain. Outside of system packages the `storage_id` for every package version is different. type\_origins [TypeOrigin](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeOrigin) Repeated \[\] List of datatype origins for mapping datatypes to a package version where it was first defined version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The version of this package ### TypeOrigin[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeOrigin "Direct link to TypeOrigin") Identifies a struct and the module it was defined in. Fields datatype\_name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional module\_name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional package\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ### TypeParameter[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeParameter "Direct link to TypeParameter") A generic type parameter used in the declaration of a struct or enum. Fields constraints [Ability](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Ability) Repeated \[\] The type parameter constraints is\_phantom [bool](https://docs.sui.io/references/fullnode-protocol#bool) Proto3 optional Whether the parameter is declared as phantom ### VariantDescriptor[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VariantDescriptor "Direct link to VariantDescriptor") Descriptor of an enum variant Fields fields [FieldDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FieldDescriptor) Repeated \[\] Set of fields defined by this variant. name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Name of the variant position [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Order or position of the variant in the enum definition. #### Enums #### Ability An `Ability` classifies what operations are permitted for a given type Enums `ABILITY_UNKNOWN` `COPY` Allows values of types with this ability to be copied `DROP` Allows values of types with this ability to be dropped. `STORE` Allows values of types with this ability to exist inside a struct in global storage `KEY` Allows the type to serve as a key for global storage operations #### DatatypeKind Enums `DATATYPE_KIND_UNKNOWN` `STRUCT` `ENUM` #### Visibility Enums `VISIBILITY_UNKNOWN` `PRIVATE` `PUBLIC` `FRIEND` #### Reference Enums `REFERENCE_UNKNOWN` `IMMUTABLE` `MUTABLE` #### Type Enums `TYPE_UNKNOWN` `ADDRESS` `BOOL` `U8` `U16` `U32` `U64` `U128` `U256` `VECTOR` `DATATYPE` `TYPE_PARAMETER` sui/rpc/v2/epoch.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_epoch-proto "Direct link to sui_rpc_v2_epoch-proto") ------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Epoch[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Epoch "Direct link to Epoch") Fields committee [ValidatorCommittee](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorCommittee) Proto3 optional The committee governing this epoch. end [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional first\_checkpoint [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional last\_checkpoint [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional protocol\_config [ProtocolConfig](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProtocolConfig) Proto3 optional reference\_gas\_price [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Reference gas price denominated in MIST start [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional system\_state [SystemState](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SystemState) Proto3 optional Snapshot of Sui's SystemState (`0x3::sui_system::SystemState`) at the beginning of the epoch, for past epochs, or the current state for the current epoch. sui/rpc/v2/subscription\_service.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_subscription-service-proto "Direct link to sui/rpc/v2/subscription_service.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### SubscribeCheckpointsRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SubscribeCheckpointsRequest "Direct link to SubscribeCheckpointsRequest") Request message for SubscriptionService.SubscribeCheckpoints Fields read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Optional. Mask for specifying which parts of the SubscribeCheckpointsResponse should be returned. ### SubscribeCheckpointsResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SubscribeCheckpointsResponse "Direct link to SubscribeCheckpointsResponse") Response message for SubscriptionService.SubscribeCheckpoints Fields checkpoint [Checkpoint](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Checkpoint) Proto3 optional The requested data for this checkpoint cursor [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Required. The checkpoint sequence number and value of the current cursor into the checkpoint stream ### Services (subscription\_service.proto)[​](https://docs.sui.io/references/fullnode-protocol#services-subscription_serviceproto "Direct link to Services (subscription_service.proto)") #### SubscriptionService Methods [SubscribeCheckpointsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SubscribeCheckpointsRequest) -> SubscribeCheckpointsResponse Subscribe to the stream of checkpoints. This API provides a subscription to the checkpoint stream for the Sui blockchain. When a subscription is initialized the stream will begin with the latest executed checkpoint as seen by the server. Responses are guaranteed to return checkpoints in-order and without gaps. This enables clients to know exactly the last checkpoint they have processed and in the event the subscription terminates (either by the client/server or by the connection breaking), clients will be able to reinitialize a subscription and then leverage other APIs in order to request data for the checkpoints they missed. sui/rpc/v2/bcs.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_bcs-proto "Direct link to sui/rpc/v2/bcs.proto") ------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Bcs[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs "Direct link to Bcs") `Bcs` contains an arbitrary type that is serialized using the [BCS](https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/index.html#bcs) format as well as a name that identifies the type of the serialized value. Fields name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Name that identifies the type of the serialized value. value [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Bytes of a BCS serialized value. sui/rpc/v2/state\_service.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_state-service-proto "Direct link to sui/rpc/v2/state_service.proto") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Balance[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Balance "Direct link to Balance") Balance information for a specific coin type. Fields address\_balance [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The balance of `Balance` in this address's Address Balance. balance [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The total balance of `coin_type` in its smallest unit. This is the sum of all spendable amounts of `coin_type` (`address_balance` and `coin_balance`). coin\_balance [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The balance of all `Coin` objects owned by this address. coin\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The type of the coin (e.g., 0x2::sui::SUI). ### CoinMetadata[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinMetadata "Direct link to CoinMetadata") Metadata for a coin type Fields decimals [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Number of decimal places to coin uses. description [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Description of the token icon\_url [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional URL for the token logo id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ObjectId of the `0x2::coin::CoinMetadata` object or 0x2::sui::coin\_registry::Currency object (when registered with CoinRegistry). metadata\_cap\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The MetadataCap ID if it has been claimed for this coin type. This capability allows updating the coin's metadata fields. Only populated when metadata is from CoinRegistry. metadata\_cap\_state [MetadataCapState](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinMetadata-MetadataCapState) Proto3 optional State of the MetadataCap for this coin type. name [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Name for the token symbol [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Symbol for the token ### CoinTreasury[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinTreasury "Direct link to CoinTreasury") Information about a coin type's `0x2::coin::TreasuryCap` and its total available supply Fields id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ObjectId of the `0x2::coin::TreasuryCap` object. supply\_state [SupplyState](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinTreasury-SupplyState) Proto3 optional Supply state indicating if the supply is fixed or can still be minted total\_supply [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Total available supply for this coin type. ### DynamicField[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-DynamicField "Direct link to DynamicField") Fields child\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The ObjectId of the child object when a child is a dynamic object field. The presence or absence of this field can be used to determine if a child is a dynamic field or a dynamic child object child\_object [Object](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Object) Proto3 optional The object itself when a child is a dynamic object field. field\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ObjectId of this dynamic field. field\_object [Object](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Object) Proto3 optional The field object itself kind [DynamicFieldKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-DynamicField-DynamicFieldKind) Proto3 optional name [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional The dynamic field's "name" parent [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ObjectId of this dynamic field's parent. value [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional The dynamic field's "value" value\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The type of the dynamic field "value". If this is a dynamic object field then this is the type of the object itself (which is a child of this field), otherwise this is the type of the value of this field. ### GetBalanceRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetBalanceRequest "Direct link to GetBalanceRequest") Request message for `LiveDataService.GetBalance`. Fields coin\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The type names for the coin (e.g., 0x2::sui::SUI). owner [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The owner's Sui address. ### GetBalanceResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetBalanceResponse "Direct link to GetBalanceResponse") Response message for `LiveDataService.GetBalance`. Return the total coin balance for one coin type, owned by the address owner. Fields balance [Balance](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Balance) Proto3 optional The balance information for the requested coin type. ### GetCoinInfoRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCoinInfoRequest "Direct link to GetCoinInfoRequest") Request message for `NodeService.GetCoinInfo`. Fields coin\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The coin type to request information about ### GetCoinInfoResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCoinInfoResponse "Direct link to GetCoinInfoResponse") Response message for `NodeService.GetCoinInfo`. Fields coin\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The coin type. metadata [CoinMetadata](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinMetadata) Proto3 optional This field will be populated with information about this coin type's `0x2::coin::CoinMetadata` if it exists and has not been wrapped. regulated\_metadata [RegulatedCoinMetadata](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-RegulatedCoinMetadata) Proto3 optional If this coin type is a regulated coin, this field will be populated with information either from its Currency object in the CoinRegistry, or from its `0x2::coin::RegulatedCoinMetadata` object for coins that have not been migrated to the CoinRegistry If this coin is not known to be regulated, only the coin\_regulated\_state field will be populated. treasury [CoinTreasury](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinTreasury) Proto3 optional This field will be populated with information about this coin type's `0x2::coin::TreasuryCap` if it exists and has not been wrapped. ### ListBalancesRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListBalancesRequest "Direct link to ListBalancesRequest") Request message for `LiveDataService.ListBalances`. Fields owner [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The owner's Sui address. page\_size [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional The maximum number of balance entries to return. The service may return fewer than this value. If unspecified, at most `50` entries will be returned. The maximum value is `1000`; values above `1000` will be coerced to `1000`. page\_token [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional A page token, received from a previous `ListBalances` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBalances` must match the call that provided the page token. ### ListBalancesResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListBalancesResponse "Direct link to ListBalancesResponse") Response message for `LiveDataService.ListBalances`. Return the total coin balance for all coin types, owned by the address owner. Fields balances [Balance](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Balance) Repeated \[\] The list of coin types and their respective balances. next\_page\_token [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. ### ListDynamicFieldsRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListDynamicFieldsRequest "Direct link to ListDynamicFieldsRequest") Request message for `NodeService.ListDynamicFields` Fields page\_size [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional The maximum number of dynamic fields to return. The service may return fewer than this value. If unspecified, at most `50` entries will be returned. The maximum value is `1000`; values above `1000` will be coerced to `1000`. page\_token [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional A page token, received from a previous `ListDynamicFields` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDynamicFields` must match the call that provided the page token. parent [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The `UID` of the parent, which owns the collections of dynamic fields. read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. If no mask is specified, defaults to `parent,field_id`. ### ListDynamicFieldsResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListDynamicFieldsResponse "Direct link to ListDynamicFieldsResponse") Response message for `NodeService.ListDynamicFields` Fields dynamic\_fields [DynamicField](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-DynamicField) Repeated \[\] Page of dynamic fields owned by the specified parent. next\_page\_token [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. ### ListOwnedObjectsRequest[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListOwnedObjectsRequest "Direct link to ListOwnedObjectsRequest") Fields object\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Optional type filter to limit the types of objects listed. Providing an object type with no type params will return objects of that type with any type parameter, e.g. `0x2::coin::Coin` will return all `Coin` objects regardless of the type parameter `T`. Providing a type with a type param will restrict the returned objects to only those objects that match the provided type parameters, e.g. `0x2::coin::Coin<0x2::sui::SUI>` will only return `Coin` objects. owner [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Required. The address of the account that owns the objects. page\_size [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional The maximum number of entries return. The service may return fewer than this value. If unspecified, at most `50` entries will be returned. The maximum value is `1000`; values above `1000` will be coerced to `1000`. page\_token [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional A page token, received from a previous `ListOwnedObjects` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListOwnedObjects` must match the call that provided the page token. read\_mask [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) Proto3 optional Mask specifying which fields to read. If no mask is specified, defaults to `object_id,version,object_type`. ### ListOwnedObjectsResponse[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListOwnedObjectsResponse "Direct link to ListOwnedObjectsResponse") Fields next\_page\_token [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. objects [Object](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Object) Repeated \[\] Page of dynamic fields owned by the specified parent. ### RegulatedCoinMetadata[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-RegulatedCoinMetadata "Direct link to RegulatedCoinMetadata") Information about a regulated coin, which indicates that it makes use of the transfer deny list. Fields allow\_global\_pause [bool](https://docs.sui.io/references/fullnode-protocol#bool) Proto3 optional Whether the coin can be globally paused coin\_metadata\_object [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The ID of the coin's `CoinMetadata` or `CoinData` object. coin\_regulated\_state [CoinRegulatedState](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-RegulatedCoinMetadata-CoinRegulatedState) Proto3 optional Indicates the coin's regulated state. deny\_cap\_object [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The ID of the coin's `DenyCap` object. id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ObjectId of the `0x2::coin::RegulatedCoinMetadata` object. Only present for coins that have not been migrated to CoinRegistry. variant [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional Variant of the regulated coin metadata ### Services (state\_service.proto)[​](https://docs.sui.io/references/fullnode-protocol#services-state_serviceproto "Direct link to Services (state_service.proto)") #### StateService Methods [ListDynamicFieldsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListDynamicFieldsRequest) -> ListDynamicFieldsResponse [ListOwnedObjectsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListOwnedObjectsRequest) -> ListOwnedObjectsResponse [GetCoinInfoRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCoinInfoRequest) -> GetCoinInfoResponse [GetBalanceRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetBalanceRequest) -> GetBalanceResponse [ListBalancesRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListBalancesRequest) -> ListBalancesResponse #### Enums #### MetadataCapState Information about the state of the coin's MetadataCap Enums `METADATA_CAP_STATE_UNKNOWN` Indicates the state of the MetadataCap is unknown. Set when the coin has not been migrated to the CoinRegistry. `CLAIMED` Indicates the MetadataCap has been claimed. `UNCLAIMED` Indicates the MetadataCap has not been claimed. `DELETED` Indicates the MetadataCap has been deleted. #### SupplyState Supply state of a coin, matching the Move SupplyState enum Enums `SUPPLY_STATE_UNKNOWN` Supply is unknown or TreasuryCap still exists (minting still possible) `FIXED` Supply is fixed (TreasuryCap consumed, no more minting possible) `BURN_ONLY` Supply can only decrease (burning allowed, minting not allowed) #### DynamicFieldKind Enums `DYNAMIC_FIELD_KIND_UNKNOWN` `FIELD` `OBJECT` #### CoinRegulatedState Indicates the state of the regulation of the coin. Enums `COIN_REGULATED_STATE_UNKNOWN` Indicates the regulation state of the coin is unknown. This is set when a coin has not been migrated to the coin registry and has no `0x2::coin::RegulatedCoinMetadata` object. `REGULATED` Indicates a coin is regulated. RegulatedCoinMetadata will be populated. `UNREGULATED` Indicates a coin is unregulated. sui/rpc/v2/signature\_scheme.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_signature-scheme-proto "Direct link to sui/rpc/v2/signature_scheme.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Enums #### SignatureScheme Flag use to disambiguate the signature schemes supported by Sui. Note: the enum values defined by this proto message exactly match their expected BCS serialized values when serialized as a u8. See [enum.SignatureScheme](https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/enum.SignatureScheme.html) for more information about signature schemes. Enums `ED25519` `SECP256K1` `SECP256R1` `MULTISIG` `BLS12381` `ZKLOGIN` `PASSKEY` sui/rpc/v2/checkpoint.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_checkpoint-proto "Direct link to sui_rpc_v2_checkpoint-proto") ---------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Checkpoint[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Checkpoint "Direct link to Checkpoint") Fields contents [CheckpointContents](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointContents) Proto3 optional The `CheckpointContents` for this checkpoint. digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this Checkpoint's CheckpointSummary. objects [ObjectSet](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ObjectSet) Proto3 optional Set of objects either referenced as inputs or produced as outputs by transactions included in this checkpoint. In order to benefit from deduplication of objects that appear in multiple transactions in this checkpoint, objects will only be present here and the `transactions.objects` field will not be populated. sequence\_number [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The height of this checkpoint. signature [ValidatorAggregatedSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorAggregatedSignature) Proto3 optional An aggregated quorum signature from the validator committee that certified this checkpoint. summary [CheckpointSummary](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointSummary) Proto3 optional The `CheckpointSummary` for this checkpoint. transactions [ExecutedTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutedTransaction) Repeated \[\] List of transactions included in this checkpoint. sui/rpc/v2/transaction.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_transaction-proto "Direct link to sui_rpc_v2_transaction-proto") ------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### ActiveJwk[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ActiveJwk "Direct link to ActiveJwk") A new JWK. Fields epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Most recent epoch in which the JWK was validated. id [JwkId](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-JwkId) Proto3 optional Identifier used to uniquely identify a JWK. jwk [Jwk](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Jwk) Proto3 optional The JWK. ### AuthenticatorStateExpire[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AuthenticatorStateExpire "Direct link to AuthenticatorStateExpire") Expire old JWKs. Fields authenticator\_object\_initial\_shared\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The initial version of the authenticator object that it was shared at. min\_epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Expire JWKs that have a lower epoch than this. ### AuthenticatorStateUpdate[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AuthenticatorStateUpdate "Direct link to AuthenticatorStateUpdate") Update the set of valid JWKs. Fields authenticator\_object\_initial\_shared\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The initial version of the authenticator object that it was shared at. epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Epoch of the authenticator state update transaction. new\_active\_jwks [ActiveJwk](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ActiveJwk) Repeated \[\] Newly active JWKs. round [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Consensus round of the authenticator state update. ### CanceledTransaction[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CanceledTransaction "Direct link to CanceledTransaction") A transaction that was canceled. Fields digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Digest of the canceled transaction. version\_assignments [VersionAssignment](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VersionAssignment) Repeated \[\] List of object version assignments. ### ChangeEpoch[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangeEpoch "Direct link to ChangeEpoch") System transaction used to change the epoch. Fields computation\_charge [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The total amount of gas charged for computation during the epoch. epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The next (to become) epoch ID. epoch\_start\_timestamp [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional Unix timestamp when epoch started. non\_refundable\_storage\_fee [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The non-refundable storage fee. protocol\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The protocol version in effect in the new epoch. storage\_charge [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The total amount of gas charged for storage during the epoch. storage\_rebate [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The amount of storage rebate refunded to the txn senders. system\_packages [SystemPackage](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SystemPackage) Repeated \[\] System packages (specifically framework and Move stdlib) that are written before the new epoch starts. This tracks framework upgrades on chain. When executing the `ChangeEpoch` txn, the validator must write out the following modules. Modules are provided with the version they will be upgraded to, their modules in serialized form (which include their package ID), and a list of their transitive dependencies. ### Command[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Command "Direct link to Command") A single command in a programmable transaction. Fields Union field **command** can be only one of the following. make\_move\_vector [MakeMoveVector](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MakeMoveVector) `forall T: Vec -> vector` Given n-values of the same type, it constructs a vector. For non-objects or an empty vector, the type tag must be specified. merge\_coins [MergeCoins](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MergeCoins) `(&mut Coin, Vec>)` It merges n-coins into the first coin. move\_call [MoveCall](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveCall) A call to either an entry or a public Move function. publish [Publish](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Publish) Publishes a Move package. It takes the package bytes and a list of the package's transitive dependencies to link against on chain. split\_coins [SplitCoins](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SplitCoins) `(&mut Coin, Vec)` -> `Vec>` It splits off some amounts into new coins with those amounts. transfer\_objects [TransferObjects](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransferObjects) `(Vec, address)` It sends n-objects to the specified address. These objects must have store (public transfer) and either the previous owner must be an address or the object must be newly created. upgrade [Upgrade](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Upgrade) Upgrades a Move package. Takes (in order): 1. A vector of serialized modules for the package. 2. A vector of object ids for the transitive dependencies of the new package. 3. The object ID of the package being upgraded. 4. An argument holding the `UpgradeTicket` that must have been produced from an earlier command in the same programmable transaction. ### ConsensusCommitPrologue[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ConsensusCommitPrologue "Direct link to ConsensusCommitPrologue") Consensus commit prologue system transaction. This message can represent V1, V2, and V3 prologue types. Fields additional\_state\_digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Digest of any additional state computed by the consensus handler. Used to detect forking bugs as early as possible. Present in V4. commit\_timestamp [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional Unix timestamp from consensus. Present in V1, V2, V3, V4. consensus\_commit\_digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Digest of consensus output. Present in V2, V3, V4. consensus\_determined\_version\_assignments [ConsensusDeterminedVersionAssignments](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ConsensusDeterminedVersionAssignments) Proto3 optional Stores consensus handler determined consensus object version assignments. Present in V3, V4. epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Epoch of the commit prologue transaction. Present in V1, V2, V3, V4. round [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Consensus round of the commit. Present in V1, V2, V3, V4. sub\_dag\_index [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The sub DAG index of the consensus commit. This field is populated if there are multiple consensus commits per round. Present in V3, V4. ### ConsensusDeterminedVersionAssignments[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ConsensusDeterminedVersionAssignments "Direct link to ConsensusDeterminedVersionAssignments") Version assignments performed by consensus. Fields canceled\_transactions [CanceledTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CanceledTransaction) Repeated \[\] Canceled transaction version assignment. version [int32](https://docs.sui.io/references/fullnode-protocol#int32) Proto3 optional Version of this message ### EndOfEpochTransaction[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochTransaction "Direct link to EndOfEpochTransaction") Set of operations run at the end of the epoch to close out the current epoch and start the next one. Fields transactions [EndOfEpochTransactionKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochTransactionKind) Repeated \[\] ### EndOfEpochTransactionKind[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochTransactionKind "Direct link to EndOfEpochTransactionKind") Operation run at the end of an epoch. Fields kind [Kind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochTransactionKind-Kind) Proto3 optional Union field **data** can be only one of the following. authenticator\_state\_expire [AuthenticatorStateExpire](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AuthenticatorStateExpire) Expire JWKs used for zklogin. bridge\_chain\_id [string](https://docs.sui.io/references/fullnode-protocol#string) ChainId used when initializing the bridge bridge\_object\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Start version of the Bridge object change\_epoch [ChangeEpoch](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangeEpoch) End the epoch and start the next one. execution\_time\_observations [ExecutionTimeObservations](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionTimeObservations) Execution time observations from the committee to preserve cross epoch storage\_cost [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Contains the end-of\-epoch\-computed storage cost for accumulator objects. ### ExecutionTimeObservation[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionTimeObservation "Direct link to ExecutionTimeObservation") Fields kind [ExecutionTimeObservationKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionTimeObservation-ExecutionTimeObservationKind) Proto3 optional move\_entry\_point [MoveCall](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveCall) Proto3 optional validator\_observations [ValidatorExecutionTimeObservation](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorExecutionTimeObservation) Repeated \[\] ### ExecutionTimeObservations[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionTimeObservations "Direct link to ExecutionTimeObservations") Fields observations [ExecutionTimeObservation](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionTimeObservation) Repeated \[\] version [int32](https://docs.sui.io/references/fullnode-protocol#int32) Proto3 optional Version of this ExecutionTimeObservations ### GasPayment[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GasPayment "Direct link to GasPayment") Payment information for executing a transaction. Fields budget [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Total budget willing to spend for the execution of a transaction. objects [ObjectReference](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ObjectReference) Repeated \[\] Set of gas objects to use for payment. owner [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Owner of the gas objects, either the transaction sender or a sponsor. price [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Gas unit price to use when charging for computation. Must be greater than or equal to the network's current RGP (reference gas price). ### GenesisTransaction[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GenesisTransaction "Direct link to GenesisTransaction") The genesis transaction. Fields objects [Object](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Object) Repeated \[\] Set of genesis objects. ### MakeMoveVector[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MakeMoveVector "Direct link to MakeMoveVector") Command to build a Move vector out of a set of individual elements. Fields element\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Type of the individual elements. This is required to be set when the type can't be inferred, for example when the set of provided arguments are all pure input values. elements [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Repeated \[\] The set individual elements to build the vector with. ### MergeCoins[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MergeCoins "Direct link to MergeCoins") Command to merge multiple coins of the same type into a single coin. Fields coin [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Proto3 optional Coin to merge coins into. coins\_to\_merge [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Repeated \[\] Set of coins to merge into `coin`. All listed coins must be of the same type and be the same type as `coin` ### MoveCall[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveCall "Direct link to MoveCall") Command to call a Move function. Functions that can be called by a `MoveCall` command are those that have a function signature that is either `entry` or `public` (which don't have a reference return type). Fields arguments [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Repeated \[\] The arguments to the function. function [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The function to be called. module [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The specific module in the package containing the function. package [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The package containing the module and function. type\_arguments [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] The type arguments to the function. ### ProgrammableTransaction[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProgrammableTransaction "Direct link to ProgrammableTransaction") A user transaction. Contains a series of native commands and Move calls where the results of one command can be used in future commands. Fields commands [Command](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Command) Repeated \[\] The commands to be executed sequentially. A failure in any command results in the failure of the entire transaction. inputs [Input](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Input) Repeated \[\] Input objects or primitive values. ### Publish[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Publish "Direct link to Publish") Command to publish a new Move package. Fields dependencies [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] Set of packages that the to-be published package depends on. modules [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Repeated \[\] The serialized Move modules. ### RandomnessStateUpdate[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-RandomnessStateUpdate "Direct link to RandomnessStateUpdate") Randomness update. Fields epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Epoch of the randomness state update transaction. random\_bytes [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Updated random bytes. randomness\_object\_initial\_shared\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional The initial version of the randomness object that it was shared at. randomness\_round [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Randomness round of the update. ### SplitCoins[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SplitCoins "Direct link to SplitCoins") Command to split a single coin object into multiple coins. Fields amounts [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Repeated \[\] The amounts to split off. coin [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Proto3 optional The coin to split. ### SystemPackage[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SystemPackage "Direct link to SystemPackage") System package. Fields dependencies [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] Package dependencies. modules [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Repeated \[\] Move modules. version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Version of the package. ### Transaction[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Transaction "Direct link to Transaction") A transaction. Fields bcs [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional This Transaction serialized as BCS. digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this Transaction. expiration [TransactionExpiration](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionExpiration) Proto3 optional gas\_payment [GasPayment](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GasPayment) Proto3 optional kind [TransactionKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionKind) Proto3 optional sender [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional version [int32](https://docs.sui.io/references/fullnode-protocol#int32) Proto3 optional Version of this Transaction. ### TransactionExpiration[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionExpiration "Direct link to TransactionExpiration") A TTL for a transaction. Fields chain [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional ChainId of the network this transaction is intended for in order to prevent cross-chain replay epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Maximum epoch in which a transaction can be executed. The provided maximal epoch must be greater than or equal to the current epoch for a transaction to execute. kind [TransactionExpirationKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionExpiration-TransactionExpirationKind) Proto3 optional max\_timestamp [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional Maximum UNIX timestamp in which a transaction can be executed. The provided maximal timestamp must be greater than or equal to the current clock. min\_epoch [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Minimal epoch in which a transaction can be executed. The provided minimal epoch must be less than or equal to the current epoch for a transaction to execute. min\_timestamp [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) Proto3 optional Minimal UNIX timestamp in which a transaction can be executed. The provided minimal timestamp must be less than or equal to the current clock. nonce [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) Proto3 optional User-provided uniqueness identifier to differentiate otherwise identical transactions ### TransactionKind[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionKind "Direct link to TransactionKind") Transaction type. Fields kind [Kind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionKind-Kind) Proto3 optional Union field **data** can be only one of the following. authenticator\_state\_update [AuthenticatorStateUpdate](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AuthenticatorStateUpdate) Update set of valid JWKs used for zklogin. change\_epoch [ChangeEpoch](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangeEpoch) System transaction used to end an epoch. The `ChangeEpoch` variant is now deprecated (but the `ChangeEpoch` struct is still used by `EndOfEpochTransaction`). consensus\_commit\_prologue [ConsensusCommitPrologue](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ConsensusCommitPrologue) consensus commit update info end\_of\_epoch [EndOfEpochTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochTransaction) Set of operations to run at the end of the epoch to close out the current epoch and start the next one. genesis [GenesisTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GenesisTransaction) Transaction used to initialize the chain state. Only valid if in the genesis checkpoint (0) and if this is the very first transaction ever executed on the chain. programmable\_transaction [ProgrammableTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProgrammableTransaction) A transaction comprised of a list of native commands and Move calls. randomness\_state\_update [RandomnessStateUpdate](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-RandomnessStateUpdate) Randomness update. ### TransferObjects[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransferObjects "Direct link to TransferObjects") Command to transfer ownership of a set of objects to an address. Fields address [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Proto3 optional The address to transfer ownership to. objects [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Repeated \[\] Set of objects to transfer. ### Upgrade[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Upgrade "Direct link to Upgrade") Command to upgrade an already published package. Fields dependencies [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] Set of packages that the to-be published package depends on. modules [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Repeated \[\] The serialized Move modules. package [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Package ID of the package to upgrade. ticket [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) Proto3 optional Ticket authorizing the upgrade. ### ValidatorExecutionTimeObservation[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorExecutionTimeObservation "Direct link to ValidatorExecutionTimeObservation") Fields duration [Duration](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Duration) Proto3 optional Duration of an execution observation validator [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Proto3 optional Bls12381 public key of the validator ### VersionAssignment[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VersionAssignment "Direct link to VersionAssignment") Object version assignment from consensus. Fields object\_id [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional `ObjectId` of the object. start\_version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional start version of the consensus stream for this object version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional Assigned version. #### Enums #### Kind Enums `KIND_UNKNOWN` `CHANGE_EPOCH` End the epoch and start the next one. `AUTHENTICATOR_STATE_CREATE` Create and initialize the authenticator object used for zklogin. `AUTHENTICATOR_STATE_EXPIRE` Expire JWKs used for zklogin. `RANDOMNESS_STATE_CREATE` Create and initialize the randomness object. `DENY_LIST_STATE_CREATE` Create and initialize the deny list object. `BRIDGE_STATE_CREATE` Create and initialize the bridge object. `BRIDGE_COMMITTEE_INIT` Initialize the bridge committee. `STORE_EXECUTION_TIME_OBSERVATIONS` Execution time observations from the committee to preserve cross epoch `ACCUMULATOR_ROOT_CREATE` Create the accumulator root object. `COIN_REGISTRY_CREATE` Create and initialize the Coin Registry object. `DISPLAY_REGISTRY_CREATE` Create and initialize the Display Registry object. `ADDRESS_ALIAS_STATE_CREATE` Create and initialize the Address Alias State object. `WRITE_ACCUMULATOR_STORAGE_COST` Write the end-of\-epoch\-computed storage cost for accumulator objects. #### ExecutionTimeObservationKind Enums `EXECUTION_TIME_OBSERVATION_KIND_UNKNOWN` `MOVE_ENTRY_POINT` `TRANSFER_OBJECTS` `SPLIT_COINS` `MERGE_COINS` `PUBLISH` `MAKE_MOVE_VECTOR` `UPGRADE` #### TransactionExpirationKind Enums `TRANSACTION_EXPIRATION_KIND_UNKNOWN` `NONE` The transaction has no expiration. `EPOCH` Validators won't sign and execute transaction unless the expiration epoch is greater than or equal to the current epoch. `VALID_DURING` This variant enables gas payments from address balances. When transactions use address balances for gas payment instead of explicit gas coins, we lose the natural transaction uniqueness and replay prevention that comes from mutation of gas coin objects. By bounding expiration and providing a nonce, validators must only retain executed digests for the maximum possible expiry range to differentiate retries from unique transactions with otherwise identical inputs. #### Kind Enums `KIND_UNKNOWN` `PROGRAMMABLE_TRANSACTION` A user transaction comprised of a list of native commands and Move calls. `CHANGE_EPOCH` System transaction used to end an epoch. The `ChangeEpoch` variant is now deprecated (but the `ChangeEpoch` struct is still used by `EndOfEpochTransaction`). `GENESIS` Transaction used to initialize the chain state. Only valid if in the genesis checkpoint (0) and if this is the very first transaction ever executed on the chain. `CONSENSUS_COMMIT_PROLOGUE_V1` V1 consensus commit update. `AUTHENTICATOR_STATE_UPDATE` Update set of valid JWKs used for zklogin. `END_OF_EPOCH` Set of operations to run at the end of the epoch to close out the current epoch and start the next one. `RANDOMNESS_STATE_UPDATE` Randomness update. `CONSENSUS_COMMIT_PROLOGUE_V2` V2 consensus commit update. `CONSENSUS_COMMIT_PROLOGUE_V3` V3 consensus commit update. `CONSENSUS_COMMIT_PROLOGUE_V4` V4 consensus commit update. `PROGRAMMABLE_SYSTEM_TRANSACTION` A system transaction comprised of a list of native commands and Move calls. sui/rpc/v2/balance\_change.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_balance-change-proto "Direct link to sui/rpc/v2/balance_change.proto") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### BalanceChange[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BalanceChange "Direct link to BalanceChange") The delta, or change, in balance for an address for a particular `Coin` type. Fields address [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The account address that is affected by this balance change event. amount [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The amount or change in balance. coin\_type [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The `Coin` type of this balance change event. sui/rpc/v2/checkpoint\_contents.proto[​](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_checkpoint-contents-proto "Direct link to sui/rpc/v2/checkpoint_contents.proto") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### AddressAliasesVersion[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AddressAliasesVersion "Direct link to AddressAliasesVersion") Fields version [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) Proto3 optional ### CheckpointContents[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointContents "Direct link to CheckpointContents") The committed to contents of a checkpoint. Fields bcs [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) Proto3 optional This CheckpointContents serialized as BCS. digest [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional The digest of this CheckpointContents. transactions [CheckpointedTransactionInfo](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointedTransactionInfo) Repeated \[\] Set of transactions committed to in this checkpoint. version [int32](https://docs.sui.io/references/fullnode-protocol#int32) Proto3 optional Version of this CheckpointContents ### CheckpointedTransactionInfo[​](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointedTransactionInfo "Direct link to CheckpointedTransactionInfo") Transaction information committed to in a checkpoint. Fields address\_aliases\_versions [AddressAliasesVersion](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AddressAliasesVersion) Repeated \[\] The `AddressAliases` object version, if any, that was used to verify the UserSignature at the same position in `signatures`. This field is present when CheckpointContents.version is >= 2. effects [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Digest of the effects. signatures [UserSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UserSignature) Repeated \[\] Set of user signatures that authorized the transaction. transaction [string](https://docs.sui.io/references/fullnode-protocol#string) Proto3 optional Digest of the transaction. google/protobuf/timestamp.proto[​](https://docs.sui.io/references/fullnode-protocol#google_protobuf_timestamp-proto "Direct link to google/protobuf/timestamp.proto") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Timestamp[​](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp "Direct link to Timestamp") A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from `0001-01-01T00:00:00Z` to `9999-12-31T23:59:59.999999999Z`. Restricting to that range ensures that conversion to and from RFC 3339 date strings is possible. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt) . ### Examples[​](https://docs.sui.io/references/fullnode-protocol#examples "Direct link to Examples") Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp;timestamp.set_seconds(time(NULL));timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv;gettimeofday(&tv, NULL);Timestamp timestamp;timestamp.set_seconds(tv.tv_sec);timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft;GetSystemTimeAsFileTime(&ft);UINT64 ticks = (((UINT64)ft.dwHighDateTime) &#lt;&#lt; 32) | ft.dwLowDateTime;// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.Timestamp timestamp;timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis();Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from current time in Python. timestamp = Timestamp()timestamp.GetCurrentTime() ### JSON Mapping[​](https://docs.sui.io/references/fullnode-protocol#json-mapping "Direct link to JSON Mapping") In JSON format, the `Timestamp` type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z` where `{year}` is always expressed using four digits while `{month}`, `{day}`, `{hour}`, `{min}`, and `{sec}` are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (so up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. For example, `2017-01-15T01:30:15.01Z` encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, you can convert a `Date` object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, you can convert a standard `datetime.datetime` object to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec `%Y-%m-%dT%H:%M:%S.%fZ`. Likewise, in Java, you can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--) to obtain a formatter capable of generating timestamps in this format. Fields nanos [int32](https://docs.sui.io/references/fullnode-protocol#int32) Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nano values that count forward in time. Must be from 0 to 999,999,999 inclusive. seconds [int64](https://docs.sui.io/references/fullnode-protocol#int64) Represents seconds of UTC time since Unix epoch `1970-01-01T00:00:00Z`. Must be from `0001-01-01T00:00:00Z` to `9999-12-31T23:59:59Z` inclusive. google/protobuf/empty.proto[​](https://docs.sui.io/references/fullnode-protocol#google_protobuf_empty-proto "Direct link to google/protobuf/empty.proto") ---------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Empty[​](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Empty "Direct link to Empty") A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);} google/protobuf/struct.proto[​](https://docs.sui.io/references/fullnode-protocol#google_protobuf_struct-proto "Direct link to google/protobuf/struct.proto") ------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### ListValue[​](https://docs.sui.io/references/fullnode-protocol#google-protobuf-ListValue "Direct link to ListValue") `ListValue` is a wrapper around a repeated field of values. The JSON representation for `ListValue` is JSON array. Fields values [Value](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Value) Repeated \[\] Repeated field of dynamically typed values. ### Struct[​](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Struct "Direct link to Struct") `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. Fields fields [FieldsEntry](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Struct-FieldsEntry) Repeated \[\] Unordered map of dynamically typed values. ### FieldsEntry[​](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Struct-FieldsEntry "Direct link to FieldsEntry") Fields key [string](https://docs.sui.io/references/fullnode-protocol#string) value [Value](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Value) ### Value[​](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Value "Direct link to Value") `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value. Fields Union field **kind** can be only one of the following. bool\_value [bool](https://docs.sui.io/references/fullnode-protocol#bool) Represents a boolean value. list\_value [ListValue](https://docs.sui.io/references/fullnode-protocol#google-protobuf-ListValue) Represents a repeated `Value`. null\_value [NullValue](https://docs.sui.io/references/fullnode-protocol#google-protobuf-NullValue) Represents a null value. number\_value [double](https://docs.sui.io/references/fullnode-protocol#double) Represents a double value. string\_value [string](https://docs.sui.io/references/fullnode-protocol#string) Represents a string value. struct\_value [Struct](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Struct) Represents a structured value. #### Enums #### NullValue `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. The JSON representation for `NullValue` is JSON `null`. Enums `NULL_VALUE` Null value. google/protobuf/any.proto[​](https://docs.sui.io/references/fullnode-protocol#google_protobuf_any-proto "Direct link to google/protobuf/any.proto") ---------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Any[​](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Any "Direct link to Any") `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first\_name = 1; string last\_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": &#lt;string>, "lastName": &#lt;string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message \[google.protobuf.Duration\]\[\]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } Fields type\_url [string](https://docs.sui.io/references/fullnode-protocol#string) A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: \* If no scheme is provided, `https` is assumed. \* An HTTP GET on the URL must yield a \[google.protobuf.Type\]\[\] value in binary format, or produce an error. \* Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. value [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) Must be a valid serialized protocol buffer of the above specified type. google/protobuf/field\_mask.proto[​](https://docs.sui.io/references/fullnode-protocol#google_protobuf_field-mask-proto "Direct link to google/protobuf/field_mask.proto") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### FieldMask[​](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask "Direct link to FieldMask") `FieldMask` represents a set of symbolic field paths, for example: paths: "f.a" paths: "f.b.d" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). ### Field Masks in Projections[​](https://docs.sui.io/references/fullnode-protocol#field-masks-in-projections "Direct link to Field Masks in Projections") When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. ### Field Masks in Update Operations[​](https://docs.sui.io/references/fullnode-protocol#field-masks-in-update-operations "Direct link to Field Masks in Update Operations") A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, new values will be appended to the existing repeated field in the target resource. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then new value will be merged into the existing sub-message in the target resource. For example, given the target message: f { b { d: 1 x: 2 } c: \[1\] } And an update message: f { b { d: 10 } c: \[2\] } then if the field mask is: paths: \["f.b", "f.c"\] then the result will be: f { b { d: 10 x: 2 } c: \[1, 2\] } An implementation may provide options to override this default behavior for repeated and message fields. In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ### Considerations for HTTP REST[​](https://docs.sui.io/references/fullnode-protocol#considerations-for-http-rest "Direct link to Considerations for HTTP REST") The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). ### JSON Encoding of Field Masks[​](https://docs.sui.io/references/fullnode-protocol#json-encoding-of-field-masks "Direct link to JSON Encoding of Field Masks") In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display\_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: "user.display\_name" paths: "photo" } In JSON, the same mask is represented as below: { mask: "user.displayName,photo" } ### Field Masks and Oneof Fields[​](https://docs.sui.io/references/fullnode-protocol#field-masks-and-oneof-fields "Direct link to Field Masks and Oneof Fields") Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test\_oneof { string name = 4; SubMessage sub\_message = 9; } } The field mask can be: mask { paths: "name" } Or: mask { paths: "sub\_message" } Note that oneof type names ("test\_oneof" in this case) cannot be used in paths. ### Field Mask Verification[​](https://docs.sui.io/references/fullnode-protocol#field-mask-verification "Direct link to Field Mask Verification") The implementation of any API method which has a FieldMask type field in the request should verify the included field paths, and return an `INVALID_ARGUMENT` error if any path is unmappable. Fields paths [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] The set of field mask paths. google/protobuf/duration.proto[​](https://docs.sui.io/references/fullnode-protocol#google_protobuf_duration-proto "Direct link to google/protobuf/duration.proto") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Duration[​](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Duration "Direct link to Duration") A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. ### Examples[​](https://docs.sui.io/references/fullnode-protocol#examples-1 "Direct link to Examples") Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds &#lt; 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos &#lt; 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos &#lt; 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) ### JSON Mapping[​](https://docs.sui.io/references/fullnode-protocol#json-mapping-1 "Direct link to JSON Mapping") In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". Fields nanos [int32](https://docs.sui.io/references/fullnode-protocol#int32) Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. seconds [int64](https://docs.sui.io/references/fullnode-protocol#int64) Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years google/rpc/error\_details.proto[​](https://docs.sui.io/references/fullnode-protocol#google_rpc_error-details-proto "Direct link to google/rpc/error_details.proto") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### BadRequest[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-BadRequest "Direct link to BadRequest") Describes violations in a client request. This error type focuses on the syntactic aspects of the request. Fields field\_violations [FieldViolation](https://docs.sui.io/references/fullnode-protocol#google-rpc-BadRequest-FieldViolation) Repeated \[\] Describes all violations in a client request. ### FieldViolation[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-BadRequest-FieldViolation "Direct link to FieldViolation") A message type used to describe a single bad request field. Fields description [string](https://docs.sui.io/references/fullnode-protocol#string) A description of why the request element is bad. field [string](https://docs.sui.io/references/fullnode-protocol#string) A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field. Consider the following: `text,json message CreateContactRequest { message EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; } optional string email = 1; repeated EmailType type = 2; } string full_name = 1; repeated EmailAddress email_addresses = 2; }` In this example, in proto `field` could take one of the following values: \* `full_name` for a violation in the `full_name` value \* `email_addresses[1].email` for a violation in the `email` field of the first `email_addresses` message \* `email_addresses[3].type[2]` for a violation in the second `type` value in the third `email_addresses` message. In JSON, the same values are represented as: \* `fullName` for a violation in the `fullName` value \* `emailAddresses[1].email` for a violation in the `email` field of the first `emailAddresses` message \* `emailAddresses[3].type[2]` for a violation in the second `type` value in the third `emailAddresses` message. localized\_message [LocalizedMessage](https://docs.sui.io/references/fullnode-protocol#google-rpc-LocalizedMessage) Provides a localized error message for field-level errors that is safe to return to the API consumer. reason [string](https://docs.sui.io/references/fullnode-protocol#string) The reason of the field-level error. This is a constant value that identifies the proximate cause of the field-level error. It should uniquely identify the type of the FieldViolation within the scope of the google.rpc.ErrorInfo.domain. This should be at most 63 characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents UPPER\_SNAKE\_CASE. ### DebugInfo[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-DebugInfo "Direct link to DebugInfo") Describes additional debugging info. Fields detail [string](https://docs.sui.io/references/fullnode-protocol#string) Additional debugging information provided by the server. stack\_entries [string](https://docs.sui.io/references/fullnode-protocol#string) Repeated \[\] The stack trace entries indicating where the error occurred. ### ErrorInfo[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-ErrorInfo "Direct link to ErrorInfo") Describes the cause of the error with structured details. Example of an error when contacting the "pubsub.googleapis.com" API when it is not enabled: { "reason": "API_DISABLED" "domain": "googleapis.com" "metadata": { "resource": "projects/123", "service": "pubsub.googleapis.com" }} This response indicates that the pubsub.googleapis.com API is not enabled. Example of an error that is returned when attempting to create a Spanner instance in a region that is out of stock: { "reason": "STOCKOUT" "domain": "spanner.googleapis.com", "metadata": { "availableRegions": "us-central1,us-east2" }} Fields domain [string](https://docs.sui.io/references/fullnode-protocol#string) The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com". metadata [MetadataEntry](https://docs.sui.io/references/fullnode-protocol#google-rpc-ErrorInfo-MetadataEntry) Repeated \[\] Additional structured details about this error. Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should ideally be lowerCamelCase. Also, they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than `{"instanceLimit": "100/request"}`, should be returned as, `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of instances that can be created in a single (batch) request. reason [string](https://docs.sui.io/references/fullnode-protocol#string) The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents UPPER\_SNAKE\_CASE. ### MetadataEntry[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-ErrorInfo-MetadataEntry "Direct link to MetadataEntry") Fields key [string](https://docs.sui.io/references/fullnode-protocol#string) value [string](https://docs.sui.io/references/fullnode-protocol#string) ### Help[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-Help "Direct link to Help") Provides links to documentation or for performing an out of band action. For example, if a quota check failed with an error indicating the calling project hasn't enabled the accessed service, this can contain a URL pointing directly to the right place in the developer console to flip the bit. Fields links [Link](https://docs.sui.io/references/fullnode-protocol#google-rpc-Help-Link) Repeated \[\] URL(s) pointing to additional information on handling the current error. ### Link[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-Help-Link "Direct link to Link") Describes a URL link. Fields description [string](https://docs.sui.io/references/fullnode-protocol#string) Describes what the link offers. url [string](https://docs.sui.io/references/fullnode-protocol#string) The URL of the link. ### LocalizedMessage[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-LocalizedMessage "Direct link to LocalizedMessage") Provides a localized error message that is safe to return to the user which can be attached to an RPC error. Fields locale [string](https://docs.sui.io/references/fullnode-protocol#string) The locale used following the specification defined at [https://www.rfc-editor.org/rfc/bcp/bcp47.txt](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) . Examples are: "en-US", "fr-CH", "es-MX" message [string](https://docs.sui.io/references/fullnode-protocol#string) The localized error message in the above locale. ### PreconditionFailure[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-PreconditionFailure "Direct link to PreconditionFailure") Describes what preconditions have failed. For example, if an RPC failed because it required the Terms of Service to be acknowledged, it could list the terms of service violation in the PreconditionFailure message. Fields violations [Violation](https://docs.sui.io/references/fullnode-protocol#google-rpc-PreconditionFailure-Violation) Repeated \[\] Describes all precondition violations. ### Violation[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-PreconditionFailure-Violation "Direct link to Violation") A message type used to describe a single precondition failure. Fields description [string](https://docs.sui.io/references/fullnode-protocol#string) A description of how the precondition failed. Developers can use this description to understand how to fix the failure. For example: "Terms of service not accepted". subject [string](https://docs.sui.io/references/fullnode-protocol#string) The subject, relative to the type, that failed. For example, "google.com/cloud" relative to the "TOS" type would indicate which terms of service is being referenced. type [string](https://docs.sui.io/references/fullnode-protocol#string) The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation subjects. For example, "TOS" for "Terms of Service violation". ### QuotaFailure[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-QuotaFailure "Direct link to QuotaFailure") Describes how a quota check failed. For example if a daily limit was exceeded for the calling project, a service could respond with a QuotaFailure detail containing the project id and the description of the quota limit that was exceeded. If the calling project hasn't enabled the service in the developer console, then a service could respond with the project id and set `service_disabled` to true. Also see RetryInfo and Help types for other details about handling a quota failure. Fields violations [Violation](https://docs.sui.io/references/fullnode-protocol#google-rpc-QuotaFailure-Violation) Repeated \[\] Describes all quota violations. ### Violation[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-QuotaFailure-Violation "Direct link to Violation") A message type used to describe a single quota violation. For example, a daily quota or a custom quota that was exceeded. Fields description [string](https://docs.sui.io/references/fullnode-protocol#string) A description of how the quota check failed. Clients can use this description to find more about the quota configuration in the service's public documentation, or find the relevant quota limit to adjust through developer console. For example: "Service disabled" or "Daily Limit for read operations exceeded". subject [string](https://docs.sui.io/references/fullnode-protocol#string) The subject on which the quota check failed. For example, `clientip:` or `project:`. ### RequestInfo[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-RequestInfo "Direct link to RequestInfo") Contains metadata about the request that clients can attach when filing a bug or providing other forms of feedback. Fields request\_id [string](https://docs.sui.io/references/fullnode-protocol#string) An opaque string that should only be interpreted by the service generating it. For example, it can be used to identify requests in the service's logs. serving\_data [string](https://docs.sui.io/references/fullnode-protocol#string) Any data that was used to serve this request. For example, an encrypted stack trace that can be sent back to the service provider for debugging. ### ResourceInfo[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-ResourceInfo "Direct link to ResourceInfo") Describes the resource that is being accessed. Fields description [string](https://docs.sui.io/references/fullnode-protocol#string) Describes what error is encountered when accessing this resource. For example, updating a cloud project may require the `writer` permission on the developer console project. owner [string](https://docs.sui.io/references/fullnode-protocol#string) The owner of the resource (optional). For example, `user:` or `project:`. resource\_name [string](https://docs.sui.io/references/fullnode-protocol#string) The name of the resource being accessed. For example, a shared calendar name: "[example.com\_4fghdhgsrgh@group.calendar.google.com](mailto:example.com_4fghdhgsrgh@group.calendar.google.com) ", if the current error is \[google.rpc.Code.PERMISSION\_DENIED\]\[google.rpc.Code.PERMISSION\_DENIED\]. resource\_type [string](https://docs.sui.io/references/fullnode-protocol#string) A name for the type of resource being accessed, e.g. "sql table", "cloud storage bucket", "file", "Google calendar"; or the type URL of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". ### RetryInfo[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-RetryInfo "Direct link to RetryInfo") Describes when the clients can retry a failed request. Clients could ignore the recommendation here or retry when this information is missing from error responses. It's always recommended that clients should use exponential backoff when retrying. Clients should wait until `retry_delay` amount of time has passed since receiving the error response before retrying. If retrying requests also fail, clients should use an exponential backoff scheme to gradually increase the delay between retries based on `retry_delay`, until either a maximum number of retries have been reached or a maximum retry delay cap has been reached. Fields retry\_delay [Duration](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Duration) Clients should wait at least this long between retrying the same request. google/rpc/status.proto[​](https://docs.sui.io/references/fullnode-protocol#google_rpc_status-proto "Direct link to google/rpc/status.proto") ---------------------------------------------------------------------------------------------------------------------------------------------- #### Messages ### Status[​](https://docs.sui.io/references/fullnode-protocol#google-rpc-Status "Direct link to Status") The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc) . Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors) . Fields code [int32](https://docs.sui.io/references/fullnode-protocol#int32) The status code, which should be an enum value of \[google.rpc.Code\]\[google.rpc.Code\]. details [Any](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Any) Repeated \[\] A list of messages that carry the error details. There is a common set of message types for APIs to use. message [string](https://docs.sui.io/references/fullnode-protocol#string) A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the \[google.rpc.Status.details\]\[google.rpc.Status.details\] field, or localized by the client. Scalar Value Types[​](https://docs.sui.io/references/fullnode-protocol#scalar-value-types "Direct link to Scalar Value Types") ------------------------------------------------------------------------------------------------------------------------------- ### double[​](https://docs.sui.io/references/fullnode-protocol#double "Direct link to double") C++ double C# double Go float64 Java double PHP float Python float Ruby Float ### float[​](https://docs.sui.io/references/fullnode-protocol#float "Direct link to float") C++ float C# float Go float32 Java float PHP float Python float Ruby Float ### int32[​](https://docs.sui.io/references/fullnode-protocol#int32 "Direct link to int32") Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. C++ int32 C# int Go int32 Java int PHP integer Python int Ruby Bignum or Fixnum (as required) ### int64[​](https://docs.sui.io/references/fullnode-protocol#int64 "Direct link to int64") Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. C++ int64 C# long Go int64 Java long PHP integer/string Python int/long Ruby Bignum ### uint32[​](https://docs.sui.io/references/fullnode-protocol#uint32 "Direct link to uint32") Uses variable-length encoding. C++ uint32 C# uint Go uint32 Java int PHP integer Python int/long Ruby Bignum or Fixnum (as required) ### uint64[​](https://docs.sui.io/references/fullnode-protocol#uint64 "Direct link to uint64") Uses variable-length encoding. C++ uint64 C# ulong Go uint64 Java long PHP integer/string Python int/long Ruby Bignum or Fixnum (as required) ### sint32[​](https://docs.sui.io/references/fullnode-protocol#sint32 "Direct link to sint32") Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. C++ int32 C# int Go int32 Java int PHP integer Python int Ruby Bignum or Fixnum (as required) ### sint64[​](https://docs.sui.io/references/fullnode-protocol#sint64 "Direct link to sint64") Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. C++ int64 C# long Go int64 Java long PHP integer/string Python int/long Ruby Bignum ### fixed32[​](https://docs.sui.io/references/fullnode-protocol#fixed32 "Direct link to fixed32") Always four bytes. More efficient than uint32 if values are often greater than 2^28. C++ uint32 C# uint Go uint32 Java int PHP integer Python int Ruby Bignum or Fixnum (as required) ### fixed64[​](https://docs.sui.io/references/fullnode-protocol#fixed64 "Direct link to fixed64") Always eight bytes. More efficient than uint64 if values are often greater than 2^56. C++ uint64 C# ulong Go uint64 Java long PHP integer/string Python int/long Ruby Bignum ### sfixed32[​](https://docs.sui.io/references/fullnode-protocol#sfixed32 "Direct link to sfixed32") Always four bytes. C++ int32 C# int Go int32 Java int PHP integer Python int Ruby Bignum or Fixnum (as required) ### sfixed64[​](https://docs.sui.io/references/fullnode-protocol#sfixed64 "Direct link to sfixed64") Always eight bytes. C++ int64 C# long Go int64 Java long PHP integer/string Python int/long Ruby Bignum ### bool[​](https://docs.sui.io/references/fullnode-protocol#bool "Direct link to bool") C++ bool C# bool Go bool Java boolean PHP boolean Python boolean Ruby TrueClass/FalseClass ### string[​](https://docs.sui.io/references/fullnode-protocol#string "Direct link to string") A string must always contain UTF-8 encoded or 7-bit ASCII text. C++ string C# string Go string Java String PHP string Python str/unicode Ruby String (UTF-8) ### bytes[​](https://docs.sui.io/references/fullnode-protocol#bytes "Direct link to bytes") May contain any arbitrary sequence of bytes. C++ string C# ByteString Go \[\]byte Java ByteString PHP string Python str Ruby String (ASCII-8BIT) * [sui/rpc/v2/argument.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_argument-proto) * [Argument](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Argument) * [sui/rpc/v2/signature\_verification\_service.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_signature-verification-service-proto) * [VerifySignatureRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VerifySignatureRequest) * [VerifySignatureResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VerifySignatureResponse) * [Services (signature\_verification\_service.proto)](https://docs.sui.io/references/fullnode-protocol#services-signature_verification_serviceproto) * [sui/rpc/v2/move\_package\_service.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_move-package-service-proto) * [GetDatatypeRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetDatatypeRequest) * [GetDatatypeResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetDatatypeResponse) * [GetFunctionRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetFunctionRequest) * [GetFunctionResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetFunctionResponse) * [GetPackageRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetPackageRequest) * [GetPackageResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetPackageResponse) * [ListPackageVersionsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListPackageVersionsRequest) * [ListPackageVersionsResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListPackageVersionsResponse) * [PackageVersion](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PackageVersion) * [Services (move\_package\_service.proto)](https://docs.sui.io/references/fullnode-protocol#services-move_package_serviceproto) * [sui/rpc/v2/checkpoint\_summary.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_checkpoint-summary-proto) * [CheckpointCommitment](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointCommitment) * [CheckpointSummary](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointSummary) * [EndOfEpochData](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochData) * [sui/rpc/v2/transaction\_execution\_service.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_transaction-execution-service-proto) * [CommandOutput](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandOutput) * [CommandResult](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandResult) * [ExecuteTransactionRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecuteTransactionRequest) * [ExecuteTransactionResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecuteTransactionResponse) * [SimulateTransactionRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimulateTransactionRequest) * [SimulateTransactionResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimulateTransactionResponse) * [Services (transaction\_execution\_service.proto)](https://docs.sui.io/references/fullnode-protocol#services-transaction_execution_serviceproto) * [sui/rpc/v2/ledger\_service.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_ledger-service-proto) * [BatchGetObjectsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetObjectsRequest) * [BatchGetObjectsResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetObjectsResponse) * [BatchGetTransactionsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetTransactionsRequest) * [BatchGetTransactionsResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BatchGetTransactionsResponse) * [GetCheckpointRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCheckpointRequest) * [GetCheckpointResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCheckpointResponse) * [GetEpochRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetEpochRequest) * [GetEpochResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetEpochResponse) * [GetObjectRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetObjectRequest) * [GetObjectResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetObjectResponse) * [GetObjectResult](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetObjectResult) * [GetServiceInfoRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetServiceInfoRequest) * [GetServiceInfoResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetServiceInfoResponse) * [GetTransactionRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetTransactionRequest) * [GetTransactionResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetTransactionResponse) * [GetTransactionResult](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetTransactionResult) * [Services (ledger\_service.proto)](https://docs.sui.io/references/fullnode-protocol#services-ledger_serviceproto) * [sui/rpc/v2/event.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_event-proto) * [Event](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Event) * [TransactionEvents](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionEvents) * [sui/rpc/v2/owner.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_owner-proto) * [Owner](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Owner) * [sui/rpc/v2/object.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_object-proto) * [Object](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Object) * [ObjectSet](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ObjectSet) * [sui/rpc/v2/jwk.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_jwk-proto) * [Jwk](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Jwk) * [JwkId](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-JwkId) * [sui/rpc/v2/effects.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_effects-proto) * [AccumulatorWrite](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AccumulatorWrite) * [ChangedObject](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangedObject) * [TransactionEffects](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionEffects) * [UnchangedConsensusObject](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UnchangedConsensusObject) * [sui/rpc/v2/executed\_transaction.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_executed-transaction-proto) * [ExecutedTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutedTransaction) * [sui/rpc/v2/name\_service.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_name-service-proto) * [LookupNameRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-LookupNameRequest) * [LookupNameResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-LookupNameResponse) * [NameRecord](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-NameRecord) * [DataEntry](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-NameRecord-DataEntry) * [ReverseLookupNameRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ReverseLookupNameRequest) * [ReverseLookupNameResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ReverseLookupNameResponse) * [Services (name\_service.proto)](https://docs.sui.io/references/fullnode-protocol#services-name_serviceproto) * [sui/rpc/v2/signature.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_signature-proto) * [CircomG1](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CircomG1) * [CircomG2](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CircomG2) * [MultisigAggregatedSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigAggregatedSignature) * [MultisigCommittee](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigCommittee) * [MultisigMember](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigMember) * [MultisigMemberPublicKey](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigMemberPublicKey) * [MultisigMemberSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MultisigMemberSignature) * [PasskeyAuthenticator](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PasskeyAuthenticator) * [SimpleSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SimpleSignature) * [UserSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-UserSignature) * [ValidatorAggregatedSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorAggregatedSignature) * [ValidatorCommittee](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorCommittee) * [ValidatorCommitteeMember](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorCommitteeMember) * [ZkLoginAuthenticator](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginAuthenticator) * [ZkLoginClaim](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginClaim) * [ZkLoginInputs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginInputs) * [ZkLoginProof](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginProof) * [ZkLoginPublicIdentifier](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ZkLoginPublicIdentifier) * [sui/rpc/v2/gas\_cost\_summary.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_gas-cost-summary-proto) * [GasCostSummary](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GasCostSummary) * [sui/rpc/v2/error\_reason.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_error-reason-proto) * [sui/rpc/v2/protocol\_config.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_protocol-config-proto) * [ProtocolConfig](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProtocolConfig) * [AttributesEntry](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProtocolConfig-AttributesEntry) * [FeatureFlagsEntry](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProtocolConfig-FeatureFlagsEntry) * [sui/rpc/v2/system\_state.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_system-state-proto) * [MoveTable](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveTable) * [StakeSubsidy](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-StakeSubsidy) * [StakingPool](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-StakingPool) * [StorageFund](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-StorageFund) * [SystemParameters](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SystemParameters) * [SystemState](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SystemState) * [Validator](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Validator) * [ValidatorReportRecord](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorReportRecord) * [ValidatorSet](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorSet) * [AtRiskValidatorsEntry](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorSet-AtRiskValidatorsEntry) * [sui/rpc/v2/execution\_status.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_execution-status-proto) * [CleverError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CleverError) * [CoinDenyListError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinDenyListError) * [CommandArgumentError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CommandArgumentError) * [CongestedObjects](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CongestedObjects) * [ExecutionError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionError) * [ExecutionStatus](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionStatus) * [IndexError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-IndexError) * [MoveAbort](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveAbort) * [MoveLocation](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveLocation) * [PackageUpgradeError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-PackageUpgradeError) * [SizeError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SizeError) * [TypeArgumentError](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeArgumentError) * [sui/rpc/v2/object\_reference.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_object-reference-proto) * [ObjectReference](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ObjectReference) * [sui/rpc/v2/input.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_input-proto) * [FundsWithdrawal](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FundsWithdrawal) * [Input](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Input) * [sui/rpc/v2/move\_package.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_move-package-proto) * [DatatypeDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-DatatypeDescriptor) * [FieldDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FieldDescriptor) * [FunctionDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-FunctionDescriptor) * [Linkage](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Linkage) * [Module](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Module) * [OpenSignature](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignature) * [OpenSignatureBody](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-OpenSignatureBody) * [Package](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Package) * [TypeOrigin](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeOrigin) * [TypeParameter](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TypeParameter) * [VariantDescriptor](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VariantDescriptor) * [sui/rpc/v2/epoch.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_epoch-proto) * [Epoch](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Epoch) * [sui/rpc/v2/subscription\_service.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_subscription-service-proto) * [SubscribeCheckpointsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SubscribeCheckpointsRequest) * [SubscribeCheckpointsResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SubscribeCheckpointsResponse) * [Services (subscription\_service.proto)](https://docs.sui.io/references/fullnode-protocol#services-subscription_serviceproto) * [sui/rpc/v2/bcs.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_bcs-proto) * [Bcs](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Bcs) * [sui/rpc/v2/state\_service.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_state-service-proto) * [Balance](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Balance) * [CoinMetadata](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinMetadata) * [CoinTreasury](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CoinTreasury) * [DynamicField](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-DynamicField) * [GetBalanceRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetBalanceRequest) * [GetBalanceResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetBalanceResponse) * [GetCoinInfoRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCoinInfoRequest) * [GetCoinInfoResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GetCoinInfoResponse) * [ListBalancesRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListBalancesRequest) * [ListBalancesResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListBalancesResponse) * [ListDynamicFieldsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListDynamicFieldsRequest) * [ListDynamicFieldsResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListDynamicFieldsResponse) * [ListOwnedObjectsRequest](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListOwnedObjectsRequest) * [ListOwnedObjectsResponse](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ListOwnedObjectsResponse) * [RegulatedCoinMetadata](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-RegulatedCoinMetadata) * [Services (state\_service.proto)](https://docs.sui.io/references/fullnode-protocol#services-state_serviceproto) * [sui/rpc/v2/signature\_scheme.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_signature-scheme-proto) * [sui/rpc/v2/checkpoint.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_checkpoint-proto) * [Checkpoint](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Checkpoint) * [sui/rpc/v2/transaction.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_transaction-proto) * [ActiveJwk](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ActiveJwk) * [AuthenticatorStateExpire](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AuthenticatorStateExpire) * [AuthenticatorStateUpdate](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AuthenticatorStateUpdate) * [CanceledTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CanceledTransaction) * [ChangeEpoch](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ChangeEpoch) * [Command](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Command) * [ConsensusCommitPrologue](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ConsensusCommitPrologue) * [ConsensusDeterminedVersionAssignments](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ConsensusDeterminedVersionAssignments) * [EndOfEpochTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochTransaction) * [EndOfEpochTransactionKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-EndOfEpochTransactionKind) * [ExecutionTimeObservation](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionTimeObservation) * [ExecutionTimeObservations](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ExecutionTimeObservations) * [GasPayment](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GasPayment) * [GenesisTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-GenesisTransaction) * [MakeMoveVector](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MakeMoveVector) * [MergeCoins](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MergeCoins) * [MoveCall](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-MoveCall) * [ProgrammableTransaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ProgrammableTransaction) * [Publish](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Publish) * [RandomnessStateUpdate](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-RandomnessStateUpdate) * [SplitCoins](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SplitCoins) * [SystemPackage](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-SystemPackage) * [Transaction](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Transaction) * [TransactionExpiration](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionExpiration) * [TransactionKind](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransactionKind) * [TransferObjects](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-TransferObjects) * [Upgrade](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-Upgrade) * [ValidatorExecutionTimeObservation](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-ValidatorExecutionTimeObservation) * [VersionAssignment](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-VersionAssignment) * [sui/rpc/v2/balance\_change.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_balance-change-proto) * [BalanceChange](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-BalanceChange) * [sui/rpc/v2/checkpoint\_contents.proto](https://docs.sui.io/references/fullnode-protocol#sui_rpc_v2_checkpoint-contents-proto) * [AddressAliasesVersion](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-AddressAliasesVersion) * [CheckpointContents](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointContents) * [CheckpointedTransactionInfo](https://docs.sui.io/references/fullnode-protocol#sui-rpc-v2-CheckpointedTransactionInfo) * [google/protobuf/timestamp.proto](https://docs.sui.io/references/fullnode-protocol#google_protobuf_timestamp-proto) * [Timestamp](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Timestamp) * [Examples](https://docs.sui.io/references/fullnode-protocol#examples) * [JSON Mapping](https://docs.sui.io/references/fullnode-protocol#json-mapping) * [google/protobuf/empty.proto](https://docs.sui.io/references/fullnode-protocol#google_protobuf_empty-proto) * [Empty](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Empty) * [google/protobuf/struct.proto](https://docs.sui.io/references/fullnode-protocol#google_protobuf_struct-proto) * [ListValue](https://docs.sui.io/references/fullnode-protocol#google-protobuf-ListValue) * [Struct](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Struct) * [FieldsEntry](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Struct-FieldsEntry) * [Value](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Value) * [google/protobuf/any.proto](https://docs.sui.io/references/fullnode-protocol#google_protobuf_any-proto) * [Any](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Any) * [google/protobuf/field\_mask.proto](https://docs.sui.io/references/fullnode-protocol#google_protobuf_field-mask-proto) * [FieldMask](https://docs.sui.io/references/fullnode-protocol#google-protobuf-FieldMask) * [Field Masks in Projections](https://docs.sui.io/references/fullnode-protocol#field-masks-in-projections) * [Field Masks in Update Operations](https://docs.sui.io/references/fullnode-protocol#field-masks-in-update-operations) * [Considerations for HTTP REST](https://docs.sui.io/references/fullnode-protocol#considerations-for-http-rest) * [JSON Encoding of Field Masks](https://docs.sui.io/references/fullnode-protocol#json-encoding-of-field-masks) * [Field Masks and Oneof Fields](https://docs.sui.io/references/fullnode-protocol#field-masks-and-oneof-fields) * [Field Mask Verification](https://docs.sui.io/references/fullnode-protocol#field-mask-verification) * [google/protobuf/duration.proto](https://docs.sui.io/references/fullnode-protocol#google_protobuf_duration-proto) * [Duration](https://docs.sui.io/references/fullnode-protocol#google-protobuf-Duration) * [Examples](https://docs.sui.io/references/fullnode-protocol#examples-1) * [JSON Mapping](https://docs.sui.io/references/fullnode-protocol#json-mapping-1) * [google/rpc/error\_details.proto](https://docs.sui.io/references/fullnode-protocol#google_rpc_error-details-proto) * [BadRequest](https://docs.sui.io/references/fullnode-protocol#google-rpc-BadRequest) * [FieldViolation](https://docs.sui.io/references/fullnode-protocol#google-rpc-BadRequest-FieldViolation) * [DebugInfo](https://docs.sui.io/references/fullnode-protocol#google-rpc-DebugInfo) * [ErrorInfo](https://docs.sui.io/references/fullnode-protocol#google-rpc-ErrorInfo) * [MetadataEntry](https://docs.sui.io/references/fullnode-protocol#google-rpc-ErrorInfo-MetadataEntry) * [Help](https://docs.sui.io/references/fullnode-protocol#google-rpc-Help) * [Link](https://docs.sui.io/references/fullnode-protocol#google-rpc-Help-Link) * [LocalizedMessage](https://docs.sui.io/references/fullnode-protocol#google-rpc-LocalizedMessage) * [PreconditionFailure](https://docs.sui.io/references/fullnode-protocol#google-rpc-PreconditionFailure) * [Violation](https://docs.sui.io/references/fullnode-protocol#google-rpc-PreconditionFailure-Violation) * [QuotaFailure](https://docs.sui.io/references/fullnode-protocol#google-rpc-QuotaFailure) * [Violation](https://docs.sui.io/references/fullnode-protocol#google-rpc-QuotaFailure-Violation) * [RequestInfo](https://docs.sui.io/references/fullnode-protocol#google-rpc-RequestInfo) * [ResourceInfo](https://docs.sui.io/references/fullnode-protocol#google-rpc-ResourceInfo) * [RetryInfo](https://docs.sui.io/references/fullnode-protocol#google-rpc-RetryInfo) * [google/rpc/status.proto](https://docs.sui.io/references/fullnode-protocol#google_rpc_status-proto) * [Status](https://docs.sui.io/references/fullnode-protocol#google-rpc-Status) * [Scalar Value Types](https://docs.sui.io/references/fullnode-protocol#scalar-value-types) * [double](https://docs.sui.io/references/fullnode-protocol#double) * [float](https://docs.sui.io/references/fullnode-protocol#float) * [int32](https://docs.sui.io/references/fullnode-protocol#int32) * [int64](https://docs.sui.io/references/fullnode-protocol#int64) * [uint32](https://docs.sui.io/references/fullnode-protocol#uint32) * [uint64](https://docs.sui.io/references/fullnode-protocol#uint64) * [sint32](https://docs.sui.io/references/fullnode-protocol#sint32) * [sint64](https://docs.sui.io/references/fullnode-protocol#sint64) * [fixed32](https://docs.sui.io/references/fullnode-protocol#fixed32) * [fixed64](https://docs.sui.io/references/fullnode-protocol#fixed64) * [sfixed32](https://docs.sui.io/references/fullnode-protocol#sfixed32) * [sfixed64](https://docs.sui.io/references/fullnode-protocol#sfixed64) * [bool](https://docs.sui.io/references/fullnode-protocol#bool) * [string](https://docs.sui.io/references/fullnode-protocol#string) * [bytes](https://docs.sui.io/references/fullnode-protocol#bytes) --- # Sui CLI | Sui Documentation [Skip to main content](https://docs.sui.io/references/cli#__docusaurus_skipToContent_fallback) On this page Sui provides a command line interface (CLI) tool to interact with the Sui network, its features, and the Move programming language. The complete suite of tools is called the Sui CLI, with commands grouped together by feature. Each group of commands is commonly referred to by its top-level command: Sui Client CLI, Sui Keytool CLI, Sui Move CLI, and Sui Validator CLI. Check Sui CLI installation[​](https://docs.sui.io/references/cli#check-sui-cli-installation "Direct link to Check Sui CLI installation") ----------------------------------------------------------------------------------------------------------------------------------------- Before you can use the Sui CLI, you must install it. To check if the CLI exists on your system, open a terminal or console and type the following command: $ sui --version If the terminal or console responds with a version number, you already have the Sui CLI installed. If the command is not found, follow the instructions in [Install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) to get the Sui CLI on your system. Update CLI[​](https://docs.sui.io/references/cli#update-cli "Direct link to Update CLI") ----------------------------------------------------------------------------------------- The recommended way to manage Sui CLI installations and versions is via `suiup`: [https://github.com/mystenLabs/suiup](https://github.com/mystenLabs/suiup) . info The `tracing` feature is important as it adds Move test coverage and debugger support in the Sui CLI. Unless it is enabled you will not be able to use these two features. Sui CLI commands[​](https://docs.sui.io/references/cli#sui-cli-commands "Direct link to Sui CLI commands") ----------------------------------------------------------------------------------------------------------- There are a number of top-level commands available, but the six most useful to users are the following. Use the `help` flag for the commands that are not documented yet. For example, `sui validator --help`. * **[Sui Client CLI](https://docs.sui.io/references/cli/client) :** Use the `sui client` commands to interact with the Sui network. * **[Sui Client PTB CLI](https://docs.sui.io/references/cli/ptb) :** Use the `sui client ptb` command to build and execute PTBs. * **[Sui Keytool CLI](https://docs.sui.io/references/cli/keytool) :** Use the `sui keytool` commands to access cryptography utilities. * **[Sui Move CLI](https://docs.sui.io/references/cli/move) :** Use the `sui move` commands to work with the Move programming language. * **[Sui Replay CLI](https://docs.sui.io/references/cli/replay) :** Use the `sui replay` command to replay a transaction and generate transaction traces for the Move Debugger and trace analysis tools. * **[Sui Validator CLI](https://docs.sui.io/references/cli/validator) :** Use the `sui validator` commands to access tools useful for Sui validators. * [Update CLI](https://docs.sui.io/references/cli#update-cli) * [Sui CLI commands](https://docs.sui.io/references/cli#sui-cli-commands) --- # Sui and Community SDKs | Sui Documentation [Skip to main content](https://docs.sui.io/references/sui-sdks#__docusaurus_skipToContent_fallback) On this page Sui provides developer kits that act as wrappers for the Sui API. The Sui community broadens the code coverage with its own set of developer kits targeting the Sui blockchain. Sui SDKs[​](https://docs.sui.io/references/sui-sdks#sui-sdks "Direct link to Sui SDKs") ---------------------------------------------------------------------------------------- dApp Kit -------- A web frontend SDK that interacts with the Sui API. It is available as an NPM package. Rust SDK -------- SDK configuration and examples of using the Sui API with Rust, using the `sui-sdk` crate. Rust SDK Auto-generated Docs ---------------------------- Auto-generated documentation for the `sui-sdk` crate in the Sui repository. TypeScript SDK -------------- TypeScript SDK for integrating Sui in your TS apps. zkSend SDK ---------- zkSend SDK to enable you to incorporate Stashed functionality. Community SDKs[​](https://docs.sui.io/references/sui-sdks#community-sdks "Direct link to Community SDKs") ---------------------------------------------------------------------------------------------------------- info While the community projects are expertly developed, their maintenance and community support vary. You might want to research a project's history and support level before committing to using its utilities. dApp Kit (Vue) -------------- Sui dApp Kit for the Vue framework. Dart SDK -------- A cross-platform Sui SDK for mobile, web, and desktop. Go SDK ------ SDK for developing for Sui using Golang. Kotlin SDK ---------- Ksui is a collection of Kotlin Multiplatform JSON-RPC wrapper and crypto utilities for interacting with a Sui full node. Python SDK ---------- pysui is a Python client for developing on the Sui blockchain. Swift SDK --------- SuiKit is a Swift SDK natively designed for developing on the Sui blockchain. * [Sui SDKs](https://docs.sui.io/references/sui-sdks#sui-sdks) * [Community SDKs](https://docs.sui.io/references/sui-sdks#community-sdks) --- # Move Analyzer VS Code Extension | Sui Documentation [Skip to main content](https://docs.sui.io/references/ide/move#__docusaurus_skipToContent_fallback) On this page The Move Analyzer extension for Visual Studio Code provides language support features for the Move programming language. It enables syntax highlighting, code completion, and advanced features like definition linking and type checking. Install[​](https://docs.sui.io/references/ide/move#install "Direct link to Install") ------------------------------------------------------------------------------------- You can install the Move extension from the Visual Studio Code Marketplace: 1. Open VS Code. 2. Open the **Extensions** view (⇧ + ⌘ + X on macOS, Ctrl + Shift + X on Windows/Linux). 3. Search for `mysten.move`. 4. Click **Install** on the Move extension by Mysten Labs. Alternative install methods include: * Use Ctrl + P or ⌘ + P and type `ext install mysten.move`. * Use the command line: $ code --install-extension mysten.move The following extensions are included in the Move extension install: * [Move Syntax](https://marketplace.visualstudio.com/items?itemName=damirka.move-syntax) * [Move Trace Debugger](https://docs.sui.io/references/ide/debugger) ### Install move\-analyzer[​](https://docs.sui.io/references/ide/move#install-move-analyzer "Direct link to install-move-analyzer") The Move extension attempts to install the appropriate `move-analyzer` binary for your platform. If this doesn't work, or you prefer to install it manually, build it with Cargo: $ cargo install --git https://github.com/MystenLabs/sui.git sui-move-lsp By default, the Move extension expects to find the `move-analyzer` binary in `~/.sui/bin`. You can either copy the binary to this location, or configure the extension to use a different path. Features[​](https://docs.sui.io/references/ide/move#features "Direct link to Features") ---------------------------------------------------------------------------------------- The Move extension supports most Language Server Protocol features, as well as basic commands for building, testing, and tracing Move code. ### Build, test, and trace[​](https://docs.sui.io/references/ide/move#build-test-and-trace "Direct link to Build, test, and trace") The Move extension installs command palette commands for building, testing, and tracing Move code. ![Move commands in the command palette](https://docs.sui.io/assets/images/commands-d1f415b9a3db72f125c75fa9d122fe6c.png) These commands find the `Move.toml` file for the open Move source file and open a terminal to run the appropriate `sui move` command. To execute these commands you must have `sui` binary installed, in particular, to generate a trace, the `sui` binary version must be trace-generation capable. See [Debugger](https://docs.sui.io/references/ide/debugger#install) for installation instructions. The extension will search for the `sui` binary on a system path but you can configure the extension to use a different path. ### Syntax highlighting[​](https://docs.sui.io/references/ide/move#syntax-highlighting "Direct link to Syntax highlighting") The [Move Syntax](https://marketplace.visualstudio.com/items?itemName=damirka.move-syntax) extension provides syntax highlighting. ### Hover information[​](https://docs.sui.io/references/ide/move#hover-information "Direct link to Hover information") Hovering over identifiers shows type information, struct fields and attributes, and docstrings (if any) for the identifier. This works for all Move symbols including macros. * Hover over structs to see structure and definition. ![Struct hoverover](https://docs.sui.io/assets/images/hover_struct-555cd8135daa0469ad1f822a41f85ec3.png) * Hover over functions for details and definition. ![Function hoverover](https://docs.sui.io/assets/images/hover_fun-72f450e3d92510e4a5909e4fe79e44c6.png) * Hover over macros for their functionality. ![Macro hoverover](https://docs.sui.io/assets/images/hover_macros-cc91f2d3fce2be4a58a40e81a49cc0fa.png) ### Code completion[​](https://docs.sui.io/references/ide/move#code-completion "Direct link to Code completion") The Move extension autocompletes upon a dot operator, displaying the available methods and fields for the type. ![Code completion](https://docs.sui.io/assets/images/dot_completion-e8a87068cc9fd9c5ee126c220f50172e.png) The Move extension also autocompletes after a `::` operator. ![Type completion](https://docs.sui.io/assets/images/colon_completion-7f004292d8090173687b87450c355796.png) Finally, the Move extension provides _inlay hints_, where the plugin automatically inserts the correct type after a variable declaration, unpack, function parameters, and other places. ![Inlay hints](https://docs.sui.io/assets/images/inlay_hint-e30731ba0e388835b5b53f28a9e683ab.png) ### Navigation[​](https://docs.sui.io/references/ide/move#navigation "Direct link to Navigation") The Move extension supports `go-to-definition` navigation for all Move symbols including types, functions, and macros, as long as the type was present when `move-analyzer` last built the file. The extension also supports `find-references` for functions, macros, constants, and types. * [Install](https://docs.sui.io/references/ide/move#install) * [Install move-analyzer](https://docs.sui.io/references/ide/move#install-move-analyzer) * [Features](https://docs.sui.io/references/ide/move#features) * [Build, test, and trace](https://docs.sui.io/references/ide/move#build-test-and-trace) * [Syntax highlighting](https://docs.sui.io/references/ide/move#syntax-highlighting) * [Hover information](https://docs.sui.io/references/ide/move#hover-information) * [Code completion](https://docs.sui.io/references/ide/move#code-completion) * [Navigation](https://docs.sui.io/references/ide/move#navigation) --- # Sui Move CLI | Sui Documentation [Skip to main content](https://docs.sui.io/references/cli/move#__docusaurus_skipToContent_fallback) On this page The Sui CLI `move` command provides several commands for working with Move source code. A typical usage of `sui move` is to compile and test the Move code, or to generate a new Move project by using `sui move new project_name`, which creates the needed directories and the `Move.toml` file. Check Sui CLI installation[​](https://docs.sui.io/references/cli/move#check-sui-cli-installation "Direct link to Check Sui CLI installation") ---------------------------------------------------------------------------------------------------------------------------------------------- Before you can use the Sui CLI, you must install it. To check if the CLI exists on your system, open a terminal or console and type the following command: $ sui --version If the terminal or console responds with a version number, you already have the Sui CLI installed. If the command is not found, follow the instructions in [Install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) to get the Sui CLI on your system. Commands[​](https://docs.sui.io/references/cli/move#commands "Direct link to Commands") ---------------------------------------------------------------------------------------- $ sui move --help Missing or invalid snippet: `console-output/sui-move-help.mdx` Examples[​](https://docs.sui.io/references/cli/move#examples "Direct link to Examples") ---------------------------------------------------------------------------------------- The following examples demonstrate some of the most often used commands. ### Create a new Move project[​](https://docs.sui.io/references/cli/move#create-a-new-move-project "Direct link to create-a-new-move-project") To create a new Move project that automatically adds the necessary dependencies in a `Move.toml` file, run `sui move new []`. $ sui move new smart_contract_test $ ls -l smart_contract_test Move.tomlSources Display the contents of Move.toml file. $ cat smart_contract_test/Move.toml [package]name = "smart_contract_test"version = "0.0.1"[dependencies]Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" }[addresses]smart_contract_test = "0x0" ### Build a Move project[​](https://docs.sui.io/references/cli/move#build-a-move-project "Direct link to build-a-move-project") Use `sui move build` at the root of your Move project to build the package. $ sui move build UPDATING GIT DEPENDENCY https://github.com/MystenLabs/sui.gitINCLUDING DEPENDENCY SuiINCLUDING DEPENDENCY MoveStdlibBUILDING smart_contract_test ### Run tests in a Move project[​](https://docs.sui.io/references/cli/move#run-tests-in-a-move-project "Direct link to run-tests-in-a-move-project") Use `sui move test` to run the tests in a Move package. $ sui move test UPDATING GIT DEPENDENCY https://github.com/MystenLabs/sui.gitINCLUDING DEPENDENCY SuiINCLUDING DEPENDENCY MoveStdlibBUILDING smart_contract_testRunning Move unit testsTest result: OK. Total tests: 0; passed: 0; failed: 0 ### Get test coverage for a module[​](https://docs.sui.io/references/cli/move#get-test-coverage-for-a-module "Direct link to get-test-coverage-for-a-module") caution This command currently only works on debug builds of the CLI. Please build the CLI from source to use it. This example uses [`first_package`](https://github.com/MystenLabs/sui/tree/main/examples/move/first_package) Move package. To get a summary of the test coverage, you must first run the `sui move test --coverage` command, and then the `sui move coverage summary --test` to get a summary of the test coverage in the example project. $ sui move test --coverage INCLUDING DEPENDENCY SuiINCLUDING DEPENDENCY MoveStdlibBUILDING first_packageRunning Move unit tests[ PASS ] 0x0::example::test_module_init[ PASS ] 0x0::example::test_sword_transactionsTest result: OK. Total tests: 2; passed: 2; failed: 0$ sui move coverage summary --test+-------------------------+| Move Coverage Summary |+-------------------------+Module 0000000000000000000000000000000000000000000000000000000000000000::example>>> % Module coverage: 92.81+-------------------------+| % Move Coverage: 92.81 |+-------------------------+ Help[​](https://docs.sui.io/references/cli/move#help "Direct link to Help") ---------------------------------------------------------------------------- Each command has its own help section. For example: $ sui move build --help Missing or invalid snippet: `console-output/sui-move-build-help.mdx` * [Commands](https://docs.sui.io/references/cli/move#commands) * [Examples](https://docs.sui.io/references/cli/move#examples) * [Create a new Move project](https://docs.sui.io/references/cli/move#create-a-new-move-project) * [Build a Move project](https://docs.sui.io/references/cli/move#build-a-move-project) * [Run tests in a Move project](https://docs.sui.io/references/cli/move#run-tests-in-a-move-project) * [Get test coverage for a module](https://docs.sui.io/references/cli/move#get-test-coverage-for-a-module) * [Help](https://docs.sui.io/references/cli/move#help) --- # Sui Keytool CLI | Sui Documentation [Skip to main content](https://docs.sui.io/references/cli/keytool#__docusaurus_skipToContent_fallback) On this page The Sui CLI `keytool` command provides several command-level access for the management and generation of addresses, as well as working with private keys, signatures, or zkLogin. For example, a user could export a private key from the Sui Wallet and import it into the local Sui CLI wallet using the `sui keytool import [...]` command. Check Sui CLI installation[​](https://docs.sui.io/references/cli/keytool#check-sui-cli-installation "Direct link to Check Sui CLI installation") ------------------------------------------------------------------------------------------------------------------------------------------------- Before you can use the Sui CLI, you must install it. To check if the CLI exists on your system, open a terminal or console and type the following command: $ sui --version If the terminal or console responds with a version number, you already have the Sui CLI installed. If the command is not found, follow the instructions in [Install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) to get the Sui CLI on your system. Commands[​](https://docs.sui.io/references/cli/keytool#commands "Direct link to Commands") ------------------------------------------------------------------------------------------- $ sui keytool --help Missing or invalid snippet: `console-output/sui-keytool-help.mdx` JSON output[​](https://docs.sui.io/references/cli/keytool#json-output "Direct link to JSON output") ---------------------------------------------------------------------------------------------------- Append the `--json` flag to commands to format responses in JSON instead of the more human friendly default Sui CLI output. This can be useful for extremely large datasets, for example, as those results can have a troublesome display on smaller screens. In these cases, the `--json` flag is useful. Examples[​](https://docs.sui.io/references/cli/keytool#examples "Direct link to Examples") ------------------------------------------------------------------------------------------- The following examples demonstrate some of the most often used commands. ### List the key pairs in the local wallet[​](https://docs.sui.io/references/cli/keytool#list-the-key-pairs-in-the-local-wallet "Direct link to List the key pairs in the local wallet") Use the `sui keytool list` command to output all the Sui addresses that exist in the `~/.sui/sui_config/sui.keystore` file in a readable format. $ sui keytool list ╭────────────────────────────────────────────────────────────────────────────────────────────╮│ ╭─────────────────┬──────────────────────────────────────────────────────────────────────╮ ││ │ suiAddress │ 0x3047f142a84297a42a65fb0a8c7a716d9d1b0bd0413d6bfa5ddfec45df175235 │ ││ │ publicBase64Key │ AHsXwcxaWNaNtCIIszwu7V2G6HO8aNM1598w/8y0zI5q │ ││ │ keyScheme │ ed25519 │ ││ │ flag │ 0 │ ││ │ peerId │ 7b17c1cc5a58d68db42208b33c2eed5d86e873bc68d335e7df30ffccb4cc8e6a │ ││ ╰─────────────────┴──────────────────────────────────────────────────────────────────────╯ ││ ╭─────────────────┬──────────────────────────────────────────────────────────────────────╮ ││ │ suiAddress │ 0x514692f08249c3e9957799ce29074695840422564bff85e424b56de462913e0d │ ││ │ publicBase64Key │ AKJCGi8R8TslhYdO2OHIjI6rbr+to1eR+vlOjigLY6SX │ ││ │ keyScheme │ ed25519 │ ││ │ flag │ 0 │ ││ │ peerId │ a2421a2f11f13b2585874ed8e1c88c8eab6ebfada35791faf94e8e280b63a497 │ ││ ╰─────────────────┴──────────────────────────────────────────────────────────────────────╯ │╰────────────────────────────────────────────────────────────────────────────────────────────╯ ### Generate a new key pair and store it in a file[​](https://docs.sui.io/references/cli/keytool#generate-a-new-key-pair-and-store-it-in-a-file "Direct link to Generate a new key pair and store it in a file") To generate a new key pair with the `ed25519` scheme, use the `sui keytool generate ed25519` command. For other schemes, see `sui keytool generate –help`. The key pair file is saved to the current directory with its filename being the address. The content of the file is a Base64 encoded string of 33-byte `flag || privkey`. $ sui keytool generate ed25519 ╭─────────────────┬───────────────────────────────────────────────────────────────────────────────────╮│ suiAddress │ 0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989eaef25 ││ publicBase64Key │ AKTAGf9iv0JqeLXXlsr4PUzBXb9VY8lK7xiZMS50GSu6 ││ keyScheme │ ed25519 ││ flag │ 0 ││ mnemonic │ cushion price ability recall payment embody kid media rude mosquito chalk broom ││ peerId │ a4c019ff62bf426a78b5d796caf83d4cc15dbf5563c94aef1899312e74192bba │╰─────────────────┴───────────────────────────────────────────────────────────────────────────────────╯ ### Show the key pair data from a file[​](https://docs.sui.io/references/cli/keytool#show-the-key-pair-data-from-a-file "Direct link to Show the key pair data from a file") Use `sui keytool show [filename]` to show the key pair data that is stored in a file. For example, the previous command generated a file named `0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989eaef25.key`. $ sui keytool show 0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989eaef25.key ╭─────────────────┬──────────────────────────────────────────────────────────────────────╮│ suiAddress │ 0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989eaef25 ││ publicBase64Key │ AC+AKTAGf9iv0JqeLXXlsr4PUzBXb9VY8lK7xiZMS50GSu6 ││ keyScheme │ ed25519 ││ flag │ 0 ││ peerId │ a4c019ff62bf426a78b5d796caf83d4cc15dbf5563c94aef1899312e74192bba │╰─────────────────┴──────────────────────────────────────────────────────────────────────╯ ### Sign a transaction[​](https://docs.sui.io/references/cli/keytool#sign-a-transaction "Direct link to sign-a-transaction") $ sui keytool sign --data AAABACBRRpLwgknD6ZV3mc4pB0aVhAQiVkv/heQktW3kYpE+DQEBAQABAAAwR/FCqEKXpCpl+wqMenFtnRsL0EE9a/pd3+xF3xdSNQEaEUeErlBmGWxz3Bh+9BZh2mzayodzsri7xIZNDHRA3wIAAAAAAAAAILsR2d1FIZ5+ADDYZtJ2e9CWlpAxsGd4Y2rZrjlyTUF1MEfxQqhCl6QqZfsKjHpxbZ0bC9BBPWv6Xd/sRd8XUjXoAwAAAAAAAICWmAAAAAAAAA== --address 0x3047f142a84297a42a65fb0a8c7a716d9d1b0bd0413d6bfa5ddfec45df175235 ╭──────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ suiAddress │ 0x3047f142a84297a42a65fb0a8c7a716d9d1b0bd0413d6bfa5ddfec45df175235 ││ rawTxData │ AAABACBRRpLwgknD6ZV3mc4pB0aVhAQiVkv/heQktW3kYpE+DQEBAQABAAAwR/FCqEKXpCpl+wqMenFtnRsL0EE9a/pd3+xF3xdSNQEaEUeErlBmGWxz3Bh+9BZh2mzayodzsri7xIZNDHRA3wIAAAAAAAAAILsR ││ │ 2d1FIZ5+ADDYZtJ2e9CWlpAxsGd4Y2rZrjlyTUF1MEfxQqhCl6QqZfsKjHpxbZ0bC9BBPWv6Xd/sRd8XUjXoAwAAAAAAAICWmAAAAAAAAA== ││ intent │ ╭─────────┬─────╮ ││ │ │ scope │ 0 │ ││ │ │ version │ 0 │ ││ │ │ app_id │ 0 │ ││ │ ╰─────────┴─────╯ ││ rawIntentMsg │ AAAAAAABACBRRpLwgknD6ZV3mc4pB0aVhAQiVkv/heQktW3kYpE+DQEBAQABAAAwR/FCqEKXpCpl+wqMenFtnRsL0EE9a/pd3+xF3xdSNQEaEUeErlBmGWxz3Bh+9BZh2mzayodzsri7xIZNDHRA3wIAAAAAAAAA ││ │ ILsR2d1FIZ5+ADDYZtJ2e9CWlpAxsGd4Y2rZrjlyTUF1MEfxQqhCl6QqZfsKjHpxbZ0bC9BBPWv6Xd/sRd8XUjXoAwAAAAAAAICWmAAAAAAAAA== ││ digest │ +B8Cbr16HfOVT50DoN/QF8HB0+oznm8KAYy8Rm+TQFo= ││ suiSignature │ ANucBEl9TIE0uv+w965DvOjlfDUll7NUtIpJgRhPc3D3y3EtZ4cvaNbm8i5pc7TNIov/qI0FhzIYf2J6PbqoNQ57F8HMWljWjbQiCLM8Lu1dhuhzvGjTNeffMP/MtMyOag== │╰──────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Help[​](https://docs.sui.io/references/cli/keytool#help "Direct link to Help") ------------------------------------------------------------------------------- Each command has its own help section. For example: $ sui keytool sign --help Missing or invalid snippet: `console-output/sui-keytool-sign-help.mdx` * [Commands](https://docs.sui.io/references/cli/keytool#commands) * [JSON output](https://docs.sui.io/references/cli/keytool#json-output) * [Examples](https://docs.sui.io/references/cli/keytool#examples) * [List the key pairs in the local wallet](https://docs.sui.io/references/cli/keytool#list-the-key-pairs-in-the-local-wallet) * [Generate a new key pair and store it in a file](https://docs.sui.io/references/cli/keytool#generate-a-new-key-pair-and-store-it-in-a-file) * [Show the key pair data from a file](https://docs.sui.io/references/cli/keytool#show-the-key-pair-data-from-a-file) * [Sign a transaction](https://docs.sui.io/references/cli/keytool#sign-a-transaction) * [Help](https://docs.sui.io/references/cli/keytool#help) --- # Sui Trace Analysis | Sui Documentation [Skip to main content](https://docs.sui.io/references/cli/trace-analysis#__docusaurus_skipToContent_fallback) On this page [Replaying a transaction](https://docs.sui.io/references/cli/replay) generates a trace file that contains detailed information about the execution of the transaction, such as gas usage, functions called, instructions executed, and more. Use the Sui CLI to analyze a trace file and extract useful insights. info Currently, only gas profile analysis is supported for transactions traced with the replay command. Support for additional analyses is planned. ### Profile a transaction[​](https://docs.sui.io/references/cli/trace-analysis#profile-a-transaction "Direct link to profile-a-transaction") Use the `sui analyze-trace -p gas-profile` command to analyze a trace for a transaction and produce a gas profile. The command outputs a profile to the current working directory in the format `gas_profile_{TRACE_FILE_NAME}.json`. You can also supply an optional `--output/-o` flag to the `analyze-trace` command to specify a different output directory for the profile. Use [speedscope](https://www.speedscope.app/) to display the profile that was generated. To install speedscope, run: $ npm install -g speedscope Then, to open a profile in speedscope, run: $ speedscope When viewing the profile in speedscope, there are three different views available: Timer Order, Left Heavy, and Sandwich. In each view, a bar's vertical width corresponds to the percentage of gas consumption incurred by the function. Hover your mouse over a bar or click a bar to see the computation units accrued by the function invocation. The transaction's total computation and storage units are multiplied by the gas price to determine the total gas cost of the transaction based on a tier system. **Time Order** shows the call stack of function invocations from left to right in the order of invocation, while **Left Heavy** combines repeated sequences of nested invocations into a single combined call stack. **Left Heavy** displays these sequences from left to right by total incurred gas consumption per combined call stack. This is useful to quickly observe the total gas consumption over all calls when there have been hundreds of repeated calls to the same function. In both views, click the top section and drag to zoom in or out over different sections of the profile. **Sandwich** view shows a list of discrete values that correspond to gas consumption per function. The **Total** value shows the gas cost incurred in all functions called by the function. **Self** shows the gas cost for only the given function. Observing a transaction's gas consumption provides insight into the expected gas cost of a package. During package development, you can [run a local network](https://docs.sui.io/guides/developer/getting-started/local-network) and publish your package locally. Then, create a transaction that calls your package and run the profiler on that transaction to see a breakdown of the gas cost. * [Profile a transaction](https://docs.sui.io/references/cli/trace-analysis#profile-a-transaction) --- # Sui Replay CLI | Sui Documentation [Skip to main content](https://docs.sui.io/references/cli/replay#__docusaurus_skipToContent_fallback) On this page Replay is a tool that allows you to replay a given transaction to check and analyze the transaction effects. In a nutshell, the replay tool will locally execute the transaction and compare its effects to the effects that exist on chain. Using the replay tool, you can pass the `--trace` flag to generate execution traces for a transaction that can be used with the Move debugger. For more information about the Move debugger, see the [Move Debugger](https://docs.sui.io/references/ide/debugger) page. You can run different [analyses on the transaction traces](https://docs.sui.io/references/cli/trace-analysis) such as [gas profiling](https://docs.sui.io/references/cli/trace-analysis) . Usage[​](https://docs.sui.io/references/cli/replay#usage "Direct link to Usage") --------------------------------------------------------------------------------- The main command for replaying a transaction follows. For all available flags and arguments, run `sui replay --help`. $ sui replay --digest After running this command, the tool generates a directory corresponding to the digest in `/.replay/`, unless you set the `--output-dir` flag. The output directory is **not** automatically overwritten if you attempt to replay the same transaction more than once. If you want to overwrite this directory, include the `--overwrite` flag. After successfully running the previous command, your console provides a response similar to the following: Successfully replayed transaction╭───────────────────────────────────────────────────────────────────────────────────────────────────╮│ Transaction Effects │├───────────────────────────────────────────────────────────────────────────────────────────────────┤│ Digest: 5sbk5UYpQv1i84zkSBSWmowAmPTxw71U7Bb1gbiW5w4y ││ Status: Success ││ Executed Epoch: 816 ││ Mutated Objects: ││ ┌── ││ │ ID: 0x03ff4587a65631bb43648a204588789e95c556eb3f577a0bbca49f0c70724fb6 ││ │ Owner: Account Address ( 0xdae936b5ac98927cf44e9270dd3a045d04d17dd167f744e619d3ba79207f7068 ) ││ │ Version: 524747425 ││ │ Digest: 5a6zqDPxZi1iPYE4QCGGd9D2WN9fMzZGgAq4LQvYDKsH ││ └── ││ ┌── ││ │ ID: 0x1e67adaf36d79a3f9e37dde8a8ea24122d4360b537cbaed29612c06267a5d23b ││ │ Owner: Object ID: ( 0xe83c2da3f26cedac7ced3652dbfae0df591aeb51818d45fb33e91364d551d0cd ) ││ │ Version: 524747425 ││ │ Digest: 7CXwfqNEnXVHHDuFMxNQvpF7TqSDo65RkMh3byXX3qtW ││ └── ││ ┌── ││ │ ID: 0x4044f18055b2eafa176865303c1d8aa257d2d750e4a003c24e86e2fab2151d4b ││ │ Owner: Object ID: ( 0xa676f00193c93b812da927baf1e51bd408c2a32b14104df6c1af2b0e874f33ad ) ││ │ Version: 524747425 ││ │ Digest: B5qvW4VTQXHotjJ9becki57bnD45fcJvWN8gTzWViVN4 ││ └── ││ ┌── ││ │ ID: 0x8ece4cb6de126eb5c7a375f90c221bdc16c81ad8f6f894af08e0b6c25fb50a45 ││ │ Owner: Shared( 414117256 ) ││ │ Version: 524747425 ││ │ Digest: 68jzyz67fHfS3xczermH8FUmDXg82pJ75t8SWLkq5W3G ││ └── ││ ┌── ││ │ ID: 0xd7aaa813f0ee8b63ea5a1ea85849a74f8d48210358b53d0de710de29566d6247 ││ │ Owner: Object ID: ( 0xa30645bc6016097b9182a25eb57a50522a1c08216416b21be8fef564aeb6e0fe ) ││ │ Version: 524747425 ││ │ Digest: A57sAtSpBT6nmUMqbas5w6Kh6a7guhTgZTxM1JeQavy1 ││ └── ││ Shared Objects: ││ ┌── ││ │ ID: 0x8ece4cb6de126eb5c7a375f90c221bdc16c81ad8f6f894af08e0b6c25fb50a45 ││ │ Version: 524747424 ││ │ Digest: AHtPqe2Spt5N1ba5QiBtnkj3yBNTNV27av8FSKgbaS21 ││ └── ││ Deleted Objects: ││ ┌── ││ │ ID: 0xf2a44b7b1de81c8fbf11635411fa7cd2cdc8ae64b48dae13928d4d91066cf13b ││ │ Version: 524747425 ││ │ Digest: 7gyGAp71YXQRoxmFBaHxofQXAipvgHyBKPyxmdSJxyvz ││ └── ││ ┌── ││ │ ID: 0xfe02a0286e87e702c6c9ccd87c3392033bdaf571aeed2f48982591e8ea5f21f5 ││ │ Version: 524747425 ││ │ Digest: 7gyGAp71YXQRoxmFBaHxofQXAipvgHyBKPyxmdSJxyvz ││ └── ││ Gas Object: ││ ┌── ││ │ ID: 0x03ff4587a65631bb43648a204588789e95c556eb3f577a0bbca49f0c70724fb6 ││ │ Owner: Account Address ( 0xdae936b5ac98927cf44e9270dd3a045d04d17dd167f744e619d3ba79207f7068 ) ││ │ Version: 524747425 ││ │ Digest: 5a6zqDPxZi1iPYE4QCGGd9D2WN9fMzZGgAq4LQvYDKsH ││ └── ││ Gas Cost Summary: ││ Storage Cost: 11187200 MIST ││ Computation Cost: 1000000 MIST ││ Storage Rebate: 13031568 MIST ││ Non-refundable Storage Fee: 131632 MIST ││ ││ Transaction Dependencies: ││ jTwsncjYXYtioZqfTZSpjLUaxWrNT2vyhSgjP3P9XGG ││ 36GM8UKe7M71qQkSY468vnxcApxFuMErx4M8vF5fQdLs ││ 4h5punxCyApywJVsWaux7Ym7mf7tzBECjp2avZTaLdue ││ BvfZzvfVD8SYPAx6De3CVFrgrxdSVgEACqxtvBtiHm7R ││ D3AKQmh6WsSv74cGeXpdE5cg3TdRHcptapPd2ySBQdFX ││ D7LMC2Jzf9LH2FmeW4WW2qbHDgEBCfduDhFH3Y2LpQAH │╰───────────────────────────────────────────────────────────────────────────────────────────────────╯Transaction Gas Report for 5sbk5UYpQv1i84zkSBSWmowAmPTxw71U7Bb1gbiW5w4y╭────────────────────────────┬──────────╮│ Gas Info │ │├────────────────────────────┼──────────┤│ Computation Cost │ 1000000 ││ Storage Cost │ 11187200 ││ Storage Rebate │ 13031568 ││ Non-Refundable Storage Fee │ 131632 ││ Gas Used │ 947 ││ Gas Budget │ 3089992 ││ Gas Price │ 1000 ││ Reference Gas Price │ 1000 ││ Storage Gas Price │ 76 ││ Rebate Rate │ 9900 │╰────────────────────────────┴──────────╯╭────────────────────────────────────────────────────────────────────┬───────┬────────────┬────────────╮│ Object ID │ Bytes │ Old Rebate │ New Rebate │├────────────────────────────────────────────────────────────────────┼───────┼────────────┼────────────┤│ 0x03ff4587a65631bb43648a204588789e95c556eb3f577a0bbca49f0c70724fb6 │ 130 │ 988000 │ 988000 ││ 0x1e67adaf36d79a3f9e37dde8a8ea24122d4360b537cbaed29612c06267a5d23b │ 461 │ 3503600 │ 3503600 ││ 0x4044f18055b2eafa176865303c1d8aa257d2d750e4a003c24e86e2fab2151d4b │ 398 │ 3024800 │ 3024800 ││ 0x8ece4cb6de126eb5c7a375f90c221bdc16c81ad8f6f894af08e0b6c25fb50a45 │ 175 │ 1330000 │ 1330000 ││ 0xd7aaa813f0ee8b63ea5a1ea85849a74f8d48210358b53d0de710de29566d6247 │ 308 │ 2340800 │ 2340800 ││ 0xf2a44b7b1de81c8fbf11635411fa7cd2cdc8ae64b48dae13928d4d91066cf13b │ 0 │ 988000 │ 0 ││ 0xfe02a0286e87e702c6c9ccd87c3392033bdaf571aeed2f48982591e8ea5f21f5 │ 0 │ 988000 │ 0 │╰────────────────────────────────────────────────────────────────────┴───────┴────────────┴────────────╯ The response above provides the transaction effects information, gas report, and a more detailed list of the each object's size and cost. For more information about the gas cost, please refer to the [gas in sui](https://docs.sui.io/concepts/tokenomics/gas-in-sui) page. You can replay multiple transactions at once by using the `--digests-path` flag to specify a location of a file containing multiple transaction digests, one per line. By default, the entire batch is replayed regardless of the success or failure of an individual transaction execution. You can use the `--terminate-early` flag to terminate batch execution if an error occurs when replaying one of the transactions. You can provide default values for the replay tool flags by specifying them in the `~/.sui/sui_config/replay.toml` file. You need to specify them in the `[flags]` section (the only section currently supported) using their "long" names with initial dashes (`--`) removed. For example, you can disable showing transaction effects with `show-effects = false` but not with `e = false`. Here is a complete example of a config file: [flags]show-effects = falseoverwrite = true * [Usage](https://docs.sui.io/references/cli/replay#usage) --- # PTB Commands | Sui Documentation [Skip to main content](https://docs.sui.io/references/ptb-commands#__docusaurus_skipToContent_fallback) On this page The following sections describe each PTB command. Command signatures shown are conceptual Move representations, as these operations cannot always be expressed as standard Move functions. #### `TransferObjects`[​](https://docs.sui.io/references/ptb-commands#transferobjects "Direct link to transferobjects") **Form:** `TransferObjects(ObjectArgs, AddressArg)` Sends one or more objects to a specified address. * `ObjectArgs: [Argument]`: Vector of objects, any type. Taken by value. * `AddressArg: Argument`: Target address from `Pure` input or result. Taken by value. **Returns:** Empty result vector. **Signature:** `(vector, address): ()` #### `SplitCoins`[​](https://docs.sui.io/references/ptb-commands#splitcoins "Direct link to splitcoins") **Form:** `SplitCoins(CoinArg, AmountArgs)` Splits off one or more coins from a single coin. * `CoinArg: Argument`: Coin of type `sui::coin::Coin` (any coin type). Taken by mutable reference. * `AmountArgs: [Argument]`: `u64` values for split amounts. Taken by value (copied). **Returns:** Vector of coins `sui::coin::Coin` matching the number of amounts. **Signature:** `(coin: &mut sui::coin::Coin, amounts: vector): vector>` #### `MergeCoins`[​](https://docs.sui.io/references/ptb-commands#mergecoins "Direct link to mergecoins") **Form:** `MergeCoins(CoinArg, ToMergeArgs)` Merges multiple coins into a single coin. * `CoinArg: Argument`: Target coin of type `sui::coin::Coin` (any coin type). Taken by mutable reference. * `ToMergeArgs: [Argument]`: Coins of type `sui::coin::Coin` to merge. Taken by value (moved). **Returns:** Empty result vector. **Signature:** `(coin: &mut sui::coin::Coin, to_merge: vector>): ()` #### `MakeMoveVec`[​](https://docs.sui.io/references/ptb-commands#makemovevec "Direct link to makemovevec") **Form:** `MakeMoveVec(VecTypeOption, Args)` Creates a vector (potentially empty) of Move values. * `VecTypeOption: Option`: Optional type specifier for elements. Must be specified for non\-object types or empty vectors. * `Args: [Argument]`: Vector elements (any type). Taken by value (copied if `T: copy`, moved otherwise). **Returns:** Single result of type `vector`. Elements cannot be accessed individually using `NestedResult`; use the entire vector or access elements inside Move code via `MoveCall`. **Signature:** `(T...): vector` #### `MoveCall`[​](https://docs.sui.io/references/ptb-commands#movecall "Direct link to movecall") **Form:** `MoveCall(Package, Module, Function, TypeArgs, Args)` Invokes an `entry` or `public` Move function in a published package. * `Package: ObjectID`: Object ID of the package. * `Module: String`: Module name. * `Function: String`: Function name. * `TypeArgs: [TypeTag]`: Type arguments satisfying the function's type parameters. * `Args: [Argument]`: Arguments matching the function's signature. **Returns:** Dynamic number of results based on the function signature. Unlike other commands, argument usage and result count depend on the Move function being called. #### `Publish`[​](https://docs.sui.io/references/ptb-commands#publish "Direct link to publish") **Form:** `Publish(ModuleBytes, TransitiveDependencies)` Creates a new package and calls the `init` function of each module. * `ModuleBytes: [[u8]]`: Bytes of modules being published (each `[u8]` is one module). * `TransitiveDependencies: [ObjectID]`: Object IDs of package dependencies for version selection. **Returns:** Single result of type `sui::package::UpgradeCap` for the newly published package. After verification, the `init` function of each module is called in the same order as the module byte vector. #### `Upgrade`[​](https://docs.sui.io/references/ptb-commands#upgrade "Direct link to upgrade") **Form:** `Upgrade(ModuleBytes, TransitiveDependencies, Package, UpgradeTicket)` Upgrades an existing package. No `init` functions are called for upgraded modules. * `ModuleBytes: [[u8]]`: Bytes of upgraded modules. * `TransitiveDependencies: [ObjectID]`: Object IDs of package dependencies. * `Package: ObjectID`: Object ID of the package being upgraded (must exist and be latest version). * `UpgradeTicket: sui::package::UpgradeTicket`: Upgrade ticket generated from `sui::package::UpgradeCap`. Taken by value (moved). **Returns:** Single result of type `sui::package::UpgradeReceipt` providing proof of upgrade. For more details on upgrades, see [Upgrading Packages](https://docs.sui.io/guides/developer/packages/upgrade) . --- # Move References | Sui Documentation [Skip to main content](https://docs.sui.io/references/sui-move#__docusaurus_skipToContent_fallback) Move is an open source language for writing safe packages to manipulate on-chain objects (sometimes referred to as _smart contracts_). Move is a platform-agnostic language to enable common libraries, tooling, and developer communities across blockchains with vastly different data and execution models. Move is adaptable to meet the needs of the blockchain the code operates on, see [Move on Sui](https://docs.sui.io/concepts/sui-move-concepts#differences) to review enhancements made to Move for optimization on the Sui blockchain. * [Sui Framework](https://docs.sui.io/references/framework) : Provides `cargo doc`\-generated content for core Sui modules. * [The Move Book](https://move-book.com/) : A definitive guide for learning the Move language on Sui. * [The Move Reference](https://move-book.com/reference) : Architecture and syntax reference for the Move language. --- # Sui Client PTB CLI | Sui Documentation [Skip to main content](https://docs.sui.io/references/cli/ptb#__docusaurus_skipToContent_fallback) On this page The `client ptb` command allows you to specify the transactions for execution in a programmable transaction block (PTB) directly from your CLI or through bash scripts. warning The examples in this document were tested using a `bash` shell environment. Your experience might vary depending on how your shell interprets the input values (for example, zsh requires quotes around passed values in brackets: "\[\]"; whereas bash accepts them without quotes). On Windows, you might need to add even more quotes around arguments passed (for example, `--assign "forge @"`). Commands[​](https://docs.sui.io/references/cli/ptb#commands "Direct link to Commands") --------------------------------------------------------------------------------------- The following list itemizes all the available args for the `sui client ptb` command. Use the `--help` for a long help version that includes some examples on how to use this command. $ sui client ptb --help Missing or invalid snippet: `console-output/sui-client-ptb-help.mdx` Design philosophy and concepts[​](https://docs.sui.io/references/cli/ptb#design-philosophy-and-concepts "Direct link to Design philosophy and concepts") --------------------------------------------------------------------------------------------------------------------------------------------------------- The main philosophy behind the CLI PTB support is to enable a user to build and execute a PTB from the command line. Bash scripts can be used to construct and execute the PTB just as you would do from the command line, providing great flexibility when it comes to automating different tasks. Besides using existing [traditional PTB](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks/) related concepts, we introduce a few new and important concepts for this command. warning All the following examples were tested using a `bash` shell environment and your experience may vary depending on how your shell interprets the input values (e.g., zsh requires to pass values in brackets by adding quotes around it: "\[\]"; bash accepts them without quotes). ### Types[​](https://docs.sui.io/references/cli/ptb#types "Direct link to Types") Sometimes, CLI PTBs require that you specify the type of a value or variable. For instance, in the following example you must provide the `` type when calling the `0x1::option::is_none` function. $ sui client ptb \--assign my_variable none \--move-call 0x1::option::is_none "" my_variable \--gas-budget 50000000 To pass in multiple types, delimit them with a comma: ...--move-call package::module::function "" \... ### Strings[​](https://docs.sui.io/references/cli/ptb#strings "Direct link to Strings") CLI PTBs support string literals as inputs, which will be encoded as pure values that can be used as inputs to `vector`, `std::ascii::String` and `std::string::String` parameters. The following example previews a transaction block that passes the string `"Hello, world"` to a function `m::f` in a package `$PKG` (its ID is held in an environment variable). $ sui client ptb --move-call "$PKG::m::f" '"Hello, world"' --gas-budget 10000000 --preview warning Double-quoted string literals tend to also be valid syntax for shells (like `bash`), so when inputting PTBs on the command-line, remember to wrap the entire string in single-quotes so that its double-quotes are interpreted literally, as in the previous example. ### Addresses and Object IDs[​](https://docs.sui.io/references/cli/ptb#addresses-and-object-ids "Direct link to addresses-and-object-ids") You can pass literal addresses and objects IDs by prefixing them with '@'. This is needed to distinguish a hexadecimal value from an address in some situations. For addresses that are in your local wallet, you can use their alias instead (passing them without '@', for example, -\-transfer\-objects my\_alias). Here are some examples for `transfer-objects` and `gas-coin`: $ sui client ptb --transfer-objects "[ARRAY_OF_OBJECTS]" @0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331 --gas-coin @0x00002819ee07a66e53800495ccf5eeade8a02054a2e0827546c70e4b226f0495 ### Vectors[​](https://docs.sui.io/references/cli/ptb#vectors "Direct link to Vectors") CLI PTBs support vectors of serializable types as input (which includes all the primitive types, `ID`s, and `Option`s). Vectors are represented as a comma-separated list of values in square brackets prefixed with `vector`. $ sui client ptb --move-call "$PKG::m::f" vector[1, 2, 3] Example above illustrates a vector of integer values. Depending on the type of the vector, you can pass any supported type: --move-call package::module::function vector[@0x1, @0x2, @0x3] # vector
--move-call package::module::function vector[none, none] # vector>--move-call package::module::function vector["1", "2", "3"] # vector ### Option[​](https://docs.sui.io/references/cli/ptb#option "Direct link to Option") Options are represented as `none` or `some(value)`. The value can be any supported primitive type, `ID`, or `Option`. $ sui client ptb --move-call "0x1::option::destroy_some" some(2) For `none`, you can use the `none` keyword. For `some`, you can use the `some` keyword followed by the value. $ sui client ptb --move-call "0x1::option::destroy_none" none ### Addresses[​](https://docs.sui.io/references/cli/ptb#addresses "Direct link to Addresses") ### Assign[​](https://docs.sui.io/references/cli/ptb#assign "Direct link to Assign") Use the `--assign` argument to bind values to variables. There are two ways you can use it: * assign a value to a variable * assign a variable to the result of the previous command Let's look at the first case where you assign a value to a variable. You want to check if some variable's value is `none`. Call the `0x1::option::is_none` function from the Move standard library, and pass in the variable name: $ sui client ptb \--assign my_variable none \--move-call 0x1::option::is_none "" my_variable \--gas-budget 50000000 tip CLI PTB uses name resolution for common packages like `sui`, `std`, `deepbook`, so you can use them directly instead of their addresses: `0x2`, `0x1`, or `0xdee9`. In the second case, if a previous command outputs some result, you can bound it to a variable for later access. Let's see an example where you want a new coin with 1000 MIST, which you can achieve by using the `split-coins` command. After you do that, you want to transfer the new coin to another address. Without the `--assign` argument, you couldn't instruct the CLI to transfer that new coin object as you would not have a way to refer to it. $ sui client ptb \--split-coins gas "[1000]" \--assign coin \--transfer-objects "[coin]" @recipient_address \--gas-budget 50000000 tip If you build a complex PTB, use the `--preview` flag to display the PTB transaction list instead of executing it. Examples[​](https://docs.sui.io/references/cli/ptb#examples "Direct link to Examples") --------------------------------------------------------------------------------------- The following examples demonstrate how to use the `client ptb` command. tip When a PTB is executed, the output contains all the relevant information (transaction data, gas cost, effects, object changes, and so on). Use `--summary` to get a short summary when you do not need all the data. For complex PTBs, you can use `--preview` to display the PTB transaction list instead of executing it. ### Move call[​](https://docs.sui.io/references/cli/ptb#move-call "Direct link to move-call") When needing to execute a Move call, use the `--move-call` transaction to call a specific function from a package. The CLI PTB supports name resolution for common packages like `sui`, `std`, `deepbook`, so you can use both `0x1::option::is_none` as well as `std::option::is_none` for passing the function name. --assign A none--move-call std::option::is_none "" A To call a specific function from a specific package, you can use the following call: --move-call PACKAGE_ADDR::MODULE::FUNCTION "" FUNC_ARG1 FUNC_ARG2 ... ### Publish[​](https://docs.sui.io/references/cli/ptb#publish "Direct link to Publish") Publishing a package is one of the most important commands you need when working with Sui. While the CLI has a standalone `publish` command, PTBs also support publishing and upgrading packages. One main difference is that with `sui client ptb`, you must explicitly transfer the `UpgradeCap` object that is returned when creating a package, or destroy it with a call to [`make_immutable`](https://docs.sui.io/concepts/sui-move-concepts/packages) . Here is an example on how to publish a Move project on chain using the `sui client ptb` command. It makes a call to the `sui::tx_context::sender` to acquire the sender and assigns the result of that call to the `sender` variable, and then calls the publish command. The result of `publish` is bounded to `upgrade_cap` variable, and then this object is transferred to the sender. $ sui client ptb \--move-call sui::tx_context::sender \--assign sender \--publish "." \--assign upgrade_cap \--transfer-objects "[upgrade_cap]" sender \--gas-budget 100000000 ### Split, destroy, and merge coins[​](https://docs.sui.io/references/cli/ptb#split-destroy-and-merge-coins "Direct link to Split, destroy, and merge coins") The following example showcases how to split a gas coin into multiple coins, make a move call to destroy one or more of the new coins, and finally merge the coins that were not destroyed back into the gas coin. It also showcases how to use framework name resolution (for example, `sui::coin` instead of `0x2::coin`) and how to refer to different values in an array using the `.` syntax. # Split off from gas--split-coins gas "[0,1,2,3]"--assign coins--move-call sui::coin::destroy_zero coins.0# Can further split a split coin (and through variable bindings/result accesses)--split-coins coins.1 "[0,0]"--assign zcoins# Destroy both new coins--move-call sui::coin::destroy_zero zcoins.0--move-call sui::coin::destroy_zero zcoins.1# Can merge the split coins back--merge-coins gas "[coins.1, coins.2, coins.3]"--gas-budget 10000000 ### Transfer objects[​](https://docs.sui.io/references/cli/ptb#transfer-objects "Direct link to transfer-objects") This example creates three new coins from gas and transfers them to a different address. --assign to_address @0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331 \--split-coins gas "[1,2,3]" \--assign s \--transfer-objects "[s.0, s.1, s.2]" to_address \--gas-budget 10000000 info You can also pass an alias (without the '@') instead of an address. Reserved words[​](https://docs.sui.io/references/cli/ptb#reserved-words "Direct link to Reserved words") --------------------------------------------------------------------------------------------------------- You cannot use the following words for variable names: * `address` * `bool` * `vector` * `some` * `none` * `gas` * `u8` * `u16` * `u32` * `u64` * `u128` * `u256` JSON output[​](https://docs.sui.io/references/cli/ptb#json-output "Direct link to JSON output") ------------------------------------------------------------------------------------------------ Append the `--json` flag to commands to format responses in JSON instead of the more human-friendly default Sui CLI output. This can be useful for extremely large datasets, for example, as those results can have a troublesome display on smaller screens. In these cases, the `--json` flag is useful. * [Commands](https://docs.sui.io/references/cli/ptb#commands) * [Design philosophy and concepts](https://docs.sui.io/references/cli/ptb#design-philosophy-and-concepts) * [Types](https://docs.sui.io/references/cli/ptb#types) * [Strings](https://docs.sui.io/references/cli/ptb#strings) * [Addresses and Object IDs](https://docs.sui.io/references/cli/ptb#addresses-and-object-ids) * [Vectors](https://docs.sui.io/references/cli/ptb#vectors) * [Option](https://docs.sui.io/references/cli/ptb#option) * [Addresses](https://docs.sui.io/references/cli/ptb#addresses) * [Assign](https://docs.sui.io/references/cli/ptb#assign) * [Examples](https://docs.sui.io/references/cli/ptb#examples) * [Move call](https://docs.sui.io/references/cli/ptb#move-call) * [Publish](https://docs.sui.io/references/cli/ptb#publish) * [Split, destroy, and merge coins](https://docs.sui.io/references/cli/ptb#split-destroy-and-merge-coins) * [Transfer objects](https://docs.sui.io/references/cli/ptb#transfer-objects) * [Reserved words](https://docs.sui.io/references/cli/ptb#reserved-words) * [JSON output](https://docs.sui.io/references/cli/ptb#json-output) --- # Sui Validator CLI | Sui Documentation [Skip to main content](https://docs.sui.io/references/cli/validator#__docusaurus_skipToContent_fallback) On this page The Sui CLI `validator` command provides command-level access to validator features of the Sui network. Commands[​](https://docs.sui.io/references/cli/validator#commands "Direct link to Commands") --------------------------------------------------------------------------------------------- $ sui validator --help Usage: sui validator [OPTIONS] [COMMAND]Commands: make-validator-info become-candidate join-committee leave-committee display-metadata update-metadata update-gas-price Update gas price that is used to calculate Reference Gas Price report-validator Report or un-report a validator serialize-payload-pop Serialize the payload that is used to generate Proof of Possession. This is useful to take the payload offline for an Authority protocol key pair to sign display-gas-price-update-raw-txn Print out the serialized data of a transaction that sets the gas price quote for a validator help Print this message or the help of the given subcommand(s)Options: --client.config Sets the file storing the state of our user accounts (an empty one will be created if missing) --json Return command outputs in json format -y, --yes -h, --help Print help Examples[​](https://docs.sui.io/references/cli/validator#examples "Direct link to Examples") --------------------------------------------------------------------------------------------- The following examples demonstrate some of the most often used commands. ### Update gas price for next epoch[​](https://docs.sui.io/references/cli/validator#update-gas-price-for-next-epoch "Direct link to update-gas-price-for-next-epoch") $ sui validator update-gas-price 500 Click to open Toggle output ----- Transaction Digest ----A8z83EqjmgwRNFV6sme6A5tTTTQPjiLgiW76neyvhLud----- Transaction Data ----╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ Transaction Data │├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ Sender: 0xf...3d9 ││ Gas Owner: 0xf...3d9 ││ Gas Budget: 200000000 MIST ││ Gas Price: 1000 MIST ││ Gas Payment: ││ ┌── ││ │ ID: 0x8...19e ││ │ Version: 1 ││ │ Digest: 8UEiGYe3KL3S6JPs8uP2sbbx7sMCtzi8yJJ6SyTe9V1x ││ └── ││ ││ Transaction Kind : Programmable ││ Inputs: [Object(SharedObject { object_id: 0x0...005, initial_shared_version: SequenceNumber(1), mutable: true }), Object(ImmOrOwnedObject { object_id: 0x4...dbe, version: SequenceNumber(1), digest: o#82z9UUX9iD2Mq9zvciD56kmmDYqjF3iwaFadi3Mk16eJ }), Pure(SuiPureValue { value_type: Some(U64), value: "500" })] ││ Commands: [ ││ MoveCall(0x0...003::sui_system::request_set_gas_price(Input(0),Input(1),Input(2))), ││ ] ││ ││ ││ Signatures: ││ j2FE7GNkHm9+ey0zTQrgfaTXJgGu1vYWmivrVxbUfP56vIrxMFA4XxqEyw7Q8pM1FR+JDPgCsE1kgZRGH6TZDg== ││ │╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯----- Transaction Effects ----╭───────────────────────────────────────────────────────────────────────────────────────────────────╮│ Transaction Effects │├───────────────────────────────────────────────────────────────────────────────────────────────────┤│ Digest: A8z83EqjmgwRNFV6sme6A5tTTTQPjiLgiW76neyvhLud ││ Status: Success ││ Executed Epoch: 5 ││ ││ Mutated Objects: ││ ┌── ││ │ ID: 0x0...005 ││ │ Owner: Shared ││ │ Version: 16 ││ │ Digest: ER2L6MxrqKNAsaRd9pWdMwvLzXG3ocGQnytnP9s5QLeh ││ └── ││ ┌── ││ │ ID: 0x4...dbe ││ │ Owner: Account Address ( 0xf45...3d9 ) ││ │ Version: 16 ││ │ Digest: 4yDkecsKPe8SnacWdECmq1yVDt7MzvpXCxbRGs74PGaB ││ └── ││ ┌── ││ │ ID: 0x5...8d1 ││ │ Owner: Object ID: ( 0x000...005 ) ││ │ Version: 16 ││ │ Digest: BBu5zHWWX7nnb1XcFu5VLVnKZEU6AqRRarDDjEeBtqWy ││ └── ││ ┌── ││ │ ID: 0x8...19e ││ │ Owner: Account Address ( 0xf45...3d9 ) ││ │ Version: 16 ││ │ Digest: 4WQp6FYctutMFzf6f2EX68xut71AMubewJ6c7GxpzX7e ││ └── ││ ││ Shared Objects: ││ ┌── ││ │ ID: 0x0...005 │ │ │ Version: 15 ││ │ Digest: 6vdobiuiDQpJguDxVbbMNW5ddRqEFkP67C3FWrAVYYuZ ││ └── ││ ││ Gas Object: ││ ┌── ││ │ ID: 0x8...19e ││ │ Owner: Account Address ( 0xf45...3d9 ) ││ │ Version: 16 ││ │ Digest: 4WQp6FYctutMFzf6f2EX68xut71AMubewJ6c7GxpzX7e ││ └── ││ ││ Gas Cost Summary: ││ Storage Cost: 31479200 ││ Computation Cost: 1000000 ││ Storage Rebate: 0 ││ Non-refundable Storage Fee: 0 ││ ││ Transaction Dependencies: ││ 2gqHgPZbjTkDWM9GnVuWU5kT9z2SWN2ggwK3ryxf8aUX ││ EmW6DhJWRACNZAvupiTNVacZFLoZxbNJ88mrKVv9DeiJ │╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ### Set gas price for the next epoch[​](https://docs.sui.io/references/cli/validator#set-gas-price-for-the-next-epoch "Direct link to set-gas-price-for-the-next-epoch") tip Beginning with the Sui `v1.24.1` [release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.24.1) , the `--gas-budget` option is no longer required for CLI commands. $ sui validator request_set_gas_price --args 0x5 \"42\" --gas-budget GAS-BUDGET-AMOUNT> ### Display the validator information[​](https://docs.sui.io/references/cli/validator#display-the-validator-information "Direct link to display-the-validator-information") $ sui validator display-metadata 0x3...de5 Click to open Toggle output 0x3...de5's validator status: ActiveSuiValidatorSummary { sui_address: 0x3...de5, protocol_pubkey_bytes: [ 167, 93, 42, 177, 79, 244, 192, 168, 26, 242, 55, 119, 232, 131, 191, 112, 92, 219, 204, 109, 234, 107, 124, 116, 79, 200, 221, 159, 185, 142, 173, 161, 122, 214, 113, 183, 240, 124, 205, 8, 157, 110, 31, 85, 16, 106, 16, 34, 9, 254, 125, 36, 83, 125, 35, 231, 245, 203, 204, 43, 137, 70, 229, 201, 64, 157, 189, 203, 220, 222, 1, 121, 138, 139, 41, 108, 106, 57, 116, 212, 208, 249, 215, 18, 22, 237, 214, 179, 71, 192, 93, 89, 255, 51, 56, 158, ], network_pubkey_bytes: [ 118, 14, 165, 223, 145, 150, 130, 74, 212, 160, 218, 170, 134, 2, 206, 72, 228, 87, 35, 114, 40, 217, 206, 35, 29, 194, 81, 61, 186, 215, 56, 215, ], worker_pubkey_bytes: [ 84, 171, 204, 100, 81, 92, 16, 207, 151, 167, 70, 138, 104, 92, 100, 75, 53, 47, 212, 209, 92, 2, 109, 120, 66, 146, 180, 116, 144, 22, 139, 57, ], proof_of_possession_bytes: [ 137, 134, 236, 79, 232, 146, 206, 45, 136, 245, 8, 42, 114, 154, 128, 148, 60, 137, 214, 92, 177, 46, 118, 246, 37, 159, 183, 233, 122, 49, 121, 227, 136, 76, 48, 122, 119, 187, 194, 169, 114, 7, 16, 225, 104, 211, 100, 198, ], name: "Staked", description: "The leading provider of staking infrastructure", image_url: "https://avatars.githubusercontent.com/u/38704373", project_url: "https://staked.us/", net_address: "/dns/sui-mainnet.prod-eks-eu-west-1.staked.cloud/tcp/8080/http", p2p_address: "/dns/sui-mainnet-udp.prod-eks-eu-west-1.staked.cloud/udp/8084", primary_address: "/dns/sui-mainnet-udp.prod-eks-eu-west-1.staked.cloud/udp/8081", worker_address: "/dns/sui-mainnet-udp.prod-eks-eu-west-1.staked.cloud/udp/8082", next_epoch_protocol_pubkey_bytes: None, next_epoch_proof_of_possession: None, next_epoch_network_pubkey_bytes: None, next_epoch_worker_pubkey_bytes: None, next_epoch_net_address: None, next_epoch_p2p_address: None, next_epoch_primary_address: None, next_epoch_worker_address: None, voting_power: 53, operation_cap_id: 0x4...217, gas_price: 1000, commission_rate: 1000, next_epoch_stake: 42223548570491465, next_epoch_gas_price: 1000, next_epoch_commission_rate: 1000, staking_pool_id: 0xc...932, staking_pool_activation_epoch: Some( 0, ), staking_pool_deactivation_epoch: None, staking_pool_sui_balance: 42926894529549497, rewards_pool: 1047712965206377, pool_token_balance: 41704322845739375, pending_stake: 0, pending_total_sui_withdraw: 703345959058032, pending_pool_token_withdraw: 683314441220777, exchange_rates_id: 0x5...65d, exchange_rates_size: 231, ### Report a bad / non-performant validator[​](https://docs.sui.io/references/cli/validator#report-a-bad--non-performant-validator "Direct link to report-a-bad--non-performant-validator") $ sui validator report-validator 0xf...3d9 Click to open Toggle output ----- Transaction Digest ----8jVYrpuRBmdSLP37MsQGRqUqE3kE2m8XiSS4TG4aJwXf----- Transaction Data ----╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ Transaction Data │├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ Sender: 0xf...3d9 ││ Gas Owner: 0xf...3d9 ││ Gas Budget: 200000000 MIST ││ Gas Price: 1000 MIST ││ Gas Payment: ││ ┌── ││ │ ID: 0x8...19e ││ │ Version: 16 ││ │ Digest: 4WQp6FYctutMFzf6f2EX68xut71AMubewJ6c7GxpzX7e ││ └── ││ ││ Transaction Kind : Programmable ││ Inputs: [Object(SharedObject { object_id: 0x0...005, initial_shared_version: SequenceNumber(1), mutable: true }), Object(ImmOrOwnedObject { object_id: 0x4...dbe, version: SequenceNumber(16), digest: o#4yDkecsKPe8SnacWdECmq1yVDt7MzvpXCxbRGs74PGaB }), Pure(SuiPureValue { value_type: Some(Address), value: "0xf...3d9" })] ││ Commands: [ ││ MoveCall(0x0...003::sui_system::report_validator(Input(0),Input(1),Input(2))), ││ ] ││ ││ ││ Signatures: ││ 7lJ9ezA1qjGk7nyFCESgLlg/tkVSy46dDkRgJzwgWP3qA+kAjJV8YVWFjJf2r6aLgWgCZCKnka9bkcp1V5jBAA== ││ │╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯----- Transaction Effects ----╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ Transaction Effects │├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ Digest: 8jVYrpuRBmdSLP37MsQGRqUqE3kE2m8XiSS4TG4aJwXf ││ Status: Failure { error: "MoveAbort(MoveLocation { module: ModuleId { address: 0000000000000000000000000000000000000000000000000000000000000003, name: Identifier(\"sui_system_state_inner\") }, function: 16, instruction: 12, function_name: Some(\"report_validator_impl\") }, 3) in command 0" } ││ Executed Epoch: 8 ││ ││ Mutated Objects: ││ ┌── ││ │ ID: 0x0...005 ││ │ Owner: Shared ││ │ Version: 25 ││ │ Digest: 5N5zyTyFCqAkyz44FGrpr6cYdXcwk4eUCHKzyAZqehMB ││ └── ││ ┌── ││ │ ID: 0x4...dbe ││ │ Owner: Account Address ( 0xf...3d9 ) ││ │ Version: 25 ││ │ Digest: HCEr5bcJhKo5jfRx2gsXxGSkpcq6tm8nFGSxxwoPpkNz ││ └── ││ ┌── ││ │ ID: 0x8...19e ││ │ Owner: Account Address ( 0xf...3d9 ) ││ │ Version: 25 ││ │ Digest: BTzMmVABwEKXoiLsTZ79Li97Eo6HPtNtWTvib8Eq1yrH ││ └── ││ ││ Shared Objects: ││ ┌── ││ │ ID: 0x0...005 ││ │ Version: 24 ││ │ Digest: BiS4pKAX3KGXbJrk4oZijy6ggKHDZJd9qPUDWxLEoNR1 ││ └── ││ ││ Gas Object: ││ ┌── ││ │ ID: 0x8...19e ││ │ Owner: Account Address ( 0xf...3d9 ) ││ │ Version: 25 ││ │ Digest: BTzMmVABwEKXoiLsTZ79Li97Eo6HPtNtWTvib8Eq1yrH ││ └── ││ ││ Gas Cost Summary: ││ Storage Cost: 4195200 ││ Computation Cost: 1000000 ││ Storage Rebate: 31164408 ││ Non-refundable Storage Fee: 314792 ││ ││ Transaction Dependencies: ││ 2gqHgPZbjTkDWM9GnVuWU5kT9z2SWN2ggwK3ryxf8aUX ││ A8z83EqjmgwRNFV6sme6A5tTTTQPjiLgiW76neyvhLud ││ B8p4pVC5pzFQRVpZ73nZfAWMt7sL4iH4x4AbDviYWuzF │╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Help[​](https://docs.sui.io/references/cli/validator#help "Direct link to Help") --------------------------------------------------------------------------------- Each command has its own help section. For example `sui validator report-validator --help` will display the following prompt: $ sui validator report-validator --help Report or un-report a validatorUsage: sui validator report-validator [OPTIONS] Arguments: The Sui Address of the validator is being reported or un-reportedOptions: --operation-cap-id Optional when sender is reporter validator itself and it holds the Cap object. Required when sender is not the reporter validator itself. Validator's OperationCap ID can be found by using the `display-metadata` subcommand --undo-report If true, undo an existing report [possible values: true, false] --gas-budget Gas budget for this transaction --json Return command outputs in json format -h, --help Print help * [Commands](https://docs.sui.io/references/cli/validator#commands) * [Examples](https://docs.sui.io/references/cli/validator#examples) * [Update gas price for next epoch](https://docs.sui.io/references/cli/validator#update-gas-price-for-next-epoch) * [Set gas price for the next epoch](https://docs.sui.io/references/cli/validator#set-gas-price-for-the-next-epoch) * [Display the validator information](https://docs.sui.io/references/cli/validator#display-the-validator-information) * [Report a bad / non-performant validator](https://docs.sui.io/references/cli/validator#report-a-bad--non-performant-validator) * [Help](https://docs.sui.io/references/cli/validator#help) --- # Glossary | Sui Documentation [Skip to main content](https://docs.sui.io/sui-glossary#__docusaurus_skipToContent_fallback) On this page Find terms used in Sui defined below. ### Archival Service[​](https://docs.sui.io/sui-glossary#archival-service "Direct link to archival-service") A gRPC API layer that exposes access to this store, enabling point lookups of historical data, ex., LedgerService ### Archival Store[​](https://docs.sui.io/sui-glossary#archival-store "Direct link to archival-store") A long-term storage system that holds checkpoint\-indexed Sui data, i.e., Bigtable. ### Causal history[​](https://docs.sui.io/sui-glossary#causal-history "Direct link to causal-history") Causal history is the relationship between an object in Sui and its direct predecessors and successors. This history is essential to the causal order Sui uses to process transactions. In contrast, other blockchains read the entire state of their world for each transaction, introducing latency. ### Causal order[​](https://docs.sui.io/sui-glossary#causal-order "Direct link to Causal order") [Causal order](https://www.scattered-thoughts.net/writing/causal-ordering/) is a representation of the relationship between transactions and the objects they produce, laid out as dependencies. Validators cannot execute a transaction dependent on objects created by a prior transaction that has not finished. Rather than total order, Sui uses causal order (a partial order). ### Certificate[​](https://docs.sui.io/sui-glossary#certificate "Direct link to certificate") A certificate is the mechanism proving a transaction was approved or certified. Validators vote on transactions, and aggregators collect a Byzantine-resistant majority of these votes into a certificate and broadcast it to all Sui validators, thereby ensuring finality. ### Closed-Loop Token[​](https://docs.sui.io/sui-glossary#closed-loop-token "Direct link to closed-loop-token") A token that can be used only for a specific service, by an authorized account, or a token that certain accounts can be blocked from using. #### DeepBook[​](https://docs.sui.io/sui-glossary#deepbook "Direct link to deepbook") A decentralized central limit order book (CLOB) built on Sui. The Sui documentation refers to the DeepBook standard as "DeepBookV3" to avoid confusion with the recently deprecated version of DeepBook (DeepBookV2). #### Devnet[​](https://docs.sui.io/sui-glossary#devnet "Direct link to devnet") A development network where data is wiped regularly as part of scheduled software updates. ### Epoch[​](https://docs.sui.io/sui-glossary#epoch "Direct link to epoch") Operation of the Sui network is temporally partitioned into non-overlapping, fixed-duration epochs. During a particular epoch, the set of validators participating in the network is fixed. ### Equivocation[​](https://docs.sui.io/sui-glossary#equivocation "Direct link to equivocation") Equivocation in blockchains is the malicious action of dishonest actors giving conflicting information for the same message, such as inconsistent or duplicate voting. ### Eventual consistency[​](https://docs.sui.io/sui-glossary#eventual-consistency "Direct link to Eventual consistency") [Eventual consistency](https://en.wikipedia.org/wiki/Eventual_consistency) is the consensus model employed by Sui; if one honest validator certifies the transaction, all of the other honest validators will too eventually. ### Finality[​](https://docs.sui.io/sui-glossary#finality "Direct link to Finality") [Finality](https://medium.com/mechanism-labs/finality-in-blockchain-consensus-d1f83c120a9a) is the assurance a transaction will not be revoked. This stage is considered closure for an exchange or other blockchain transaction. ### Gas[​](https://docs.sui.io/sui-glossary#gas "Direct link to gas") [Gas](https://ethereum.org/en/developers/docs/gas/) refers to the computational effort required for executing operations on the Sui network. In Sui, gas is paid with the network's native currency SUI. The cost of executing a transaction in SUI units is referred to as the transaction fee. ### Genesis[​](https://docs.sui.io/sui-glossary#genesis "Direct link to Genesis") Genesis is the initial act of creating accounts and gas objects for a Sui network. Sui provides a `genesis` command that allows users to create and inspect the genesis object setting up the network for operation. ### Localnet[​](https://docs.sui.io/sui-glossary#localnet "Direct link to localnet") A locally created development network running on your local machine. ### Kiosk[​](https://docs.sui.io/sui-glossary#kiosk "Direct link to kiosk") A decentralized system for commerce applications on Sui. The Sui Kiosk standard consists of Kiosk objects: shared objects owned by individual parties that store assets that can be sold or traded. ### Mainnet[​](https://docs.sui.io/sui-glossary#mainnet "Direct link to mainnet") The Sui production network. ### Multi-writer objects[​](https://docs.sui.io/sui-glossary#multi-writer-objects "Direct link to multi-writer-objects") Multi-writer objects are objects that are owned by more than one address. Transactions affecting multi-writer objects require consensus in Sui. This contrasts with transactions affecting only single-writer objects, which require only a confirmation of the owner's address contents. ### Mysticeti[​](https://docs.sui.io/sui-glossary#mysticeti "Direct link to mysticeti") The consensus protocol used on Sui. Mysticeti is a high-throughput, Directed Acyclic Graph (DAG)-based Byzantine consensus protocol. ### Object[​](https://docs.sui.io/sui-glossary#object "Direct link to Object") The basic unit of storage in Sui is an object. In contrast to many other blockchains, where storage is centered around an address and each address contains a key-value store, Sui's storage is centered around objects. Sui objects have one of the following primary states: * **Immutable:** The object cannot be modified. * **Mutable:** The object can be modified. Further, mutable objects are divided into these categories: * **Owned:** The object can be modified only by its owner. * **Shared:** The object can be modified by anyone. Immutable objects do not need this distinction because they have no owner. #### Operation Cap[​](https://docs.sui.io/sui-glossary#operation-cap "Direct link to operation-cap") Allows a validator to authorize another account to perform certain actions on its behalf. ### Proof-of-stake[​](https://docs.sui.io/sui-glossary#proof-of-stake "Direct link to Proof-of-stake") [Proof-of-stake](https://en.wikipedia.org/wiki/Proof_of_stake) is a blockchain consensus mechanism where the voting weight of each validator is proportional to a bonded amount of the network's native currency (called their stake in the network). This mitigates [Sybil attacks](https://en.wikipedia.org/wiki/Sybil_attack) by forcing bad actors to gain a large stake in the blockchain first. ### Single-writer objects[​](https://docs.sui.io/sui-glossary#single-writer-objects "Direct link to Single-writer objects") Single-writer objects are owned by one address. In Sui, transactions affecting only single-writer objects owned by the same address may proceed with only a verification of the sender's address, greatly speeding transaction times. These are _simple transactions_. See Single-Writer Apps for example applications of this simple transaction model. ### Smart contract[​](https://docs.sui.io/sui-glossary#smart-contract "Direct link to Smart contract") A [smart contract](https://en.wikipedia.org/wiki/Smart_contract) is an agreement based upon the protocol for conducting transactions in a blockchain. In Sui, smart contracts are written in the [Move](https://github.com/MystenLabs/awesome-move) programming language. ### Sui[​](https://docs.sui.io/sui-glossary#sui "Direct link to Sui") Sui refers to the Sui blockchain, and the [Sui open source project](https://github.com/MystenLabs/sui/) as a whole. ### SUI[​](https://docs.sui.io/sui-glossary#sui-1 "Direct link to SUI") SUI is the native token to the Sui network. #### Sui Keystore[​](https://docs.sui.io/sui-glossary#sui-keystore "Direct link to Sui Keystore") A secure storage system for managing your Sui cryptographic key pairs. #### Sui Keytool[​](https://docs.sui.io/sui-glossary#sui-keytool "Direct link to Sui Keytool") A CLI tool that provides commands for managing and generating addresses, and interacting with private keys, signatures, or zkLogin. #### SuiLink[​](https://docs.sui.io/sui-glossary#suilink "Direct link to SuiLink") A Mysten Labs product that connects wallets across chains to support use cases such as cross chain wallet verification, asset ownership verification, and asset distributions across chains. #### Sui Object Display[​](https://docs.sui.io/sui-glossary#sui-object-display "Direct link to sui-object-display") A template engine that enables on-chain management of off-chain representation (display) for a type. #### Soulbound[​](https://docs.sui.io/sui-glossary#soulbound "Direct link to soulbound") An asset that is bound to an account and cannot be transferred. #### Testnet[​](https://docs.sui.io/sui-glossary#testnet "Direct link to testnet") A development network. Data deployed to Testnet persists through the regular update process, but might be wiped when necessary. Testnet data wipes are announced ahead of time. ### Total order[​](https://docs.sui.io/sui-glossary#total-order "Direct link to Total order") [Total order](https://en.wikipedia.org/wiki/Total_order) refers to the ordered presentation of the history of all transactions processed by a traditional blockchain up to a given time. This is maintained by many blockchain systems, as the only way to process transactions. In contrast, Sui uses a causal (partial) order wherever possible and safe. ### Transaction[​](https://docs.sui.io/sui-glossary#transaction "Direct link to Transaction") A transaction in Sui is a change to the blockchain. This may be a simple transaction affecting only single-writer, single\-address objects, such as minting an NFT or transferring an NFT or another token. These transactions may bypass the consensus protocol in Sui. More complex transactions affecting objects that are shared or owned by multiple addresses, such as asset management and other DeFi use cases, do go through consensus. ### Transfer[​](https://docs.sui.io/sui-glossary#transfer "Direct link to transfer") A transfer is switching the owner address of a token to a new one via command in Sui. This is accomplished via the Sui CLI client command line interface. It is one of the more common of many commands available in the CLI client. ### Validator[​](https://docs.sui.io/sui-glossary#validator "Direct link to Validator") A validator in Sui plays a passive role analogous to the more active role of validators and miners in other blockchains. In Sui, validators do not continuously participate in the consensus protocol but are called into action only when receiving a transaction or certificate. #### Wallet Standard[​](https://docs.sui.io/sui-glossary#wallet-standard "Direct link to wallet-standard") A cross-chain standard that defines how apps can automatically discover and interact with wallets. * [Archival Service](https://docs.sui.io/sui-glossary#archival-service) * [Archival Store](https://docs.sui.io/sui-glossary#archival-store) * [Causal history](https://docs.sui.io/sui-glossary#causal-history) * [Causal order](https://docs.sui.io/sui-glossary#causal-order) * [Certificate](https://docs.sui.io/sui-glossary#certificate) * [Closed-Loop Token](https://docs.sui.io/sui-glossary#closed-loop-token) * [Epoch](https://docs.sui.io/sui-glossary#epoch) * [Equivocation](https://docs.sui.io/sui-glossary#equivocation) * [Eventual consistency](https://docs.sui.io/sui-glossary#eventual-consistency) * [Finality](https://docs.sui.io/sui-glossary#finality) * [Gas](https://docs.sui.io/sui-glossary#gas) * [Genesis](https://docs.sui.io/sui-glossary#genesis) * [Localnet](https://docs.sui.io/sui-glossary#localnet) * [Kiosk](https://docs.sui.io/sui-glossary#kiosk) * [Mainnet](https://docs.sui.io/sui-glossary#mainnet) * [Multi-writer objects](https://docs.sui.io/sui-glossary#multi-writer-objects) * [Mysticeti](https://docs.sui.io/sui-glossary#mysticeti) * [Object](https://docs.sui.io/sui-glossary#object) * [Proof-of-stake](https://docs.sui.io/sui-glossary#proof-of-stake) * [Single-writer objects](https://docs.sui.io/sui-glossary#single-writer-objects) * [Smart contract](https://docs.sui.io/sui-glossary#smart-contract) * [Sui](https://docs.sui.io/sui-glossary#sui) * [SUI](https://docs.sui.io/sui-glossary#sui-1) * [Total order](https://docs.sui.io/sui-glossary#total-order) * [Transaction](https://docs.sui.io/sui-glossary#transaction) * [Transfer](https://docs.sui.io/sui-glossary#transfer) * [Validator](https://docs.sui.io/sui-glossary#validator) --- # Move Trace Debugger | Sui Documentation [Skip to main content](https://docs.sui.io/references/ide/debugger#__docusaurus_skipToContent_fallback) On this page The [Move Trace Debugger](https://marketplace.visualstudio.com/items?itemName=mysten.move-trace-debug) extension for Visual Studio Code provides a familiar [debugging interface](https://code.visualstudio.com/docs/debugtest/debugging) for Move unit tests and on-chain transactions, including [PTB](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) debugging support. You can inspect the state of PTB commands, step through code execution, track local variable values, and set line breakpoints for Move code, either in unit tests or in on-chain Move calls. Debugging is enabled via trace generation: traces can be generated during [unit test execution](https://docs.sui.io/references/ide/debugger#debugging-unit-tests) or during on-chain [transaction replay](https://docs.sui.io/references/ide/debugger#debugging-on-chain-transactions) . Install[​](https://docs.sui.io/references/ide/debugger#install "Direct link to Install") ----------------------------------------------------------------------------------------- info Use the debugger by installing the [Move extension](https://docs.sui.io/references/ide/move) , which includes the Move Trace Debugger extension; you do not need to install it separately. The install instructions are included for certain cases where a separate install might be necessary. The Move Trace Debugger extension is available in the Visual Studio Code Marketplace. Search for `Move Trace Debugger` in the **Extensions** view, or press Ctrl + P or ⌘ + P and type `ext install mysten.move-trace-debug`. Alternatively, run `code --install-extension mysten.move-trace-debug` to install the extension from the command line. To generate unit execution traces that enable unit test and on-chain transaction debugging, you need the `sui` binary installed with the `tracing` feature flag enabled. The `sui` binaries included in release tarballs, Homebrew, and Chocolatey installations have this feature enabled. See [Install Sui](https://docs.sui.io/guides/developer/getting-started/sui-install) for more information. Features[​](https://docs.sui.io/references/ide/debugger#features "Direct link to Features") -------------------------------------------------------------------------------------------- The debugger provides a common set of features for all Move code debugging, whether you're debugging Move unit tests or on-chain Move calls. When debugging on-chain transactions, a Move call is just one of many PTB commands. The debugger supports inspecting not only the Move call itself, but also the state and execution of all remaining native PTB commands. ### Move code debugging features[​](https://docs.sui.io/references/ide/debugger#move-code-debugging-features "Direct link to move-code-debugging-features") Currently, the Move Trace Debugger supports forward debugging through execution traces. Reverse debugging is not currently available. #### Disassembly and source-level debugging[​](https://docs.sui.io/references/ide/debugger#disassembly-and-source-level-debugging "Direct link to Disassembly and source-level debugging") Source code for debugging unit tests is available by definition, and when starting a debug session for unit tests, you will find yourself in the source view. ![Source view](https://docs.sui.io/assets/images/source_view-19aeb2769f992e36a0cbfa735633eb08.png) When debugging an on-chain transaction, the source code for Move calls executed within the transaction is not available by default, as it is not stored on-chain. A debug session will start in the disassembly view where Move code is represented by disassembled bytecode. ![Disassembly view](https://docs.sui.io/assets/images/disassembly_view-a59ac49df372b528d9316dde75a35222.png) This is a lower level representation of the Move code that is still quite useful to improve one's understanding of the Move code behavior and execution flow. It also has one advantage over the source view: it is a much better match to what is recorded in the execution trace. In presence of Move compiler optimizations, disassembly view is the ultimate source of truth. For example, some variables present in the source may no longer be present in the trace, which you can verify in the disassembly view. You can still provide [source code for on-chain transactions by hand](https://docs.sui.io/references/ide/debugger#source-level-debugging-for-on-chain-transactions) to enable source view. Support for automating source-level debugging for on-chain transactions will be available in the future. If both source code and disassembled bytecode are available, you can toggle between source view and disassembly view via `Move: Toggle source view` and `Move: Toggle disassembly view` commands from the command palette. You can open these with Shift + ⌘ + P on macOS, Ctrl + Shift + P on Windows/Linux). #### Stepping through code execution[​](https://docs.sui.io/references/ide/debugger#stepping-through-code-execution "Direct link to Stepping through code execution") Move Trace Debugger supports the following standard [debug actions](https://code.visualstudio.com/docs/debugtest/debugging#_debug-actions) : * Step Over * Step Into * Step Out * Continue * Restart * Stop As you step through the code into other function calls, the resulting call stack view in the left-hand side bar will update. ![Stepping through code execution](https://docs.sui.io/assets/images/stepping-87802a142896e878c57b275bec6c6a87.png) #### Tracking variable values[​](https://docs.sui.io/references/ide/debugger#tracking-variable-values "Direct link to Tracking variable values") Move Trace Debugger supports displaying values of primitive types, Move structs, and references. Note that some of the variables present in the source code can be optimized away by the Move compiler and are not available in the underlying trace. Consequently, their values cannot be tracked by the debugger. ![Variable values](https://docs.sui.io/assets/images/variables-73764419f65e4a0ee0d7c6f287f69d2c.png) The debugger currently does not support setting watch points on variables. #### Line breakpoints[​](https://docs.sui.io/references/ide/debugger#line-breakpoints "Direct link to Line breakpoints") Set line breakpoints in your code by placing a cursor on any given line and choosing **Run** -> **Toggle Breakpoint** from the main menu. You can use the **Continue** debug command to advance execution to the next breakpoint. ![Breakpoints](https://docs.sui.io/assets/images/breakpoints-3bdcf87c087f3acdf4ebdcaa8b75e442.png) ### PTB debugging features[​](https://docs.sui.io/references/ide/debugger#ptb-debugging-features "Direct link to ptb-debugging-features") When debugging PTBs, the debugger first displays a summary of the PTB structure. In the following example, you can see that the PTB being debugged consists of multiple Move calls and several native PTB commands (**Split Coins**, **Merge Coins**, and **Transfer Objects**). ![PTB summary](https://docs.sui.io/assets/images/ptb_summary-321eda8af29f59dfc7368073d38418d5.png) In the PTB summary, you can step into specific commands or step over them, much like stepping into functions and and stepping over them when debugging Move code. Setting breakpoints in the PTB summary view is not currently supported. Stepping into a Move function starts Move code debugging with all the relevant [features](https://docs.sui.io/references/ide/debugger#move-code-debugging-features) available (value tracking, breakpoints, etc.). Stepping into a native command allows you to inspect its input and result values. ![Split coins](https://docs.sui.io/assets/images/split_coins-aeb8c45b1076efd74dcb4d03b75f2034.png) There is no stepping "through" native commands. Once the state is inspected, you can only step out of it or keep stepping to move to the next command. Usage[​](https://docs.sui.io/references/ide/debugger#usage "Direct link to Usage") ----------------------------------------------------------------------------------- Use the debugger to debug unit tests and existing on-chain transactions (including [PTB](https://docs.sui.io/guides/developer/transactions/prog-txn-blocks) debugging support) with the help of the [replay tool](https://docs.sui.io/references/cli/replay) . ### Debugging unit tests[​](https://docs.sui.io/references/ide/debugger#debugging-unit-tests "Direct link to Debugging unit tests") Debugging a Move unit test is a two-step process: **1\. Generate execution traces** * Open the command palette (Shift + ⌘ + P on macOS, Ctrl + Shift + P on Windows/Linux). * Run the `Move: Trace Move test execution` command. ![Command palette](https://docs.sui.io/assets/images/trace_palette-aa8928091877c180c8f70bb073b01e0a.png) info This command uses the `sui` binary under the hood which needs to be [pre-installed](https://docs.sui.io/references/ide/debugger#install) . The location of the binary needs to be [discoverable by the Move extension](https://docs.sui.io/references/ide/move#build-test-and-trace) . * The extension displays a filter prompt. Either type a filter string to target specific tests or leave the field blank to run all tests and press Enter. ![Filter test string](https://docs.sui.io/assets/images/filter_string-d2a2f8b90dddd61f529a8f71369edd32.png) * Find the generated traces in the `traces` directory. info If trace generation in the Visual Studio Code extension does not work for some reason, you can generate traces by executing tests for your package using additional flags: sui move test --trace-execution --disassemble **2\. Start debugging** * Open the Move file containing your test. * Select **Run** -> **Start Debugging** from the main menu. ![Start test debugging](https://docs.sui.io/assets/images/start_debugging-797841198e139cf8ecc45b00d86265c0.png) * If the file has multiple tests, select the specific test from the dropdown menu. ![Test selection](https://docs.sui.io/assets/images/test_selection-665236f8006cbca893b618c3676040f7.png) ### Debugging on-chain transactions[​](https://docs.sui.io/references/ide/debugger#debugging-on-chain-transactions "Direct link to Debugging on-chain transactions") Debugging an on-chain transaction is a two-step process: **1\. Generate execution trace** You need to know a transaction's digest to generate a trace for it. For example, `0x42`. sui replay --trace --digest 0x42 This command re-executes the transaction locally, generates a trace of its execution, and downloads all data required for debugging this transaction. Data is deposited in a subdirectory of replay tool's output directory (`.replay` by default, but its location is [configurable](https://docs.sui.io/references/cli/replay#usage) ). This subdirectory is named after the transaction digest. **2\. Start debugging** * Open the subdirectory containing the transaction data downloaded for a transaction with the given digest. Open the trace file `trace.json.zst`. ![Replay trace](https://docs.sui.io/assets/images/replay_trace-3281f7f02ad84ff31b1c190612bbfe56.png) * Select **Run** -> **Start Debugging** from the main menu. ![Start txn debugging](https://docs.sui.io/assets/images/start_debugging-797841198e139cf8ecc45b00d86265c0.png) info The first time you run this command you may be asked to select a debugger type. Select **Move Debugger**. Source-level debugging for on-chain transactions[​](https://docs.sui.io/references/ide/debugger#source-level-debugging-for-on-chain-transactions "Direct link to Source-level debugging for on-chain transactions") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Data downloaded from the network for debugging a transaction does not contain the source code for Move calls executed throughout the transaction. You can, however, provide the sources along with additional debugging metadata yourself to enable source-level debugging. If you have access to the source code of packages used throughout the transaction, you can build the packages to generate the debugging metadata and make the location of this data visible to the replay tool. The source code version of each package should be the same version that was used to build the package used in the transaction. Otherwise, a discrepancy between execution trace (generated from on-chain data) and package debugging metadata (generated locally), might result in debugging failures. For example, consider a situation when an on-chain transaction executes a call to some public function `foo` which then calls some private function `bar`. The package's source code used to generate the debugging metadata still has public function `foo` but `foo` not longer calls `bar`. When attempting to do source-level debugging in such case, if a call to `bar` was part of the execution trace, the debugger would have no source for function `bar` to display when the call is reached during the debugging session. Using the newest version of a package might still work, particularly for packages whose existing functionality is largely stabilized and its source code rarely changes, such as Sui framework package. Below are the instructions on how to handle this simplified case, followed by instructions on how to locate precise versions of packages. Consider the following: a mainnet transaction and with the digest `95oR1YipjSnqd18K4BMshkLgPijypwzARHV988eRhMDs`. Assume that all commands (unless stated otherwise) are executed in some `$ROOT_DIR` (such as your home directory). Start by tracing execution of this transaction. sui replay --digest 95oR1YipjSnqd18K4BMshkLgPijypwzARHV988eRhMDs --trace When you replay the transaction, the replay tool downloads data for all Move packages used by this transaction. In the case of this example, they reside in the `$ROOT_DIR/.replay/95oR1YipjSnqd18K4BMshkLgPijypwzARHV988eRhMDs` parent directory, with subdirectories named after package IDs: 0x00000000000000000000000000000000000000000000000000000000000000010x00000000000000000000000000000000000000000000000000000000000000020x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d32048090xb29d83c26cdd2a64959263abbcfc4a6937f0c9fccaf98580ca56faded65be2440xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e70xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c2700xe0917b74a5912e4ad186ac634e29c922ab83903f71af7500969f9411706f9b9a0xecf47609d7da919ea98e7fd04f6e0648a0a79b337aaad373fa37aac8febf19c8 The second directory on the list corresponds to the ID of the Sui framework package. To enable source-level debugging for this package, provide the replay tool with access to its debugging metadata: obtain the package source, build it, and copy the metadata to a specific location (`source` directory) in the Sui framework package subdirectory. **Metadata generation** * Clone the repository, unless you already have the Sui source code repository available. git clone https://github.com/MystenLabs/sui.git * Build Sui framework package source code. cd sui/crates/sui-framework/packages/sui-framework; sui move build * Copy the debugging metadata to the right location. cp -r $ROOT_DIR/sui/crates/sui-framework/packages/sui-framework/build/Sui $ROOT_DIR.replay/95oR1YipjSnqd18K4BMshkLgPijypwzARHV988eRhMDs/0x0000000000000000000000000000000000000000000000000000000000000002/source When you start a debug session and reach the Sui framework code during debugging, you will be in the source view rather than disassembly view. ### Locating precise package versions[​](https://docs.sui.io/references/ide/debugger#locating-precise-package-versions "Direct link to locating-precise-package-versions") You should try to enable source-level debugging uniformly for all packages used throughout the transaction (both user-level and system packages), and use precise package versions to ensure a smooth [debugging experience](https://docs.sui.io/references/ide/debugger#precise-versions-for-all-packages) . This may not always be possible, but in such case, you can still locate [precise versions of system packages](https://docs.sui.io/references/ide/debugger#precise-versions-for-system-packages) to enable limited source-level debugging. Start debugging the transaction to collect some more information about Move code executed in the transaction. ![Deepbook PTB](https://docs.sui.io/assets/images/deepbook_ptb-1d039c843d0e88d76000c0b997ca3de4.png) The PTB summary reveals that this transaction consists of only one Move call to the function `add_deep_price_point`, in module `pool`, in user package `0xb29d83c26cdd2a64959263abbcfc4a6937f0c9fccaf98580ca56faded65be244`. Ideally, you want to be able to locate the buildable source code for this package and the correct version of the source code. Then, build debugging metadata for this package, which will automatically include information for all dependent packages, enabling uniform source-level debugging. Barring that, you might want to find the correct version of the source code for system packages to at least enable source-level debugging for Sui framework code. #### Precise versions for all packages[​](https://docs.sui.io/references/ide/debugger#precise-versions-for-all-packages "Direct link to precise-versions-for-all-packages") To locate the correct version of the source code for a user package, utilize a Sui explorer (such as [suiscan](https://suiscan.xyz/) ) and Sui's Move Package Registry ([MVR](https://www.moveregistry.com/) ). Search for the package in a Sui explorer. ![Package search](https://docs.sui.io/assets/images/deepbook_search-14edb813b6d44f5aa05d22cbba81a60d.png) You can see that the the package in question is `deepbook/core`. Look at the detailed information about this package available in the explorer. ![Package explorer](https://docs.sui.io/assets/images/deepbook_explorer-2719c9f361bca7082f267f1d00bc800b.png) You can see that the package description in the explorer includes an MVR link. When you follow that link, you get to the MVR page containing a different kind of description for this package. The MVR description includes a link to the package's source code repository and information that the ID represents the 3rd version of this package. ![Deepbook MVR](https://docs.sui.io/assets/images/deepbook_mvr-4340f59951b11a75cff7d18d364d847a.png) While the source code repository for `deepbook/core` contains three different packages, the `pool` module in the PTB is only defined in the `deepbook` package. Proceed to building a correct version of this package to generate debugging metadata that must accompany the package source code. Assume that all commands are executed in `$ROOT_DIR` unless stated otherwise. * Clone the repository. git clone https://github.com/MystenLabs/deepbookv3.git * Go to the `deepbook` package directory. cd deepbookv3/packages/deepbook * Check the version tags. git tag -l In this repository, the tags indeed represent different package versions. v1.0.0v2.0.0v3.0.0 Choose the exact version of the package to build. git checkout v3.0.0 If tags are not found, you can proceed directly to the next step, but there is no guarantee that the most recent version of source code in the repository corresponds to the version of the package on-chain, which may affect debugging capabilities. * Build the package and copying the debugging metadata. sui move build This creates a `build` directory with a `deepbook` subdirectory in it containing all the relevant metadata, which you now copy to the right directory. cp -r ~/deepbookv3/packages/deepbook/build/deepbook ~/.replay/0xb29d83c26cdd2a64959263abbcfc4a6937f0c9fccaf98580ca56faded65be244/source #### Precise versions for system packages[​](https://docs.sui.io/references/ide/debugger#precise-versions-for-system-packages "Direct link to precise-versions-for-system-packages") If you cannot locate sources for a user package, you can still locate source code and its correct version for system packages that the user package depends on. This allows you to at least view the source of system packages during the debugging session. System packages in Sui (the Sui framework package in particular), might only change when the protocol version for Sui changes. These changes [are tracked](https://github.com/MystenLabs/sui/blob/main/crates/sui-framework-snapshot/manifest.json) and include information about protocol version numbers (starting with 3) and corresponding git revisions that represent the exact version of the Sui framework package's source code at a given protocol version. This allows you to locate which protocol version was in effect when the user package was published on-chain. Run the following query against Mainnet's GraphQL [endpoint](https://graphql.mainnet.sui.io/graphql) where the `address` parameter is the ID of the user package (`0xb29d83c26cdd2a64959263abbcfc4a6937f0c9fccaf98580ca56faded65be244` in this example). { object(address: "0xb29d83c26cdd2a64959263abbcfc4a6937f0c9fccaf98580ca56faded65be244") { previousTransaction { effects { epoch { protocolConfigs { protocolVersion } } } } }} The result of this query looks as follows. { "data": { "object": { "previousTransaction": { "effects": { "epoch": { "protocolConfigs": { "protocolVersion": 84 } } } } } }} In this example, the user package was published at protocol version 84. The corresponding git revision from the protocol version tracking file is `25804c243d07dd73c0d199e7794383bd855cd436`. Now, you can follow the debugging metadata generation [instructions](https://docs.sui.io/references/ide/debugger#metadata-generation) for Sui framework code. The only difference is that before building the framework package, you need choose the right git revision. git checkout 25804c243d07dd73c0d199e7794383bd855cd436 * [Install](https://docs.sui.io/references/ide/debugger#install) * [Features](https://docs.sui.io/references/ide/debugger#features) * [Move code debugging features](https://docs.sui.io/references/ide/debugger#move-code-debugging-features) * [PTB debugging features](https://docs.sui.io/references/ide/debugger#ptb-debugging-features) * [Usage](https://docs.sui.io/references/ide/debugger#usage) * [Debugging unit tests](https://docs.sui.io/references/ide/debugger#debugging-unit-tests) * [Debugging on-chain transactions](https://docs.sui.io/references/ide/debugger#debugging-on-chain-transactions) * [Source-level debugging for on-chain transactions](https://docs.sui.io/references/ide/debugger#source-level-debugging-for-on-chain-transactions) * [Locating precise package versions](https://docs.sui.io/references/ide/debugger#locating-precise-package-versions) --- # Sui CLI Cheat Sheet | Sui Documentation [Skip to main content](https://docs.sui.io/references/cli/cheatsheet#__docusaurus_skipToContent_fallback) On this page The cheat sheet highlights common Sui CLI commands. tip [Download sheet as PDF](https://docs.sui.io/doc/sui-cli-cheatsheet.pdf) Addresses & aliases[​](https://docs.sui.io/references/cli/cheatsheet#addresses--aliases "Direct link to addresses--aliases") ----------------------------------------------------------------------------------------------------------------------------- | Command | Description | | --- | --- | | `sui client active-address` | Get the active address | | `sui client addresses` | List the addresses, their aliases, and the active address | | `sui client new-address ed25519` | Create a new address with ED25519 scheme | | `sui client new-address ed25519 MY_ALIAS` | Create a new address with ED25519 scheme and alias | | `sui client switch --address ADDRESS` | Make this the active address (accepts also an alias) | | `sui keytool convert PRIVATE_KEY` | Convert private key in Hex or Base64 to new format (Bech32 encoded 33 byte flag \| private key starting with "suiprivkey") | | `sui keytool generate ed25519` | Generate a new keypair with ED25519 scheme and save it to file | | `sui keytool import INPUT KEY_SCHEME` | Add a new key to Sui CLI Keystore using either the input mnemonic phrase or a Bech32 encoded 33-byte flag \| privkey starting with "suiprivkey" | | `sui keytool update-alias OLD_ALIAS NEW_ALIAS` | Update the alias of an address | Faucet & gas[​](https://docs.sui.io/references/cli/cheatsheet#faucet--gas "Direct link to faucet--gas") -------------------------------------------------------------------------------------------------------- | Command | Description | | --- | --- | | `sui client faucet` | Get a SUI coin from the faucet associated with the active network | | `sui client faucet --address ADDRESS` | Get a SUI coin for the address (accepts also an alias) | | `sui client faucet --url CUSTOM_FAUCET_URL` | Get a SUI coin from custom faucet | | `sui client gas` | List the gas coins for the active address | | `sui client gas ADDRESS` | List the gas coins for the given address (accepts also an alias) | Network command description[​](https://docs.sui.io/references/cli/cheatsheet#network-command-description "Direct link to Network command description") ------------------------------------------------------------------------------------------------------------------------------------------------------- | Command | Description | | --- | --- | | `sui client active-env` | Get the active environment | | `sui client envs` | List defined environments | | `sui client new-env --rpc URL --alias ALIAS` | Create a new environment with URL and alias | | `sui client switch --env ENV_ALIAS` | Switch to the given environment | | `sui genesis` | Bootstrap and initialize a new Sui network | | `sui start` | Start the local Sui network | | `sui-faucet` | Start a local faucet. Note this is a different binary | Create, build, and test a Move project[​](https://docs.sui.io/references/cli/cheatsheet#create-build-and-test-a-move-project "Direct link to create-build-and-test-a-move-project") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Command | Description | | --- | --- | | `sui move build` | Build the Move project in the current directory | | `sui move build --path PATH` | Build the Move project from the given path | | `sui move migrate PATH` | Migrate to Move 2024 for the package at provided path | | `sui move new PROJECT_NAME` | Create a new Move project in the given folder | | `sui move test` | Test the Move project in the current directory | | `sui move test --trace` | Create an execution trace for the Move tests in the current directory. Use with the [Move Trace Debugger](https://marketplace.visualstudio.com/items?itemName=mysten.move-trace-debug)
extension. | Executing transactions[​](https://docs.sui.io/references/cli/cheatsheet#executing-transactions "Direct link to Executing transactions") ---------------------------------------------------------------------------------------------------------------------------------------- | Command | Description | | --- | --- | | `sui client call \`
  `--package PACKAGE \`
  `--module MODULE \`
  `--function FUNCTION` | Call a Move package | | `sui client merge-coin \`
  `--primary-coin COIN_ID \`
  `--coin-to-merge COIN_ID` | Merge two coins | | `sui client split-coin \`
  `--coin-id COIN_ID \`
  `--amounts 1000` | Split a coin into two coins: one with 1000 MIST and the rest | | `sui client pay-sui \`
  `--input-coins COIN_ID \`
  `--recipients ADDRESS \`
  `--amounts 100000000` | Transfer 0.1 SUI to an address and use the same coin for gas | | `sui client transfer-sui \`
  `--sui-coin-object-id COIN_ID \`
  `--to ADDRESS` | Transfer SUI object to an address and use the same coin for gas | Programmable transaction blocks (PTBs)[​](https://docs.sui.io/references/cli/cheatsheet#programmable-transaction-blocks-ptbs "Direct link to programmable-transaction-blocks-ptbs") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Command | Description | | --- | --- | | `sui client ptb --move-call p::m::f "" args` | Call a Move function from a package and module | | `sui client ptb --make-move-vec "" "[1000,2000]"` | Make a Move vector with two elements of type u64 | | `sui client ptb \`
  `--split-coins gas "[1000]" \`
  `--assign new_coins \`
  `--transfer-objects "[new_coins]" ADDRESS` | Split a gas coin and transfer it to address | | `sui client ptb --transfer-objects "[object_id]" ADDRESS` | Transfer an object to an address. Note that you can pass multiple objects in the array | | `sui client ptb \`
  `--move-call sui::tx_context::sender \`
  `--assign sender \`
  `--publish "." \`
  `--assign upgrade_cap \`
  `--transfer-objects "[upgrade_cap]" sender` | Publish a Move package, and transfer the upgrade capability to sender | | `sui client ptb --move-call p::m::f "" args --dry-run` | Simulate a PTB execution without committing the transaction | | `sui client ptb --move-call p::m::f "" args --preview` | Preview PTB commands instead of executing the transaction | | `sui client ptb --move-call p::m::f "" args --summary` | Show a short summary for a PTB (digest, status, gas cost) | | `sui client ptb \`
  `--move-call p::m::f "" args \`
  `--serialize-unsigned-transaction` | Serialize the unsigned PTB as base64 instead of executing it | * [Addresses & aliases](https://docs.sui.io/references/cli/cheatsheet#addresses--aliases) * [Faucet & gas](https://docs.sui.io/references/cli/cheatsheet#faucet--gas) * [Network command description](https://docs.sui.io/references/cli/cheatsheet#network-command-description) * [Create, build, and test a Move project](https://docs.sui.io/references/cli/cheatsheet#create-build-and-test-a-move-project) * [Executing transactions](https://docs.sui.io/references/cli/cheatsheet#executing-transactions) * [Programmable transaction blocks (PTBs)](https://docs.sui.io/references/cli/cheatsheet#programmable-transaction-blocks-ptbs) --- # Rust SDK | Sui Documentation [Skip to main content](https://docs.sui.io/references/rust-sdk#__docusaurus_skipToContent_fallback) The Sui Rust SDK crate is in the [**crates\\sui-sdk** directory](https://github.com/MystenLabs/sui/tree/main/crates/sui-sdk) of the Sui repository. This crate provides the Sui Rust SDK, containing APIs to interact with the Sui network. Auto-generated documentation for this crate is [here](https://mystenlabs.github.io/sui/sui_sdk/index.html) . Getting started --------------- Add the `sui-sdk` dependency as following: sui_sdk = { git = "https://github.com/mystenlabs/sui", package = "sui-sdk"} tokio = { version = "1.2", features = ["full"] } anyhow = "1.0" The main building block for the Sui Rust SDK is the `SuiClientBuilder`, which provides a simple and straightforward way of connecting to a Sui network and having access to the different available APIs. In the following example, the application connects to the Sui `testnet` and `devnet` networks and prints out their respective RPC API versions. use sui_sdk::SuiClientBuilder; #[tokio::main] async fn main() -> Result<(), anyhow::Error> { // Sui testnet -- https://fullnode.testnet.sui.io:443 let sui_testnet = SuiClientBuilder::default().build_testnet().await?; println!("Sui testnet version: {}", sui_testnet.api_version()); // Sui devnet -- https://fullnode.devnet.sui.io:443 let sui_devnet = SuiClientBuilder::default().build_devnet().await?; println!("Sui devnet version: {}", sui_devnet.api_version()); // Sui mainnet -- https://fullnode.mainnet.sui.io:443 let sui_mainnet = SuiClientBuilder::default().build_mainnet().await?; println!("Sui mainnet version: {}", sui_mainnet.api_version()); Ok(()) } Documentation for sui-sdk crate ------------------------------- [GitHub Pages](https://mystenlabs.github.io/sui/sui_sdk/index.html) hosts the generated documentation for all Rust crates in the Sui repository. ### Building documentation locally You can also build the documentation locally. To do so, 1. Clone the `sui` repo locally. Open a Terminal or Console and go to the `sui/crates/sui-sdk` directory. 2. Run `cargo doc` to build the documentation into the `sui/target` directory. Take note of location of the generated file from the last line of the output, for example `Generated /Users/foo/sui/target/doc/sui_sdk/index.html`. 3. Use a web browser, like Chrome, to open the `.../target/doc/sui_sdk/index.html` file at the location your console reported in the previous step. Rust SDK examples ----------------- The [examples](https://github.com/MystenLabs/sui/tree/main/crates/sui-sdk/examples) folder provides both basic and advanced examples. There are serveral files ending in `_api.rs` which provide code examples of the corresponding APIs and their methods. These showcase how to use the Sui Rust SDK, and can be run against the Sui testnet. Below are instructions on the prerequisites and how to run these examples. ### Prerequisites Unless otherwise specified, most of these examples assume `Rust` and `cargo` are installed, and that there is an available internet connection. The examples connect to the Sui testnet (`https://fullnode.testnet.sui.io:443`) and execute different APIs using the active address from the local wallet. If there is no local wallet, it will create one, generate two addresses, set one of them to be active, and it will request 1 SUI from the testnet faucet for the active address. ### Running the existing examples In the root folder of the `sui` repository (or in the `sui-sdk` crate folder), you can individually run examples using the command `cargo run --example filename` (without `.rs` extension). For example: * `cargo run --example sui_client` – this one requires a local Sui network running (see \[here\](#Connecting to Sui Network )). If you do not have a local Sui network running, please skip this example. * `cargo run --example coin_read_api` * `cargo run --example event_api` – note that this will subscribe to a stream and thus the program will not terminate unless forced (Ctrl+C) * `cargo run --example governance_api` * `cargo run --example read_api` * `cargo run --example programmable_transactions_api` * `cargo run --example sign_tx_guide` ### Basic Examples #### Connecting to Sui Network The `SuiClientBuilder` struct provides a connection to the JSON-RPC server that you use for all read-only operations. The default URLs to connect to the Sui network are: * Local: [http://127.0.0.1:9000](http://127.0.0.1:9000/) * Devnet: [https://fullnode.devnet.sui.io:443](https://fullnode.devnet.sui.io/) * Testnet: [https://fullnode.testnet.sui.io:443](https://fullnode.testnet.sui.io/) * Mainnet: [https://fullnode.mainnet.sui.io:443](https://fullnode.mainnet.sui.io/) For all available servers, see [here](https://sui.io/networkinfo) . For running a local Sui network, please follow [this guide](https://docs.sui.io/build/sui-local-network) for installing Sui and [this guide](https://docs.sui.io/build/sui-local-network#start-the-local-network) for starting the local Sui network. use sui_sdk::SuiClientBuilder; #[tokio::main] async fn main() -> Result<(), anyhow::Error> { let sui = SuiClientBuilder::default() .build("http://127.0.0.1:9000") // local network address .await?; println!("Sui local network version: {}", sui.api_version()); // local Sui network, like the above one but using the dedicated function let sui_local = SuiClientBuilder::default().build_localnet().await?; println!("Sui local network version: {}", sui_local.api_version()); // Sui devnet -- https://fullnode.devnet.sui.io:443 let sui_devnet = SuiClientBuilder::default().build_devnet().await?; println!("Sui devnet version: {}", sui_devnet.api_version()); // Sui testnet -- https://fullnode.testnet.sui.io:443 let sui_testnet = SuiClientBuilder::default().build_testnet().await?; println!("Sui testnet version: {}", sui_testnet.api_version()); Ok(()) } #### Read the total coin balance for each coin type owned by this address use std::str::FromStr; use sui_sdk::types::base_types::SuiAddress; use sui_sdk::{ SuiClientBuilder}; #[tokio::main] async fn main() -> Result<(), anyhow::Error> { let sui_local = SuiClientBuilder::default().build_localnet().await?; println!("Sui local network version: {}", sui_local.api_version()); let active_address = SuiAddress::from_str("")?; // change to your Sui address let total_balance = sui_local .coin_read_api() .get_all_balances(active_address) .await?; println!("The balances for all coins owned by address: {active_address} are {:#?}", total_balance); Ok(()) } Advanced examples ----------------- See the programmable transactions [example](https://github.com/MystenLabs/sui/blob/main/crates/sui-sdk/examples/programmable_transactions_api.rs) . Games examples -------------- ### Tic Tac Toe quick start 1. Prepare the environment 1. Install `sui` binary following the [Sui installation](https://github.com/MystenLabs/sui/blob/main/docs/content/guides/developer/getting-started/sui-install.mdx) docs. 2. [Connect to Sui Devnet](https://github.com/MystenLabs/sui/blob/main/docs/content/guides/developer/getting-started/connect.mdx) . 3. [Make sure you have two addresses with gas](https://github.com/MystenLabs/sui/blob/main/docs/content/guides/developer/getting-started/get-address.mdx) by using the `new-address` command to create new addresses: sui client new-address ed25519 You must specify the key scheme, one of `ed25519` or `secp256k1` or `secp256r1`. You can skip this step if you are going to play with a friend. :) 4. [Request Sui tokens](https://github.com/MystenLabs/sui/blob/main/docs/content/guides/developer/getting-started/get-coins.mdx) for all addresses that will be used to join the game. 2. Publish the move contract 1. [Download the Sui source code](https://github.com/MystenLabs/sui/blob/main/docs/content/guides/developer/getting-started/sui-install.mdx) . 2. Publish the [`tic-tac-toe` package](https://github.com/MystenLabs/sui/tree/main/examples/tic-tac-toe/move) using the Sui client: sui client publish --path /path-to-sui-source-code/examples/tic-tac-toe/move 3. Record the package object ID. 3. Create a new tic-tac-toe game 1. Run the following command in the [`tic-tac-toe/cli` directory](https://github.com/MystenLabs/sui/tree/main/examples/tic-tac-toe/cli) to start a new game, replacing the game package objects ID with the one you recorded: cargo run -- new --package-id <> <> This will create a game between the active address in the keystore, and the specified Player O. 2. Copy the game ID and pass it to your friend to join the game. 4. Making a move Run the following command in the [`tic-tac-toe/cli` directory](https://github.com/MystenLabs/sui/tree/main/examples/tic-tac-toe/cli) to make a move in an existing game, as the active address in the CLI, replacing the game ID and address accordingly: cargo run -- move --package-id <> --row $R --col $C <> License ------- [SPDX-License-Identifier: Apache-2.0](https://github.com/MystenLabs/sui/blob/main/LICENSE) --- # Sui Framework | Sui Documentation [Skip to main content](https://docs.sui.io/references/framework#__docusaurus_skipToContent_fallback) On this page The documentation in this section is created from the Rust `cargo doc` process. The process builds the content from comments in the source code. Framework documentation[​](https://docs.sui.io/references/framework#framework-documentation "Direct link to Framework documentation") -------------------------------------------------------------------------------------------------------------------------------------- The child pages to this topic describe the module members for the following libraries: * [`bridge`](https://docs.sui.io/references/framework/sui_bridge) * [`std`](https://docs.sui.io/references/framework/sui_std) * [`sui`](https://docs.sui.io/references/framework/sui_sui) * [`sui_system`](https://docs.sui.io/references/framework/sui_sui_system) Source code[​](https://docs.sui.io/references/framework#source-code "Direct link to Source code") -------------------------------------------------------------------------------------------------- You can find the source code for these Move modules in the [crates/sui-framework/packages](https://github.com/MystenLabs/sui/tree/main/crates/sui-framework/packages) directory in the `sui` repository on GitHub. As previously mentioned, the comments included in the code provide context for the logic defined. Crate documentation[​](https://docs.sui.io/references/framework#crate-documentation "Direct link to Crate documentation") -------------------------------------------------------------------------------------------------------------------------- You can review the raw `cargo doc` output of the following documentation in the `sui` repository. The .md files are located in the `crates/sui-framework/docs` directory. Online, they are located at [https://github.com/MystenLabs/sui/tree/main/crates/sui-framework/docs](https://github.com/MystenLabs/sui/tree/main/crates/sui-framework/docs) . Build documentation locally[​](https://docs.sui.io/references/framework#build-documentation-locally "Direct link to Build documentation locally") -------------------------------------------------------------------------------------------------------------------------------------------------- The most recent documentation is always available in the `main` branch of the `sui` repository. You shouldn't need to build the documentation locally, but if the need arises you can: 1. Open a terminal or console to the `sui/crates/sui-framework` directory. 2. Run `cargo doc --workspace --exclude "sui-benchmark" --no-deps`. 3. The docs are built to `crates/sui-framework/docs` into their respective subdirectories. info If the `cargo doc` process does not work as expected, try running `cargo clean` before attempting again. * [Framework documentation](https://docs.sui.io/references/framework#framework-documentation) * [Source code](https://docs.sui.io/references/framework#source-code) * [Crate documentation](https://docs.sui.io/references/framework#crate-documentation) * [Build documentation locally](https://docs.sui.io/references/framework#build-documentation-locally) --- # Contribute to Sui Documentation | Sui Documentation [Skip to main content](https://docs.sui.io/references/contribute/contribution-process#__docusaurus_skipToContent_fallback) On this page The Sui documentation is open source and thrives on community contributions. Whether you’re fixing a typo, clarifying explanations, or adding entirely new content, your work benefits the whole community. This page explains how to contribute to the documentation using either GitHub’s web editor or your local development environment. Follow the style guide[​](https://docs.sui.io/references/contribute/contribution-process#follow-the-style-guide "Direct link to Follow the style guide") --------------------------------------------------------------------------------------------------------------------------------------------------------- All documentation changes must follow the [Sui style guide](https://docs.sui.io/style-guide) . Reviewers will provide feedback to ensure consistency in tone and quality. Don’t be discouraged if your pull request (PR) receives multiple review comments, as this process helps maintain clarity and uniformity across all docs. After your PR is merged, future updates may refine your content further. When writing, keep these key principles in mind: * Use active voice. * Write in present tense. * Be clear and concise. Use only as many words as needed. GitHub web editor[​](https://docs.sui.io/references/contribute/contribution-process#github-web-editor "Direct link to GitHub web editor") ------------------------------------------------------------------------------------------------------------------------------------------ If you’re new to Git or prefer a simpler workflow, you can make small edits directly in GitHub’s web interface. * **Add a new page** 1. Go to the `docs/content` directory. 2. Open the relevant subdirectory. 3. Click **Add file** → **Create new file**. 4. Write your content and commit your changes. * **Edit an existing page** 1. From the documentation website, you can use the "Edit this page" link at the bottom of each documentation page. 2. From GitHub, navigate to the file you want to update. Click the **pencil icon** in the top-right. 3. Make your edits and commit them. Set up a local environment[​](https://docs.sui.io/references/contribute/contribution-process#local-environment "Direct link to Set up a local environment") ------------------------------------------------------------------------------------------------------------------------------------------------------------ Cloning the documentation locally is recommended when you are creating larger, more significant changes to the docs. See [Sui Environment Setup](https://docs.sui.io/references/contribute/sui-environment) for instructions on forking and cloning the Sui repository. Documentation is located in the `docs/content` directory. 1. **Install dependencies** * If you use [Visual Studio Code](https://code.visualstudio.com/) , install the [Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) to keep formatting consistent. 2. **Make your changes** * Edit or add files in the `docs/content` directory. * Stage and commit changes: git add .git commit -m "Describe your changes"git push 3. **Preview locally** * Navigate to the `docs/site` directory. * Install dependencies (If you don’t have `pnpm` installed, see the [pnpm installation guide](https://pnpm.io/installation) ): pnpm install * Start the local dev server: pnpm start * Open `http://localhost:3000` to verify your updates. Review process[​](https://docs.sui.io/references/contribute/contribution-process#review-process "Direct link to Review process") --------------------------------------------------------------------------------------------------------------------------------- When your changes are ready: 1. Submit a PR to the `main` branch of the Sui repository. 2. A [Vercel](https://vercel.com/) preview will be generated so you can verify your changes. The preview is what you can expect to see online after your changes have been merged. 3. Reviewers will provide feedback. It’s your responsibility to update your PR based on their comments. Multiple reviewers might give input. 4. After at least one reviewer approves your PR, it gets merged into `main`, and your contribution goes live. Changes are reflected on the live website within 5-10 minutes after the PR has merged into `main`. * [Follow the style guide](https://docs.sui.io/references/contribute/contribution-process#follow-the-style-guide) * [GitHub web editor](https://docs.sui.io/references/contribute/contribution-process#github-web-editor) * [Set up a local environment](https://docs.sui.io/references/contribute/contribution-process#local-environment) * [Review process](https://docs.sui.io/references/contribute/contribution-process#review-process) --- # Release Notes | Sui Documentation [Skip to main content](https://docs.sui.io/references/release-notes#__docusaurus_skipToContent_fallback) On this page * * * v1.65.2[​](https://docs.sui.io/references/release-notes#v1652 "Direct link to v1.65.2") ---------------------------------------------------------------------------------------- **🔶 Testnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/testnet-v1.65.2) _ #### Sui Protocol Version in this release: `111`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-111 "Direct link to sui-protocol-version-in-this-release-111") [#25366](https://github.com/MystenLabs/sui/pull/25366) : 111 makes more consistent check across execution mode and transaction data [#24957](https://github.com/MystenLabs/sui/pull/24957) : Enable custom nonzero pcrs parsing for mainnet in version 109. #### gRPC[​](https://docs.sui.io/references/release-notes#grpc "Direct link to grpc") [#25392](https://github.com/MystenLabs/sui/pull/25392) : Fixes a bug that was introduced in #24797 that could lead to the balance index being incorrect if a fullnode restored indexes with the 1.64 release. #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql "Direct link to GraphQL") [#24963](https://github.com/MystenLabs/sui/pull/24963) : `Balance.totalBalance` now returns the sum of balances from owned coins and from the accumulator object. The individual coin or address balances can be retrieved through `Balance.coinBalance` and `Balance.addressBalance` respectively. For the previous behavior, select the `Balance.coinBalance` field for coin balances only. [#25108](https://github.com/MystenLabs/sui/pull/25108) : Partial error will be properly supported in GraphQL. Invalid fields will have error messages and valid fields will still be displayed normally #### CLI[​](https://docs.sui.io/references/release-notes#cli "Direct link to CLI") [#25016](https://github.com/MystenLabs/sui/pull/25016) : The `--sender` flag is now correctly respected in `sui client publish` and `sui client upgrade` commands when used with `--serialize-unsigned-transaction`. Previously, the sender was incorrectly inferred from gas objects, ignoring the `--sender` flag. #### Indexing Framework[​](https://docs.sui.io/references/release-notes#indexing-framework "Direct link to Indexing Framework") [#24066](https://github.com/MystenLabs/sui/pull/24066) : Ingest zstd-compressed proto files rather than BCS files [#24991](https://github.com/MystenLabs/sui/pull/24991) : `remote_client::RemoteIngestionClient` becomes `store_client::StoreIngestionClient` and supports any valid implementation of `object_store::ObjectStore` as a checkpoint source. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/testnet-v1.65.2](https://github.com/MystenLabs/sui/commits/testnet-v1.65.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitstestnet-v1652 "Direct link to full-log-httpsgithubcommystenlabssuicommitstestnet-v1652") * * * v1.64.2[​](https://docs.sui.io/references/release-notes#v1642 "Direct link to v1.64.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.64.2) _ #### Sui Protocol Version in this release: `109`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-109 "Direct link to sui-protocol-version-in-this-release-109") [#25147](https://github.com/MystenLabs/sui/pull/25147) : fix(sui-http): use explicit rustls::CryptoProvider * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.64.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.64.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1642 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1642") * * * v1.64.1[​](https://docs.sui.io/references/release-notes#v1641 "Direct link to v1.64.1") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.64.1) _ #### Sui Protocol Version in this release: `109`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-109-1 "Direct link to sui-protocol-version-in-this-release-109-1") [#24802](https://github.com/MystenLabs/sui/pull/24802) : `TxContext` arguments can now appear in any position and still be callable in the PTB layer. [#24835](https://github.com/MystenLabs/sui/pull/24835) : Signature check for entry functions is disabled. Move compiler changes will follow [#24895](https://github.com/MystenLabs/sui/pull/24895) : Enables address alias feature on testnet. [#24879](https://github.com/MystenLabs/sui/pull/24879) : poseidon\_bn254 is enabled on all networks. #### gRPC[​](https://docs.sui.io/references/release-notes#grpc-1 "Direct link to gRPC") [#24794](https://github.com/MystenLabs/sui/pull/24794) : Return an error when `balance_changes` is requested but the transactions have not been indexed yet. #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-1 "Direct link to GraphQL") [#24782](https://github.com/MystenLabs/sui/pull/24782) : Introduce `Query.node(id: ID!): Node`, part of the GraphQL Global Identification Specification, to the schema, to support Relay's `@refetchable` annotation. [#24781](https://github.com/MystenLabs/sui/pull/24781) : `Epoch.totalTransactions` now returns a value for the latest epoch as of the checkpoint being viewed, rather than `null`. [#24750](https://github.com/MystenLabs/sui/pull/24750) : Add `effectsJson` on `TransactionEffects` and `transactionJson` on `Transaction`, that supports returning effects and transactions as JSON blob [#24865](https://github.com/MystenLabs/sui/pull/24865) : GraphQL requests are now subject to a single "rich query" limit, which enforces a budget on the number of dedicated requests to the database can be made by a single request. [#24836](https://github.com/MystenLabs/sui/pull/24836) : Add balanceChangeEffectJson on TransactionEffects, that supports returning balance changes as JSON blob [#24876](https://github.com/MystenLabs/sui/pull/24876) : Added BalanceWithdraw type to TransactionInput union [#24770](https://github.com/MystenLabs/sui/pull/24770) : Introduces `MoveValue.extract` for extracting a sub-slice from a `MoveValue` using a Display v2 expression. [#24771](https://github.com/MystenLabs/sui/pull/24771) : Introduce `MoveValue.asAddress` and `IAddressable.addressAt` for coercing a `MoveValue` to a GraphQL `Address` and viewing an address at a difference checkpoint. [#24772](https://github.com/MystenLabs/sui/pull/24772) : Adds `DynamicFieldName.literal` for providing a dynamic field name as a Display v2 literal. [#24774](https://github.com/MystenLabs/sui/pull/24774) : Add `MoveValue.format` to evaluate a single format string against a Move value. [#24775](https://github.com/MystenLabs/sui/pull/24775) : PTB Inputs are represented as `MoveValue`\-s, if their types can be inferred. [#24776](https://github.com/MystenLabs/sui/pull/24776) : Remove fields related to the system state from `Epoch`, in favour of exposing the whole system state as `Epoch.systemState: MoveValue`. Similarly replace most fields on `ValidatorSet` with `ValidatorSet.contents: MoveValue`, and `Validator` with `Validator.contents: MoveValue`. [#24779](https://github.com/MystenLabs/sui/pull/24779) : Replace `Query.suinsName(name: ...)` with `Query.address(name: ...)`, replace `IAddressable.defaultSuinsName` with `IAddressable.defaultNameRecord.target`, and add `Query.nameRecord` for fetching the SuiNS NameRecord for a given SuiNS name. [#25025](https://github.com/MystenLabs/sui/pull/25025) : `Balance.totalBalance` now returns the sum of balances from owned coins and from the accumulator object. The individual coin or address balances can be retrieved through `Balance.coinBalance` and `Balance.addressBalance` respectively. For the previous behavior, select the `Balance.coinBalance` field for coin balances only. #### CLI[​](https://docs.sui.io/references/release-notes#cli-1 "Direct link to CLI") [#24822](https://github.com/MystenLabs/sui/pull/24822) : Fixed the issue for `sui client publish | upgrade` around using various flags (e.g., dry-run). [#24844](https://github.com/MystenLabs/sui/pull/24844) : Added `--no-tree-shaking` flag that can only be used with `--dump-bytecode-as-base64`. This will ensure that all dependencies will be kept in the list of dependencies in the json output, regardless if they're used or not used in the source code. In contrast, by default, the CLI will remove any unused dependencies from the dependency list on publication/upgrade and when `--no-tree-shaking` flag is false. #### Indexing Framework[​](https://docs.sui.io/references/release-notes#indexing-framework-1 "Direct link to Indexing Framework") [#24925](https://github.com/MystenLabs/sui/pull/24925) : Adding optional jitter to watermark update interval. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.64.1](https://github.com/MystenLabs/sui/commits/mainnet-v1.64.1) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1641 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1641") * * * v1.63.4[​](https://docs.sui.io/references/release-notes#v1634 "Direct link to v1.63.4") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.63.4) _ #### 📕 Note:[​](https://docs.sui.io/references/release-notes#-note "Direct link to 📕 Note:") This release contains a performance fix and does not require a protocol version bump #### Sui Protocol Version in this release: `107`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-107 "Direct link to sui-protocol-version-in-this-release-107") [#24974](https://github.com/MystenLabs/sui/pull/24974) : Restore the environment variable to enable write sync * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.63.4](https://github.com/MystenLabs/sui/commits/mainnet-v1.63.4) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1634 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1634") * * * v1.63.3[​](https://docs.sui.io/references/release-notes#v1633 "Direct link to v1.63.3") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.63.3) _ #### Sui Protocol Version in this release: `107`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-107-1 "Direct link to sui-protocol-version-in-this-release-107-1") [#24856](https://github.com/MystenLabs/sui/pull/24856) : \[consensus\] improve direct finalization [#24943](https://github.com/MystenLabs/sui/pull/24943) : Fix a consensus issue where validators do not agree on transactions that need to be rejected. #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes "Direct link to Nodes (Validators and Full nodes)") [#24742](https://github.com/MystenLabs/sui/pull/24742) : Disable validator RPC handlers for signing transactions and submitting transactions with aggregated validator signatures. Transaction submission using Quorum Driver or similar logic will no longer work. Transaction Driver and its related validator RPC handlers are the only way to submit transaction to Sui now. #### gRPC[​](https://docs.sui.io/references/release-notes#grpc-2 "Direct link to gRPC") [#24820](https://github.com/MystenLabs/sui/pull/24820) : Return an error when `balance_changes` is requested but the transactions have not been indexed yet. #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-2 "Direct link to GraphQL") [#24595](https://github.com/MystenLabs/sui/pull/24595) : Partial error will be properly supported in GraphQL. Invalid fields will have error messages and valid fields will still be displayed normally [#24679](https://github.com/MystenLabs/sui/pull/24679) : Add support for `checks_enabled` and `do_gas_selection` argument for `query.simulateTransaction` [#24681](https://github.com/MystenLabs/sui/pull/24681) : Partial error will be properly supported in GraphQL. Invalid fields will have error messages and valid fields will still be displayed normally [#24911](https://github.com/MystenLabs/sui/pull/24911) : Add `effectsJson`, `balanceChangesJson` on TransactionEffects and `transactionJson` on Transaction, that supports returning effects and transactions as JSON blob #### CLI[​](https://docs.sui.io/references/release-notes#cli-2 "Direct link to CLI") [#24508](https://github.com/MystenLabs/sui/pull/24508) : Removes `--verify-compatibility` and adds `--skip-verify-compatibility` defaulting to checking locally for upgrade compatibility errors. [#24896](https://github.com/MystenLabs/sui/pull/24896) : Several changes to the new package management system: * New `--no-tree-shaking` flag allows offline dump-bytecode-as-base64 * Bug fixes for `move-analyzer` * Improvements to the `test-publish` command: the `Pub.localnet.toml` files can now be shared between dependencies more easily. * Added `test-upgrade` command * Added `test-publish --publish-unpublished-deps` command for push-button local deployment of a package and its dependencies * Error message fixes #### Indexing Framework[​](https://docs.sui.io/references/release-notes#indexing-framework-2 "Direct link to Indexing Framework") [#24503](https://github.com/MystenLabs/sui/pull/24503) : The indexer, ingestion service, and metrics service all now return a `Service` instead of a `JoinHandle<()>` when run. Use `Service::main` to wait for the service to exit cleanly or with an error, or respond to a termination signal with a graceful shutdown. `Service` also exposes `wait_for_shutdown`, `join`, and `shutdown` functions to customise various aspects of the shutdown process. [#24523](https://github.com/MystenLabs/sui/pull/24523) : Fix pruning for concurrent pipelines when indexer is initialized with `--first-checkpoint`. * * * * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.63.3](https://github.com/MystenLabs/sui/commits/mainnet-v1.63.3) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1633 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1633") * * * v1.62.1[​](https://docs.sui.io/references/release-notes#v1621 "Direct link to v1.62.1") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.62.1) _ Click to openSui v1.62 Gas Schedule Updates (and what to expect) Sui v1.62 includes targeted gas schedule and metering fixes to more accurately account for the true execution cost and introduce a few new gas changes to reduce over-charging. #### Summary of gas schedule changes[​](https://docs.sui.io/references/release-notes#summary-of-gas-schedule-changes "Direct link to summary-of-gas-schedule-changes") **Dynamic field changes (largest behavioral impact)** Dynamic field operations now charge differently depending on cache status: * **First load of a dynamic field** (i.e., not in the runtime cache, and not created in the transaction) is **more expensive**. * **Subsequent loads of the same dynamic field within the transaction** are **significantly cheaper**. * **Accessing dynamic fields created earlier in the same transaction** are **significantly cheaper.** **Additional execution-level adjustments** The following execution-level adjustments are being introduced: * **`MoveLoc` is cheaper:** We previously (incorrectly) charged proportionally to value size, even though no value is created. We now charge a constant amount. * **`ReadRef` is slightly more expensive:** This creates value copies, which we now account for. * **Execution stack tracking:** More accurate stack-height metering reduces over-charging for some instructions. * **Primitive size accounting tuning:** The computed “size” for several primitive types now better match their actual size, including some decreases and increases. #### Observed impact from transaction sampling[​](https://docs.sui.io/references/release-notes#observed-impact-from-transaction-sampling "Direct link to observed-impact-from-transaction-sampling") We backtested several million transactions when examining these gas changes. Across a few million sampled transactions: * **5.7%** saw a change in gas usage. Of that: * **1.3%** saw a gas **increase** * **4.4%** saw a gas **decrease** * The **mean** change in gas costs across all transactions was **−6.03%** * The **median** change in gas costs was **−21.52%** Looking at the distribution among affected transactions: * Up through about the **75th percentile**, changes are **net decreases** in gas costs. * From the **76th percentile onward**, changes shift to **increases**. * Extremes (0th/100th percentile) show larger swings, mostly explained by dynamic-field behavior interacting with size/caching. #### What this means for developers[​](https://docs.sui.io/references/release-notes#what-this-means-for-developers "Direct link to What this means for developers") For most workloads, you will notice no change (only 5.7% are affected from several million transactions). If you do, it is more likely to be a cost decrease. #### Costly patterns[​](https://docs.sui.io/references/release-notes#costly-patterns "Direct link to Costly patterns") Your transactions may be more expensive if they do **some or all** of the following: * Read **many unique dynamic fields** * The fields read are **large in size** * Each field is read only a few times per transaction This is because **first-time loads of uncached dynamic fields** are now **more expensive**. #### Cheaper transactions[​](https://docs.sui.io/references/release-notes#cheaper-transactions "Direct link to Cheaper transactions") Your transactions should get cheaper if they do **any** of the following: * Read **a small set of dynamic fields repeatedly** within the same transaction * **Create dynamic fields** and then access them again in\-transaction These now benefit from the cache-aware and “created in\-transaction” discounts. #### Secondary effects[​](https://docs.sui.io/references/release-notes#secondary-effects "Direct link to Secondary effects") Most other instruction and stack-metering changes are modest, paving a path toward optimization in compilation. Over time, compiler work to prefer moving locals over copies wherever possible should allow the compiler to be able to take advantage of the reduced cost for `MoveLoc` that is introduced in these changes. Click to openChanges to Non-`public` `entry` Functions in PTBs In the next release (v1.62), there will be a new set of verification rules for arguments to non-`public` (either private or `public(package)`) `entry` functions. These rules will fully replace the existing rules, and in most cases will allow for more expressivity! This means that you can do more with `entry` functions than previously possible. While we have received the feedback that most people do not understand the existing rules around `entry` functions, this post will not explain them since they are going away. Instead we'll focus on the new `entry` function rules going forward. #### Overview[​](https://docs.sui.io/references/release-notes#overview "Direct link to Overview") For a brief overview, arguments to a non-`public` `entry` function cannot be entangled with a hot potato. For example with the following code module ex::m;public struct HotPotato()public fun hot(x: &mut Coin): HotPotato { ... }entry fun spend(x: &mut Coin) { ... }public fun cool(h: HotPotato) { ... } With an example PTB, this is invalid since the input coin to `spend` has an entangled hot potato when it is used with the `spend` function // Invalid PTB0: ex::m::hot(Input(0));1: ex::m::spend(Input(0)); // INVALID, Input(0) still hot via Result(0)2: ex::m::cool(Result(0)); However, it is valid if the hot potato is destroyed before `spend` is called. // Valid PTB0: ex::m::hot(Input(0));1: ex::m::cool(Result(0));2: ex::m::spend(Input(0)); // Valid! Input(0) is not hot Below we will dig deeper into why these rules exist and how the rules are defined. #### The New Rules[​](https://docs.sui.io/references/release-notes#the-new-rules "Direct link to The New Rules") #### Motivation[​](https://docs.sui.io/references/release-notes#motivation "Direct link to Motivation") You might wonder why have any rules for the usage of values with `entry` functions? The original motivation was to ensure that package developers had a way of ensuring a certain sense of “atomicity” for the arguments to their `entry` functions. Meaning a way of ensuring that the arguments would behave the same if the specific `entry` function was the only command in the PTB. A canonical example for this is flash loans—a developer might want to ensure that a given `Coin` is not from a flash loan and is ostensibly “owned” by the sender of the transaction. In Move, flash loans (and similar paradigms) use [“hot potato”](https://move-book.com/programmability/hot-potato-pattern) patterns to force behavior. For example module flash::loan;use sui::balance::Balance;use sui::sui::SUI;public struct Bank has key { id: UID, holdings: Balance,}// This is a hot potato because it does not have `store` and does not have `drop`public struct Loan { amount: u64,}public fun issue(bank: &mut Bank, amount: u64): (Balance, Loan) { assert!(bank.holdings.value() >= amount); let loaned = bank.holdings.split(amount); (loaned, Loan { amount })}public fun repay(bank: &mut Bank, loan: Loan, repayment: Balance) { let Loan { amount } = loan; assert!(repayment.value() == amount); bank.holdings.join(repayment);} In this example, when `issue` is called, a `Loan` hot potato is created. In the PTB if `issue` is called, the transaction will not succeed unless the created `Loan` hot potato is destroyed by calling `repay`. Our goal with non-public `entry` functions is to ensure that no argument is involved in such a flash loan (or similar hot potato) scenario. In other words, the arguments to a non-public `entry` function cannot be entangled in such a way to forces behavior in the PTB after the `entry` function is called. We will track this with an algorithm that tries to count how many hot potato values are active and what values they can influence. #### Terminology[​](https://docs.sui.io/references/release-notes#terminology "Direct link to Terminology") Some brief terminology before looking at the rules and their defining algorithm. * The rules apply to the PTB _statically_. This means that the verification happens before the PTB begins execution. In some cases (particularly around shared objects), this will result in the rules seeming more general and pessimistic than they otherwise would be if they were applied _dynamically_ as the PTB was executed. * A _value_ is any PTB `Argument`. These can be `Input`s, `Result`s, `NestedResult`s, or the `GasCoin` (already smashed). * A _result_ is a value that was returned from a PTB command. These are referred to via `Result` and `NestedResult`. * Arguments to a PTB command have two usage types: by-reference (`&` or `&mut`) or by-value (either copied or moved). * A value is considered _hot_ if its type has neither `store` nor `drop`. * This means a hot value’s type can be in one of the following cases: * No abilities * `copy` * `key` * Note that a value cannot have both `key` and `copy` since `sui::object::UID` does not have `copy` * Each value belongs to a _clique_. A clique represents values that have been used together as arguments and their results. * Each clique has a count with the number of hot values. Meaning that the clique’s count is incremented when results are hot (once per result), and the clique’s count is decremented when a hot value is moved (taken by-value and not copied). * The count here is tracking how many hot potato (or similar) values are outstanding, and the clique is tracking which values they could restrict or otherwise influence. #### The Algorithm[​](https://docs.sui.io/references/release-notes#the-algorithm "Direct link to The Algorithm") * Each input to the PTB starts off in its own clique with a count of zero. * When values are used (by reference or by-value) together in a command, their cliques are merged, adding together each clique’s count. * The count of the arguments’ merged clique is decremented for each hot value moved (taken by-value and not copied). * If the command is a Move call for a non-public `entry` function, the count of the arguments’ merged clique must be zero at this point. * Note that this means a non-public `entry` function _can_ take hot values! They must just be the last hot values in their clique. * Results of each command are included in the arguments’ merged clique. The clique’s count is incremented for each hot result value. * **NOTE:** Shared objects taken by-value have a special rule in that during the accounting for the result values, the argument’s merged clique’s count is set to infinity. * See the “Limitations” section below for more detail #### Examples[​](https://docs.sui.io/references/release-notes#examples "Direct link to Examples") Walking through the example from the overview more carefully with the algorithm. In these examples, we will walk through the algorithm, showing each clique and its count between each command. // Invalid PTB// Input 0: Coin// cliques: { Input(0) } => 00: ex::m::hot(Input(0));// cliques: { Input(0), Result(0) } = 11: ex::m::spend(Input(0)); // INVALID, Input(0)'s clique has a count > 02: ex::m::cool(Result(0));// Valid PTB// Input 0: Coin// cliques: { Input(0) } => 00: ex::m::hot(Input(0));// cliques: { Input(0), Result(0) } = 11: ex::m::cool(Result(0));// cliques: { Input(0) } => 02: ex::m::spend(Input(0)); // Valid! Input(0)'s clique has a count of 0 Using the `flash::loan` module from above, we can construct more involved examples // Invalid PTB// Input 0: flash::loan::Bank// Input 1: u64// cliques: { Input(0) } => 0, { Input(1) } => 0,0: flash::loan::issue(Input(0), Input(1))// cliques: { Input(0), NestedResult(0,0), NestedResult(0,1) } => 1,1: sui::coin::from_balance(NestedResult(0,0));// cliques: { Input(0), NestedResult(0,1), Result(1) } => 1,2: ex::m::spend(Result(1)); // INVALID, Result(1)'s clique has count > 03: sui::coin::into_balance(Result(1));4: flash::loan::repay(Result(3), NestedResult(0,1)); Even though the `Coin` created in command `1` was not directly involved in the flash loan in command `0`, its a part of a clique with a hot value `NestedResult(0,1)`. As such, it cannot be used in the private `entry` function `ex::m::spend`. If the loan was repaid with `flash::loan::repay` before `ex::m::spend` was called, then this would be permitted (like we saw with the earlier example). #### Limitations[​](https://docs.sui.io/references/release-notes#limitations "Direct link to Limitations") As mentioned above, a clique with a shared object by-value is always hot. In other words, a non-public `entry` function can take a shared object by-value, but it cannot take a value in a clique that previously interacted with a shared object by value. Why? This rule is needed since shared objects cannot be wrapped—they either have to be re-shared or deleted. This means that a shared\-object could be used to force behavior in a way similar to a hot potato. But unlike a hot potato, we cannot tell from signature of the function if it is used properly. If this algorithm was “dynamic” rather than “static”, it could be more precise at the cost of clarity. That is, a static set of rules is typically easier to describe and follow as compared to a dynamic set of rules. However, [party objects](https://docs.sui.io/guides/developer/objects/object-ownership/party) will fall under this restriction under more narrow cases than with shared objects. As such, we think that this restriction will be acceptable long term without having to sacrifice the clarity of the static system. #### Coming Soon (v1.63 or later)[​](https://docs.sui.io/references/release-notes#coming-soon-v163-or-later "Direct link to Coming Soon (v1.63 or later)") In a later version, we will remove the signature restrictions for `entry` functions. This means that _any_ Move function can become `entry`! #### Sui Protocol Version in this release: `104`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-104 "Direct link to sui-protocol-version-in-this-release-104") [#24239](https://github.com/MystenLabs/sui/pull/24239) : 104 - update CoinMetadata post updates in Coin in 103 #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-1 "Direct link to Nodes (Validators and Full nodes)") [#24420](https://github.com/MystenLabs/sui/pull/24420) : Disable using Quorum Driver for transaction submission. Setting `TRANSACTION_DRIVER` env var is now a no-op. #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc "Direct link to JSON-RPC") [#23737](https://github.com/MystenLabs/sui/pull/23737) : This PR, in tandem with \[[#24192](https://github.com/MystenLabs/sui/pull/24192)\ \]([#2419](https://github.com/MystenLabs/sui/pull/2419) 2), unifies how indexers determine their ingestion starting point and introduce watermark-gated backfill tasks. 1. `--skip-watermark` is removed, and the previous ability to bypass watermark safety checks for concurrent pipelines is no longer supported. 2. `--first-checkpoint` no longer forces the indexer to start ingesting from the configured checkpoint. The indexer now always determines its starting ingestion point as the minimum next checkpoint across all pipelines to resume processing from. From this release, `--first-checkpoint` now only applies to pipelines that do not yet have a committer watermark. These pipelines will resume processing from the configured value. Pipelines with existing watermarks will always resume processing from their own next checkpoint. 3. A new mechanism, watermark tasks, allows operators to run the same pipelines on multiple indexer instances for historical backfilling. Two new flags, `--task` and `--reader-interval-ms`, enable this mechanism. These flags create a tasked indexer whose pipelines commit checkpoint data as long as the checkpoint is not below the `reader_lo` watermark of their corresponding main pipelines. The indexer controls how frequently these tasked pipelines poll the main pipelines' watermarks per `--reader-interval-ms`. Migration guidance: 1. If you use `--first-checkpoint` only for _initial_ ingestion of a fresh pipeline, no further action is needed. 2. If you previously used `--first-checkpoint` and optionally `--skip-watermark` to backfill existing tables, you can achieve the same workflow by starting a new indexer instance with a configured `--task`, `--reader-interval-ms`, and `--first-checkpoint`. 3. Like `--skip-watermark`, `--task` cannot be used to run sequential pipelines. #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-3 "Direct link to GraphQL") [#24319](https://github.com/MystenLabs/sui/pull/24319) : Fixes a bug where the transaction payloads that were part of `simulateTransaction` calls were incorrectly classified as part of the query payload (and therefore subject to a lower payload size limit). [#23928](https://github.com/MystenLabs/sui/pull/23928) : Removed `events` field from `SimulationResult`. Events are now only accessible via `effects.events()` to eliminate redundancy. [#23929](https://github.com/MystenLabs/sui/pull/23929) : Returns `null` for simulated/executed transactions timestamp as they are not included in a checkpoint. [#24486](https://github.com/MystenLabs/sui/pull/24486) : Validate types and fields passed into AvailableRange queries. #### CLI[​](https://docs.sui.io/references/release-notes#cli-3 "Direct link to CLI") [#24367](https://github.com/MystenLabs/sui/pull/24367) : * Refactored `sui validator` commands to use a shared [TxProcessingArgs](cci:2://file:///Users/jnaulty/github/mystenlabs/sui/crates/sui/src/client_commands.rs:693:0-721:1) struct for transaction arguments, improving consistency with `sui client`. Updated `serialize_unsigned_transaction` help text to provide clearer instructions for offline signing. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.62.1](https://github.com/MystenLabs/sui/commits/mainnet-v1.62.1) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1621 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1621") * * * v1.61.2[​](https://docs.sui.io/references/release-notes#v1612 "Direct link to v1.61.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.61.2) _ #### Sui Protocol Version in this release: `103`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-103 "Direct link to sui-protocol-version-in-this-release-103") [#24343](https://github.com/MystenLabs/sui/pull/24343) : framework changes to coin.move #### gRPC[​](https://docs.sui.io/references/release-notes#grpc-3 "Direct link to gRPC") [#24244](https://github.com/MystenLabs/sui/pull/24244) : Return "Not Found" for new checkpoints that haven't been fully stored yet instead of "Internal Error." #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-4 "Direct link to GraphQL") [#24202](https://github.com/MystenLabs/sui/pull/24202) : Fixes a bug related to paginating object versions for an object that has been deleted/wrapped at some point. [#24325](https://github.com/MystenLabs/sui/pull/24325) : Fixes a bug where the transaction payloads that were part of `simulateTransaction` calls were incorrectly classified as part of the query payload (and therefore subject to a lower payload size limit). * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.61.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.61.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1612 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1612") * * * v1.60.1[​](https://docs.sui.io/references/release-notes#v1601 "Direct link to v1.60.1") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.60.1) _ #### Sui Protocol Version in this release: `101`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-101 "Direct link to sui-protocol-version-in-this-release-101") [#24073](https://github.com/MystenLabs/sui/pull/24073) : Coin registry patch #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-2 "Direct link to Nodes (Validators and Full nodes)") [#24010](https://github.com/MystenLabs/sui/pull/24010) : Use Mysticeti 2.0 and `TransactionDriver` for transaction processing by default. #### CLI[​](https://docs.sui.io/references/release-notes#cli-4 "Direct link to CLI") [#24133](https://github.com/MystenLabs/sui/pull/24133) : Adds the ability to talk to an existing, remote postgress database when running the indexer and/or GraphQL for a local network. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.60.1](https://github.com/MystenLabs/sui/commits/mainnet-v1.60.1) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1601 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1601") * * * v1.59.1[​](https://docs.sui.io/references/release-notes#v1591 "Direct link to v1.59.1") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.59.1) _ #### Sui Protocol Version in this release: `100`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-100 "Direct link to sui-protocol-version-in-this-release-100") [#24108](https://github.com/MystenLabs/sui/pull/24108) : Simplify private generics check #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-5 "Direct link to GraphQL") [#23851](https://github.com/MystenLabs/sui/pull/23851) : Fix a bug where live object set queries would include historical data. [#23417](https://github.com/MystenLabs/sui/pull/23417) : Adds `AvailableRange` API for querying the checkpoint ranges we have data available for types, fields, and filters. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.59.1](https://github.com/MystenLabs/sui/commits/mainnet-v1.59.1) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1591 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1591") * * * v1.58.3[​](https://docs.sui.io/references/release-notes#v1583 "Direct link to v1.58.3") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.58.3) _ #### Sui Protocol Version in this release: `98`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-98 "Direct link to sui-protocol-version-in-this-release-98") [#23866](https://github.com/MystenLabs/sui/pull/23866) : Fix issue in bytecode verifier #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc-1 "Direct link to JSON-RPC") [#23766](https://github.com/MystenLabs/sui/pull/23766) : Fix wrong iter bounds that cause missing results in `get_transactions_by_move_function` #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-6 "Direct link to GraphQL") [#23689](https://github.com/MystenLabs/sui/pull/23689) : Adds `Validator.operationCap` that displays address that the operation ability was delegated to if it exists. [#23697](https://github.com/MystenLabs/sui/pull/23697) : Adds `Validator.exchangeRatesTable` that displays a mapping of epoch number to exchange rate. The exchange rate is used to determine the amount of SUI tokens that each past SUI staker can withdraw in the future. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.58.3](https://github.com/MystenLabs/sui/commits/mainnet-v1.58.3) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1583 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1583") * * * v1.57.3[​](https://docs.sui.io/references/release-notes#v1573 "Direct link to v1.57.3") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.57.3) _ #### Sui Protocol Version in this release: `97`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-97 "Direct link to sui-protocol-version-in-this-release-97") [#23858](https://github.com/MystenLabs/sui/pull/23858) : Adds a new protocol version that fixes an issue in the bytecode verifier. #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc-2 "Direct link to JSON-RPC") [#23766](https://github.com/MystenLabs/sui/pull/23766) : Fix wrong iter bounds that cause missing results in `get_transactions_by_move_function` #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-7 "Direct link to GraphQL") [#23689](https://github.com/MystenLabs/sui/pull/23689) : Adds `Validator.operationCap` that displays address that the operation ability was delegated to if it exists. [#23697](https://github.com/MystenLabs/sui/pull/23697) : Adds `Validator.exchangeRatesTable` that displays a mapping of epoch number to exchange rate. The exchange rate is used to determine the amount of SUI tokens that each past SUI staker can withdraw in the future. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.57.3](https://github.com/MystenLabs/sui/commits/mainnet-v1.57.3) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1573 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1573") * * * v1.57.2[​](https://docs.sui.io/references/release-notes#v1572 "Direct link to v1.57.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.57.2) _ #### Sui Protocol Version in this release: `96`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-96 "Direct link to sui-protocol-version-in-this-release-96") [#23650](https://github.com/MystenLabs/sui/pull/23650) : Mysticeti v2 (Mysticeti fastpath) support is enabled on mainnet. #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-3 "Direct link to Nodes (Validators and Full nodes)") [#23492](https://github.com/MystenLabs/sui/pull/23492) : Adds CheckpointArtifacts digest to the summary. Currently enabled in Devnet for testing. #### gRPC[​](https://docs.sui.io/references/release-notes#grpc-4 "Direct link to gRPC") [#22874](https://github.com/MystenLabs/sui/pull/22874) : Integrating GetCoinInfo with the new CoinRegistry system object. #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc-3 "Direct link to JSON-RPC") [#22903](https://github.com/MystenLabs/sui/pull/22903) : Integrating coin metadata and total supply APIs with the CoinRegistry system object. #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-8 "Direct link to GraphQL") [#23597](https://github.com/MystenLabs/sui/pull/23597) : Adds support for Coin Registry to GraphQL's `Query.coinMetadata` API. [#23636](https://github.com/MystenLabs/sui/pull/23636) : Fix a bug where queries would fail if they used a variable to populate a nullable parameter, and then did not supply the variable (which is a valid thing to do). #### CLI[​](https://docs.sui.io/references/release-notes#cli-5 "Direct link to CLI") [#23433](https://github.com/MystenLabs/sui/pull/23433) : Fixed a bug where an upgrade command would terminate early if the CLI binary is not at the same protocol version or newer than the network. [#23533](https://github.com/MystenLabs/sui/pull/23533) : Transaction replay now has its own command in Sui CLI: `sui replay` * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.57.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.57.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1572 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1572") * * * v1.56.2[​](https://docs.sui.io/references/release-notes#v1562 "Direct link to v1.56.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.56.2) _ #### CLI[​](https://docs.sui.io/references/release-notes#cli-6 "Direct link to CLI") [#23472](https://github.com/MystenLabs/sui/pull/23472) : Fixed a bug where an upgrade command would terminate early if the CLI binary is not at the same protocol version or newer than the network. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.56.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.56.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1562 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1562") * * * v1.55.0[​](https://docs.sui.io/references/release-notes#v1550 "Direct link to v1.55.0") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.55.0) _ #### Sui Protocol Version in this release: `94`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-94 "Direct link to sui-protocol-version-in-this-release-94") [#23220](https://github.com/MystenLabs/sui/pull/23220) : Protocol bump to version `94` #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-4 "Direct link to Nodes (Validators and Full nodes)") [#23074](https://github.com/MystenLabs/sui/pull/23074) : Delta to CheckpointSignatures sent to consensus, now including Digest as part of dedup key. #### CLI[​](https://docs.sui.io/references/release-notes#cli-7 "Direct link to CLI") [#23036](https://github.com/MystenLabs/sui/pull/23036) : (linux, macos) Ensure that `sui.keystore` files are flagged with 0600 flags. This is a defense-in-depth measure to defend Sui wallets running on shared multi-user hosts. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.55.0](https://github.com/MystenLabs/sui/commits/mainnet-v1.55.0) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1550 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1550") * * * v1.54.2[​](https://docs.sui.io/references/release-notes#v1542 "Direct link to v1.54.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.54.2) _ #### Sui Protocol Version in this release: `92`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-92 "Direct link to sui-protocol-version-in-this-release-92") [#22675](https://github.com/MystenLabs/sui/pull/22675) : Minor patch in Sui Framework. [#23041](https://github.com/MystenLabs/sui/pull/23041) : Shared object deletion rules are now more granular and per-command, rather than per\-transaction. #### CLI[​](https://docs.sui.io/references/release-notes#cli-8 "Direct link to CLI") [#22924](https://github.com/MystenLabs/sui/pull/22924) : now supports transfer of party objects via `client transfer` command * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.54.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.54.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1542 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1542") * * * v1.53.2[​](https://docs.sui.io/references/release-notes#v1532 "Direct link to v1.53.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.53.2) _ #### Sui Protocol Version in this release: `90`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-90 "Direct link to sui-protocol-version-in-this-release-90") [#20957](https://github.com/MystenLabs/sui/pull/20957) : updates to protocol version `89`, standard library changes [#22798](https://github.com/MystenLabs/sui/pull/22798) : Enable passkey and passkey inside multisig for `mainnet` in protocol version `89`. [#22940](https://github.com/MystenLabs/sui/pull/22940) : Shifts protocol version `89` to `90`. #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-5 "Direct link to Nodes (Validators and Full nodes)") [#22842](https://github.com/MystenLabs/sui/pull/22842) : `ObjectNotFound` and `DependencyPackageNotFound` errors from transaction processing now get retried in `QuorumDriver` by default. #### CLI[​](https://docs.sui.io/references/release-notes#cli-9 "Direct link to CLI") [#22914](https://github.com/MystenLabs/sui/pull/22914) : Fixes a bug around global value mutation tracking in generated traces for debugger * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.53.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.53.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1532 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1532") * * * v1.52.3[​](https://docs.sui.io/references/release-notes#v1523 "Direct link to v1.52.3") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.52.3) _ #### Sui Protocol Version in this release: `89`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-89 "Direct link to sui-protocol-version-in-this-release-89") [#22937](https://github.com/MystenLabs/sui/pull/22937) : Adds a new protocol version to enable the latest checks. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.52.3](https://github.com/MystenLabs/sui/commits/mainnet-v1.52.3) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1523 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1523") * * * v1.52.2[​](https://docs.sui.io/references/release-notes#v1522 "Direct link to v1.52.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.52.2) _ #### Sui Protocol Version in this release: `88`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-88 "Direct link to sui-protocol-version-in-this-release-88") [#22580](https://github.com/MystenLabs/sui/pull/22580) : Adds `calculate_rewards` function to Sui System [#22611](https://github.com/MystenLabs/sui/pull/22611) : Improve error messages around type resolution. #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-6 "Direct link to Nodes (Validators and Full nodes)") [#22572](https://github.com/MystenLabs/sui/pull/22572) : support path-based remote-store options for fullnode state sync fallback [#22594](https://github.com/MystenLabs/sui/pull/22594) : No noticeable impact to users #### gRPC[​](https://docs.sui.io/references/release-notes#grpc-5 "Direct link to gRPC") [#22435](https://github.com/MystenLabs/sui/pull/22435) : Implementing GetPackage, GetModule, GetFunction, and GetDatatype APIs [#22525](https://github.com/MystenLabs/sui/pull/22525) : Implementing ListPackageVersions API for MovePackageService [#22560](https://github.com/MystenLabs/sui/pull/22560) : Speeding up index initialization by accumulating batches of balance updates in memory. [#22619](https://github.com/MystenLabs/sui/pull/22619) : Tune rocksdb for index initialization. #### CLI[​](https://docs.sui.io/references/release-notes#cli-10 "Direct link to CLI") [#22530](https://github.com/MystenLabs/sui/pull/22530) : `sui keytool export` to show the `alias` field correctly. [#22528](https://github.com/MystenLabs/sui/pull/22528) : `sui move build --dump-bytecode-as-base64` is now working correctly due to a bug in the logic when a Move.lock file existed with the published address. [#22622](https://github.com/MystenLabs/sui/pull/22622) : Updates to the transaction `replay-transaction` and `replay-batch` client subcommands to use the new transaction replay infrastructure. [#22644](https://github.com/MystenLabs/sui/pull/22644) : Remove `profile-transaction` and `replay-checkpoint` commands from the `sui client` commands. #### Rust SDK[​](https://docs.sui.io/references/release-notes#rust-sdk "Direct link to Rust SDK") [#22595](https://github.com/MystenLabs/sui/pull/22595) : Adds support for custom user-defined headers in the `SuiClientBuilder`. Custom headers can be defined through the `SuiClientBuilder::custom_headers` function and should be added right before building. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.52.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.52.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1522 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1522") * * * v1.51.5[​](https://docs.sui.io/references/release-notes#v1515 "Direct link to v1.51.5") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.51.5) _ #### Sui Protocol Version in this release: `87`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-87 "Direct link to sui-protocol-version-in-this-release-87") [#22244](https://github.com/MystenLabs/sui/pull/22244) : Changes to using type tags in the object runtime. No user-visible impacts. [#22419](https://github.com/MystenLabs/sui/pull/22419) : Adds an existing hardcoded bound to the protocol config for clarity. [#19439](https://github.com/MystenLabs/sui/pull/19439) : Added epoch\-stable sequence numbers for read-only per\-epoch configs accessed in the transaction. [#22474](https://github.com/MystenLabs/sui/pull/22474) : enables Party objects (and associated `party_transfer` functions) in testnet #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-7 "Direct link to Nodes (Validators and Full nodes)") [#21877](https://github.com/MystenLabs/sui/pull/21877) : TLS is now required to connect to the validator gRPC interface. [#22540](https://github.com/MystenLabs/sui/pull/22540) : The default bucket for state sync archive fallback now uses a requester pays policy. Update the sui node's state-archive-read-config section according to the [docs](https://docs.sui.io/guides/operator/archives) #### gRPC[​](https://docs.sui.io/references/release-notes#grpc-6 "Direct link to gRPC") [#22241](https://github.com/MystenLabs/sui/pull/22241) : Implementing GetBalance and ListBalances APIs for LiveDataService. * * * Co-authored-by: Brandon Williams <[brandon@mystenlabs.com](mailto:brandon@mystenlabs.com) \> [#21877](https://github.com/MystenLabs/sui/pull/21877) : TLS is now required to connect to the validator gRPC interface. #### CLI[​](https://docs.sui.io/references/release-notes#cli-11 "Direct link to CLI") [#22332](https://github.com/MystenLabs/sui/pull/22332) : Update test names used for filtering in Move unit tests so the fully-qualified name is used to match against (i.e., `testing::a::test_name` instead of `a::test_name`). Also, add support for regexes to be used for test filtering rather than just substring matching. [#22303](https://github.com/MystenLabs/sui/pull/22303) : Update the package summary generation to make it more portable. [#22350](https://github.com/MystenLabs/sui/pull/22350) : Improved initial clone times for Move packages that are git dependencies. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.51.5](https://github.com/MystenLabs/sui/commits/mainnet-v1.51.5) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1515 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1515") * * * v1.51.4[​](https://docs.sui.io/references/release-notes#v1514 "Direct link to v1.51.4") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.51.4) _ #### Sui Protocol Version in this release: `87`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-87-1 "Direct link to sui-protocol-version-in-this-release-87-1") [#22244](https://github.com/MystenLabs/sui/pull/22244) : Changes to using type tags in the object runtime. No user-visible impacts. [#22419](https://github.com/MystenLabs/sui/pull/22419) : Adds an existing hardcoded bound to the protocol config for clarity. [#19439](https://github.com/MystenLabs/sui/pull/19439) : Added epoch\-stable sequence numbers for read-only per\-epoch configs accessed in the transaction. [#22474](https://github.com/MystenLabs/sui/pull/22474) : enables Party objects (and associated `party_transfer` functions) in testnet #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-8 "Direct link to Nodes (Validators and Full nodes)") [#21877](https://github.com/MystenLabs/sui/pull/21877) : TLS is now required to connect to the validator gRPC interface. [#22540](https://github.com/MystenLabs/sui/pull/22540) : The default bucket for state sync archive fallback now uses a requester pays policy. Update sui node's state-archive-read-config section according to the [docs](https://docs.sui.io/guides/operator/archives) #### gRPC[​](https://docs.sui.io/references/release-notes#grpc-7 "Direct link to gRPC") [#21877](https://github.com/MystenLabs/sui/pull/21877) : TLS is now required to connect to the validator gRPC interface. #### CLI[​](https://docs.sui.io/references/release-notes#cli-12 "Direct link to CLI") [#22332](https://github.com/MystenLabs/sui/pull/22332) : Update test names used for filtering in Move unit tests so the fully-qualified name is used to match against (i.e., `testing::a::test_name` instead of `a::test_name`). Also, add support for regexes to be used for test filtering rather than just substring matching. [#22303](https://github.com/MystenLabs/sui/pull/22303) : Update the package summary generation to make it more portable. [#22350](https://github.com/MystenLabs/sui/pull/22350) : Improved initial clone times for Move packages that are git dependencies. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.51.4](https://github.com/MystenLabs/sui/commits/mainnet-v1.51.4) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1514 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1514") * * * v1.50.1[​](https://docs.sui.io/references/release-notes#v1501 "Direct link to v1.50.1") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.50.1) _ #### Sui Protocol Version in this release: `85`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-85 "Direct link to sui-protocol-version-in-this-release-85") [#22173](https://github.com/MystenLabs/sui/pull/22173) : Allow larger objects to be created by system transactions [#22353](https://github.com/MystenLabs/sui/pull/22353) : Congestion control settings have been adjusted #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-9 "Direct link to Nodes (Validators and Full nodes)") [#22143](https://github.com/MystenLabs/sui/pull/22143) : DoS protection is enabled in dryRun mode by default for validators #### gRPC[​](https://docs.sui.io/references/release-notes#grpc-8 "Direct link to gRPC") [#21896](https://github.com/MystenLabs/sui/pull/21896) : [#22197](https://github.com/MystenLabs/sui/pull/22197) : Enables TLS on connections to validators over the gRPC interface. #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc-4 "Direct link to JSON-RPC") [#21932](https://github.com/MystenLabs/sui/pull/21932) : returns additional error information when an abort error occurs. #### CLI[​](https://docs.sui.io/references/release-notes#cli-13 "Direct link to CLI") [#22166](https://github.com/MystenLabs/sui/pull/22166) : Added the `-c` short flag for the `sui client upgrade` command to pass the upgrade capability. [#22139](https://github.com/MystenLabs/sui/pull/22139) : Add default TLS to sui-tool with optional --no-tls flag [#22293](https://github.com/MystenLabs/sui/pull/22293) : Added a new `--sender` argument for transactions to set the sender to a specific address. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.50.1](https://github.com/MystenLabs/sui/commits/mainnet-v1.50.1) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1501 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1501") * * * v1.49.2[​](https://docs.sui.io/references/release-notes#v1492 "Direct link to v1.49.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.49.2) _ #### Sui Protocol Version in this release: `84`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-84 "Direct link to sui-protocol-version-in-this-release-84") [#22081](https://github.com/MystenLabs/sui/pull/22081) : Normalize all type inputs to be defining ID-based when converting from `TypeInput`s in the adapter. [#22113](https://github.com/MystenLabs/sui/pull/22113) : Enables ExecutionTimeEstimate mode for congestion control on `mainnet`. [#22120](https://github.com/MystenLabs/sui/pull/22120) : update Nitro attestation parsing logic and enable for `mainnet` in version `83`. [#22092](https://github.com/MystenLabs/sui/pull/22092) : add a new feature flag that switches the object runtime to using TypeTags instead of VM runtime types. [#22258](https://github.com/MystenLabs/sui/pull/22258) : upgrade to allow recovery of stolen funds in accordance with community vote #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-10 "Direct link to Nodes (Validators and Full nodes)") [#21955](https://github.com/MystenLabs/sui/pull/21955) : Switches Sui archive mechanism for state sync from the existing format to the checkpoint data ingestion bucket. The `state-archive-read-config` section of the full node config needs to be updated to include the `ingestion-url` field. For possible bucket options, see: [https://docs.sui.io/guides/developer/advanced/custom-indexer#remote-reader](https://docs.sui.io/guides/developer/advanced/custom-indexer#remote-reader) . #### CLI[​](https://docs.sui.io/references/release-notes#cli-14 "Direct link to CLI") [#21983](https://github.com/MystenLabs/sui/pull/21983) : Add `--client.env` flag to `client` and `move` subcommands to allow for selecting a specific environment for a single CLI command. #### Rust SDK[​](https://docs.sui.io/references/release-notes#rust-sdk-1 "Direct link to Rust SDK") [#21893](https://github.com/MystenLabs/sui/pull/21893) : Added new `merge_coins` and `smash_coins` functions to `ProgrammableTransactionBuilder` [#21983](https://github.com/MystenLabs/sui/pull/21983) : Update arguments to `WalletContext::new` so it only takes the path to the config. Additional configurations (timeout, max concurrent connections, etc) can then be set on the context after it has been created. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.49.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.49.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1492 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1492") * * * v1.48.4[​](https://docs.sui.io/references/release-notes#v1484 "Direct link to v1.48.4") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.48.4) _ #### Sui Protocol Version in this release: `83`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-83 "Direct link to sui-protocol-version-in-this-release-83") [#22259](https://github.com/MystenLabs/sui/pull/22259) : upgrade to allow recovery of stolen funds in accordance with a community vote * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.48.4](https://github.com/MystenLabs/sui/commits/mainnet-v1.48.4) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1484 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1484") * * * v1.48.2[​](https://docs.sui.io/references/release-notes#v1482 "Direct link to v1.48.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.48.2) _ #### Sui Protocol Version in this release: `82`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-82 "Direct link to sui-protocol-version-in-this-release-82") [#21760](https://github.com/MystenLabs/sui/pull/21760) : version `82`, cleanup and minor patches to Sui System #### gRPC[​](https://docs.sui.io/references/release-notes#grpc-9 "Direct link to gRPC") [#21837](https://github.com/MystenLabs/sui/pull/21837) : Enables TLS on connections to validators over the gRPC interface. #### CLI[​](https://docs.sui.io/references/release-notes#cli-15 "Direct link to CLI") [#20851](https://github.com/MystenLabs/sui/pull/20851) : Change in generated Move trace representation to be compressed. Existing Move test traces will need to be regenerated in order to be used. [#21837](https://github.com/MystenLabs/sui/pull/21837) : Enables TLS on connections to validators over the gRPC interface. [#21790](https://github.com/MystenLabs/sui/pull/21790) : Compiler might generate slightly different errors as a result of the compilation process being more permissive with respect to parsing errors. [#21876](https://github.com/MystenLabs/sui/pull/21876) : Bug fix [#21912](https://github.com/MystenLabs/sui/pull/21912) : Added the `sui client remove-address` command to the CLI. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.48.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.48.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1482 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1482") * * * v1.47.1[​](https://docs.sui.io/references/release-notes#v1471 "Direct link to v1.47.1") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.47.1) _ #### Sui Protocol Version in this release: `81`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-81 "Direct link to sui-protocol-version-in-this-release-81") [#21303](https://github.com/MystenLabs/sui/pull/21303) : Implements SIP-39 in Sui System [#21704](https://github.com/MystenLabs/sui/pull/21704) : Enable consensus median-based timestamp for mainnet in `v81` [#21802](https://github.com/MystenLabs/sui/pull/21802) : Increase threshold for bad nodes that won't be considered leaders in consensus in `mainnet` `v47` #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc-5 "Direct link to JSON-RPC") [#21605](https://github.com/MystenLabs/sui/pull/21605) : internal minor log change, no impact on users [#21622](https://github.com/MystenLabs/sui/pull/21622) : minor internal metrics & logging change, no user impact #### CLI[​](https://docs.sui.io/references/release-notes#cli-16 "Direct link to CLI") [#21609](https://github.com/MystenLabs/sui/pull/21609) : The `sui client ptb` now supports passing MVR name registered packages for package IDs and type tags. [#21685](https://github.com/MystenLabs/sui/pull/21685) : Bug fix - transitive dependencies of externally resolved dependencies are fetched before reading [#21671](https://github.com/MystenLabs/sui/pull/21671) : DeepBook is no longer included as an implicit dependency. [#21742](https://github.com/MystenLabs/sui/pull/21742) : remove spurious error message for external resolvers [#21710](https://github.com/MystenLabs/sui/pull/21710) : bug fix for `sui move disassemble` with implicit dependencies * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.47.1](https://github.com/MystenLabs/sui/commits/mainnet-v1.47.1) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1471 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1471") * * * v1.46.3[​](https://docs.sui.io/references/release-notes#v1463 "Direct link to v1.46.3") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.46.3) _ #### Sui Protocol Version in this release: `80`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-80 "Direct link to sui-protocol-version-in-this-release-80") [#21815](https://github.com/MystenLabs/sui/pull/21815) : Adds a fix that bounds the size of PTB values * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.46.3](https://github.com/MystenLabs/sui/commits/mainnet-v1.46.3) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1463 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1463") * * * v1.46.2[​](https://docs.sui.io/references/release-notes#v1462 "Direct link to v1.46.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.46.2) _ ‼️# Private Release Notice‼️ This release includes a private fix for an issue effecting fullnodes and validators. Changes will be made public once applied to mainnet after an epoch change tomorrow. Private Commit: `3c894a0ab474fca8d4880606f919ab9af91f4529` Private release install instructions: [https://bit.ly/sui-private-release-install](https://bit.ly/sui-private-release-install) Do not use the attached binaries and download them from [https://sui-releases.s3-accelerate.amazonaws.com/3c894a0ab474fca8d4880606f919ab9af91f4529/sui-node](https://sui-releases.s3-accelerate.amazonaws.com/3c894a0ab474fca8d4880606f919ab9af91f4529/sui-node) instead until 4/10 after the epoch change #### Sui Protocol Version in this release: `79`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-79 "Direct link to sui-protocol-version-in-this-release-79") [#21530](https://github.com/MystenLabs/sui/pull/21530) : Enable consensus commit median based timestamp calculation for testnet. [#21562](https://github.com/MystenLabs/sui/pull/21562) : v79 Increase threshold for bad nodes that won't be considered leaders in consensus in testnet [#21621](https://github.com/MystenLabs/sui/pull/21621) : Enable consensus garbage collection and new linearizer logic in mainnet #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-11 "Direct link to Nodes (Validators and Full nodes)") [#21715](https://github.com/MystenLabs/sui/pull/21715) : Fixes an issue that could cause end-of\-epoch crash loops on validators. #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc-6 "Direct link to JSON-RPC") [#21489](https://github.com/MystenLabs/sui/pull/21489) : dependency change, should not have user-noticeable impact internal minor log change, no impact on users minor internal metrics & logging change, no user impact #### CLI[​](https://docs.sui.io/references/release-notes#cli-17 "Direct link to CLI") [#21462](https://github.com/MystenLabs/sui/pull/21462) : improved error response when publishing an empty package [#21633](https://github.com/MystenLabs/sui/pull/21633) : Fixes Move Analyzer issues around macros. Move now supports type annotations on lambdas. [#21649](https://github.com/MystenLabs/sui/pull/21649) : The `sui client ptb` now supports passing MVR name registered packages for package IDs and type tags. [#21693](https://github.com/MystenLabs/sui/pull/21693) : package management bug fixes * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.46.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.46.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1462 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1462") * * * v1.45.3[​](https://docs.sui.io/references/release-notes#v1453 "Direct link to v1.45.3") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.45.3) _ #### Sui Protocol Version in this release: `78`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-78 "Direct link to sui-protocol-version-in-this-release-78") [#21444](https://github.com/MystenLabs/sui/pull/21444) : enable group ops uncompressed in `mainnet`. [#21420](https://github.com/MystenLabs/sui/pull/21420) : Enable consensus garbage collection and new commit rule for `testnet`. [#21460](https://github.com/MystenLabs/sui/pull/21460) : Add a new protocol version to support native transaction contexts and `sponsor`. [#21492](https://github.com/MystenLabs/sui/pull/21492) : Enables new ExecutionTimeEstimate mode for congestion control in `testnet`. #### Nodes (Validators and Full nodes)[​](https://docs.sui.io/references/release-notes#nodes-validators-and-full-nodes-12 "Direct link to Nodes (Validators and Full nodes)") [#21563](https://github.com/MystenLabs/sui/pull/21563) : Upgrade to a new version required for validators. Fullnodes are unaffected. #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc-7 "Direct link to JSON-RPC") [#21375](https://github.com/MystenLabs/sui/pull/21375) : return error source information in dry run transactions [#21474](https://github.com/MystenLabs/sui/pull/21474) : fixed a partition advance flakiness bug, no impact on the `JSON-RPC` interface #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-9 "Direct link to GraphQL") [#21474](https://github.com/MystenLabs/sui/pull/21474) : fixed a partition advance flakiness bug, no impact on the GraphQL interface. #### CLI[​](https://docs.sui.io/references/release-notes#cli-18 "Direct link to CLI") [#21204](https://github.com/MystenLabs/sui/pull/21204) : Implicitly added dependencies on system packages (MoveStdLib, Sui, System, DeepBook, and Bridge) if they are not included in `Move.toml`. [#21491](https://github.com/MystenLabs/sui/pull/21491) : Starting with `v1.45.0`, the `sui console` command is not available anymore. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.45.3](https://github.com/MystenLabs/sui/commits/mainnet-v1.45.3) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1453 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1453") * * * v1.44.3[​](https://docs.sui.io/references/release-notes#v1443 "Direct link to v1.44.3") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.44.3) _ #### Sui Protocol Version in this release: `77`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-77 "Direct link to sui-protocol-version-in-this-release-77") [#21108](https://github.com/MystenLabs/sui/pull/21108) : upgrade protocol version to enable passkey for testnet [#21192](https://github.com/MystenLabs/sui/pull/21192) : Changes to the Sui framework, deprecate Deepbook V2 with exception of cancel and withdrawal [#21364](https://github.com/MystenLabs/sui/pull/21364) : Enable consensus garbage collection and new commit rule. [#18820](https://github.com/MystenLabs/sui/pull/18820) : add feature flag to allow passkey inside `multisig`. Enable for devnet and testnet. [#21445](https://github.com/MystenLabs/sui/pull/21445) : enable uncompressed group ops in mainnet for protocol version `77` [#21449](https://github.com/MystenLabs/sui/pull/21449) : Enable consensus garbage collection and new commit rule for testnet. #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc-8 "Direct link to JSON-RPC") [#21359](https://github.com/MystenLabs/sui/pull/21359) : Ordering of enum variants in Move enum types are now returned in declaration order as opposed to lexicographic order. #### GraphQL[​](https://docs.sui.io/references/release-notes#graphql-10 "Direct link to GraphQL") [#21032](https://github.com/MystenLabs/sui/pull/21032) : Removed the `objectKeys` field from `ObjectFilter` as per the previous deprecation notice. Use `multiGetObjects` instead to fetch multiple objects. #### CLI[​](https://docs.sui.io/references/release-notes#cli-19 "Direct link to CLI") [#21211](https://github.com/MystenLabs/sui/pull/21211) : `sui client publish/upgrade` will now by default remove dependencies that are not referenced in source code from being published on-chain. [#21331](https://github.com/MystenLabs/sui/pull/21331) : Adds support to `sui client ptb` to create transactions with `sui::object::ID` values as pure inputs. ID inputs are specified like addresses (hexadecimal numbers with a leading `@`) and their type is inferred from usage. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.44.3](https://github.com/MystenLabs/sui/commits/mainnet-v1.44.3) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1443 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1443") * * * v1.43.1[​](https://docs.sui.io/references/release-notes#v1431 "Direct link to v1.43.1") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.43.1) _ #### Sui Protocol Version in this release: `74`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-74 "Direct link to sui-protocol-version-in-this-release-74") [#20984](https://github.com/MystenLabs/sui/pull/20984) : bumps protocol version to `74` [#20870](https://github.com/MystenLabs/sui/pull/20870) : Add a new native function to verify aws nitro enclave attestation in `devnet`. [#21177](https://github.com/MystenLabs/sui/pull/21177) : Enable `zstd` compression for consensus tonic network in `mainnet` [#21208](https://github.com/MystenLabs/sui/pull/21208) : Enables consensus garbage collection for `testnet` #### JSON-RPC[​](https://docs.sui.io/references/release-notes#json-rpc-9 "Direct link to JSON-RPC") [#21166](https://github.com/MystenLabs/sui/pull/21166) : add new read api to verify `zklogin` signature #### CLI[​](https://docs.sui.io/references/release-notes#cli-20 "Direct link to CLI") [#21116](https://github.com/MystenLabs/sui/pull/21116) : Fixed the bug when the CLI cannot connect to the active environment leading to an error on most commands. [#20977](https://github.com/MystenLabs/sui/pull/20977) : publication and upgrade will now warn that source verification will become opt-in in a future release; the warning can be disabled with either `--skip-dependency-verification` or the new `--verify-deps` flags [#21159](https://github.com/MystenLabs/sui/pull/21159) : Source verification for publish/upgrade commands is now opt-in instead of opt-out. * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.43.1](https://github.com/MystenLabs/sui/commits/mainnet-v1.43.1) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1431 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1431") * * * v1.42.2[​](https://docs.sui.io/references/release-notes#v1422 "Direct link to v1.42.2") ---------------------------------------------------------------------------------------- **✅ Mainnet** | _Source: [GitHub Release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.42.2) _ #### Sui Protocol Version in this release: `73`[​](https://docs.sui.io/references/release-notes#sui-protocol-version-in-this-release-73 "Direct link to sui-protocol-version-in-this-release-73") [#20258](https://github.com/MystenLabs/sui/pull/20258) : Enables consensus garbage collection & new linearization logic for devnet [#20978](https://github.com/MystenLabs/sui/pull/20978) : Enable `zstd` compression for consensus tonic network in testnet. [#21026](https://github.com/MystenLabs/sui/pull/21026) : Enable smart ancestor selection & probing for accepted rounds #### CLI[​](https://docs.sui.io/references/release-notes#cli-21 "Direct link to CLI") [#20342](https://github.com/MystenLabs/sui/pull/20342) : added `--verify-compatibility` flag to `client upgrade` command, which checks upgrade compatibility locally before publishing upgrades [#20954](https://github.com/MystenLabs/sui/pull/20954) : Fixed the CLI `keytool update-alias` command not to allow duplicate aliases. [#20961](https://github.com/MystenLabs/sui/pull/20961) : The `Move.toml` file generated by `sui move new` now sets `override = true` for the framework dependency. This will prevent some source verification errors for new projects. [#21124](https://github.com/MystenLabs/sui/pull/21124) : Fixed the bug when the CLI cannot connect to the active environment, leading to an error on most commands. [#21127](https://github.com/MystenLabs/sui/pull/21127) : publication and upgrade will now warn that source verification will become opt-in in a future release; the warning can be disabled with either `--skip-dependency-verification` or the new `--verify-deps` flags * * * ##### Full Log: [https://github.com/MystenLabs/sui/commits/mainnet-v1.42.2](https://github.com/MystenLabs/sui/commits/mainnet-v1.42.2) [​](https://docs.sui.io/references/release-notes#full-log-httpsgithubcommystenlabssuicommitsmainnet-v1422 "Direct link to full-log-httpsgithubcommystenlabssuicommitsmainnet-v1422") * * * * [v1.65.2](https://docs.sui.io/references/release-notes#v1652) * [v1.64.2](https://docs.sui.io/references/release-notes#v1642) * [v1.64.1](https://docs.sui.io/references/release-notes#v1641) * [v1.63.4](https://docs.sui.io/references/release-notes#v1634) * [v1.63.3](https://docs.sui.io/references/release-notes#v1633) * [v1.62.1](https://docs.sui.io/references/release-notes#v1621) * [v1.61.2](https://docs.sui.io/references/release-notes#v1612) * [v1.60.1](https://docs.sui.io/references/release-notes#v1601) * [v1.59.1](https://docs.sui.io/references/release-notes#v1591) * [v1.58.3](https://docs.sui.io/references/release-notes#v1583) * [v1.57.3](https://docs.sui.io/references/release-notes#v1573) * [v1.57.2](https://docs.sui.io/references/release-notes#v1572) * [v1.56.2](https://docs.sui.io/references/release-notes#v1562) * [v1.55.0](https://docs.sui.io/references/release-notes#v1550) * [v1.54.2](https://docs.sui.io/references/release-notes#v1542) * [v1.53.2](https://docs.sui.io/references/release-notes#v1532) * [v1.52.3](https://docs.sui.io/references/release-notes#v1523) * [v1.52.2](https://docs.sui.io/references/release-notes#v1522) * [v1.51.5](https://docs.sui.io/references/release-notes#v1515) * [v1.51.4](https://docs.sui.io/references/release-notes#v1514) * [v1.50.1](https://docs.sui.io/references/release-notes#v1501) * [v1.49.2](https://docs.sui.io/references/release-notes#v1492) * [v1.48.4](https://docs.sui.io/references/release-notes#v1484) * [v1.48.2](https://docs.sui.io/references/release-notes#v1482) * [v1.47.1](https://docs.sui.io/references/release-notes#v1471) * [v1.46.3](https://docs.sui.io/references/release-notes#v1463) * [v1.46.2](https://docs.sui.io/references/release-notes#v1462) * [v1.45.3](https://docs.sui.io/references/release-notes#v1453) * [v1.44.3](https://docs.sui.io/references/release-notes#v1443) * [v1.43.1](https://docs.sui.io/references/release-notes#v1431) * [v1.42.2](https://docs.sui.io/references/release-notes#v1422) --- # Genesis | Sui Documentation [Skip to main content](https://docs.sui.io/guides/operator/genesis#__docusaurus_skipToContent_fallback) On this page Genesis is the initial state of the Sui blockchain. To launch a network, the initial committee of validators collaborate by providing their validator information (public keys, network addresses, and so on) to a shared workspace. After all of the initial validators have contributed their information, Sui generates the initial, unsigned genesis checkpoint (checkpoint with sequence number 0) and each validator provides their signature. Sui aggregates these signatures to form a certificate on the genesis checkpoint. Sui bundles this checkpoint, as well as the initial objects, together into a single genesis.blob file that is used to initialize the state when running the `sui-node` binary for both validators and Full nodes. Genesis blob locations[​](https://docs.sui.io/guides/operator/genesis#genesis-blob-locations "Direct link to Genesis blob locations") -------------------------------------------------------------------------------------------------------------------------------------- The `genesis.blob` files for each network are in the [sui-genesis](https://github.com/mystenlabs/sui-genesis) repository. See [Sui Full Node](https://docs.sui.io/guides/operator/sui-full-node) for how to get the genesis.blob file for each network. * [Genesis blob locations](https://docs.sui.io/guides/operator/genesis#genesis-blob-locations) --- # Unknown SuiCLICheatSheet CommandDescription sui client active-addressGet the active address sui client addressesList the addresses, their aliases, and the active address sui client new-address ed25519Create a new address with ED25519 scheme sui client new-address ed25519 MY\_ALIASCreate a new address with ED25519 scheme and alias sui client switch --address ADDRESSMake this the active address (accepts also an alias) sui keytool convert PRIVATE\_KEYConvert private key in Hex or Base64 to new format (Bech32 encoded 33 byte flag || private key starting with "suiprivkey") sui keytool generate ed25519Generate a new keypair with ED25519 scheme and save it to file sui keytool import INPUT KEY\_SCHEMEAdd a new key to Sui CLI Keystore using either the input mnemonic phrase or a Bech32 encoded 33-byte flag || privkey starting with "suiprivkey" sui keytool update-alias OLD\_ALIAS NEW\_ALIAS Update the alias of an address Addresses & Aliases CommandDescription sui client faucetGet a SUI coin from the faucet associated with the active network sui client faucet --address ADDRESSGet a SUI coin for the address (accepts also an alias) sui client faucet --url CUSTOM\_FAUCET\_URLGet a SUI coin from custom faucet sui client gasList the gas coins for the active address sui client gas ADDRESSList the gas coins for the given address (accepts also an alias) Faucet & Gas CommandDescription sui client active-envGet the active environment sui client envsList defined environments sui client new-env --rpc URL --alias ALIASCreate a new environment with URL and alias sui client switch --env ENV\_ALIASSwitch to the given environment sui genesisBootstrap and initialize a new Sui network sui startStart the local Sui network sui-faucetStart a local faucet. Note this is a different binary Network CommandDescription sui move buildBuild the Move project in the current directory sui move build --path PATHBuild the Move project from the given path sui move migrate PATHMigrate to Move 2024 for the package at provided path sui move new PROJECT\_NAMECreate a new Move project in the given folder sui move testTest the Move project in the current directory Create,Build,andTestaMoveProject CommandDescription sui client call \\Call a Move package --package PACKAGE \\ --module MODULE \\ --function FUNCTION sui client merge-coin \\Merge two coins --primary-coin COIN\_ID \\ --coin-to-merge COIN\_ID sui client split-coin \\Split a coin into two coins: one with 1000 MIST and the rest --coin-id COIN\_ID \\ --amounts 1000 sui client pay-sui --input-coins COIN\_ID \\Transfer 0.1 SUI to an address and use the same coin for gas --recipients ADDRESS \\ --amounts 100000000 sui client transfer-sui \\ --sui-coin-object-id COIN\_ID \\Transfer SUI object to an address and use the same coin for gas --to ADDRESS \\ Executing Transactions CommandDescription sui client ptb --move-call p::m::f "" argsCall a Move function from a package and module sui client ptb --make-move-vec "" "\[1000,2000\]" Make a Move vector with two elements of type u64 sui client ptb \\Split a gas coin and transfer it to address --split-coins gas "\[1000\]" \\ --assign new\_coins \\ --transfer-objects "\[new\_coins\]" ADDRESS sui client ptb --transfer-objects "\[object\_id\]" ADDRESS Transfer an object to an address. Note that you can pass multiple objects in the array sui client ptb \\Publish a Move package, and transfer the upgrade capability --move-call sui::tx\_context::sender \\to sender --assign sender \\ --publish "." \\ --assign upgrade\_cap \\ --transfer-objects "\[upgrade\_cap\]" sender ProgrammableTransactionBlocks(PTBs) --- # Sui Node Monitoring | Sui Documentation [Skip to main content](https://docs.sui.io/guides/operator/monitoring#__docusaurus_skipToContent_fallback) On this page info These instructions are for advanced users. If you just need a local development environment, you should instead follow the instructions in [Create a Local Sui Network](https://docs.sui.io/guides/developer/getting-started/local-network) to create a local full node, validators, and faucet. Nodes expose on `localhost:9184/metrics` by default. You can view the metrics in the metrics UI, or you can use a tool like `curl` to get the metrics in a format that is easy to parse. $ curl -s http://localhost:9184/metrics | grep -E 'sui_validator|sui_fullnode' Production monitoring[​](https://docs.sui.io/guides/operator/monitoring#production-monitoring "Direct link to Production monitoring") -------------------------------------------------------------------------------------------------------------------------------------- For production monitoring, [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) are recommended. You can use Grafana Agent, Grafana Alloy, or another tool to scrape the metrics from your node. * [Production monitoring](https://docs.sui.io/guides/operator/monitoring#production-monitoring) --- # Sui Kiosk | Sui Documentation [Skip to main content](https://docs.sui.io/standards/kiosk#__docusaurus_skipToContent_fallback) On this page Kiosk is a decentralized system for commerce applications on Sui. It consists of `Kiosk` objects - shared objects owned by individual parties that store assets and allow listing them for sale as well as utilize custom trading functionality - for example, an auction. While being highly decentralized, Sui Kiosk provides a set of strong guarantees: * Kiosk owners retain ownership of their assets to the moment of purchase. * Creators set custom policies - sets of rules applied to every trade (such as pay royalty fee or do some arbitrary action X). * Marketplaces can index events the `Kiosk` object emits and subscribe to a single feed for on-chain asset trading. Practically, Kiosk is a part of the Sui framework, and it is native to the system and available to everyone out of the box. info See the [Kiosk SDK documentation](https://sdk.mystenlabs.com/kiosk) for examples of working with Kiosk using TypeScript. Sui Kiosk owners[​](https://docs.sui.io/standards/kiosk#sui-kiosk-owners "Direct link to sui-kiosk-owners") ------------------------------------------------------------------------------------------------------------ Anyone can create a Sui Kiosk. Ownership of a kiosk is determined by the owner of the `KioskOwnerCap`, a special object that grants full access to a single kiosk. As the owner, you can sell any asset with a type (T) that has a shared `TransferPolicy` available, or you can use a kiosk to store assets even without a shared policy. You can’t sell or transfer any assets from your kiosk that do not have an associated transfer policy available. To sell an item, if there is an existing transfer policy for the type (T), you just add your assets to your kiosk and then list them. You specify an offer amount when you list an item. Anyone can then purchase the item for the amount of SUI specified in the listing. The associated transfer policy determines what the buyer can do with the purchased asset. A kiosk owner can: * Place and take items * List items for sale * Add and remove Extensions * Withdraw profits from sales * Borrow and mutate owned assets * Access the full set of trading tools, such as auctions, lotteries, and collection bidding Sui Kiosk for buyers[​](https://docs.sui.io/standards/kiosk#sui-kiosk-for-buyers "Direct link to sui-kiosk-for-buyers") ------------------------------------------------------------------------------------------------------------------------ A buyer is a party that purchases (or - more generally - receives) items from kiosks, anyone on the network can be a buyer (and, for example, a kiosk owner at the same time). **Benefits:** * Buyers get access to global liquidity and can get the best offer * Buyers can place bids on collections through their kiosks * Most buyer actions performed in kiosks clean up seller objects, which results in free (gas\-less) actions **Responsibilities:** * Buyer is the party that pays the fees if they're set in the policy * Buyer must follow the rules set by creators or a transaction won't succeed **Guarantees:** * When using a custom trading logic such as an auction, the items are guaranteed to be unchanged until the trade is complete Sui Kiosk for marketplaces[​](https://docs.sui.io/standards/kiosk#sui-kiosk-for-marketplaces "Direct link to sui-kiosk-for-marketplaces") ------------------------------------------------------------------------------------------------------------------------------------------ As a marketplace operator, you can implement Sui Kiosk to watch for offers made in a collection of kiosks and display them on a marketplace site. You can also implement a custom system using Kiosk extensions (created by the community or third-parties). For example, marketplaces can use a `TransferPolicyCap` to implement application-specific transfer rules. Sui Kiosk for creators[​](https://docs.sui.io/standards/kiosk#sui-kiosk-for-creators "Direct link to sui-kiosk-for-creators") ------------------------------------------------------------------------------------------------------------------------------ As a creator, Sui Kiosk supports strong enforcement for transfer policies and associated rules to protect assets and enforce asset ownership. Sui Kiosk gives creators more control over their creations, and puts creators and owners in control of how their works can be used. Creator is a party that creates and controls the TransferPolicy for a single type. For example, the authors of SuiFrens are the Creators of the `SuiFren` type and act as creators in the Kiosk ecosystem. Creators set the policy, but they might also be the first sellers of their assets through a kiosk. **Creators can:** * Set any rules for trades * Set multiple ways ("tracks") of rules * Enable or disable trades at any moment with a policy * Enforce policies (like royalties) on all trades * Perform a primary sale of their assets through a kiosk All of the above is effective immediately and globally. **Creators cannot:** * Take or modify items stored in someone else's kiosk * Restrict taking items from kiosks if the "locking" rule was not set in the policy Sui Kiosk guarantees[​](https://docs.sui.io/standards/kiosk#sui-kiosk-guarantees "Direct link to sui-kiosk-guarantees") ------------------------------------------------------------------------------------------------------------------------ Sui Kiosk provides a set of guarantees that Sui enforces through smart contracts. These guarantees include: * Every trade in Sui Kiosk requires a `TransferPolicy` resolution. This gives creators control over how their assets can be traded. * True ownership, which means that only a kiosk owner can take, list, borrow, or modify the assets added to their kiosk. This is similar to how single-owner objects work on Sui. * Strong policy enforcement, for example Royalty policies, that lets creators enable or disable policies at any time that applies to all trades on the platform for objects with that policy attached. * Changes to a `TransferPolicy` apply instantly and globally. In practice, these guarantees mean that: * When you list an item for sale, no one can modify it or take it from the kiosk. * When you define a `PurchaseCap`, an item remains locked and you can’t modify or take the item from the kiosk unless the trade uses or returns the `PurchaseCap`. * You can remove any rule at any time (as the owner). * You can disable any extension at any time (as the owner). * The state of an extension state is always accessible to the extension. ### Asset states in Sui Kiosk[​](https://docs.sui.io/standards/kiosk#asset-states "Direct link to asset-states") Sui Kiosk is a shared object that can store heterogeneous values, such as different sets of asset collectibles. When you add an asset to your kiosk, it has one of the following states: * PLACED: An item placed in the kiosk using the `kiosk::place` function. The kiosk owner can withdraw it and use it directly, borrow it (mutably or immutably), or list an item for sale. * LOCKED: An item placed in the kiosk using the `kiosk::lock` function. You can’t withdraw a Locked item from a kiosk, but you can borrow it mutably and list it for sale. Any item placed in a kiosk that has an associated kiosk lock policy have a LOCKED state. * LISTED: An item in the kiosk that is listed for sale using the `kiosk::list` or `kiosk::place_and_list` functions. You can’t modify an item while listed, but you can borrow it immutably or delist it, which returns it to its previous state. * LISTED EXCLUSIVELY: An item placed or locked in the kiosk by an extension that calls the `kiosk::list_with_purchase_cap` function. Only the kiosk owner can approve calling the function. The owner can only borrow it immutably. The extension must provide the functionality to delist / unlock the asset, or it might stay locked forever. Given that this action is explicitly performed by the owner - it is the responsibility of the owner to choose verified and audited extensions to use. When someone purchases an asset from a kiosk, the asset leaves the kiosk and ownership transfers to the buyer’s address. Open a Sui Kiosk[​](https://docs.sui.io/standards/kiosk#open-a-sui-kiosk "Direct link to open-a-sui-kiosk") ------------------------------------------------------------------------------------------------------------ To use a Sui Kiosk, you must create one and have the `KioskOwnerCap` that matches the `Kiosk` object. You can create a new kiosk using a single transaction by calling the `kiosk::default` function. The function creates and shares a `Kiosk`, and transfers the `KioskOwnerCap` to your address. ### Create a Sui Kiosk using programmable transaction blocks[​](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-using-programmable-transaction-blocks "Direct link to create-a-sui-kiosk-using-programmable-transaction-blocks") let tx = new Transaction();tx.moveCall({ target: '0x2::kiosk::default',}); ### Create a Sui Kiosk using the Sui CLI[​](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-using-the-sui-cli "Direct link to create-a-sui-kiosk-using-the-sui-cli") tip Beginning with the Sui `v1.24.1` [release](https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.24.1) , the `--gas-budget` option is no longer required for CLI commands. $ sui client call \ --package 0x2 \ --module kiosk \ --function default \ --gas-budget 1000000000 ### Create a Sui Kiosk with advanced options[​](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-with-advanced-options "Direct link to create-a-sui-kiosk-with-advanced-options") For more advanced use cases, when you want to choose the storage model or perform an action right away, you can use the programmable transaction block (PTB) friendly function `kiosk::new`. Kiosk is designed to be shared. If you choose a different storage model, such as owned, your kiosk might not function as intended or not be accessible to other users. You can make sure your kiosk works by testing it on Sui Testnet. ### Create a Sui Kiosk with advanced options using programmable transaction blocks[​](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-with-advanced-options-using-programmable-transaction-blocks "Direct link to create-a-sui-kiosk-with-advanced-options-using-programmable-transaction-blocks") let tx = new Transaction();let [kiosk, kioskOwnerCap] = tx.moveCall({ target: '0x2::kiosk::new',});tx.transferObjects([kioskOwnerCap], sender);tx.moveCall({ target: '0x2::transfer::public_share_object', arguments: [kiosk], typeArguments: '0x2::kiosk::Kiosk',}); ### Create a Sui Kiosk with advanced options using the Sui CLI[​](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-with-advanced-options-using-the-sui-cli "Direct link to create-a-sui-kiosk-with-advanced-options-using-the-sui-cli") Sui CLI does not support PTBs and transaction chaining yet. You can use the `kiosk::default` function instead. Place items in and take items from your kiosk[​](https://docs.sui.io/standards/kiosk#place-items-in-and-take-items-from-your-kiosk "Direct link to place-items-in-and-take-items-from-your-kiosk") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- As a kiosk owner, you can place any assets into your Sui Kiosk. You can take any item from your kiosk that is not currently listed for sale. There's no limitations on which assets you can place in your kiosk. However, you can’t necessarily list and trade all of the items you place in your kiosk. The `TransferPolicy` associated with the type for the item determines whether you can trade it. To learn more, see the [Purchase items from a kiosk](https://docs.sui.io/standards/kiosk#purchase) section. ### Place an item in your kiosk[​](https://docs.sui.io/standards/kiosk#place-an-item-in-your-kiosk "Direct link to place-an-item-in-your-kiosk") To place an item to the kiosk, the owner needs to call the `sui::kiosk::place` function on the `Kiosk` object and pass the `KioskOwnerCap` and the `Item` as arguments. `ITEM_TYPE` in the following examples represents the full type of the item. ### Place an item using programmable transaction blocks[​](https://docs.sui.io/standards/kiosk#place-an-item-using-programmable-transaction-blocks "Direct link to place-an-item-using-programmable-transaction-blocks") let tx = new Transaction();let itemArg = tx.object('');let kioskArg = tx.object('');let kioskOwnerCapArg = tx.object('');tx.moveCall({ target: '0x2::kiosk::place', arguments: [kioskArg, kioskOwnerCapArg, itemArg], typeArguments: [''],}); ### Place an item using the Sui CLI[​](https://docs.sui.io/standards/kiosk#place-an-item-using-the-sui-cli "Direct link to Place an item using the Sui CLI") $ sui client call \ --package 0x2 \ --module kiosk \ --function place \ --args "" "" "" \ --type-args "" \ --gas-budget 1000000000 Take items from a kiosk[​](https://docs.sui.io/standards/kiosk#take-items-from-a-kiosk "Direct link to take-items-from-a-kiosk") --------------------------------------------------------------------------------------------------------------------------------- To take an item from a kiosk you must be the kiosk owner. As the owner, call the `sui::kiosk::take` function on the `Kiosk` object, and pass the `KioskOwnerCap` and `ID` of the item as arguments. `ITEM_TYPE` in the following examples represents the full type of the item. ### Take an item from a kiosk using programmable transaction blocks[​](https://docs.sui.io/standards/kiosk#take-an-item-from-a-kiosk-using-programmable-transaction-blocks "Direct link to take-an-item-from-a-kiosk-using-programmable-transaction-blocks") let tx = new Transaction();let itemId = tx.pure.id('');let kioskArg = tx.object('');let kioskOwnerCapArg = tx.object('');let item = tx.moveCall({ target: '0x2::kiosk::take', arguments: [kioskArg, kioskOwnerCapArg, itemId], typeArguments: [''],}); ### Take an item from a kiosk using the Sui CLI[​](https://docs.sui.io/standards/kiosk#take-an-item-from-a-kiosk-using-the-sui-cli "Direct link to take-an-item-from-a-kiosk-using-the-sui-cli") The `kiosk::take` function is built to be PTB friendly and returns the asset. The Sui CLI does not yet support transaction chaining. Lock items in a kiosk[​](https://docs.sui.io/standards/kiosk#lock-items-in-a-kiosk "Direct link to lock-items-in-a-kiosk") --------------------------------------------------------------------------------------------------------------------------- Some policies require that assets never get removed from a kiosk, such as for strong royalty enforcement. To support this, Sui Kiosk provides a locking mechanism. Locking is similar to placing except that you can't take a locked asset out of the kiosk. To lock an asset in a kiosk, call the `sui::kiosk::lock` function. To ensure that you can later unlock the asset you must associate a `TransferPolicy` with the asset. info After you lock an asset, you must use `list` or `list_with_purchase_cap` functions to list it. ### Lock an item in a kiosk[​](https://docs.sui.io/standards/kiosk#lock-an-item-in-a-kiosk "Direct link to lock-an-item-in-a-kiosk") When you use the `lock` function, similar to using the `place` function, you specify the `KioskOwnerCap` and the `Item` as arguments. But to lock the item, you must also show the `TransferPolicy`. `` in the following examples represents the full type of the asset. ### Lock an item using programmable transaction blocks[​](https://docs.sui.io/standards/kiosk#lock-an-item-using-programmable-transaction-blocks "Direct link to lock-an-item-using-programmable-transaction-blocks") const tx = new Transaction();let kioskArg = tx.object('');let kioskOwnerCapArg = tx.object('');let itemArg = tx.object('');let transferPolicyArg = tx.object('');tx.moveCall({ target: '0x2::kiosk::lock', arguments: [kioskArg, kioskOwnerCapArg, transferPolicyArg, itemArg], typeArguments: [''],}); ### Lock an item using the Sui CLI[​](https://docs.sui.io/standards/kiosk#lock-an-item-using-the-sui-cli "Direct link to Lock an item using the Sui CLI") $ sui client call \ --package 0x2 \ --module kiosk \ --function lock \ --args "" "" "" "" \ --type-args "" \ --gas-budget 1000000000 List and delist items from a kiosk[​](https://docs.sui.io/standards/kiosk#list-and-delist-items-from-a-kiosk "Direct link to list-and-delist-items-from-a-kiosk") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Sui Kiosk provides basic trading functionality. As a kiosk owner, you can list assets for sale, and buyers can discover and purchase them. Sui Kiosk supports listing items by default with three primary functions: * `kiosk::list` - list an asset for sale for a fixed price * `kiosk::delist` - remove an existing listing * `kiosk::purchase` - purchase an asset listed for sale Anyone on the network can purchase an item listed from a Sui Kiosk. To learn more about the purchase flow, see the [Purchase section](https://docs.sui.io/standards/kiosk#purchase) . To learn more about asset states and what can be done with a listed item, see the [Asset States](https://docs.sui.io/standards/kiosk#asset-states) section. ### List an item from a kiosk[​](https://docs.sui.io/standards/kiosk#list-an-item-from-a-kiosk "Direct link to list-an-item-from-a-kiosk") As a kiosk owner, you can use the `kiosk::list` function to list any asset you added to your kiosk. Include the item to sell and the list price as arguments. All listings on Sui are in SUI tokens. When you list an item, Sui emits a `kiosk::ItemListed` event that contains the kiosk ID, item ID, type of the item, and the list price. ### List an item using programmable transaction blocks[​](https://docs.sui.io/standards/kiosk#list-an-item-using-programmable-transaction-blocks "Direct link to list-an-item-using-programmable-transaction-blocks") let tx = new Transaction();let kioskArg = tx.object('');let capArg = tx.object('');let itemId = tx.pure.id('');let itemType = 'ITEM_TYPE';let priceArg = tx.pure.u64(''); // in MIST (1 SUI = 10^9 MIST)tx.moveCall({ target: '0x2::kiosk::list', arguments: [kioskArg, capArg, itemId, priceArg], typeArguments: [itemType],}); ### List an item using the Sui CLI[​](https://docs.sui.io/standards/kiosk#list-an-item-using-the-sui-cli "Direct link to List an item using the Sui CLI") $ sui client call \ --package 0x2 \ --module kiosk \ --function list \ --args "" "" "" "" \ --type-args "ITEM_TYPE" \ --gas-budget 1000000000 ### Delist an item[​](https://docs.sui.io/standards/kiosk#delist-an-item "Direct link to Delist an item") As a kiosk owner you can use the `kiosk::delist` to delist any currently listed asset. Specify the item to delist as an argument. When you delist an item, Sui returns to the kiosk owner the gas fees charged to list the item. When you delist an item, Sui emits a `kiosk::ItemDelisted` event that contains the kiosk ID, item ID, and the type of the item. ### Delist an item using the programmable transaction blocks[​](https://docs.sui.io/standards/kiosk#delist-an-item-using-the-programmable-transaction-blocks "Direct link to delist-an-item-using-the-programmable-transaction-blocks") let tx = new Transaction();let kioskArg = tx.object('');let capArg = tx.object('');let itemId = tx.pure.id('');let itemType = 'ITEM_TYPE';tx.moveCall({ target: '0x2::kiosk::delist', arguments: [kioskArg, capArg, itemId], typeArguments: [itemType],}); ### Delist an item using the Sui CLI[​](https://docs.sui.io/standards/kiosk#delist-an-item-using-the-sui-cli "Direct link to Delist an item using the Sui CLI") $ sui client call \ --package 0x2 \ --module kiosk \ --function delist \ --args "" "" "" \ --type-args "ITEM_TYPE" \ --gas-budget 1000000000 Purchase an item from a kiosk[​](https://docs.sui.io/standards/kiosk#purchase "Direct link to purchase") --------------------------------------------------------------------------------------------------------- Anyone that has an address on the Sui network can purchase an item listed from a Sui Kiosk. To purchase an item, you can use the `kiosk::purchase` function. Specify the item to purchase and pay the list price set by the kiosk owner. You can discover the items listed on the network with the `kiosk::ItemListed` event. When you use the `kiosk::purchase` function, it returns the purchased asset and the `TransferRequest` for the type associated with the asset. To complete the purchase, you must meet the terms defined in the `TransferPolicy` applied to the asset. Borrow an item from a kiosk[​](https://docs.sui.io/standards/kiosk#borrow-an-item-from-a-kiosk "Direct link to borrow-an-item-from-a-kiosk") --------------------------------------------------------------------------------------------------------------------------------------------- As a kiosk owner, you can access an asset placed or locked in a kiosk without taking the asset from the kiosk. You can always borrow the asset immutably. Whether you can mutably borrow an asset depends on the state of the asset. For example, you can’t borrow a listed asset because you can’t modify it while listed. The functions available include: * `kiosk::borrow`: Returns an immutable reference to the asset * `kiosk::borrow_mut`: Returns a mutable reference to the asset * `kiosk::borrow_val`: A PTB\-friendly version of `borrow_mut`, which allows you to take an asset and place it back in the same transaction. ### Immutable borrow[​](https://docs.sui.io/standards/kiosk#immutable-borrow "Direct link to Immutable borrow") You can always borrow an asset from a kiosk immutably. You can use the `kiosk::borrow` function to borrow an asset, however, it is not possible to use references within a programmable transaction block. To access the asset you must use a published module (function). ### Immutably borrow an asset using Sui Move[​](https://docs.sui.io/standards/kiosk#immutably-borrow-an-asset-using-sui-move "Direct link to immutably-borrow-an-asset-using-sui-move") module examples::immutable_borrow;use sui::kiosk::{Self, Kiosk, KioskOwnerCap};public fun immutable_borrow_example(self: &Kiosk, cap: &KioskOwnerCap, item_id: ID): &T { self.borrow(cap, item_id)} ### Mutable borrow with borrow\_mut[​](https://docs.sui.io/standards/kiosk#mutable-borrow-with-borrow_mut "Direct link to Mutable borrow with borrow_mut") You can mutably borrow an asset from a kiosk if it is not listed. You can use the `kiosk::borrow_mut` function to mutably borrow an asset. However, it is not possible to use references within a PTB, so to access the mutably borrowed asset you must use a published module (function). ### Mutably borrow an asset using Sui Move[​](https://docs.sui.io/standards/kiosk#mutably-borrow-an-asset-using-sui-move "Direct link to mutably-borrow-an-asset-using-sui-move") module examples::mutable_borrow;use sui::kiosk::{Self, Kiosk, KioskOwnerCap};public fun mutable_borrow_example( self: &mut Kiosk, cap: &KioskOwnerCap, item_id: ID): &mut T { self.borrow_mut(cap, item_id)} ### Mutable borrow with borrow\_val[​](https://docs.sui.io/standards/kiosk#mutable-borrow-with-borrow_val "Direct link to Mutable borrow with borrow_val") Use the PTB\-friendly `kiosk::borrow_val` function to take an asset and place it back in the same transaction. To make sure the asset is placed back into the kiosk, the function obliges the caller with a Hot Potato. See The Move Book for more information on the [Hot Potato pattern](https://move-book.com/programmability/hot-potato-pattern) . ### Mutable borrow with `borrow_val` using programmable transaction blocks[​](https://docs.sui.io/standards/kiosk#mutable-borrow-with-borrow_val-using-programmable-transaction-blocks "Direct link to mutable-borrow-with-borrow_val-using-programmable-transaction-blocks") let tx = new Transaction();let itemType = 'ITEM_TYPE';let itemId = tx.pure.id('');let kioskArg = tx.object('');let capArg = tx.object('');let [item, promise] = tx.moveCall({ target: '0x2::kiosk::borrow_val', arguments: [kioskArg, capArg, itemId], typeArguments: [itemType],});// freely mutate or reference the `item`// any calls are available as long as they take a reference// `returnValue` must be explicitly calledtx.moveCall({ target: '0x2::kiosk::return_val', arguments: [kioskArg, item, promise], typeArguments: [itemType],}); Withdraw proceeds from a completed sale[​](https://docs.sui.io/standards/kiosk#withdraw-proceeds-from-a-completed-sale "Direct link to Withdraw proceeds from a completed sale") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- When someone purchases an item, Sui stores the proceeds from the sale in the kiosk. As the kiosk owner, you can withdraw the proceeds at any time by calling the `kiosk::withdraw` function. The function is simple, but because it is PTB friendly it is not currently supported in the Sui CLI. ### Withdraw proceeds using programmable transaction blocks[​](https://docs.sui.io/standards/kiosk#withdraw-proceeds-using-programmable-transaction-blocks "Direct link to withdraw-proceeds-using-programmable-transaction-blocks") let tx = new Transaction();let kioskArg = tx.object('');let capArg = tx.object('');// because the function uses an Option argument,// constructing is a bit more complexlet amountArg = tx.moveCall({ target: '0x1::option::some', arguments: [tx.pure.u64('')], typeArguments: ['u64'],});// alternativelylet withdrawAllArg = tx.moveCall({ target: '0x1::option::none', typeArguments: ['u64'],});let coin = tx.moveCall({ target: '0x2::kiosk::withdraw', arguments: [kioskArg, capArg, amountArg], typeArguments: ['u64'],}); ### Withdraw proceeds using the Sui CLI[​](https://docs.sui.io/standards/kiosk#withdraw-proceeds-using-the-sui-cli "Direct link to Withdraw proceeds using the Sui CLI") This action is not currently supported in the CLI environment. * [Sui Kiosk owners](https://docs.sui.io/standards/kiosk#sui-kiosk-owners) * [Sui Kiosk for buyers](https://docs.sui.io/standards/kiosk#sui-kiosk-for-buyers) * [Sui Kiosk for marketplaces](https://docs.sui.io/standards/kiosk#sui-kiosk-for-marketplaces) * [Sui Kiosk for creators](https://docs.sui.io/standards/kiosk#sui-kiosk-for-creators) * [Sui Kiosk guarantees](https://docs.sui.io/standards/kiosk#sui-kiosk-guarantees) * [Asset states in Sui Kiosk](https://docs.sui.io/standards/kiosk#asset-states) * [Open a Sui Kiosk](https://docs.sui.io/standards/kiosk#open-a-sui-kiosk) * [Create a Sui Kiosk using programmable transaction blocks](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-using-programmable-transaction-blocks) * [Create a Sui Kiosk using the Sui CLI](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-using-the-sui-cli) * [Create a Sui Kiosk with advanced options](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-with-advanced-options) * [Create a Sui Kiosk with advanced options using programmable transaction blocks](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-with-advanced-options-using-programmable-transaction-blocks) * [Create a Sui Kiosk with advanced options using the Sui CLI](https://docs.sui.io/standards/kiosk#create-a-sui-kiosk-with-advanced-options-using-the-sui-cli) * [Place items in and take items from your kiosk](https://docs.sui.io/standards/kiosk#place-items-in-and-take-items-from-your-kiosk) * [Place an item in your kiosk](https://docs.sui.io/standards/kiosk#place-an-item-in-your-kiosk) * [Place an item using programmable transaction blocks](https://docs.sui.io/standards/kiosk#place-an-item-using-programmable-transaction-blocks) * [Place an item using the Sui CLI](https://docs.sui.io/standards/kiosk#place-an-item-using-the-sui-cli) * [Take items from a kiosk](https://docs.sui.io/standards/kiosk#take-items-from-a-kiosk) * [Take an item from a kiosk using programmable transaction blocks](https://docs.sui.io/standards/kiosk#take-an-item-from-a-kiosk-using-programmable-transaction-blocks) * [Take an item from a kiosk using the Sui CLI](https://docs.sui.io/standards/kiosk#take-an-item-from-a-kiosk-using-the-sui-cli) * [Lock items in a kiosk](https://docs.sui.io/standards/kiosk#lock-items-in-a-kiosk) * [Lock an item in a kiosk](https://docs.sui.io/standards/kiosk#lock-an-item-in-a-kiosk) * [Lock an item using programmable transaction blocks](https://docs.sui.io/standards/kiosk#lock-an-item-using-programmable-transaction-blocks) * [Lock an item using the Sui CLI](https://docs.sui.io/standards/kiosk#lock-an-item-using-the-sui-cli) * [List and delist items from a kiosk](https://docs.sui.io/standards/kiosk#list-and-delist-items-from-a-kiosk) * [List an item from a kiosk](https://docs.sui.io/standards/kiosk#list-an-item-from-a-kiosk) * [List an item using programmable transaction blocks](https://docs.sui.io/standards/kiosk#list-an-item-using-programmable-transaction-blocks) * [List an item using the Sui CLI](https://docs.sui.io/standards/kiosk#list-an-item-using-the-sui-cli) * [Delist an item](https://docs.sui.io/standards/kiosk#delist-an-item) * [Delist an item using the programmable transaction blocks](https://docs.sui.io/standards/kiosk#delist-an-item-using-the-programmable-transaction-blocks) * [Delist an item using the Sui CLI](https://docs.sui.io/standards/kiosk#delist-an-item-using-the-sui-cli) * [Purchase an item from a kiosk](https://docs.sui.io/standards/kiosk#purchase) * [Borrow an item from a kiosk](https://docs.sui.io/standards/kiosk#borrow-an-item-from-a-kiosk) * [Immutable borrow](https://docs.sui.io/standards/kiosk#immutable-borrow) * [Immutably borrow an asset using Sui Move](https://docs.sui.io/standards/kiosk#immutably-borrow-an-asset-using-sui-move) * [Mutable borrow with borrow\_mut](https://docs.sui.io/standards/kiosk#mutable-borrow-with-borrow_mut) * [Mutably borrow an asset using Sui Move](https://docs.sui.io/standards/kiosk#mutably-borrow-an-asset-using-sui-move) * [Mutable borrow with borrow\_val](https://docs.sui.io/standards/kiosk#mutable-borrow-with-borrow_val) * [Mutable borrow with `borrow_val` using programmable transaction blocks](https://docs.sui.io/standards/kiosk#mutable-borrow-with-borrow_val-using-programmable-transaction-blocks) * [Withdraw proceeds from a completed sale](https://docs.sui.io/standards/kiosk#withdraw-proceeds-from-a-completed-sale) * [Withdraw proceeds using programmable transaction blocks](https://docs.sui.io/standards/kiosk#withdraw-proceeds-using-programmable-transaction-blocks) * [Withdraw proceeds using the Sui CLI](https://docs.sui.io/standards/kiosk#withdraw-proceeds-using-the-sui-cli) --- # Sagat | Sui Documentation [Skip to main content](https://docs.sui.io/standards/sagat#__docusaurus_skipToContent_fallback) On this page [Sagat](https://github.com/MystenLabs/sagat/tree/main) is a full-stack multisig management platform for Sui multisig wallets. It is built using Bun and a TypeScript API for the backend and React for the frontend. Use the [Sagat web interface](https://sagat.mystenlabs.com/) for signing transactions, analyzing signatures, creating and managing multisigs, accepting or rejecting multisig invitations, and creating, voting on, and executing proposals. Alternatively, use the [Sagat SDK](https://github.com/MystenLabs/sagat/tree/main/sdk) to execute these tasks programmatically. What is multisig?[​](https://docs.sui.io/standards/sagat#what-is-multisig "Direct link to what-is-multisig") ------------------------------------------------------------------------------------------------------------- [Multisig](https://docs.sui.io/guides/developer/cryptography/multisig) is a type of authentication that requires multiple signatures from different parties before a transaction can be executed. Several addresses can be invited to a multisig group. On Sagat, all invited parties must accept for the multisig to be created. Each multisig can have a different voting threshold. For example, in a multisig that contains 3 users, only 2 of the users might need to sign the proposed transaction for it to be approved. In other scenarios, all users might be required to sign the transaction, and if one rejects it, the proposed transaction is canceled. Each threshold can configure different weights per user, enabling endless combinations, such as 5 out of 6 with just 2 addresses. Learn how to use the [TypeScript SDK for multisig](https://sdk.mystenlabs.com/typescript/cryptography/multisig) . Risks[​](https://docs.sui.io/standards/sagat#risks "Direct link to Risks") --------------------------------------------------------------------------- Sagat uses Mysten Labs infrastructure for its API layer and frontend layer to store proposal data in order to facilitate multisig management. The application's frontend is also hosted through Mysten Labs services, which you must rely on to be secure. Always validate a transaction's preview in a secondary location, such as through your wallet, not just from the web interface. ### Mitigate risks by self-hosting Sagat[​](https://docs.sui.io/standards/sagat#mitigate-risks-by-self-hosting-sagat "Direct link to Mitigate risks by self-hosting Sagat") To take control and use Sagat in a trustless manner, you can self-host it. To do so, first download the GitHub repository: $ git clone https://github.com/MystenLabs/sagat/tree/main Then, build the SDK and spin up the frontend and the API using the command: $ bun run dev tip Building the SDK is optional, as it can accept a custom URL. This runs the bun server in dev mode, so all changes made are reflected as you are developing. Using the Sagat web interface[​](https://docs.sui.io/standards/sagat#using-the-sagat-web-interface "Direct link to Using the Sagat web interface") --------------------------------------------------------------------------------------------------------------------------------------------------- Use Sagat [web interface](https://sagat.mystenlabs.com/) to: * Create multisigs within the browser. The browser validates each multisig and displays a real-time preview. * Accept or reject invitations to participate in multisig compositions. * Propose new transactions. * Preview and sign transactions. * Share transactions through links. * Add external proposers outside of the existing multisig group. * Execute transactions once the voting threshold has been reached. Each of these tasks can be executed [programmatically](https://docs.sui.io/standards/sagat#using-sagat-programmatically) as well. ### Connecting a wallet[​](https://docs.sui.io/standards/sagat#connecting-a-wallet "Direct link to Connecting a wallet") First, connect a wallet, such as [Slush](https://slush.app/) or [Suilet](https://suiet.app/) , to the Sagat web interface: ![Sagat connect Slush](https://docs.sui.io/assets/images/sagat-1-52f31f692841920587616eb75b216257.png "Screenshot showing how to connect Slush wallet to Sagat.") info Any address that supports ed25519, secp256r1 and secp256k1 are supported. ZkLogin is not supported. Connecting a wallet to the Sagat web interface registers the wallet's keys with the service. Multisigs can only contain keys that have been registered with Sagat. Keys can also be registered [programmatically](https://docs.sui.io/standards/sagat#register-public-keys) . tip The message "No wallets found. Install a wallet (ex. Slush Wallet) to continue." indicates that you must [install the Slush extension](https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil) before continuing. Unlock your wallet and approve the initial transaction. The Sagat web interface prompts you to generate a second transaction used to authenticate your wallet, as this helps with confidentiality. ![Sagat authenticate Slush](https://docs.sui.io/assets/images/sagat-2-5e0481d578cdc733f0007bfa885388b3.png "Screenshot showing how to authenticate transaction in Slush.") Follow the steps in your wallet to sign and approve the transaction, then verify account ownership. #### Testnet versus Mainnet[​](https://docs.sui.io/standards/sagat#testnet-versus-mainnet "Direct link to testnet-versus-mainnet") In the account drop-down menu, there is a toggle option for **Test Mode**. Test mode toggles connection to Testnet when turned on and connection to Mainnet when turned off. Using Testnet is recommended for testing and debugging, as signing and submitting transactions use Testnet SUI tokens that have no fiat equivalent value. Signing and submitting transactions to Mainnet costs real SUI tokens that have a fiat equivalent value. ### Creating and managing multisig[​](https://docs.sui.io/standards/sagat#creating-and-managing-multisig "Direct link to creating-and-managing-multisig") A multisig is a group of users who must vote on and approve transactions before execution. To create and execute multisig transactions, you must first create a multisig. Click **Create Your First Multisig** ![Sagat Create Your First Multisig](https://docs.sui.io/assets/images/sagat-3-5bda6cf3a7a37ac855e945c46bc9c0e9.png "Screenshot showing 'Create Your First Multisig' option.") You must add at least 2 addresses to create a multisig and set the approval threshold before the multisig can be created. ![Sagat create multisig](https://docs.sui.io/assets/images/sagat-4-03cd713f72d49766b1e6b4dc6703b462.png "Screenshot showing multisig creation form.") To add another member, click **Add Another Member**, then add their public key and configure their approval weight. If you do not know a user's public key, you can click the magnifying glass: ![Sagat lookup public key](https://docs.sui.io/assets/images/sagat-5-f2d0fa83736c12dbffb3ce0b31222cb1.png "Screenshot showing how to look up a public key.") Then enter their Sui address. The address's public key is returned. ![Sagat lookup public key](https://docs.sui.io/assets/images/sagat-6-b03f366429c0cc7c489d68b272b22145.png "Screenshot showing how to look up a public key.") caution Addresses must be registered with Sagat before they can be invited to a multisig. The multisig preview is displayed before you create it. ![Sagat multisig preview](https://docs.sui.io/assets/images/sagat-7-862fbd127cf26336bd8d8ed83fb25a2c.png "Screenshot showing a multisig preview.") ### Multisig invitations[​](https://docs.sui.io/standards/sagat#multisig-invitations "Direct link to multisig-invitations") Once a multisig has been created, the added addresses receive an invitation to join the multisig. Pending invitations can be seen in the **Invitations** tab. ![Sagat multisig invitations](https://docs.sui.io/assets/images/sagat-8-3fb4a6155e8fe739b77676330e79bdfb.png "Screenshot showing multisig invitations tab.") ### Create and submit proposals[​](https://docs.sui.io/standards/sagat#create-and-submit-proposals "Direct link to Create and submit proposals") From the Sagat dashboard, you can see several details and options regarding proposals, including: * A button to create a new proposal. * All proposals that have been submitted, are pending, or have been executed. Proposals are sorted by status. * An overview of the multisig, its members, and any external proposers that have been added. * An overview of the assets owned by the multisig. Only members of the committee can query proposals from the API. ![Sagat dashboard](https://docs.sui.io/assets/images/sagat-9-c12c8f082ff24ccb947f9a7389c81e9c.png "Screenshot showing Sagat dashboard.") ### Add external proposers[​](https://docs.sui.io/standards/sagat#add-external-proposers "Direct link to Add external proposers") External proposers can create proposals for a multisig without being added as part of the multisig. External proposers cannot approve or execute transactions on behalf of the multisig. To add external proposers, click on the **Overview** tab and scroll down to **Proposers** and click **Add Proposer**. ![Sagat external proposers](https://docs.sui.io/assets/images/sagat-10-73a190c78a8355231c41461d8cd339f4.png "Screenshot showing how to add external proposers.") ### Analyze signatures[​](https://docs.sui.io/standards/sagat#analyze-signatures "Direct link to Analyze signatures") The [signature analyzer tool](https://sagat.mystenlabs.com/tools/signature-analyzer) is used to analyze and decode base64-encoded signatures. It supports both multisig and single signature schemes. Insert the signature into the input box. The decoded signature and its details are returned: ![Sagat signature analyzer](https://docs.sui.io/assets/images/sagat-11-574beb4783857b667d2e8a30a3f809d2.png "Screenshot showing signature analysis details using Sagat signature analyzer tool.") You can get a transaction's signature through network explorers like [SuiScan](https://suiscan.xyz/testnet/) by viewing a [transaction's details](https://suiscan.xyz/testnet/tx/GPtGkR2F7wN1TAqDJmUE3wKTBeL7e9sVuv7UTGvp9E99) and looking at the **User signature** metadata field. caution If the Sagat web interface is set to **Test Mode**, you can only use signatures for transactions deployed on Testnet. For Mainnet transactions, disable **Test mode** in the account drop-down menu on Sagat. ### Sign transactions[​](https://docs.sui.io/standards/sagat#sign-transactions "Direct link to Sign transactions") The [transaction signer tool](https://sagat.mystenlabs.com/tools/sign) can be used to preview and sign transactions using the Slush wallet you connected to the web interface. Insert the transaction data as raw JSON or base64. The tool returns a preview of the transaction before providing an option to sign it. caution If the Sagat web interface is set to **Test Mode**, you can preview or sign transactions for Testnet. For Mainnet transactions, disable **Test mode** in the account drop-down menu on Sagat. Using Sagat programmatically[​](https://docs.sui.io/standards/sagat#using-sagat-programmatically "Direct link to Using Sagat programmatically") ------------------------------------------------------------------------------------------------------------------------------------------------ Sagat can be used through a [TypeScript SDK](https://github.com/MystenLabs/sagat/tree/main/sdk) or the [Sagat API](https://github.com/MystenLabs/sagat/tree/main/api) to execute the same tasks supported through the web browser. The examples below demonstrate test scenarios for using the Sagat API. ### Register public keys[​](https://docs.sui.io/standards/sagat#register-public-keys "Direct link to Register public keys") Register your address with Sagat before creating multisigs: File not found in manifest: `api/test/addresses.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. Register multiple addresses with Sagat in the same session before creating multisigs: File not found in manifest: `api/test/addresses.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. Learn how to execute this task using the [Sagat TypeScript SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L214-L222) . ### Creating and managing multisig[​](https://docs.sui.io/standards/sagat#creating-and-managing-multisig-1 "Direct link to creating-and-managing-multisig-1") A multisig is a group of users who must vote on and approve transactions before execution. To create and execute multisig transactions, you must first create a multisig. If a proposed transaction does not receive majority approval from multisig members, the transaction is canceled. For example, create and verify a 2-of-2 multisig: File not found in manifest: `api/test/multisig-api.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. A 2-of-2 multisig means there are 2 users who are part of the multisig and both users must approve of a proposed transaction. Learn how to execute this task using the [Sagat TypeScript SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L72-L94) . You can also create a multisig with a custom name: File not found in manifest: `api/test/multisig.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. You can view multisig details about a specific address: File not found in manifest: `api/test/addresses.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. Learn how to execute this task using the [Sagat TypeScript SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L96-L100) . You can also look up [public key information for a registered address](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L279-L281) . Manage the addresses that can create proposals for the multisig: File not found in manifest: `api/test/proposal-business-logic.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. Learn how to execute this task using the [Sagat TypeScript SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L297-L346) . ### Multisig invitations[​](https://docs.sui.io/standards/sagat#multisig-invitations-1 "Direct link to multisig-invitations-1") Multisigs are not valid until all members invited to the multisig accept or reject the invitation to join. When a multisig is created, all member public keys are [auto-registered](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L283-L294) . View and accept pending multisig invitations for a public key: File not found in manifest: `api/test/multisig.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. Learn how to view invitations using the [Sagat TypeScript SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L234-L251) , or learn how to [accept invitations with the SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L102-L113) . You can also [reject an invitation](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L115-L126) . ### Proposal creation[​](https://docs.sui.io/standards/sagat#proposal-creation "Direct link to Proposal creation") For a multisig transaction to be executed, it must first be proposed. The members of that multisig must vote on the proposed transaction and the configured majority must agree to execute the transaction. Only verified multisig members can create and vote on proposals. Each multisig member can vote once. A proposal must reach a certain voting threshold to be executed. Before a proposal has been executed, it can be [canceled by the user](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L197-L208) that created the proposal. File not found in manifest: `api/test/proposal-business-logic.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. A transaction's signature must be [verified](https://github.com/MystenLabs/sagat/blob/main/api/test/proposal-business-logic.test.ts#L41) before a proposal can be created. Learn how to execute this task using the [Sagat TypeScript SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L128-L134) . ### Viewing proposals[​](https://docs.sui.io/standards/sagat#viewing-proposals "Direct link to Viewing proposals") You can browse proposals for a multisig with filtering by status and pagination: File not found in manifest: `api/test/proposal-business-logic.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. Learn how to execute this task using the [Sagat TypeScript SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L136-L171) . You can view a proposal by its transaction digest: File not found in manifest: `api/test/proposal-business-logic.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. Learn how to execute this task using the [Sagat TypeScript SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L173-L177) . ### Voting on proposals[​](https://docs.sui.io/standards/sagat#voting-on-proposals "Direct link to Voting on proposals") Users approve or reject a transaction by voting on the proposal to either accept or reject: File not found in manifest: `api/test/multisig-api.test.ts`. You probably need to run \`pnpm prebuild\` and restart the site. Learn how to execute this task using the [Sagat TypeScript SDK](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L179-L190) . Verify a proposal using its [ID number](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L258-L265) or the [transaction's digest](https://github.com/MystenLabs/sagat/blob/313624a9d3b4b971b81b80be851b49e055067250/sdk/src/client.ts#L267-L274) . * [What is multisig?](https://docs.sui.io/standards/sagat#what-is-multisig) * [Risks](https://docs.sui.io/standards/sagat#risks) * [Mitigate risks by self-hosting Sagat](https://docs.sui.io/standards/sagat#mitigate-risks-by-self-hosting-sagat) * [Using the Sagat web interface](https://docs.sui.io/standards/sagat#using-the-sagat-web-interface) * [Connecting a wallet](https://docs.sui.io/standards/sagat#connecting-a-wallet) * [Creating and managing multisig](https://docs.sui.io/standards/sagat#creating-and-managing-multisig) * [Multisig invitations](https://docs.sui.io/standards/sagat#multisig-invitations) * [Create and submit proposals](https://docs.sui.io/standards/sagat#create-and-submit-proposals) * [Add external proposers](https://docs.sui.io/standards/sagat#add-external-proposers) * [Analyze signatures](https://docs.sui.io/standards/sagat#analyze-signatures) * [Sign transactions](https://docs.sui.io/standards/sagat#sign-transactions) * [Using Sagat programmatically](https://docs.sui.io/standards/sagat#using-sagat-programmatically) * [Register public keys](https://docs.sui.io/standards/sagat#register-public-keys) * [Creating and managing multisig](https://docs.sui.io/standards/sagat#creating-and-managing-multisig-1) * [Multisig invitations](https://docs.sui.io/standards/sagat#multisig-invitations-1) * [Proposal creation](https://docs.sui.io/standards/sagat#proposal-creation) * [Viewing proposals](https://docs.sui.io/standards/sagat#viewing-proposals) * [Voting on proposals](https://docs.sui.io/standards/sagat#voting-on-proposals) --- # Kiosk Apps | Sui Documentation [Skip to main content](https://docs.sui.io/standards/kiosk-apps#__docusaurus_skipToContent_fallback) On this page Kiosk apps are a way to extend the functionality of Sui Kiosk while keeping the core functionality intact. You can develop apps to add new features to a kiosk without having to modify the core code or move the assets elsewhere. There are two types of apps: * [Basic apps](https://docs.sui.io/standards/kiosk-apps#basic-apps) * [Permissioned apps](https://docs.sui.io/standards/kiosk-apps#permissioned-apps) Basic apps[​](https://docs.sui.io/standards/kiosk-apps#basic-apps "Direct link to Basic apps") ----------------------------------------------------------------------------------------------- Basic Kiosk apps do not require Kiosk Apps API to function. They usually serve the purpose of adding custom metadata to a kiosk or wrapping/working with existing objects such as `Kiosk` or `KioskOwnerCap`. An example of an app that does not require the API is the Personal Kiosk app. ### UID access via the uid\_mut[​](https://docs.sui.io/standards/kiosk-apps#uid-access-via-the-uid_mut "Direct link to UID access via the uid_mut") Kiosk has an `id: UID` field like all objects on Sui, which allows this object to be uniquely identified and carry custom dynamic fields and dynamic object fields. The Kiosk itself is built around dynamic fields and features like place and list are built around dynamic object fields. ### The uid\_mut\_as\_owner function[​](https://docs.sui.io/standards/kiosk-apps#the-uid_mut_as_owner-function "Direct link to The uid_mut_as_owner function") Kiosk can carry additional dynamic fields and dynamic object fields. The `uid_mut_as_owner` function allows the Kiosk owner to mutably access the UID of the Kiosk object and use it to add or remove custom fields. Function signature: `kiosk::uid_mut_as_owner(self: &mut Kiosk, cap: &KioskOwnerCap): &mut UID` ### The public uid getter[​](https://docs.sui.io/standards/kiosk-apps#the-public-uid-getter "Direct link to The public uid getter") Anyone can read the `uid` of kiosks. This allows third party modules to read the fields of the kiosk if they're allowed to do so. Therefore enabling the object capability and other patterns. ### Basic app ideas[​](https://docs.sui.io/standards/kiosk-apps#basic-app-ideas "Direct link to Basic app ideas") You can attach custom dynamic fields to your kiosks that anyone can then read (but only you can modify), you can use this to implement basic apps. For example, a Kiosk Name app where you as the kiosk owner can set a name for the kiosk, attach it as a dynamic field, and make it readable by anyone. module examples::kiosk_name_ext;use std::string::String;use sui::dynamic_field as df;use sui::kiosk::{Self, Kiosk, KioskOwnerCap};/// The dynamic field key for the Kiosk Name Extensionstruct KioskName has copy, store, drop {}/// Add a name to the Kiosk (in this implementation can be called only once)public fun add(self: &mut Kiosk, cap: &KioskOwnerCap, name: String) { let uid_mut = self.uid_mut_as_owner(cap); df::add(uid_mut, KioskName {}, name)}/// Try to read the name of the Kiosk - if set - return Some(String), if not - Nonepublic fun name(self: &Kiosk): Option { if (df::exists_(self.uid(), KioskName {})) { option::some(*df::borrow(self.uid(), KioskName {})) } else { option::none() }} Permissioned apps using the Kiosk Apps API[​](https://docs.sui.io/standards/kiosk-apps#permissioned-apps "Direct link to permissioned-apps") --------------------------------------------------------------------------------------------------------------------------------------------- Permissioned apps use the Kiosk Apps API to perform actions in the kiosk. They usually imply interaction with a third party and provide guarantees for the storage access (preventing malicious actions from the seller). Just having access to the `uid` is often not enough to build an app due to the security limitations. Only the owner of a kiosk has full access to the `uid`, which means that an app involving a third party would require involvement from the kiosk owner in every step of the process. In addition to limited and constrained access to storage, app permissions are also owner dependent. In the default setup, no party can place or lock items in a kiosk without its owner's consent. As a result, some cases such as collection bidding (offering X SUI for any item in a collection) requires the kiosk owner to approve the bid. kiosk\_extension module[​](https://docs.sui.io/standards/kiosk-apps#kiosk_extension-module "Direct link to kiosk_extension-module") ------------------------------------------------------------------------------------------------------------------------------------ The `kiosk_extension` module addresses concerns over owner bottlenecks and provides more guarantees for storage access. The module provides a set of functions that enable you to perform certain actions in the kiosk without the kiosk owner's involvement and have a guarantee that the storage of the app is not tampered with. module example::my_extension;use sui::kiosk_extension;// ... App lifecycle[​](https://docs.sui.io/standards/kiosk-apps#app-lifecycle "Direct link to App lifecycle") -------------------------------------------------------------------------------------------------------- These are the key points in the lifecycle of a Sui Kiosk app: * You can only install an app with an explicit call in the `kiosk_extension` module. * A kiosk owner can revoke permissions of an app at any time by calling the `disable` function. * A kiosk owner can re-enable a disabled app at any time by calling the `enable` function. * You can only remove apps if the app storage is empty (all items are removed). Adding an app[​](https://docs.sui.io/standards/kiosk-apps#adding-an-app "Direct link to Adding an app") -------------------------------------------------------------------------------------------------------- For the app to function, the kiosk owner first needs to install it. To achieve that, an app needs to implement the `add` function that the kiosk owner calls to request all necessary permissions. ### Implementing add function[​](https://docs.sui.io/standards/kiosk-apps#implementing-add-function "Direct link to Implementing add function") The signature of the `kiosk_extension::add` function requires the app witness, making it impossible to install an app without an explicit implementation. The following example shows how to implement the `add` function for an app that requires the `place` permission: module examples::letterbox_ext;use sui::kiosk_extension;// ... dependencies/// The expected set of permissions for extension. It requires `place`.const PERMISSIONS: u128 = 1;/// The Witness struct used to identify and authorize the extension.struct Extension has drop {}/// Install the Mallbox extension into the Kiosk.public fun add(kiosk: &mut Kiosk, cap: &KioskOwnerCap, ctx: &mut TxContext) { kiosk_extension::add(Extension {}, kiosk, cap, PERMISSIONS, ctx)} App permissions[​](https://docs.sui.io/standards/kiosk-apps#app-permissions "Direct link to App permissions") -------------------------------------------------------------------------------------------------------------- Apps can request permissions from the kiosk owner on installation. Permissions follow the all or nothing principle. If the kiosk owner adds an app, it gets all of the requested permissions; if the kiosk owner then disables an app, it loses all of its permissions. ### Structure[​](https://docs.sui.io/standards/kiosk-apps#structure "Direct link to Structure") Permissions are represented as a `u128` integer storing a bitmap. Each of the bits corresponds to a permission, the first bit is the least significant bit. The following table lists all permissions and their corresponding bit: | Bit | Decimal | Permission | | --- | --- | --- | | 0000 | 0 | No permissions | | 0001 | 1 | App can place | | 0010 | 2 | App can place and lock | | 0011 | 3 | App can place and lock | info Currently, Sui Kiosk has only two permissions: `place` (first bit) and `lock` and `place` (second bit). The remaining bits are reserved for future use. ### Using permissions in the add function[​](https://docs.sui.io/standards/kiosk-apps#using-permissions-in-the-add-function "Direct link to Using permissions in the add function") It's considered good practice to define a constant containing permissions of the app: module examples::letterbox_ext;// ... dependencies/// The expected set of permissions for the app. It requires `place`.const PERMISSIONS: u128 = 1;/// The witness struct used to identify and authorize the app.struct Extension has drop {}/// Install the Mallbox app into the kiosk and request `place` permission.public fun add(kiosk: &mut Kiosk, cap: &KioskOwnerCap, ctx: &mut TxContext) { kiosk_extension::add(Extension {}, kiosk, cap, PERMISSIONS, ctx)} ### Accessing protected functions[​](https://docs.sui.io/standards/kiosk-apps#accessing-protected-functions "Direct link to Accessing protected functions") If an app requests and is granted permissions (and isn't disabled), it can access protected functions. The following example shows how to access the `place` function: module examples::letterbox_ext;// .../// Emitted when trying to place an item without permissions.const ENotEnoughPermissions: u64 = 1;/// Place a letter into the kiosk without the `KioskOwnerCap`.public fun place(kiosk: &mut Kiosk, letter: Letter, policy: &TransferPolicy) { assert!(kiosk_extension::can_place(kiosk), ENotEnoughPermissions) kiosk_extension::place(Extension {}, kiosk, letter, policy)} Currently, two functions are available: * `place(Ext, &mut Kiosk, T, &TransferPolicy)` - similar to place * `lock(Ext, &mut Kiosk, T, &TransferPolicy)` - similar to lock ### Checking permissions[​](https://docs.sui.io/standards/kiosk-apps#checking-permissions "Direct link to Checking permissions") Use the `can_place(kiosk: &Kiosk): bool` function to check if the app has the `place` permission. Similarly, you can use the `can_lock(kiosk: &Kiosk): bool` function to check if the app has the `lock` permission. Both functions make sure that the app is enabled, so you don't need to explicitly check for that. App storage[​](https://docs.sui.io/standards/kiosk-apps#app-storage "Direct link to App storage") -------------------------------------------------------------------------------------------------- Every app gets its isolated storage as a bag type that only the app module can access (providing the app witness). See [The Move Book](https://move-book.com/programmability/dynamic-collections.html) to learn more about dynamic collections, like bags, available in Move. After you install an app, it can use the storage to store its data. Ideally, the storage should be managed in a way that allows the app to be removed from the kiosk if there are no active trades or other activities happening at the moment. The storage is always available to the app if it is installed. The owner of a kiosk can't access the storage of the app if the logic for it is not implemented. ### Accessing the storage[​](https://docs.sui.io/standards/kiosk-apps#accessing-the-storage "Direct link to Accessing the storage") An installed app can access the storage mutably or immutably using one of the following functions: * `storage(_ext: Extension {}, kiosk: &Kiosk): Bag`: returns a reference to the storage of the app. Use the function to read the storage. * `storage_mut(_ext: Extension {}, kiosk: &mut Kiosk): &mut Bag`: returns a mutable reference to the storage of the app. Use the function to read and write to the storage. Disabling and removing[​](https://docs.sui.io/standards/kiosk-apps#disabling-and-removing "Direct link to Disabling and removing") ----------------------------------------------------------------------------------------------------------------------------------- The kiosk owner can disable any app at any time. Doing so revokes all permissions of the app and prevents it from performing any actions in the kiosk. The kiosk owner can also re-enable the app at any time. Disabling an app does not remove it from the kiosk. An installed app has access to its storage until completely removed from the kiosk. ### Disabling an app[​](https://docs.sui.io/standards/kiosk-apps#disabling-an-app "Direct link to Disabling an app") Use the `disable(kiosk: &mut Kiosk, cap: &KioskOwnerCap)` function to disable an app. It revokes all permissions of the app and prevents it from performing any protected actions in the kiosk. **Example PTB** let txb = new TransactionBuilder();let kioskArg = tx.object('');let capArg = tx.object('');txb.moveCall({ target: '0x2::kiosk_extension::disable', arguments: [ kioskArg, capArg ], typeArguments: '::letterbox_ext::Extension'}); ### Removing an app[​](https://docs.sui.io/standards/kiosk-apps#removing-an-app "Direct link to Removing an app") You can remove an app only if the storage is empty. Use the `remove(kiosk: &mut Kiosk, cap: &KioskOwnerCap)` function to facilitate removal. The function removes the app, unpacks the app storage and configuration and rebates the storage cost to the kiosk owner. Only the kiosk owner can perform this action. The call fails if the storage is not empty. **Example PTB** let txb = new TransactionBuilder();let kioskArg = tx.object('');let capArg = tx.object('');txb.moveCall({ target: '0x2::kiosk_extension::remove', arguments: [ kioskArg, capArg ], typeArguments: '::letterbox_ext::Extension'}); Related links[​](https://docs.sui.io/standards/kiosk-apps#related-links "Direct link to Related links") -------------------------------------------------------------------------------------------------------- • [NFT Rental Example](https://docs.sui.io/guides/developer/nft/nft-rental) An example using the Kiosk Apps standard that provides the ability for users to rent NFTs according to the rules of a provided policy instead of outright owning them. This approach closely aligns with the ERC-4907 renting standard, making it a suitable choice for Solidity-based use cases intended for implementation on Sui. • [NFT Rental repository](https://github.com/MystenLabs/sui/tree/main/examples/move/nft-rental) GitHub repo that contains the source code for the NFT Rental app. * [Basic apps](https://docs.sui.io/standards/kiosk-apps#basic-apps) * [UID access via the uid\_mut](https://docs.sui.io/standards/kiosk-apps#uid-access-via-the-uid_mut) * [The uid\_mut\_as\_owner function](https://docs.sui.io/standards/kiosk-apps#the-uid_mut_as_owner-function) * [The public uid getter](https://docs.sui.io/standards/kiosk-apps#the-public-uid-getter) * [Basic app ideas](https://docs.sui.io/standards/kiosk-apps#basic-app-ideas) * [Permissioned apps using the Kiosk Apps API](https://docs.sui.io/standards/kiosk-apps#permissioned-apps) * [kiosk\_extension module](https://docs.sui.io/standards/kiosk-apps#kiosk_extension-module) * [App lifecycle](https://docs.sui.io/standards/kiosk-apps#app-lifecycle) * [Adding an app](https://docs.sui.io/standards/kiosk-apps#adding-an-app) * [Implementing add function](https://docs.sui.io/standards/kiosk-apps#implementing-add-function) * [App permissions](https://docs.sui.io/standards/kiosk-apps#app-permissions) * [Structure](https://docs.sui.io/standards/kiosk-apps#structure) * [Using permissions in the add function](https://docs.sui.io/standards/kiosk-apps#using-permissions-in-the-add-function) * [Accessing protected functions](https://docs.sui.io/standards/kiosk-apps#accessing-protected-functions) * [Checking permissions](https://docs.sui.io/standards/kiosk-apps#checking-permissions) * [App storage](https://docs.sui.io/standards/kiosk-apps#app-storage) * [Accessing the storage](https://docs.sui.io/standards/kiosk-apps#accessing-the-storage) * [Disabling and removing](https://docs.sui.io/standards/kiosk-apps#disabling-and-removing) * [Disabling an app](https://docs.sui.io/standards/kiosk-apps#disabling-an-app) * [Removing an app](https://docs.sui.io/standards/kiosk-apps#removing-an-app) * [Related links](https://docs.sui.io/standards/kiosk-apps#related-links) --- # Wallet Standard | Sui Documentation [Skip to main content](https://docs.sui.io/standards/wallet-standard#__docusaurus_skipToContent_fallback) On this page Browser extension wallets built for Sui use the [Wallet Standard](https://github.com/wallet-standard/wallet-standard/) . This is a cross-chain standard that defines how apps can automatically discover and interact with wallets. If you are building a wallet, the helper library `@mysten/wallet-standard` provides types and utilities to help get started. Working with wallets[​](https://docs.sui.io/standards/wallet-standard#working-with-wallets "Direct link to Working with wallets") ---------------------------------------------------------------------------------------------------------------------------------- The Wallet Standard includes features to help build wallets. ### Creating a wallet interface[​](https://docs.sui.io/standards/wallet-standard#creating-a-wallet-interface "Direct link to Creating a wallet interface") Create a class that represents your wallet. Use the `Wallet` interface from `@mysten/wallet-standard` to help ensure your class adheres to the standard. import { SUI_DEVNET_CHAIN, Wallet } from '@mysten/wallet-standard';class YourWallet implements Wallet { get version() { // Return the version of the Wallet Standard this implements (in this case, 1.0.0). return '1.0.0'; } get name() { return 'Wallet Name'; } get icon() { return 'some-icon-data-url'; } // Return the Sui chains that your wallet supports. get chains() { return [SUI_DEVNET_CHAIN]; }} ### Implementing features[​](https://docs.sui.io/standards/wallet-standard#implementing-features "Direct link to Implementing features") Features are standard methods consumers can use to interact with a wallet. Wallets should implement the following features: **Core features** * `standard:connect` - Use to prompt the wallet for account authorization. * `standard:events` - Use to listen for changes that happen within the wallet, such as accounts being added or removed. **Transaction features** Libraries built on top of the Wallet Standard (like dApp Kit) require transaction signing capabilities. Implement both current and legacy methods for maximum compatibility: Current methods: * `sui:signTransaction` - Use to prompt the user to sign a transaction and return the serialized transaction and signature back to the app. This method does not submit the transaction for execution. * `sui:signAndExecuteTransaction` - Use to prompt the user to sign a transaction, then submit it for execution to the blockchain. Legacy methods: * `sui:signTransactionBlock` - The legacy version of `sui:signTransaction`. Many existing apps still rely on this method. * `sui:signAndExecuteTransactionBlock` - The legacy version of `sui:signAndExecuteTransaction`. Many existing apps still rely on this method. **Personal message signing** * `sui:signPersonalMessage` - Use to prompt the user to sign a personal message and return the message signature back to the app. This is essential for user verification flows used by many apps. Implement these features in your wallet class under the `features` property: import { StandardConnectFeature, StandardConnectMethod, StandardEventsFeature, StandardEventsOnMethod, SuiFeatures, SuiSignPersonalMessageMethod, SuiSignTransactionMethod, SuiSignAndExecuteTransactionMethod, StandardConnect, StandardEvents, SuiSignPersonalMessage, SuiSignTransaction, SuiSignAndExecuteTransaction} from "@mysten/wallet-standard";class YourWallet implements Wallet { /* ... existing code from above ... */ get features(): ConnectFeature & EventsFeature & SuiFeatures { return { [StandardConnect]: { version: "1.0.0", connect: this.#connect, }, [StandardEvents]: { version: "1.0.0", on: this.#on, }, [SuiSignPersonalMessage]: { version: "1.1.0", signPersonalMessage: this.#signPersonalMessage, }, [SuiSignTransaction]: { version: "2.0.0", signTransaction: this.#signTransaction, }, [SuiSignAndExecuteTransaction]: { version: "2.0.0", signAndExecuteTransaction: this.#signAndExecuteTransaction, }, }; }; #on: EventsOnMethod = () => { // Your wallet's events on implementation }; #connect: ConnectMethod = () => { // Your wallet's connect implementation }; #signPersonalMessage: SuiSignPersonalMessageMethod = () => { // Your wallet's signPersonalMessage implementation }; #signTransaction: SuiSignTransactionMethod = () => { // Your wallet's signTransaction implementation }; #signAndExecuteTransaction: SuiSignAndExecuteTransactionMethod = () => { // Your wallet's signAndExecuteTransaction implementation };} ### Exposing accounts[​](https://docs.sui.io/standards/wallet-standard#exposing-accounts "Direct link to Exposing accounts") The last requirement of the wallet interface is to expose an `accounts` interface. Wallets that comply with the Wallet Standard should automatically populate this array with any previously authorized accounts when the wallet loads. This means: * On first visit: The array will be empty until the user authorizes accounts through `standard:connect` * On subsequent visits: Previously authorized accounts automatically appear without any app action * After revocation: Accounts that have been revoked won't appear in the array The accounts use the `ReadonlyWalletAccount` class to construct an account matching the required interface. import { ReadonlyWalletAccount } from '@mysten/wallet-standard';class YourWallet implements Wallet { get accounts() { // Assuming we already have some internal representation of accounts: return someWalletAccounts.map( (walletAccount) => new ReadonlyWalletAccount({ address: walletAccount.suiAddress, publicKey: walletAccount.pubkey, // The Sui chains that this account supports. This can be a subset of the wallet's supported chains. // These chains must exist on the wallet as well. chains: [SUI_DEVNET_CHAIN], // The features that this account supports. This can be a subset of the wallet's supported features. // These features must exist on the wallet as well. features: [ SuiSignPersonalMessage, SuiSignTransaction, SuiSignAndExecuteTransaction, ], }), ); }} ### Registering in the window[​](https://docs.sui.io/standards/wallet-standard#registering-in-the-window "Direct link to Registering in the window") After you have a compatible interface for your wallet, use the `registerWallet` function to register it. import { registerWallet } from '@mysten/wallet-standard';registerWallet(new YourWallet()); Managing wallets[​](https://docs.sui.io/standards/wallet-standard#managing-wallets "Direct link to Managing wallets") ---------------------------------------------------------------------------------------------------------------------- The Wallet Standard includes features to help your apps interact with wallets. ### Wallet data[​](https://docs.sui.io/standards/wallet-standard#wallet-data "Direct link to Wallet data") To query the installed wallets in a user's browser, use the `get` function of `getWallets`. import { getWallets } from '@mysten/wallet-standard';const availableWallets = getWallets().get(); The return from this call (`availableWallets` in the previous code) is an array of `Wallet` types. Use the `Wallet.icon` and `Wallet.name` attributes to display the wallet details on your web page. The `Wallet.accounts` is an array of `WalletAccount`s. Each `WalletAccount` type has `address` and `publicKey` properties, which are most useful during development. This data fills and caches after account authorization. ### Features[​](https://docs.sui.io/standards/wallet-standard#features "Direct link to Features") Both the `Wallet` type and the `WalletAccount` type have a property called `features`. The main wallet functionality is found here. The mandatory features that wallets must implement are listed in the previous code. Many wallets choose to omit some non-mandatory features or add some custom features, so be sure to check the relevant wallet documentation if you intend to integrate a specific wallet. ### Authorizing wallet accounts[​](https://docs.sui.io/standards/wallet-standard#authorizing-wallet-accounts "Direct link to Authorizing wallet accounts") The Wallet Standard uses a persistent authorization model. Despite the "connect" terminology in the API, wallets should automatically restore previously authorized accounts when they load, without any action from the app. The `connect()` method is specifically for prompting users to authorize accounts when needed. **How account authorization works:** 1. **Wallets restore accounts automatically**: When a wallet loads, it should automatically populate its `accounts` array with any previously authorized accounts for the current app. This happens without any app interaction. 2. **Only prompt when necessary**: Call `connect()` only when: * The `accounts` array is empty (first-time user or all accounts were revoked) * The current accounts don't meet your requirements (e.g., you need an account on a specific chain) * The user explicitly wants to authorize more accounts await wallet.features['standard:connect'].connect(); info The `connect()` method has a `silent` parameter that is intended to retrieve previously authorized accounts without user interaction, but this parameter is planned for deprecation in future versions of the Wallet Standard. Wallets should instead automatically populate the `accounts` array on load. When you do call `connect()`, the wallet will open a pop-up for the user to select and authorize which accounts the app can access. ### Revoking account authorization[​](https://docs.sui.io/standards/wallet-standard#revoking-account-authorization "Direct link to Revoking account authorization") Similar to the connect (account authorization) feature, the Wallet Standard also includes `standard:disconnect` to revoke an app's access to wallet accounts. The following example calls this feature: wallet.features['standard:disconnect'].disconnect(); ### Transactions - suggested approach[​](https://docs.sui.io/standards/wallet-standard#transactions---suggested-approach "Direct link to Transactions - suggested approach") Once the user has authorized accounts from a wallet, your app has the necessary information to execute transactions, such as address and method. Construct the transaction separately with the `@mysten/sui` library and then sign it with the private key of the user. Use the `sui:signTransaction` feature to achieve this: wallet.features['sui:signTransaction'].signTransaction({ transaction: , account: }) Similar to account authorization, this process opens a pop-up dialog for the user to either accept or decline the transaction. Upon accepting, the function returns an object in the form `{bytes: String, signature: Uint8Array}`. The `bytes` value is the `b64` encoding of the transaction and the `signature` value is the transaction signature. To execute the transaction, use a Sui client such as `SuiGrpcClient` from `@mysten/sui/grpc`: import { fromBase64 } from '@mysten/sui/utils';import { SuiGrpcClient } from '@mysten/sui/grpc';const client = new SuiGrpcClient({ network: 'mainnet', baseUrl: 'https://fullnode.mainnet.sui.io:443',});client.core.executeTransaction({ transaction: fromBase64(bytes), signatures: [signature],}); ### Transactions - abbreviated approach[​](https://docs.sui.io/standards/wallet-standard#transactions---abbreviated-approach "Direct link to Transactions - abbreviated approach") Many wallets abstract the above flow into one feature: `sui:signAndExecuteTransaction`. The required arguments for this feature are the raw transaction and the options with the desired information to be included in the response: * `showEffects`: Include the transaction effects. * `showEvents`: Include the transaction events. * `showObjectChanges`: Include all the objects that were deleted, created, or mutated. * `showBalanceChanges`: Include any coin transfer that took place. * `showInput`: Include the transaction's input. * `showRawInput`: Same as `showInput` but the format is raw. ### Events wallets emit[​](https://docs.sui.io/standards/wallet-standard#events-wallets-emit "Direct link to Events wallets emit") The wallet emits events on certain user actions that apps can listen to. These events allow your app to be responsive to user actions on their wallets. The Wallet Standard only defines the change event that can apply to chains, features, or accounts. * `chains`: A change event on the chains means the user switched the wallet's active network, such as from Devnet to Testnet. * `features`: The user added or removed permission for your app to access certain wallet features. * `accounts`: The user added or removed an account (address) to interact with your app. To subscribe your apps to events with the following call: const unsubscribe = wallet.features['standard:events'].on('change', callback); This call returns a function that can be called to unsubscribe from listening to the events. The callback is the handler that contains the logic to perform when the event fires. The input to the callback function is an object with the following type: { accounts: WalletAccount[], chains: IdentifierArray, features: IdentifierRecord} These values are all arrays containing the new or changed items. Consequently, every event populates only one array in most cases, the rest are empty. ### Implementation example[​](https://docs.sui.io/standards/wallet-standard#implementation-example "Direct link to Implementation example") Mysten Labs offers a bare bones scaffold for React-based applications called `@mysten/dapp-kit-react`. See the [dApp Kit documentation](https://sdk.mystenlabs.com/dapp-kit) for more information. * [Working with wallets](https://docs.sui.io/standards/wallet-standard#working-with-wallets) * [Creating a wallet interface](https://docs.sui.io/standards/wallet-standard#creating-a-wallet-interface) * [Implementing features](https://docs.sui.io/standards/wallet-standard#implementing-features) * [Exposing accounts](https://docs.sui.io/standards/wallet-standard#exposing-accounts) * [Registering in the window](https://docs.sui.io/standards/wallet-standard#registering-in-the-window) * [Managing wallets](https://docs.sui.io/standards/wallet-standard#managing-wallets) * [Wallet data](https://docs.sui.io/standards/wallet-standard#wallet-data) * [Features](https://docs.sui.io/standards/wallet-standard#features) * [Authorizing wallet accounts](https://docs.sui.io/standards/wallet-standard#authorizing-wallet-accounts) * [Revoking account authorization](https://docs.sui.io/standards/wallet-standard#revoking-account-authorization) * [Transactions - suggested approach](https://docs.sui.io/standards/wallet-standard#transactions---suggested-approach) * [Transactions - abbreviated approach](https://docs.sui.io/standards/wallet-standard#transactions---abbreviated-approach) * [Events wallets emit](https://docs.sui.io/standards/wallet-standard#events-wallets-emit) * [Implementation example](https://docs.sui.io/standards/wallet-standard#implementation-example) --- # Sui Object Display | Sui Documentation [Skip to main content](https://docs.sui.io/standards/display#__docusaurus_skipToContent_fallback) On this page The Sui Object Display standard is a template engine that enables on-chain management of off-chain representation (display) for a type. With it, you can substitute data for an object into a template string. The standard doesn’t limit the fields you can set. You can use the `{property}` syntax to access all object properties, and then insert them as a part of the template string. Use a `Publisher` object that you own to set `sui::display` for a type. For more information about `Publisher` objects, see [Publisher](https://examples.sui.io/basics/publisher.html) topic in _Sui Move by Example_. In Sui Move, `Display` represents an object that specifies a set of named templates for the type `T`. For example, for a type `0x2::capy::Capy` the display syntax is: `Display<0x2::capy::Capy>`. Sui Full nodes process all objects of the type `T` by matching the `Display` definition, and return the processed result when you query an object with the `{ showDisplay: true }` setting in the query. Display properties[​](https://docs.sui.io/standards/display#display-properties "Direct link to Display properties") -------------------------------------------------------------------------------------------------------------------- The basic set of properties suggested includes: * `name`: A name for the object. The name is displayed when users view the object. * `description`: A description for the object. The description is displayed when users view the object. * `link`: A link to the object to use in an application. * `image_url`: A URL or a blob with the image for the object. * `thumbnail_url`: A URL to a **smaller** image to use in wallets, explorers, and other products as a preview. * `project_url`: A link to a website associated with the object or creator. * `creator`: A string that indicates the object creator. ### Example: Sui Hero module[​](https://docs.sui.io/standards/display#example-sui-hero-module "Direct link to example-sui-hero-module") The following code sample demonstrates how the `Display` for an example `Hero` module varies based on the `name`, `id`, and `image_url` properties of the type `Hero`. The following represents the template the `init` function defines: { "name": "{name}", "link": "https://sui-heroes.io/hero/{id}", "image_url": "https://sui-heroes.io/hero/{image_url}", "description": "A true Hero of the Sui ecosystem!", "project_url": "https://sui-heroes.io", "creator": "Unknown Sui Fan"} /// Example of an unlimited "Sui Hero" collection - anyone can/// mint their Hero. Shows how to initialize the `Publisher` and how/// to use it to get the `Display` object - a way to describe a/// type for the ecosystem.module examples::my_hero;use std::string::String;// The creator bundle: these two packages often go together.use sui::package;use sui::display;/// The Hero - an outstanding collection of digital art.public struct Hero has key, store { id: UID, name: String, image_url: String,}/// One-Time-Witness for the module.public struct MY_HERO has drop {}/// Claim the `Publisher` object in the module initializer /// to then create a `Display`. The `Display` is initialized with/// a set of fields (but can be modified later) and published via/// the `update_version` call.////// Keys and values are set in the initializer but could also be/// set after publishing if a `Publisher` object was created.fun init(otw: MY_HERO, ctx: &mut TxContext) { let keys = vector[ b"name".to_string(), b"link".to_string(), b"image_url".to_string(), b"description".to_string(), b"project_url".to_string(), b"creator".to_string(), ]; let values = vector[ // For `name` one can use the `Hero.name` property b"{name}".to_string(), // For `link` one can build a URL using an `id` property b"https://sui-heroes.io/hero/{id}".to_string(), // For `image_url` use an IPFS template + `image_url` property. b"ipfs://{image_url}".to_string(), // Description is static for all `Hero` objects. b"A true Hero of the Sui ecosystem!".to_string(), // Project URL is usually static b"https://sui-heroes.io".to_string(), // Creator field can be any b"Unknown Sui Fan".to_string(), ]; // Claim the `Publisher` for the package! let publisher = package::claim(otw, ctx); // Get a new `Display` object for the `Hero` type. let mut display = display::new_with_fields( &publisher, keys, values, ctx ); // Commit first version of `Display` to apply changes. display.update_version(); transfer::public_transfer(publisher, ctx.sender()); transfer::public_transfer(display, ctx.sender());}/// Anyone can mint their `Hero`!public fun mint(name: String, image_url: String, ctx: &mut TxContext): Hero { Hero { id: object::new(ctx), name, image_url }} Work with Object Display[​](https://docs.sui.io/standards/display#work-with-object-display "Direct link to work-with-object-display") -------------------------------------------------------------------------------------------------------------------------------------- The `display::new` call creates a `Display`, either in a custom function or module initializer, or as part of a programmable transaction. The following code sample demonstrates how to create a `Display`: module sui::display;/// Get a new Display object for the `T`./// Publisher must be the publisher of the T, `from_package`/// check is performed.public fun new(pub: &Publisher): Display { /* ... */ } After you create the `Display`, you can modify it. The following code sample demonstrates how to modify a `Display`: module sui::display;/// Sets multiple fields at oncepublic fun add_multiple( self: &mut Display, keys: vector, values: vector) { /* ... */ }/// Edit a single fieldpublic fun edit(self: &mut Display, key: String, value: String) { /* ... */ }/// Remove a key from Displaypublic fun remove(self: &mut Display, key: String ) { /* ... */ } Next, the `update_version` call applies the changes and sets the `Display` for the `T` by emitting an event. Full nodes receive the event and use the data in the event to retrieve a template for the type. The following code sample demonstrates how to use the `update_version` call: module sui::display;/// Update the version of Display and emit an eventpublic fun update_version(self: &mut Display) { /* ... */ } Sui utility objects[​](https://docs.sui.io/standards/display#sui-utility-objects "Direct link to Sui utility objects") ----------------------------------------------------------------------------------------------------------------------- In Sui, utility objects enable authorization for capabilities. Almost all modules have features that can be accessed only with the required capability. Generic modules allow one capability per application, such as a marketplace. Some capabilities mark ownership of a shared object on-chain, or access the shared data from another account. With capabilities, it is important to provide a meaningful description of objects to facilitate user interface implementation. This helps avoid accidentally transferring the wrong object when objects are similar. It also provides a user-friendly description of items that users see. The following example demonstrates how to create a capy capability: module capy::utility;/// A capability which grants Capy Manager permission to add/// new genes and manage the Capy Marketpublic struct CapyManagerCap has key, store { id: UID } Typical objects with data duplication[​](https://docs.sui.io/standards/display#typical-objects-with-data-duplication "Direct link to Typical objects with data duplication") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- A common case with in-game items is to have a large number of similar objects grouped by some criteria. It is important to optimize their size and the cost to mint and update them. Typically, a game uses a single source image or URL per group or item criteria. Storing the source image inside of every object is not optimal. In some cases, users mint in-game items when a game allows them or when they purchase an in-game item. To enable this, some IPFS/Arweave metadata must be created and stored in advance. This requires additional logic that is usually not related to the in-game properties of the item. The following example demonstrates how to create a Capy: module capy::capy_items;use std::string::String;/// A wearable Capy item. For some items there can be an/// unlimited supply. And items with the same name are identical.public struct CapyItem has key, store { id: UID, name: String} Unique objects with dynamic representation[​](https://docs.sui.io/standards/display#unique-objects-with-dynamic-representation "Direct link to Unique objects with dynamic representation") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sui Capys use dynamic image generation. When a Capy is born, its attributes determine the Capy’s appearance, such as color or pattern. When a user puts an item on a Capy, the Capy’s appearance changes. When users put multiple items on a Capy, there’s a chance of a bonus for a combination of items. To implement this, the Capys game API service refreshes the image in response to a user-initiated change. The URL for a Capy is a template with the `capy.id`. But storing the full URL - as well as other fields in the Capy object due to their diverse population - also leads to users paying for excess storage and increased gas fees. The following example demonstrates how to implement dynamic image generation: module capy::capy;/// A Capy - very diverse object with different combination/// of genes. Created dynamically + for images a dynamic SVG/// generation is used.public struct Capy has key, store { id: UID, genes: vector} Objects with unique static content[​](https://docs.sui.io/standards/display#objects-with-unique-static-content "Direct link to Objects with unique static content") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is the simplest scenario - an object represents everything itself. It is very easy to apply a metadata standard to an object of this kind, especially if the object stays immutable forever. However, if the metadata standard evolves and some ecosystem projects add new features for some properties, this object always stays in its original form and might require backward-compatible changes. module sui::devnet_nft;use std::string::String;/// A Collectible with a static data. URL, name, description are/// set only once on a mint eventpublic struct DevNetNFT has key, store { id: UID, name: String, description: String, url: String,} * [Display properties](https://docs.sui.io/standards/display#display-properties) * [Example: Sui Hero module](https://docs.sui.io/standards/display#example-sui-hero-module) * [Work with Object Display](https://docs.sui.io/standards/display#work-with-object-display) * [Sui utility objects](https://docs.sui.io/standards/display#sui-utility-objects) * [Typical objects with data duplication](https://docs.sui.io/standards/display#typical-objects-with-data-duplication) * [Unique objects with dynamic representation](https://docs.sui.io/standards/display#unique-objects-with-dynamic-representation) * [Objects with unique static content](https://docs.sui.io/standards/display#objects-with-unique-static-content) --- # Payment Kit Standard | Sui Documentation [Skip to main content](https://docs.sui.io/standards/payment-kit#__docusaurus_skipToContent_fallback) On this page The Sui Payment Kit is a framework for secure, flexible payment processing on Sui. It provides persistent and ephemeral payment options, event-driven architecture, and built-in duplicate prevention. The Payment Kit standardizes payment processing on Sui, enabling developers to build robust payment flows without reimplementing common payment verification and receipt management logic. Applications using the Payment Kit benefit from battle-tested security patterns and consistent payment handling across the ecosystem. Key features[​](https://docs.sui.io/standards/payment-kit#key-features "Direct link to Key features") ------------------------------------------------------------------------------------------------------ The Payment Kit provides the following core capabilities: * **Secure payment processing**: Validates payment amounts and transfers coins safely. * **Payment registries**: Optional persistent storage for payment receipts with duplicate detection. * **Flexible receipt management**: Generates receipts for payment tracking and verification. * **Event-driven architecture**: Emits events for off-chain tracking and integration. * **Multi-coin support**: Works with any Sui coin type. * **Transaction URIs**: Standardized URI format in order to create encoded links for user friendly payment flows. Architecture components[​](https://docs.sui.io/standards/payment-kit#architecture-components "Direct link to Architecture components") --------------------------------------------------------------------------------------------------------------------------------------- The Payment Kit consists of the following main components: ### Payment processing core[​](https://docs.sui.io/standards/payment-kit#payment-processing-core "Direct link to Payment processing core") Handles coin transfers, payment validation, and receipt generation. The core validates that: * Payment amounts match expected values * Coins have sufficient balance * Transfers complete successfully * Receipts contain accurate payment information ### Registry system[​](https://docs.sui.io/standards/payment-kit#registry-system "Direct link to Registry system") Optional persistent storage that tracks payment history and prevents duplicate payments. Registries provide: * Payment record storage with composite keys * Configurable expiration policies for payment records * Withdrawal capabilities for accumulated funds * Administrative controls via capabilities Core concepts[​](https://docs.sui.io/standards/payment-kit#core-concepts "Direct link to Core concepts") --------------------------------------------------------------------------------------------------------- ### Payment modes[​](https://docs.sui.io/standards/payment-kit#payment-modes "Direct link to Payment modes") The Payment Kit supports two payment processing modes: **1\. Registry payments**: Process payments through a `PaymentRegistry` with duplicate prevention and persistent receipts. Use this mode when: * You need to prevent duplicate payments * Payment history must be tracked * Compliance or auditing requires payment records * Funds should accumulate in a managed registry **2\. Ephemeral payments**: Process one-time payments without persistent storage. Use this mode when: * Duplicate prevention is not enforced ### Duplicate prevention[​](https://docs.sui.io/standards/payment-kit#duplicate-prevention "Direct link to Duplicate prevention") Duplicate prevention is enforced when processing payments via a `PaymentRegistry`. The system uses a composite `PaymentKey` derived from: * **Nonce**: Unique identifier for each payment `(UUIDv4)`. * **Amount**: Payment value in coin units. * **Coin type**: The specific coin type. * **Receiver address**: Destination address for the payment. This composite key ensures that the same payment cannot be processed twice, even if individual components (like amount or receiver) are reused across different payments. ### Payment receipts[​](https://docs.sui.io/standards/payment-kit#payment-receipts "Direct link to Payment receipts") Every processed payment generates a `PaymentReceipt` object containing: * Payment nonce for reference * Amount paid * Coin type used * Receiver address * Timestamp of payment * Registry information (for registry payments; not applicable to ephemeral payments) Receipts serve as proof of payment and can be used for off-chain verification, accounting, or integration with other systems. ### Payment records[​](https://docs.sui.io/standards/payment-kit#payment-records "Direct link to Payment records") When payments are processed through a `PaymentRegistry`, the system creates and stores `PaymentRecord` objects internally to track payment history and enable duplicate prevention. Payment records differ from payment receipts in key ways: **PaymentRecords vs PaymentReceipts:** * **`PaymentRecords`**: Internal registry storage structures that persist payment metadata for duplicate detection. These are stored within the registry's internal tables and are not directly accessible as objects. * **`PaymentReceipts`**: User-facing objects returned after payment processing that serve as proof of payment. These can be stored, transferred, or used for off-chain verification. **`PaymentRecord` lifecycle:** 1. **Creation**: When `process_registry_payment` is called, a `PaymentRecord` is created and stored in the registry using the composite `PaymentKey`. 2. **Storage**: Records persist in the registry's internal table, indexed by their unique payment key. 3. **Expiration**: Records become eligible for deletion after the registry's configured `epoch_expiration_duration` has passed. 4. **Deletion**: Expired records can be removed using `delete_payment_record` to reclaim storage and reduce gas costs. **`PaymentRecord` expiration:** A `PaymentRecord` include an expiration epoch calculated at the time of payment creation. This expiration mechanism: * Prevents indefinite storage growth in registries * Allows for eventual cleanup of historical payment data * Balances duplicate prevention needs with storage efficiency * Can be configured per-registry via `set_config_epoch_expiration_duration` A `PaymentRecord` cannot be deleted before its expiration epoch, ensuring a minimum retention period for duplicate detection. After expiration, administrators or users can delete records to free storage, though deletion is optional. Working with payment registries[​](https://docs.sui.io/standards/payment-kit#working-with-payment-registries "Direct link to Working with payment registries") --------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Creating a registry[​](https://docs.sui.io/standards/payment-kit#creating-a-registry "Direct link to Creating a registry") To create a new payment registry, you need to provide a `name` which is simply an ASCII-based string that is used to derive an address for the registry. In addition to a `name`, the package `Namespace` object must also be provided. `Namespace` provides a higher-order organizational structure for managing multiple payment registries. module sui::payment_kit;public fun create_registry( namespace: &mut Namespace, name: String, ctx: &mut TxContext) This function creates a `PaymentRegistry` and a `RegistryAdminCap` for administrative control. The `RegistryAdminCap` is initially owned by the creator and can be shared or transferred as needed. #### Namespace objects[​](https://docs.sui.io/standards/payment-kit#namespace-objects "Direct link to Namespace objects") mainnet: 0xccd3e4c7802921991cd9ce488c4ca0b51334ba75483702744242284ccf3ae7c2 testnet: 0xa5016862fdccba7cc576b56cc5a391eda6775200aaa03a6b3c97d512312878db ### Processing registry payments[​](https://docs.sui.io/standards/payment-kit#processing-registry-payments "Direct link to Processing registry payments") Process payments through a registry with duplicate prevention: module sui::payment_kit;public fun process_registry_payment( registry: &mut PaymentRegistry, nonce: String, payment_amount: u64, coin: Coin, receiver: Option
, clock: &Clock, ctx: &mut TxContext) **Parameters:** * `registry`: Mutable reference to the payment registry. * `nonce`: Unique payment identifier (prevents duplicates). * `payment_amount`: Expected payment amount in coin units. * `coin`: Payment coin object. * `receiver`: Optional receiver address (if `None`, funds stay in registry). * `clock`: Sui clock object for timestamping. * `ctx`: Transaction context. The function: 1. Verifies the payment amount matches the coin value 2. Checks for duplicate payments using the composite key 3. Records the payment in the registry 4. Transfers funds to `receiver` or the registry (based on configuration) 5. Generates and returns a `PaymentReceipt` 6. Emits a payment event **Error conditions:** * `EDuplicatePayment`: Payment with same composite key already exists. * `EPaymentAmountMismatch`: Coin value doesn't match expected amount. ### Managing payment records[​](https://docs.sui.io/standards/payment-kit#managing-payment-records "Direct link to Managing payment records") Delete an expired `PaymentRecord` to free up storage: module sui::payment_kit;public fun delete_payment_record( registry: &mut PaymentRegistry, payment_key: PaymentKey, ctx: &mut TxContext) Records can only be deleted after they expire based on the registry's configured expiration duration. Create a `PaymentKey` using the `create_payment_key` function with the original payment parameters. ### Configuring registries[​](https://docs.sui.io/standards/payment-kit#configuring-registries "Direct link to Configuring registries") Registry administrators can update configuration settings using the `RegistryAdminCap`: **Set expiration duration:** module sui::payment_kit;public fun set_config_epoch_expiration_duration( registry: &mut PaymentRegistry, cap: &RegistryAdminCap, epoch_expiration_duration: u64, ctx: &mut TxContext) **Set `PaymentRegistry` to receive funds:** module sui::payment_kit;public fun set_config_registry_managed_funds( registry: &mut PaymentRegistry, cap: &RegistryAdminCap, registry_managed_funds: bool, ctx: &mut TxContext) When `registry_managed_funds` is `true`, payments accumulate in the registry for later withdrawal. When `false`, payments transfer immediately to receivers. ### Withdrawing from a registry[​](https://docs.sui.io/standards/payment-kit#withdrawing-from-a-registry "Direct link to Withdrawing from a registry") If a `PaymentRegistry` is set to manage funds, an administrator can withdraw accumulated funds: module sui::payment_kit;public fun withdraw_from_registry( registry: &mut PaymentRegistry, cap: &RegistryAdminCap, ctx: &mut TxContext) This function requires the `RegistryAdminCap` and returns all accumulated coins of type `T` from the registry. Only use this when the registry is configured to retain funds (controlled by the `registry_managed_funds` configuration setting). Processing ephemeral payments[​](https://docs.sui.io/standards/payment-kit#processing-ephemeral-payments "Direct link to Processing ephemeral payments") --------------------------------------------------------------------------------------------------------------------------------------------------------- For scenarios that don't require duplicate prevention or persistent records, use ephemeral payments: module sui::payment_kit;public fun process_ephemeral_payment( nonce: String, payment_amount: u64, coin: Coin, receiver: address, clock: &Clock, ctx: &mut TxContext) Ephemeral payments: * Do not check for duplicates * Do not store payment records on-chain * Transfer funds immediately to the receiver * Generate receipts for the transaction * Emit payment events for off-chain tracking * Have lower gas costs than registry payments This mode is ideal for: * Duplicate prevention is not required * Applications with external payment tracking systems Transaction URIs[​](https://docs.sui.io/standards/payment-kit#transaction-uris "Direct link to transaction-uris") ------------------------------------------------------------------------------------------------------------------ The Payment Kit defines a standard URI format for encoding payment requests. Transaction URIs allow applications to generate payment links that wallets and other clients can parse and execute. ### URI format[​](https://docs.sui.io/standards/payment-kit#uri-format "Direct link to URI format") Payment Kit Transaction URIs use the following format: sui:pay?receiver= &amount= &coinType= &nonce= &label=