sui_sdk/lib.rs
1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Client-side utilities for interacting with a Sui network from Rust.
5//!
6//! The JSON-RPC client this crate used to provide was removed together with
7//! the fullnode JSON-RPC service. What remains is the wallet and configuration
8//! layer shared by the Sui CLI and the tooling in this repository:
9//!
10//! * [`wallet_context::WalletContext`] - the keystore-backed wallet used to
11//! sign and execute transactions against a network over gRPC.
12//! * [`sui_client_config::SuiClientConfig`] - the persisted client
13//! configuration (`client.yaml`) and its named network environments.
14//! * [`verify_personal_message_signature`] - verification of personal message
15//! signatures through a fullnode.
16//!
17//! For a general-purpose Rust SDK, use the
18//! [`sui-rust-sdk`](https://github.com/MystenLabs/sui-rust-sdk) crate.
19
20pub use sui_crypto;
21pub use sui_rpc;
22pub use sui_sdk_types;
23pub use sui_types as types;
24
25pub mod digests;
26pub mod error;
27pub mod sui_client_config;
28pub mod verify_personal_message_signature;
29pub mod wallet_context;
30
31pub const SUI_COIN_TYPE: &str = "0x2::sui::SUI";
32pub const SUI_LOCAL_NETWORK_URL: &str = "http://127.0.0.1:9000";
33pub const SUI_LOCAL_NETWORK_URL_0: &str = "http://0.0.0.0:9000";
34pub const SUI_LOCAL_NETWORK_GAS_URL: &str = "http://127.0.0.1:5003/v2/gas";
35pub const SUI_DEVNET_URL: &str = "https://fullnode.devnet.sui.io:443";
36pub const SUI_TESTNET_URL: &str = "https://fullnode.testnet.sui.io:443";
37pub const SUI_MAINNET_URL: &str = "https://fullnode.mainnet.sui.io:443";