Sui TypeScript SDK Quick Start
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.
Installation
Network locations
The following table lists the locations for Sui networks.
Network | Full node | faucet |
---|---|---|
local | http://127.0.0.1:9000 (default) | http://127.0.0.1:9123/v2/gas (default) |
Devnet | https://fullnode.devnet.sui.io:443 | https://faucet.devnet.sui.io/v2/gas |
Testnet | https://fullnode.testnet.sui.io:443 | https://faucet.testnet.sui.io/v2/gas |
Mainnet | https://fullnode.mainnet.sui.io:443 | null |
Use dedicated nodes/shared services rather than public endpoints for production apps. The public
endpoints maintained by Mysten Labs (fullnode.<NETWORK>.sui.io:443
) are rate-limited, and support
only 100 requests per 30 seconds or so. 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 using the Node Service tab.
Module packages
The SDK contains a set of modular packages that you can use independently or together. Import just what you need to keep your code light and compact.
@mysten/sui/client
- A client for interacting with Sui RPC nodes.@mysten/sui/bcs
- A BCS builder with pre-defined types for Sui.@mysten/sui/transactions
- Utilities for building and interacting with transactions.@mysten/sui/keypairs/*
- Modular exports for specific KeyPair implementations.@mysten/sui/verify
- Methods for verifying transactions and messages.@mysten/sui/cryptography
- Shared types and classes for cryptography.@mysten/sui/multisig
- Utilities for working with multisig signatures.@mysten/sui/utils
- Utilities for formatting and parsing various Sui types.@mysten/sui/faucet
- Methods for requesting SUI from a faucet.@mysten/sui/zklogin
- Utilities for working with zkLogin.