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
npm i -D @mysten/sui.jsNetwork 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/gas (default) |
| Devnet | https://fullnode.devnet.sui.io:443 | https://faucet.devnet.sui.io/gas |
| Testnet | https://fullnode.testnet.sui.io:443 | https://faucet.testnet.sui.io/gas |
| Mainnet | https://fullnode.mainnet.sui.io:443 | null |
Architecture
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.js/client- A client for interacting with Sui RPC nodes.@mysten/sui.js/bcs- A BCS builder with pre-defined types for Sui. nodes.@mysten/sui.js/transaction- Utilities for building and interacting with transactions.@mysten/sui.js/keypairs/*- Modular exports for specific KeyPair implementations.@mysten/sui.js/verify- Methods for verifying transactions and messages.@mysten/sui.js/cryptography- Shared types and classes for cryptography.@mysten/sui.js/multisig- Utilities for working with multisig signatures.@mysten/sui.js/utils- Utilities for formatting and parsing various Sui types.@mysten/sui.js/faucet- Methods for requesting sui from a faucet.