sui_jsonrpc/lib.rs
1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3#![cfg_attr(all(doc, not(doctest)), feature(doc_cfg))]
4
5//! A fork of Mysten's `sui-json-rpc-api` and `sui-json-rpc-types` with minimal dependencies for client applications.
6
7#[cfg(feature = "client-api")]
8pub mod api;
9#[cfg(feature = "client")]
10pub mod client;
11#[cfg(feature = "client-api")]
12pub mod error;
13pub mod msgs;
14pub mod serde;
15
16pub const RPC_QUERY_MAX_RESULT_LIMIT: &str = "RPC_QUERY_MAX_RESULT_LIMIT";
17pub const DEFAULT_RPC_QUERY_MAX_RESULT_LIMIT: usize = 50;
18pub const QUERY_MAX_RESULT_LIMIT_CHECKPOINTS: usize = 100;
19pub const CLIENT_REQUEST_METHOD_HEADER: &str = "client-request-method";
20pub const CLIENT_SDK_TYPE_HEADER: &str = "client-sdk-type";
21/// The version number of the SDK itself. This can be different from the API version.
22pub const CLIENT_SDK_VERSION_HEADER: &str = "client-sdk-version";
23/// The RPC API version that the client is targeting. Different SDK versions may target the same
24/// API version.
25pub const CLIENT_TARGET_API_VERSION_HEADER: &str = "client-target-api-version";
26pub const TRANSIENT_ERROR_CODE: i32 = -32050;
27pub const TRANSACTION_EXECUTION_CLIENT_ERROR_CODE: i32 = -32002;